diff --git a/.beads/beads.jsonl b/.beads/beads.jsonl index 55a57ad2..2bd9618b 100644 --- a/.beads/beads.jsonl +++ b/.beads/beads.jsonl @@ -567,6 +567,7 @@ {"id":"bd-ng56","content_hash":"f570cf399d412baa9b9209bae41140668269513e2d2127c47ddee70fa173d79d","title":"bd-hv01: Three full JSONL reads on every sync (performance)","description":"Problem: computeAcceptedDeletions reads three JSONL files completely into memory (base, left, merged). For 1000 issues at 1KB each, this is 3MB read and 3000 JSON parse operations.\n\nImpact: Acceptable now (~20-35ms overhead) but will be slow for large repos (10k+ issues).\n\nPossible optimizations: single-pass streaming, memory-mapped files, binary format, incremental snapshots.\n\nFiles: cmd/bd/deletion_tracking.go:101-208","status":"closed","priority":3,"issue_type":"task","created_at":"2025-11-06T18:16:25.653076-08:00","updated_at":"2025-11-06T20:06:49.220818-08:00","closed_at":"2025-11-06T19:41:04.67733-08:00","source_repo":".","dependencies":[{"issue_id":"bd-ng56","depends_on_id":"bd-rbxi","type":"parent-child","created_at":"2025-11-06T18:19:15.148149-08:00","created_by":"daemon"}]} {"id":"bd-nl8z","content_hash":"a573c9fe29cd810420b602fc5d2c105ace29a409f2294fd251baf515bef0b85e","title":"Documentation","description":"Complete documentation for Agent Mail integration to enable adoption.","status":"closed","priority":1,"issue_type":"epic","created_at":"2025-11-07T22:42:37.969636-08:00","updated_at":"2025-11-08T03:09:48.253476-08:00","closed_at":"2025-11-08T02:34:57.887891-08:00","source_repo":".","dependencies":[{"issue_id":"bd-nl8z","depends_on_id":"bd-wfmw","type":"blocks","created_at":"2025-11-07T22:42:37.970621-08:00","created_by":"daemon"}]} {"id":"bd-nq41","content_hash":"33f9cfe6a0ef5200dcd5016317b43b1568ff9dc7303537d956bdab02029f6c63","title":"Fix Homebrew warning about Ruby file location","description":"Homebrew warning: Found Ruby file outside steveyegge/beads tap formula directory.\nWarning points to: /opt/homebrew/Library/Taps/steveyegge/homebrew-beads/bd.rb\nIt should likely be inside a Formula/ directory or similar structure expected by Homebrew taps.\n","status":"open","priority":2,"issue_type":"chore","created_at":"2025-11-20T18:56:21.226579-05:00","updated_at":"2025-11-20T18:56:21.226579-05:00","source_repo":"."} +<<<<<<< HEAD {"id":"bd-nqes","content_hash":"0063981ff72ee9d99ef59e43bf43369b4c8fc0e73479ce1e8bd9e91603b850a3","title":"bd-hv01: Non-atomic snapshot operations can cause data loss","description":"## Problem\nIn sync.go:146-155 and daemon_sync.go:502-505, snapshot capture failures are logged as warnings but sync continues:\n\n```go\nif err := exportToJSONL(ctx, jsonlPath); err != nil { ... }\nif err := captureLeftSnapshot(jsonlPath); err != nil {\n fmt.Fprintf(os.Stderr, \"Warning: failed to capture snapshot...\")\n}\n```\n\nIf export succeeds but snapshot capture fails, the merge uses stale snapshot data, potentially deleting wrong issues.\n\n## Impact\n- Critical data integrity issue\n- Could delete issues incorrectly during multi-workspace sync\n\n## Fix\nMake snapshot capture mandatory:\n```go\nif err := captureLeftSnapshot(jsonlPath); err != nil {\n return fmt.Errorf(\"failed to capture snapshot (required for deletion tracking): %w\", err)\n}\n```\n\n## Files Affected\n- cmd/bd/sync.go:146-155\n- cmd/bd/daemon_sync.go:502-505","status":"closed","priority":1,"issue_type":"bug","created_at":"2025-11-06T18:15:33.574158-08:00","updated_at":"2025-11-06T18:46:55.874814-08:00","closed_at":"2025-11-06T18:46:55.874814-08:00","source_repo":".","dependencies":[{"issue_id":"bd-nqes","depends_on_id":"bd-rbxi","type":"parent-child","created_at":"2025-11-06T18:19:14.749153-08:00","created_by":"daemon"}]} {"id":"bd-nszi","content_hash":"7eb77a2db8edb51267c42176883ad97f11a83103720647c92a8de26e79e6ab3e","title":"Post-merge hook silently fails on JSONL conflicts, poor UX","description":"When git pull results in merge conflicts in .beads/issues.jsonl, the post-merge hook runs 'bd sync --import-only' which fails, but stderr was redirected to /dev/null. User only saw generic warning.\n\nFixed by capturing and displaying the actual error output, so users see 'Git conflict markers detected' message immediately.","status":"closed","priority":1,"issue_type":"bug","created_at":"2025-11-08T02:31:04.909925-08:00","updated_at":"2025-11-08T02:31:45.237286-08:00","closed_at":"2025-11-08T02:31:45.237286-08:00","source_repo":"."} {"id":"bd-nxgk","content_hash":"b1124b39715075cd321a6996f662adf9af49871524a97890703819caf87f7da1","title":"Agent upgrade awareness system","description":"Make it easy for AI agents to discover and adapt to bd upgrades without manual intervention.\n\n## Problem\nWhen bd is upgraded (happens weekly), agents need to:\n1. Discover what changed\n2. Update their workflows/instructions\n3. Keep git hooks in sync\n4. Know which new features to adopt\n\nCurrently this requires manual prompting or re-running bd onboard, which is unreliable.\n\n## Solution Layers\n1. Documentation improvements (immediate)\n2. Startup hook snippet for detection (immediate, zero bd code)\n3. Built-in version tracking in bd (short-term)\n4. Separated canonical BD_GUIDE.md (long-term architectural)\n\n## Success Criteria\n- Agents automatically detect bd upgrades at session start\n- Agents see what changed without re-reading all docs\n- Git hooks stay in sync with bd version\n- bd-specific instructions separated from project instructions\n\n## Related Discussion\nGitHub Discussion #239: 'Upgrading beads: how to let the Agent know'\n","status":"closed","priority":2,"issue_type":"epic","created_at":"2025-11-23T16:21:14.431233-08:00","updated_at":"2025-11-23T21:16:26.811616-08:00","closed_at":"2025-11-23T21:16:26.811616-08:00","source_repo":"."} @@ -576,6 +577,9 @@ {"id":"bd-obdc","content_hash":"fe7ac547d667b6e7dd713f1120fc2dbea3afa77a59a481358ca484f15cb47c36","title":"Add 'bd doctor --rebuild-cache' command for cache recovery","description":"Add admin command to manually rebuild the blocked_issues_cache table for recovery scenarios.\n\n## Use cases\n\n1. **Cache corruption recovery**\n - If cache gets out of sync with actual dependencies\n - Manual rebuild as safety measure\n\n2. **Post-migration verification**\n - After database migrations that affect dependencies\n - Verify cache is correctly populated\n\n3. **Debugging**\n - Compare cache state with actual blocking calculations\n - Troubleshoot performance issues\n\n## Implementation\n\nAdd flag to bd doctor command:\n\n```bash\nbd doctor --rebuild-cache\n```\n\nShould:\n- Call `SQLiteStorage.invalidateBlockedCache()` directly\n- Print before/after cache statistics\n- Show timing information\n- Exit code 0 on success\n\nExample output:\n```\nRebuilding blocked_issues_cache...\nBefore: 15 blocked issues\nAfter: 15 blocked issues\nRebuilt in 12ms\n✓ Cache rebuild complete\n```\n\n## Files to modify\n\n- cmd/bd/doctor.go - add --rebuild-cache flag\n- internal/storage/sqlite/blocked_cache.go - maybe add public RebuildBlockedCache() method\n\n## Related\n\n- [deleted:[deleted:bd-5qim]]: GetReadyWork performance optimization\n- bd-13gm: Add cache validation tests","status":"open","priority":3,"issue_type":"feature","created_at":"2025-11-23T20:07:07.331501-08:00","updated_at":"2025-11-23T21:31:18.600059-08:00","source_repo":".","dependencies":[{"issue_id":"bd-obdc","depends_on_id":"bd-5qim","type":"discovered-from","created_at":"2025-11-23T20:07:40.642297-08:00","created_by":"daemon"}]} {"id":"bd-obxt","content_hash":"7e57a01427663290ada787e0f45cf0df28208ed6cda632e9caf2bdb7e9bb077a","title":"Fix bd doctor to recommend issues.jsonl as canonical (not beads.jsonl)","description":"","status":"closed","priority":1,"issue_type":"bug","created_at":"2025-11-21T23:27:02.008716-08:00","updated_at":"2025-11-21T23:44:06.081448-08:00","closed_at":"2025-11-21T23:44:06.081448-08:00","source_repo":"."} {"id":"bd-oif6","content_hash":"5732dcbfd354e39ae9249cbae70f08ec1ccf026a812129519dfda5a8588e5ad1","title":"Vendor beads-merge Go code into internal/merge/","description":"Copy beads-merge source code from @neongreen's repo into bd codebase.\n\n**Tasks**:\n- Create `internal/merge/` package\n- Copy merge algorithm code\n- Add attribution header to all files\n- Update imports to use bd's internal types\n- Add LICENSE/ATTRIBUTION file crediting @neongreen\n- Keep original algorithm intact\n\n**Source**: https://github.com/neongreen/mono/tree/main/beads-merge","status":"closed","priority":1,"issue_type":"task","created_at":"2025-11-05T18:42:20.405283-08:00","updated_at":"2025-11-05T18:52:53.71713-08:00","closed_at":"2025-11-05T18:52:53.71713-08:00","source_repo":".","dependencies":[{"issue_id":"bd-oif6","depends_on_id":"bd-qqvw","type":"parent-child","created_at":"2025-11-05T18:42:28.69196-08:00","created_by":"daemon"}]} +======= +{"id":"bd-obdc","content_hash":"fe7ac547d667b6e7dd713f1120fc2dbea3afa77a59a481358ca484f15cb47c36","title":"Add 'bd doctor --rebuild-cache' command for cache recovery","description":"Add admin command to manually rebuild the blocked_issues_cache table for recovery scenarios.\n\n## Use cases\n\n1. **Cache corruption recovery**\n - If cache gets out of sync with actual dependencies\n - Manual rebuild as safety measure\n\n2. **Post-migration verification**\n - After database migrations that affect dependencies\n - Verify cache is correctly populated\n\n3. **Debugging**\n - Compare cache state with actual blocking calculations\n - Troubleshoot performance issues\n\n## Implementation\n\nAdd flag to bd doctor command:\n\n```bash\nbd doctor --rebuild-cache\n```\n\nShould:\n- Call `SQLiteStorage.invalidateBlockedCache()` directly\n- Print before/after cache statistics\n- Show timing information\n- Exit code 0 on success\n\nExample output:\n```\nRebuilding blocked_issues_cache...\nBefore: 15 blocked issues\nAfter: 15 blocked issues\nRebuilt in 12ms\n✓ Cache rebuild complete\n```\n\n## Files to modify\n\n- cmd/bd/doctor.go - add --rebuild-cache flag\n- internal/storage/sqlite/blocked_cache.go - maybe add public RebuildBlockedCache() method\n\n## Related\n\n- [deleted:[deleted:bd-5qim]]: GetReadyWork performance optimization\n- bd-13gm: Add cache validation tests","status":"closed","priority":3,"issue_type":"feature","created_at":"2025-11-23T20:07:07.331501-08:00","updated_at":"2025-11-23T21:35:08.042436-08:00","closed_at":"2025-11-23T21:35:08.042436-08:00","source_repo":"."} +>>>>>>> 25c241f (bd sync: 2025-11-23 21:37:19) {"id":"bd-ola6","content_hash":"79461888e8a7875bf3623b8db44ea004f73a2374daa52ae9cb3fc9d3ce5e6a8b","title":"Implement transaction retry logic for SQLITE_BUSY","description":"BEGIN IMMEDIATE fails immediately on SQLITE_BUSY instead of retrying with exponential backoff.\n\nLocation: internal/storage/sqlite/sqlite.go:223-225\n\nProblem:\n- Under concurrent write load, BEGIN IMMEDIATE can fail with SQLITE_BUSY\n- Current implementation fails immediately instead of retrying\n- Results in spurious failures under normal concurrent usage\n\nSolution: Implement exponential backoff retry:\n- Retry up to N times (e.g., 5)\n- Backoff: 10ms, 20ms, 40ms, 80ms, 160ms\n- Check for context cancellation between retries\n- Only retry on SQLITE_BUSY/database locked errors\n\nImpact: Spurious failures under concurrent write load\n\nEffort: 3 hours","status":"open","priority":1,"issue_type":"feature","created_at":"2025-11-16T14:51:31.247147-08:00","updated_at":"2025-11-16T14:51:31.247147-08:00","source_repo":"."} {"id":"bd-omx1","content_hash":"e61d74adb03fc8275c97242df8ce0e4146db7e49271e4e86c3379b4a3fbab0d8","title":"Add `bd merge` command wrapping 3-way merge logic","description":"Implement CLI command to invoke beads-merge functionality.\n\n**Interface**:\n```bash\nbd merge \u003coutput\u003e \u003cbase\u003e \u003cleft\u003e \u003cright\u003e\nbd merge --debug \u003coutput\u003e \u003cbase\u003e \u003cleft\u003e \u003cright\u003e\n```\n\n**Behavior**:\n- Exit code 0 on clean merge\n- Exit code 1 if conflicts (write conflict markers)\n- Support --debug flag for verbose output\n- Match beads-merge's existing behavior\n\n**File**: `cmd/bd/merge.go`","status":"closed","priority":1,"issue_type":"task","created_at":"2025-11-05T18:42:20.427429-08:00","updated_at":"2025-11-05T19:01:29.071365-08:00","closed_at":"2025-11-05T19:01:29.071365-08:00","source_repo":".","dependencies":[{"issue_id":"bd-omx1","depends_on_id":"bd-qqvw","type":"parent-child","created_at":"2025-11-05T18:42:28.709123-08:00","created_by":"daemon"},{"issue_id":"bd-omx1","depends_on_id":"bd-oif6","type":"blocks","created_at":"2025-11-05T18:42:35.436444-08:00","created_by":"daemon"}]} {"id":"bd-p0zr","content_hash":"5e518ce89ce35cb4b5b534b8c1287679b7984bc73f7c6747773962277d2ad1bc","title":"bd message: Improve type safety with typed parameter structs","description":"","status":"closed","priority":2,"issue_type":"task","created_at":"2025-11-08T12:54:29.675678-08:00","updated_at":"2025-11-08T12:58:59.559643-08:00","closed_at":"2025-11-08T12:58:59.559643-08:00","source_repo":".","dependencies":[{"issue_id":"bd-p0zr","depends_on_id":"bd-6uix","type":"parent-child","created_at":"2025-11-08T12:55:55.058354-08:00","created_by":"daemon"}]}