feat(importer): add ConvertedToTombstone counter (bd-wucl)

Track legacy deletions.jsonl entries converted to tombstones during import:
- Add Result.ConvertedToTombstone counter
- Add Result.ConvertedTombstoneIDs for the converted IDs
- Update test to verify the new counter

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Steve Yegge
2025-12-07 21:18:17 +11:00
parent 32f646a303
commit 711dd9ccd4
3 changed files with 18 additions and 8 deletions

View File

@@ -1335,6 +1335,13 @@ func TestImportIssues_LegacyDeletionsConvertedToTombstones(t *testing.T) {
if result.SkippedDeleted != 1 {
t.Errorf("Expected 1 skipped deleted (issue in deletions.jsonl), got %d", result.SkippedDeleted)
}
// Verify ConvertedToTombstone counter (bd-wucl)
if result.ConvertedToTombstone != 1 {
t.Errorf("Expected 1 converted to tombstone, got %d", result.ConvertedToTombstone)
}
if len(result.ConvertedTombstoneIDs) != 1 || result.ConvertedTombstoneIDs[0] != "test-abc" {
t.Errorf("Expected ConvertedTombstoneIDs [test-abc], got %v", result.ConvertedTombstoneIDs)
}
// Verify regular issue was imported
issues, err := store.SearchIssues(ctx, "", types.IssueFilter{})