fix: doctor check skips interactions.jsonl and molecules.jsonl (GH#709) (#739)

The fix for GH#709 updated FindJSONLInDir to skip interactions.jsonl,
but the doctor check in CheckLegacyJSONLFilename was not updated.
This caused `bd doctor` to warn about multiple JSONL files when
both issues.jsonl and interactions.jsonl exist (which is normal
after `bd init`).

Also skip molecules.jsonl which is another system file that shouldn't
be counted as a duplicate issue database.
This commit is contained in:
Dirceu Pereira Tiegs
2025-12-26 02:52:43 +07:00
committed by GitHub
parent acb4aeee55
commit 939ade731f
2 changed files with 20 additions and 0 deletions

View File

@@ -154,6 +154,8 @@ func CheckLegacyJSONLFilename(repoPath string) DoctorCheck {
strings.Contains(lowerName, "~") ||
strings.HasPrefix(lowerName, "backup_") ||
name == "deletions.jsonl" ||
name == "interactions.jsonl" ||
name == "molecules.jsonl" ||
// Git merge conflict artifacts (e.g., issues.base.jsonl, issues.left.jsonl)
strings.Contains(lowerName, ".base.jsonl") ||
strings.Contains(lowerName, ".left.jsonl") ||

View File

@@ -278,6 +278,24 @@ func TestCheckLegacyJSONLFilename(t *testing.T) {
expectedStatus: "ok",
expectWarning: false,
},
{
name: "interactions.jsonl ignored as system file (GH#709)",
files: []string{"issues.jsonl", "interactions.jsonl"},
expectedStatus: "ok",
expectWarning: false,
},
{
name: "molecules.jsonl ignored as system file",
files: []string{"issues.jsonl", "molecules.jsonl"},
expectedStatus: "ok",
expectWarning: false,
},
{
name: "all system files ignored together",
files: []string{"issues.jsonl", "deletions.jsonl", "interactions.jsonl", "molecules.jsonl"},
expectedStatus: "ok",
expectWarning: false,
},
}
for _, tt := range tests {