- Created migrations/ subdirectory with 14 individual migration files
- Reduced migrations.go from 680 to 98 lines (orchestration only)
- Updated test imports to use migrations package
- Updated MULTI_REPO_HYDRATION.md documentation
- All tests passing
- Created internal/util/strings.go with NormalizeLabels function
- Added comprehensive tests in internal/util/strings_test.go
- Updated internal/rpc/server_issues_epics.go to use util.NormalizeLabels
- Updated cmd/bd/list.go and cmd/bd/ready.go to use util.NormalizeLabels
- Updated cmd/bd/list_test.go to use util.NormalizeLabels
- Removed duplicate implementations
- All tests pass
Fixes bd-fb95094c.6
Amp-Thread-ID: https://ampcode.com/threads/T-edb3c286-cd60-4231-94cd-edaf75d84a3d
Co-authored-by: Amp <amp@ampcode.com>
- Call getMultiRepoJSONLPaths() once at sync start instead of 3 times
- Eliminates redundant config lookups and path constructions
- Performance optimization for multi-repo workflows
Optimization to avoid JSON unmarshalling when strings match exactly (common case).
Simple 1-line change instead of complex streaming rewrite for P3 issue.
- Add snapshotMetadata struct with version, timestamp, commit SHA
- Validate snapshots are <1 hour old, from compatible version
- Auto-cleanup stale snapshots from interrupted syncs
- All snapshot functions now write/validate metadata files
- Fixes issue where crash/kill -9 left stale snapshots
Removed old global daemon infrastructure that was replaced by per-workspace
daemon architecture. Package had no imports and all functions were unreachable.
Closes bd-irq6
- Added getMultiRepoJSONLPaths() helper to enumerate all JSONL files
- Updated daemon_sync.go to capture/update snapshots for each repo
- Added TestMultiRepoDeletionTracking to verify fix
- Added TestMultiRepoSnapshotIsolation for isolation guarantees
Previously, deletion tracking only worked for single-repo mode because
snapshot operations were hardcoded to the primary JSONL path. This fix
ensures snapshots are managed per-repository in multi-repo mode.
The previous implementation required hash IDs to contain letters a-f,
but SHA256 hashes can be all digits (probability ~2.4%). This caused
TestMigrateHashIDs to fail when the generated hash ID was all numeric.
Updated isHashID to:
- Strip hierarchical suffixes (.1, .1.2) before checking
- Accept any valid hex string (0-9, a-f)
- Distinguish hash IDs by presence of letters a-f
Fixes bd-6ku3
Root cause: Import and export commands tried to open the database directly
while the daemon already held the lock, causing indefinite blocking.
Solution: Both commands now explicitly close the daemon connection before
opening direct database access, avoiding SQLite lock contention.
Changes:
- import.go: Close daemon connection and open direct SQLite connection
- export.go: Close daemon connection before direct access
- Added debug logging to help diagnose similar issues
Tests: Existing TestImport and TestExport tests pass