fix(doctor): add .sync.lock and sync_base.jsonl to gitignore (#980)

* fix(doctor): add .sync.lock and sync_base.jsonl to gitignore

Problem:
- .sync.lock and sync_base.jsonl were missing from GitignoreTemplate
- Files introduced in PR #918 (pull-first sync) appeared as untracked

Solution:
- Add patterns to GitignoreTemplate with explanatory comment
- Add patterns to requiredPatterns for bd doctor validation

Impact:
- Existing users get warning via bd doctor, fix via bd doctor --fix
- New repos get correct gitignore on bd init

Fixes: GH#974

* docs(sync): fix sync_base.jsonl tracking status and add tests

Problem:
- SYNC.md incorrectly documented sync_base.jsonl as "git-tracked"
- No tests validated sync state file gitignore patterns

Solution:
- Update Files Reference table: sync_base.jsonl is "not tracked, per-machine"
- Add TestGitignoreTemplate_ContainsSyncStateFiles
- Add TestRequiredPatterns_ContainsSyncStatePatterns

Relates to: GH#974
This commit is contained in:
Peter Chanthamynavong
2026-01-09 11:04:28 -08:00
committed by GitHub
parent c988c76b08
commit edbfd5dc96
3 changed files with 48 additions and 1 deletions

View File

@@ -174,7 +174,7 @@ For maximum reliability, ensure machine clocks are synchronized via NTP.
| File | Purpose |
|------|---------|
| `.beads/issues.jsonl` | Current state (git-tracked) |
| `.beads/sync_base.jsonl` | Last-synced state (git-tracked) |
| `.beads/sync_base.jsonl` | Last-synced state (not tracked, per-machine) |
| `.beads/.sync.lock` | Concurrency guard (not tracked) |
| `.beads/beads.db` | SQLite database (not tracked) |