Root cause: bd doctor hydrate was re-adding migrated tombstones to the deletions manifest because getCurrentJSONLIDs() included all issues, including tombstones. When compared against git history, tombstones appeared as 'deleted' and were incorrectly added to the manifest as new deletions, corrupting the database on next sync. Fix: Skip tombstone-status issues in getCurrentJSONLIDs() so they don't participate in deletion detection. Tombstones represent already-recorded deletions/migrations and shouldn't be treated as active issues. Changes: - cmd/bd/doctor/fix/deletions.go: Skip tombstones in getCurrentJSONLIDs() - cmd/bd/doctor/fix/deletions_test.go: New tests for tombstone skipping - cmd/bd/migrate_tombstones_test.go: Test that tombstones are valid This fixes the bug where 'bd migrate-tombstones' followed by 'bd sync' would add thousands of deletion records with author 'bd-doctor-hydrate'
33 lines
532 B
Plaintext
33 lines
532 B
Plaintext
# SQLite databases
|
|
*.db
|
|
*.db?*
|
|
*.db-journal
|
|
*.db-wal
|
|
*.db-shm
|
|
|
|
# Daemon runtime files
|
|
daemon.lock
|
|
daemon.log
|
|
daemon.pid
|
|
bd.sock
|
|
|
|
# Local version tracking (prevents upgrade notification spam after git ops)
|
|
.local_version
|
|
|
|
# Legacy database files
|
|
db.sqlite
|
|
bd.db
|
|
|
|
# Merge artifacts (temporary files from 3-way merge)
|
|
beads.base.jsonl
|
|
beads.base.meta.json
|
|
beads.left.jsonl
|
|
beads.left.meta.json
|
|
beads.right.jsonl
|
|
beads.right.meta.json
|
|
|
|
# Keep JSONL exports and config (source of truth for git)
|
|
!issues.jsonl
|
|
!metadata.json
|
|
!config.json
|