Files
beads/internal
v4rgas 73f5acadfa fix: sync ID counters after import to prevent collisions
When importing issues with explicit high IDs (e.g., bd-100), the
issue_counters table wasn't being updated. This caused the next
auto-generated issue to collide with existing IDs (bd-4 instead of bd-101).

Changes:
- Add SyncAllCounters() to scan all issues and update counters atomically
- Add SyncCounterForPrefix() for granular counter synchronization
- Call SyncAllCounters() in import command after creating issues
- Add comprehensive tests for counter sync functionality
- Update TestImportCounterSyncAfterHighID to verify fix

The fix uses a single efficient SQL query to prevent ID collisions
with subsequently auto-generated issues.
2025-10-14 01:19:03 -07:00
..