fix: skip interactions.jsonl in FindJSONLInDir (GH#709)
FindJSONLInDir() was returning interactions.jsonl when issues.jsonl didn't exist. This caused bd sync to write issue data to the wrong file after fresh init. Add interactions.jsonl to the skip list alongside deletions.jsonl and merge artifacts, so the function correctly defaults to issues.jsonl.
This commit is contained in:
@@ -110,6 +110,16 @@ func TestFindJSONLInDir(t *testing.T) {
|
||||
files: []string{"deletions.jsonl"},
|
||||
expected: "issues.jsonl",
|
||||
},
|
||||
{
|
||||
name: "only interactions.jsonl - returns default issues.jsonl",
|
||||
files: []string{"interactions.jsonl"},
|
||||
expected: "issues.jsonl",
|
||||
},
|
||||
{
|
||||
name: "interactions.jsonl with issues.jsonl - prefers issues",
|
||||
files: []string{"interactions.jsonl", "issues.jsonl"},
|
||||
expected: "issues.jsonl",
|
||||
},
|
||||
{
|
||||
name: "only merge artifacts - returns default issues.jsonl",
|
||||
files: []string{"beads.base.jsonl", "beads.left.jsonl", "beads.right.jsonl"},
|
||||
|
||||
Reference in New Issue
Block a user