From 7fe7d4d50af15d2121f8bc9e7c95d26449be83a5 Mon Sep 17 00:00:00 2001 From: Steve Yegge Date: Sun, 2 Nov 2025 22:12:17 -0800 Subject: [PATCH] bd sync: 2025-11-02 22:12:17 --- .beads/beads.jsonl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.beads/beads.jsonl b/.beads/beads.jsonl index 5d272049..e42b9522 100644 --- a/.beads/beads.jsonl +++ b/.beads/beads.jsonl @@ -15,7 +15,7 @@ {"id":"bd-0e1f2b1b","content_hash":"c0b1677fe3f4aa3f395ae4d79bff5362632d5db26477bf571c09f9177b8741ef","title":"Event-driven daemon architecture","description":"Replace 5-second polling sync loop with event-driven architecture that reacts instantly to changes. Eliminates stale data issues while reducing CPU ~60%. Key components: FileWatcher (fsnotify), Debouncer (500ms), RPC mutation events, optional git hooks. Target latency: \u003c500ms (vs 5000ms). See event_driven_daemon.md for full design.","status":"closed","priority":1,"issue_type":"epic","created_at":"2025-10-28T16:20:02.430479-07:00","updated_at":"2025-10-30T17:12:58.221424-07:00","closed_at":"2025-10-28T16:30:26.631191-07:00"} {"id":"bd-0e74","content_hash":"d8ab25b7a6ac1ba0e5012677cac3ac1320d3ca1059df97c979aab8c43ecb579d","title":"Comprehensive testing for separate branch workflow","description":"Comprehensive testing for separate branch workflow including unit tests, integration tests, and performance testing.\n\nTasks:\n- Unit tests for worktree management\n- Unit tests for config parsing\n- Integration tests: create/update/close → beads branch\n- Integration test: merge beads → main\n- Integration test: protected branch scenario\n- Integration test: network failure recovery\n- Integration test: config change handling\n- Manual testing guide\n- Performance testing (worktree overhead)\n\nTest scenarios: fresh setup, issue operations, merge workflow, protected branch, error handling, migration, multiple workspaces, sparse checkout\n\nEstimated effort: 4-5 days","acceptance_criteria":"- All unit tests pass\n- All integration tests pass\n- Manual testing guide works\n- No data loss in any scenario\n- Performance acceptable (\u003c 100ms overhead per commit)","notes":"Completed comprehensive test coverage. Added 4 new integration tests: config change handling, multiple concurrent clones (3-way), performance testing (avg 77ms \u003c 150ms target), and network failure recovery. All tests pass. Coverage includes fresh setup, issue ops, error handling, multiple workspaces, sparse checkout, config changes, network failures, and performance.","status":"closed","priority":1,"issue_type":"task","created_at":"2025-11-02T15:22:35.580741-08:00","updated_at":"2025-11-02T18:44:12.433152-08:00","closed_at":"2025-11-02T18:44:12.433158-08:00","dependencies":[{"issue_id":"bd-0e74","depends_on_id":"bd-a101","type":"parent-child","created_at":"2025-11-02T15:22:51.348226-08:00","created_by":"stevey"}]} {"id":"bd-1022","content_hash":"0b712a337844711597d2dd950d27d4c032a3b746a27f44326d62db740f5944e9","title":"Use external_ref as primary matching key for import updates","description":"Enable re-syncing from external systems (Jira, GitHub, Linear) by using external_ref as the primary matching key during imports. Currently imports treat any content change as a collision, making it impossible to sync updates from external systems without creating duplicates.\n\nSee GH #142 for detailed proposal and implementation plan.\n\nKey changes needed:\n1. Add findByExternalRef() query function\n2. Update DetectCollisions() to match by external_ref first\n3. Update import_shared.go to update existing issues when external_ref matches\n4. Add index on external_ref for performance\n5. Preserve local issues (no external_ref) from being overwritten\n\nThis enables hybrid workflows: import external backlog, break down with local tasks, re-sync anytime.","notes":"## Code Review Complete ✅\n\n**Overall Assessment**: EXCELLENT - Production ready\n\n### Implementation Quality\n- ✓ Clean architecture with proper interface extension\n- ✓ Dual backend support (SQLite + Memory)\n- ✓ Smart matching priority: external_ref → ID → content hash\n- ✓ O(1) lookups with database index\n- ✓ Timestamp-based conflict resolution\n- ✓ Comprehensive test coverage (11 test cases)\n\n### Follow-up Issues Filed\nHigh Priority (P2):\n- bd-897a: Add UNIQUE constraint on external_ref column\n- bd-7315: Add validation for duplicate external_ref in batch imports\n\nMedium Priority (P3):\n- bd-f9a1: Add index usage verification test\n- bd-3f6a: Add concurrent import race condition tests\n\nLow Priority (P4):\n- bd-e166: Improve timestamp comparison readability\n- bd-9e23: Optimize Memory backend with index\n- bd-537e: Add external_ref change tracking\n- bd-df11: Add import metrics\n- bd-9f4a: Document external_ref in content hash\n\n### Key Features\n✅ External systems (Jira, GitHub, Linear) can re-sync without duplicates\n✅ Hybrid workflows: import external backlog, add local tasks, re-sync anytime\n✅ Local issues protected from being overwritten\n✅ Timestamp checking ensures only newer updates applied\n✅ Performance optimized with database index\n\n**Confidence Level**: 95% - Ship it! 🚀","status":"closed","priority":0,"issue_type":"feature","created_at":"2025-11-02T14:55:56.355813-08:00","updated_at":"2025-11-02T15:52:05.786625-08:00","closed_at":"2025-11-02T15:52:05.78663-08:00"} -{"id":"bd-1048","content_hash":"b895cb69369511d3f71af51a1dc2d393b158578681cb38a28381633263fa6b49","title":"Daemon crashes silently on RPC query after startup","description":"The daemon fails to handle 'show' RPC commands when:\n1) JSONL is newer than database (needs import)\n2) git pull fails due to uncommitted changes\n\nSymptoms:\n- Daemon appears to run (ps shows process)\n- 'bd list' and other commands work fine \n- 'bd show \u003cid\u003e' returns \"failed to read response: EOF\"\n- No panic or error logged in daemon.log\n\nRoot cause likely: auto-import deadlock or state corruption when import is blocked by git conflicts.\n\nWorkaround: \n- Restart daemon after syncing git state (commit/push changes)\n- OR use --no-daemon flag for all commands\n\nThe panic recovery added in server_lifecycle_conn.go:183 didn't catch any panics, confirming this isn't a panic-based crash.","status":"in_progress","priority":0,"issue_type":"bug","created_at":"2025-11-02T17:05:03.658333-08:00","updated_at":"2025-11-02T21:52:49.537357-08:00"} +{"id":"bd-1048","content_hash":"9f877ba70b4cfdc0356abe358b14a876a367d03f63e74f8a259056936566cd0a","title":"Daemon crashes silently on RPC query after startup","description":"The daemon fails to handle 'show' RPC commands when:\n1) JSONL is newer than database (needs import)\n2) git pull fails due to uncommitted changes\n\nSymptoms:\n- Daemon appears to run (ps shows process)\n- 'bd list' and other commands work fine \n- 'bd show \u003cid\u003e' returns \"failed to read response: EOF\"\n- No panic or error logged in daemon.log\n\nRoot cause likely: auto-import deadlock or state corruption when import is blocked by git conflicts.\n\nWorkaround: \n- Restart daemon after syncing git state (commit/push changes)\n- OR use --no-daemon flag for all commands\n\nThe panic recovery added in server_lifecycle_conn.go:183 didn't catch any panics, confirming this isn't a panic-based crash.","notes":"## Investigation findings (2025-11-02)\n\n**Reproduced**: Yes, confirmed returns EOF with daemon but works with .\n\n**Symptoms**:\n- returns \"failed to read response: EOF\" after ~30s timeout\n- \nFound 257 issues:\n\nbd-8507 [P0] [task] open\n Publish bd-wasm to npm\n\nbd-374e [P0] [task] open\n WASM integration testing\n\nbd-cc03 [P0] [task] open\n Build Node.js CLI wrapper for WASM\n\nbd-1c77 [P0] [task] open\n Implement filesystem shims for WASM\n\nbd-c77d [P0] [task] open\n Test SQLite WASM compatibility\n\nbd-197b [P0] [task] open\n Set up WASM build pipeline\n\nbd-44d0 [P0] [epic] open\n WASM port of bd for Claude Code Web sandboxes\n\nbd-8931 [P0] [bug] open\n Daemon gets stuck when auto-import blocked by git conflicts\n\nbd-1048 [P0] [bug] in_progress\n Daemon crashes silently on RPC query after startup\n\nbd-1022 [P0] [feature] closed\n Use external_ref as primary matching key for import updates\n\nbd-1231 [P0] [bug] closed\n CI failing on all 3/4 test jobs despite individual tests passing\n\nbd-4ff2 [P0] [bug] closed\n Fix CI failures before 0.21.3 release\n\nbd-89e2 [P0] [bug] closed\n Daemon race condition: stale export overwrites recent DB changes\n\nbd-2530 [P0] [feature] closed\n Issue with labels\n Labels: [bug critical]\n\nbd-eb3c [P0] [epic] closed\n UX nightmare: multiple ways daemon can fail with misleading messages\n\nbd-373c [P0] [bug] closed\n Daemon crashes silently when multiple .db files exist in .beads/\n\nbd-763c [P0] [bug] closed\n ~/src/beads daemon has 'sql: database is closed' errors - zombie daemon\n\nbd-12c2 [P0] [task] closed\n Add comprehensive tests for show.go commands (show, update, edit, close)\n\nbd-27ea [P0] [task] closed\n Improve cmd/bd test coverage from 21% to 40% (multi-session effort)\n\nbd-70419816 [P0] [bug] closed\n Export deduplication breaks when JSONL and export_hashes table diverge\n\nbd-5dae5504 [P0] [bug] closed\n Export deduplication breaks when JSONL and export_hashes table diverge\n\nbd-325da116 [P0] [epic] closed\n Fix N-way collision convergence\n\nbd-4ba5908b [P0] [task] closed\n Implement content-hash based collision resolution for deterministic convergence\n\nbd-3d844c58 [P0] [task] closed\n Implement content-hash based collision resolution for deterministic convergence\n\nbd-71107098 [P0] [epic] closed\n Make two-clone workflow actually work (no hacks)\n\nbd-0134cc5a [P0] [bug] closed\n Fix auto-import creating duplicates instead of updating issues\n\nbd-09b5f2f5 [P0] [epic] closed\n Daemon fails to auto-import after git pull updates JSONL\n\nbd-36870264 [P0] [bug] closed\n Enforce daemon singleton per workspace with file locking\n\nbd-ad5e [P1] [feature] closed\n Add AI planning docs management guidance to bd onboard (GH-196)\n\nbd-caa9 [P1] [task] open\n Migration tool for existing users\n\nbd-6545 [P1] [task] closed\n Update daemon commit logic for separate branch\n\nbd-5ce8 [P1] [task] closed\n Document protected branch workflow\n\nbd-3396 [P1] [task] closed\n Add merge helper commands (bd sync --merge)\n\nbd-0e74 [P1] [task] closed\n Comprehensive testing for separate branch workflow\n\nbd-a4b5 [P1] [task] closed\n Implement git worktree management\n\nbd-b7d2 [P1] [task] closed\n Add sync.branch configuration\n\nbd-a101 [P1] [epic] in_progress\n Support separate branch for beads commits\n\nbd-0d9c [P1] [bug] closed\n YABB: Spurious issue updates during normal operations\n\nbd-627d [P1] [epic] closed\n AI-supervised database migrations for safer schema evolution\n\nbd-8a39 [P1] [bug] closed\n Fix Windows-specific test failures in CI\n\nbd-3e3b [P1] [feature] closed\n Add circular dependency detection to bd doctor\n\nbd-d9e0 [P1] [task] closed\n Extract validation functions to validators.go\n\nbd-1f28 [P1] [task] closed\n Extract migration functions to migrations.go\n\nbd-90a5 [P1] [task] closed\n Extract hash ID generation functions to hash_ids.go\n\nbd-3b7f [P1] [task] closed\n Add tests for extracted modules\n\nbd-c796 [P1] [task] closed\n Extract batch operations to batch_ops.go\n\nbd-fc2d [P1] [epic] closed\n Refactor sqlite.go (2298 lines)\n\nbd-fd56 [P1] [task] closed\n Wrap git operations in GitClient interface\n\nbd-1445 [P1] [task] closed\n Create shared insert/event/dirty helpers\n\nbd-0702 [P1] [task] closed\n Consolidate ID generation and validation into ids.go\n\nbd-05a1 [P1] [task] closed\n Isolate RPC server startup into rpc_server.go\n\nbd-0458 [P1] [task] closed\n Consolidate export/import/commit/push into sync.go\n\nbd-d33c [P1] [task] closed\n Separate process/lock/PID concerns into process.go\n\nbd-b245 [P1] [task] closed\n Add migration registry and simplify New()\n\nbd-b5a3 [P1] [task] closed\n Extract Daemon struct and config into internal/daemonrunner\n\nbd-1b0a [P1] [task] closed\n Add transaction helper to replace manual COMMIT/ROLLBACK\n\nbd-5f26 [P1] [epic] closed\n Refactor daemon.go into internal/daemonrunner\n\nbd-fb05 [P1] [epic] closed\n Refactor sqlite.go into focused modules\n\nbd-ef85 [P1] [feature] closed\n Add --json flags to all bd commands for agent-friendly output\n\nbd-2b34.8 [P1] [task] closed\n Extract daemon lifecycle functions to daemon_lifecycle.go\n\nbd-2b34.7 [P1] [task] closed\n Add tests for daemon config module\n\nbd-2b34.6 [P1] [task] closed\n Add tests for daemon lifecycle module\n\nbd-2b34.5 [P1] [task] closed\n Add tests for daemon sync module\n\nbd-2b34.4 [P1] [task] closed\n Extract daemon config functions to daemon_config.go\n\nbd-2b34.3 [P1] [task] closed\n Extract daemon sync functions to daemon_sync.go\n\nbd-2b34.2 [P1] [task] closed\n Extract daemon server functions to daemon_server.go\n\nbd-2b34.1 [P1] [task] closed\n Extract daemon logger functions to daemon_logger.go\n\nbd-2b34 [P1] [epic] closed\n Refactor cmd/bd/daemon.go for testability and maintainability\n\nbd-9e8d [P1] [bug] closed\n Test Issue\n\nbd-40a0 [P1] [feature] closed\n bd doctor should check for multiple DBs, multiple JSONLs, daemon health\n\nbd-11e0 [P1] [bug] closed\n Database import silently fails when daemon version != CLI version\n\nbd-07af [P1] [feature] closed\n Need comprehensive daemon health check command (bd daemon doctor?)\n\nbd-6c68 [P1] [bug] closed\n bd info shows 'auto_start_disabled' even when daemon is crashed/missing\n\nbd-e652 [P1] [bug] closed\n bd doctor doesn't detect version mismatches or stale daemons\n\nbd-e55c [P1] [bug] closed\n Import overwrites newer local issues with older remote versions\n\nbd-e1085716 [P1] [task] open\n bd validate - Comprehensive health check\n\nbd-1f4086c5 [P1] [epic] closed\n Event-driven daemon architecture\n\nbd-2752a7a2 [P1] [task] closed\n Create cmd/bd/daemon_watcher.go (~150 LOC)\n\nbd-f8b764c9.1 [P1] [task] closed\n Dogfood: Migrate beads repo to hash IDs\n\nbd-f8b764c9.2 [P1] [task] closed\n Update MCP server for hash IDs\n\nbd-f8b764c9.3 [P1] [task] closed\n Test: N-clone scenario with hash IDs (no collisions)\n\nbd-f8b764c9.4 [P1] [task] closed\n Migration tool: sequential → hash IDs\n\nbd-f8b764c9.5 [P1] [task] closed\n Delete collision resolution code\n\nbd-f8b764c9.6 [P1] [task] closed\n Implement alias conflict resolution\n\nbd-f8b764c9.7 [P1] [task] closed\n CLI accepts both hash IDs and aliases\n\nbd-f8b764c9.8 [P1] [task] closed\n Update JSONL format to use hash IDs\n\nbd-f8b764c9.9 [P1] [task] closed\n Implement hash ID generation in CreateIssue\n\nbd-f8b764c9.10 [P1] [task] closed\n Add alias field to database schema\n\nbd-f8b764c9.11 [P1] [task] closed\n Design hash ID generation algorithm\n\nbd-f8b764c9 [P1] [epic] closed\n Hash-based IDs with aliasing system\n\nbd-98c4e1fa [P1] [epic] closed\n Event-driven daemon architecture\n\nbd-eef03e0a [P1] [task] closed\n Stress test: event storm handling\n\nbd-7c5915ae [P1] [task] closed\n Run final validation and cleanup checks\n\nbd-581b80b3 [P1] [task] open\n bd find-duplicates - AI-powered duplicate detection\n\nbd-a1691807 [P1] [task] closed\n Integration test: mutation to export latency\n\nbd-1f4086c5.1 [P1] [task] closed\n Integration test: mutation to export latency\n\nbd-833559b3 [P1] [task] open\n bd validate - Comprehensive health check\n\nbd-a40f374f [P1] [task] closed\n bd validate - Comprehensive health check\n\nbd-7c831c51 [P1] [task] closed\n Run final validation and cleanup checks\n\nbd-b501fcc1 [P1] [task] closed\n Unit tests for Debouncer\n\nbd-36320a04 [P1] [task] closed\n Add mutation channel to internal/rpc/server.go\n\nbd-83f0bb64 [P1] [task] closed\n Platform tests: Linux, macOS, Windows\n\nbd-69bce74a [P1] [task] closed\n Platform tests: Linux, macOS, Windows\n\nbd-a5a8bec0 [P1] [task] closed\n bd find-duplicates - AI-powered duplicate detection\n\nbd-df190564 [P1] [task] closed\n bd repair-deps - Orphaned dependency cleaner\n\nbd-4e21b5ad [P1] [task] closed\n Add test case for symmetric collision (both clones create same ID simultaneously)\n\nbd-0447029c [P1] [task] closed\n bd find-duplicates - AI-powered duplicate detection\n\nbd-31aab707 [P1] [task] closed\n Unit tests for FileWatcher\n\nbd-e6d71828 [P1] [task] closed\n Add transaction + retry logic for N-way collision resolution\n\nbd-cbed9619.1 [P1] [task] closed\n Fix multi-round convergence for N-way collisions\n\nbd-5f483051 [P1] [task] open\n Implement bd resolve-conflicts (git merge conflicts in JSONL)\n\nbd-7e7ddffa [P1] [epic] closed\n Repair Commands \u0026 AI-Assisted Tooling\n\nbd-cbed9619.2 [P1] [task] closed\n Implement content-first idempotent import\n\nbd-cbed9619.3 [P1] [task] closed\n Implement global N-way collision resolution algorithm\n\nbd-cbed9619.4 [P1] [task] closed\n Make DetectCollisions read-only (separate detection from modification)\n\nbd-cbed9619.5 [P1] [task] closed\n Add content-addressable identity to Issue type\n\nbd-64c05d00.1 [P1] [task] closed\n Fix TestTwoCloneCollision to compare content not timestamps\n\nbd-64c05d00 [P1] [epic] closed\n Multi-clone collision resolution testing and documentation\n\nbd-317ddbbf [P1] [task] closed\n Add BEADS_DAEMON_MODE flag handling\n\nbd-0650a73b [P1] [task] closed\n Create cmd/bd/daemon_debouncer.go (~60 LOC)\n\nbd-0e1f2b1b [P1] [epic] closed\n Event-driven daemon architecture\n\nbd-da4d8951 [P1] [task] closed\n Replace getStorageForRequest with Direct Access\n\nbd-3b2fe268 [P1] [task] open\n Add fsnotify dependency to go.mod\n\nbd-6ada971e [P1] [task] closed\n Create cmd/bd/daemon_event_loop.go (~200 LOC)\n\nbd-96142dec [P1] [task] closed\n Add fallback to polling on watcher failure\n\nbd-7e7ddffa.1 [P1] [task] open\n bd resolve-conflicts - Git merge conflict resolver\n\nbd-9f1fce5d [P1] [task] open\n Add internal/ai package for LLM integration\n\nbd-5314bddf [P1] [task] open\n bd detect-pollution - Test pollution detector\n\nbd-4aeed709 [P1] [task] closed\n bd resolve-conflicts - Git merge conflict resolver\n\nbd-6214875c [P1] [task] closed\n Split internal/rpc/server.go into focused modules\n\nbd-2f388ca7 [P1] [bug] closed\n Fix TestTwoCloneCollision timeout\n\nbd-c947dd1b [P1] [epic] closed\n Remove Daemon Storage Cache\n\nbd-06aec0c3 [P1] [task] closed\n Integration Testing\n\nbd-cb64c226.1 [P1] [task] closed\n Performance Validation\n\nbd-08e556f2 [P1] [task] closed\n Remove Cache Configuration Docs\n\nbd-3e9ddc31 [P1] [task] closed\n Replace getStorageForRequest with Direct Access\n\nbd-bc2c6191 [P1] [task] open\n Audit Current Cache Usage\n\nbd-381d7f6c [P1] [task] closed\n Audit Current Cache Usage\n\nbd-cb64c226.6 [P1] [task] closed\n Verify MCP Server Compatibility\n\nbd-cb64c226.8 [P1] [task] closed\n Update Metrics and Health Endpoints\n\nbd-cb64c226.9 [P1] [task] closed\n Remove Cache-Related Tests\n\nbd-cb64c226.10 [P1] [task] closed\n Delete server_cache_storage.go\n\nbd-cb64c226.12 [P1] [task] closed\n Remove Storage Cache from Server Struct\n\nbd-cb64c226.13 [P1] [task] closed\n Audit Current Cache Usage\n\nbd-fb95094c.1 [P1] [task] closed\n Run final validation and cleanup checks\n Labels: [phase-4 validation]\n\nbd-fb95094c.2 [P1] [task] closed\n Delete skipped tests for \"old buggy behavior\"\n Labels: [cleanup dead-code phase-1 test-cleanup]\n\nbd-3ee2c7e9 [P1] [epic] closed\n Add \"bd daemons\" command for multi-daemon management\n\nbd-e16b [P2] [feature] closed\n Replace BEADS_DB with BEADS_DIR environment variable\n\nbd-28db [P2] [feature] open\n Add 'bd status' command for issue database overview\n\nbd-d3f0 [P2] [feature] open\n Add 'bd comment' as alias for 'bd comments add'\n\nbd-23a8 [P2] [task] closed\n Test simple issue\n\nbd-6049 [P2] [bug] closed\n bd doctor --json flag not working\n\nbd-7bd2 [P2] [task] closed\n Complete remaining sync branch daemon tests\n\nbd-502e [P2] [task] closed\n Add comprehensive tests for sync branch daemon logic\n\nbd-e05d [P2] [task] closed\n Investigate and optimize test suite performance\n\nbd-7315 [P2] [task] closed\n Add validation for duplicate external_ref in batch imports\n\nbd-897a [P2] [task] closed\n Add UNIQUE constraint on external_ref column\n\nbd-d3e5 [P2] [task] closed\n Test issue 2\n\nbd-879d [P2] [task] closed\n Test issue 1\n\nbd-0a90 [P2] [bug] closed\n bd show --json doesn't include dependency type field\n\nbd-63e9 [P2] [bug] closed\n Fix Nix flake build test failures\n\nbd-7fe8 [P2] [chore] closed\n Fix linting error in migrate.go\n\nbd-cdf7 [P2] [task] closed\n Add tests for DetectCycles to improve coverage from 29.6%\n\nbd-c01f [P2] [epic] closed\n Implement bd stale command to find abandoned/forgotten issues\n\nbd-5e1f [P2] [bug] closed\n Issue with desc\n\nbd-b6b2 [P2] [feature] closed\n Feature with design\n\nbd-1ece [P2] [chore] closed\n Remove obsolete renumber.go command (hash IDs eliminated need)\n\nbd-5599 [P2] [bug] closed\n Fix TestListCommand duplicate dependency constraint violation\n\nbd-7eed [P2] [chore] closed\n Remove obsolete stale.go command (executor tables never implemented)\n\nbd-d355a07d [P2] [bug] open\n Import validation falsely reports data loss on collision resolution\n\nbd-98c4e1fa.1 [P2] [task] open\n Update AGENTS.md with event-driven mode\n\nbd-22e0bde9 [P2] [task] closed\n Add TestNWayCollision for 5+ clones\n\nbd-a03d5e36 [P2] [epic] open\n Improve integration test coverage for stateful features\n\nbd-f8b764c9.12 [P2] [task] closed\n Update documentation for hash IDs and aliases\n\nbd-f8b764c9.13 [P2] [task] closed\n Add bd alias command for manual alias control\n\nbd-1863608e [P2] [task] closed\n Add TestNWayCollision for 5+ clones\n\nbd-81abb639 [P2] [task] closed\n Investigate jujutsu VCS as potential solution for conflict-free merging\n\nbd-7a2b58fc [P2] [feature] open\n Implement clone-scoped ID allocation to prevent N-way collisions\n\nbd-5aad5a9c [P2] [task] closed\n Add TestNWayCollision for 5+ clones\n\nbd-9a9530d8 [P2] [task] closed\n Add TestNWayCollision for 5+ clones\n\nbd-3e307cd4 [P2] [task] closed\n File change test issue\n\nbd-a5251b1a [P2] [task] closed\n Test RPC mutation event\n\nbd-5b40a0bf [P2] [task] closed\n Batch test 5\n\nbd-dcd6f14b [P2] [task] closed\n Batch test 4\n\nbd-e8be4224 [P2] [task] closed\n Batch test 3\n\nbd-17fa2d21 [P2] [task] closed\n Batch test 2\n\nbd-f0d9bcf2 [P2] [task] closed\n Batch test 1\n\nbd-7da9437e [P2] [task] closed\n Latency test\n\nbd-8900f145 [P2] [task] closed\n Testing event-driven mode!\n\nbd-3f80d9e0 [P2] [task] open\n Improve internal/daemon test coverage (currently 22.5%)\n\nbd-6221bdcd [P2] [task] open\n Improve cmd/bd test coverage (currently 20.2%)\n\nbd-4d7fca8a [P2] [task] open\n Add tests for internal/utils package\n\nbd-0dcea000 [P2] [task] open\n Add tests for internal/importer package\n\nbd-85487065 [P2] [task] open\n Add tests for internal/autoimport package\n\nbd-9ae788be [P2] [feature] open\n Implement clone-scoped ID allocation to prevent N-way collisions\n\nbd-ef72b864 [P2] [task] closed\n Add MCP server functions for repair commands\n\nbd-7bbc4e6a [P2] [task] open\n Add MCP server functions for repair commands\n\nbd-c9a482db [P2] [task] open\n Add internal/ai package for AI-assisted repairs\n\nbd-b55e2ac2 [P2] [task] open\n Fix autoimport tests for content-hash collision scoring\n\nbd-dd6f6d26 [P2] [task] closed\n Fix autoimport tests for content-hash collision scoring\n\nbd-64c05d00.2 [P2] [task] open\n Document 3-clone ID non-determinism in collision resolution\n\nbd-64c05d00.3 [P2] [task] closed\n Add TestThreeCloneCollision for regression protection\n\nbd-6fe4622f [P2] [task] open\n Remove unreachable utility functions\n\nbd-29c128e8 [P2] [task] closed\n Update AGENTS.md with event-driven mode\n\nbd-89f89fc0 [P2] [task] open\n Remove unreachable RPC methods\n\nbd-c825f867 [P2] [task] open\n Add docs/architecture/event_driven.md\n\nbd-ce37850f [P2] [task] open\n Add embedding generation for duplicate detection\n\nbd-d4ec5a82 [P2] [task] open\n Add MCP functions for repair commands\n\nbd-cf349eb3 [P2] [task] closed\n Update LINTING.md with current baseline\n\nbd-fb95094c [P2] [epic] open\n Code Health \u0026 Technical Debt Cleanup\n Labels: [cleanup epic]\n\nbd-fb95094c.3 [P2] [task] open\n Update documentation after code health cleanup\n Labels: [documentation phase-4]\n\nbd-fb95094c.4 [P2] [task] open\n Audit and consolidate collision test coverage\n Labels: [phase-4 test-cleanup]\n\nbd-fb95094c.5 [P2] [task] open\n Centralize BD_DEBUG logging into debug package\n Labels: [deduplication logging phase-3 refactor]\n\nbd-fb95094c.6 [P2] [task] open\n Extract normalizeLabels to shared utility package\n Labels: [deduplication phase-3 refactor]\n\nbd-fb95094c.7 [P2] [task] open\n Extract SQLite migrations into separate files\n Labels: [database phase-2 refactor]\n\nbd-fb95094c.8 [P2] [task] closed\n Remove unreachable utility functions\n Labels: [cleanup dead-code phase-1]\n\nbd-fb95094c.9 [P2] [task] closed\n Remove unreachable RPC methods\n Labels: [cleanup dead-code phase-1 rpc]\n\nbd-aec5439f [P2] [task] open\n Update LINTING.md with current baseline\n\nbd-bdaf24d5 [P2] [task] closed\n Final validation test\n\nbd-46381404 [P2] [task] closed\n Test database naming\n\nbd-69fbe98e [P2] [task] open\n Implement \"bd daemons logs\" subcommand\n\nbd-e98221b3 [P2] [task] open\n Update AGENTS.md and README.md with \"bd daemons\" documentation\n\nbd-fd8753d9 [P2] [task] open\n Document bd edit command and verify MCP exclusion\n\nbd-248bdc3e [P2] [task] open\n Add optional post-merge git hook example for bd sync\n\nbd-b47c034e [P2] [task] closed\n Address gosec security warnings (102 issues)\n\nbd-a9699011 [P2] [bug] open\n GH#146: No color showing in terminal for some users\n\nbd-4d80b7b1 [P2] [task] open\n Investigate and upgrade to modernc.org/sqlite 1.39.1+\n\nbd-9063acda [P2] [epic] closed\n Clean up linter errors (914 total issues)\n\nbd-ce75 [P3] [task] closed\n Test parent issue\n\nbd-c362 [P3] [chore] open\n Extract database search logic into helper function\n\nbd-efe8 [P3] [chore] open\n Refactor path canonicalization into helper function\n\nbd-736d [P3] [chore] open\n Refactor path canonicalization into helper function\n\nbd-3f6a [P3] [task] closed\n Add concurrent import race condition tests\n\nbd-f9a1 [P3] [task] closed\n Add index usage verification test for external_ref lookups\n\nbd-08fd [P3] [task] closed\n Test child issue\n\nbd-9f20 [P3] [bug] closed\n DetectCycles SQL query has bug preventing cycle detection\n\nbd-2e80 [P3] [chore] closed\n Document shared memory test isolation pattern in test_helpers.go\n\nbd-d68f [P3] [task] closed\n Add tests for Comments API (AddIssueComment, GetIssueComments)\n\nbd-4f582ec8 [P3] [task] closed\n Test auto-start in fred\n\nbd-9826b69a [P3] [feature] closed\n CRDT-based architecture for guaranteed convergence (v2.0)\n\nbd-6d7efe32 [P3] [feature] closed\n CRDT-based architecture for guaranteed convergence (v2.0)\n\nbd-942469b8 [P3] [task] open\n Rapid 5\n\nbd-e1d645e8 [P3] [task] open\n Rapid 4\n\nbd-d7e88238 [P3] [task] open\n Rapid 3\n\nbd-7a00c94e [P3] [task] open\n Rapid 2\n\nbd-6bebe013 [P3] [task] open\n Rapid 1\n\nbd-710a4916 [P3] [feature] open\n CRDT-based architecture for guaranteed convergence (v2.0)\n\nbd-7e0d6660 [P3] [task] closed\n Handle unchecked errors (errcheck - 683 issues)\n\nbd-589c7c1e [P3] [task] closed\n Fix revive style issues (78 issues)\n\nbd-fb95094c.10 [P3] [task] open\n Consider central serialization package for JSON handling\n Labels: [deduplication optional phase-3 refactor serialization]\n\nbd-1c63eb84 [P3] [task] open\n Investigate jujutsu integration for beads\n\nbd-9f4a [P4] [task] open\n Document external_ref in content hash behavior\n\nbd-df11 [P4] [chore] open\n Add import metrics for external_ref matching statistics\n\nbd-537e [P4] [feature] open\n Add external_ref change tracking and auditing\n\nbd-9e23 [P4] [chore] open\n Optimize Memory backend GetIssueByExternalRef with index\n\nbd-e166 [P4] [chore] open\n Improve timestamp comparison readability in import\n\nbd-5b6e [P4] [task] open\n Add tests for helper functions (GetDirtyIssueHash, GetAllDependencyRecords, export hashes), \n📋 Ready work (10 issues with no blockers):\n\n1. [P0] bd-44d0: WASM port of bd for Claude Code Web sandboxes\n2. [P1] bd-caa9: Migration tool for existing users\n3. [P2] bd-d3f0: Add 'bd comment' as alias for 'bd comments add'\n4. [P2] bd-28db: Add 'bd status' command for issue database overview\n5. [P3] bd-736d: Refactor path canonicalization into helper function\n6. [P3] bd-efe8: Refactor path canonicalization into helper function\n7. [P3] bd-c362: Extract database search logic into helper function\n8. [P4] bd-5b6e: Add tests for helper functions (GetDirtyIssueHash, GetAllDependencyRecords, export hashes)\n9. [P4] bd-e166: Improve timestamp comparison readability in import\n10. [P4] bd-9e23: Optimize Memory backend GetIssueByExternalRef with index, \n📊 Beads Statistics:\n\nTotal Issues: 257\nOpen: 69\nIn Progress: 2\nClosed: 186\nBlocked: 9\nReady: 60\nAvg Lead Time: 21.5 hours all work fine with daemon\n- works perfectly\n- Client connects successfully (health check passes) but times out waiting for response\n- No errors in daemon logs, no debug messages reaching logs\n\n**What works**:\n- Health checks (daemon responds)\n- All other RPC operations (list, ready, stats, create, update, close)\n- bd show with --no-daemon flag\n\n**What fails**:\n- ALL commands when using daemon (any issue ID)\n\n**Code investigation**:\n1. Client timeout = 30s (internal/rpc/client.go:56)\n2. Auto-import timeout = 5s (after fix attempt, was 30s)\n3. handleShow calls GetLabels, GetDependencies, GetDependents (unlike list)\n4. Daemon stderr redirected to /dev/null, debug logging not visible\n5. No debug messages in logs means request may not reach handleRequest\n\n**Attempted fixes**:\n- Reduced auto-import timeout from 30s to 5s (didn't help)\n- Manually imported JSONL to sync state (didn't help)\n- Restarted daemon after import (didn't help)\n- Added debug logging (not visible due to stderr → /dev/null)\n\n**Next steps**:\n- Need visible logging (redirect to log file or use daemon logger)\n- Investigate if GetDependencies/GetDependents causing database lock\n- Check if handleConnection even receives show requests\n- Consider async auto-import to avoid blocking\n- Test with completely empty database to rule out data issues","status":"in_progress","priority":0,"issue_type":"bug","created_at":"2025-11-02T17:05:03.658333-08:00","updated_at":"2025-11-02T22:12:06.857797-08:00"} {"id":"bd-11e0","content_hash":"591db3f5674cf7f79b1f50d6b8d83fe60e495f02a21e181c9c63d8da88308d58","title":"Database import silently fails when daemon version != CLI version","description":"","status":"closed","priority":1,"issue_type":"bug","created_at":"2025-10-31T21:08:09.096749-07:00","updated_at":"2025-11-01T19:29:35.267817-07:00","closed_at":"2025-11-01T19:29:35.267817-07:00"} {"id":"bd-1231","content_hash":"c9545032de3b8fb5da54edc4951253d7ac47e5c96677fc412b8c785e56ec8f32","title":"CI failing on all 3/4 test jobs despite individual tests passing","description":"CI has been broken for a day+ with mysterious test failures. Issue #173 on GitHub tracks this.\n\n## Current Status\n- **Lint job**: ✅ PASSING\n- **Test (Linux)**: ❌ FAILING (exit code 1)\n- **Test (Windows)**: ❌ FAILING (exit code 1)\n- **Test Nix Flake**: ❌ FAILING (exit code 1)\n\n## Key Observations\nAll three failing jobs show identical pattern:\n- Individual test output shows PASS for every test\n- Final result: `FAIL github.com/steveyegge/beads/cmd/bd`\n- Exit code 1 despite no visible test failures\n- Last visible test output before failure: \"No Reason Issue\" test (TestCloseCommand/close_without_reason)\n\n## Investigation So Far\n1. All tests appear to pass when examined individually\n2. Likely causes:\n - Race detector finding data races during test cleanup (`-race` flag)\n - Panic/error occurring after main tests complete\n - Test harness issue not reporting actual failure\n - Possible regression from PR #203 (dependency_type changes)\n\n## Recent CI Runs\n- Run 19015040655 (latest): 3/4 failing\n- Multiple recent commits tried to fix Windows/lint issues\n- Agent on rrnewton/beads fork attempting fixes (2/4 passing there)\n\n## Next Steps\n1. Run tests locally with `-race -v` to see full output\n2. Check for unreported test failures or panics\n3. Examine test cleanup/teardown code\n4. Review recent changes around close command tests\n5. Consider if race detector is too sensitive or catching real issues","notes":"## Progress Update\n\n### ✅ Fixed (commits 09bd4d3, 21a29bc)\n1. **Daemon auto-import** - Always recompute content_hash in importer to avoid stale hashes\n2. **TestScripts failures** - Added bd binary to PATH for shell subprocess tests\n3. **Test infrastructure** - Added .gitignore to test repos, fixed last_import_time metadata\n\n### ✅ CI Status (Run 19015638968)\n- **Test (Linux)**: ✅ SUCCESS - All tests passing\n- **Test (Windows)**: ❌ FAILURE - Pre-existing Windows test failures\n- **Test Nix Flake**: ❌ FAILURE - Build fails with same test errors\n- **Lint**: ❌ FAILURE - Pre-existing issue in migrate.go:647\n\n### ❌ Remaining Issues (not related to original bd-1231)\n\n**Windows failures:**\n- TestFindDatabasePathEnvVar\n- TestHashIDs_MultiCloneConverge \n- TestHashIDs_IdenticalContentDedup\n- TestDatabaseReinitialization (5 subtests)\n- TestFindBeadsDir_NotFound\n- TestMetricsSnapshot/uptime\n\n**Lint failure:**\n- cmd/bd/migrate.go:647:37: cleanupWALFiles - result 0 (error) is always nil (unparam)\n\n**Nix failure:**\n- Build fails during test phase with same test errors\n\n### Next Steps\n1. Investigate Windows-specific test failures\n2. Fix linting issue in migrate.go\n3. Debug Nix build test failures","status":"closed","priority":0,"issue_type":"bug","created_at":"2025-11-02T08:42:16.142128-08:00","updated_at":"2025-11-02T11:17:39.073861-08:00","closed_at":"2025-11-02T11:17:39.073861-08:00","external_ref":"https://github.com/steveyegge/beads/issues/173"} {"id":"bd-12c2","content_hash":"caa7a5f6e61a9b1c872f5462e53ed0ecdedc8835265ba6b7c7ef2100fa6448ae","title":"Add comprehensive tests for show.go commands (show, update, edit, close)","description":"Need to add tests for cmd/bd/show.go which contains show, update, edit, and close commands.\n\n**Challenge**: The existing test patterns use rootCmd.SetArgs() and rootCmd.Execute(), but the global `store` variable needs to match what the commands use. Initial attempt created tests that failed with \"no issue found\" because the test's store instance wasn't the same as the command's store.\n\n**Files to test**:\n- show.go (contains showCmd, updateCmd, editCmd, closeCmd)\n\n**Coverage needed**:\n- show command (single issue, multiple issues, JSON output, with dependencies, with labels, with compaction)\n- update command (status, priority, title, assignee, description, multiple fields, multiple issues)\n- edit command (requires $EDITOR, may need mocking)\n- close command (single issue, multiple issues, with reason, JSON output)\n\n**Test approach**:\n1. Study working test patterns in init_test.go, list_test.go, etc.\n2. Ensure BEADS_NO_DAEMON=1 is set\n3. Properly initialize database with bd init\n4. Use the command's global store, not a separate instance\n5. May need to reset global state between tests\n\n**Success criteria**: \n- All test functions pass\n- Coverage for show.go increases significantly\n- Tests follow existing patterns in cmd/bd/*_test.go","status":"closed","priority":0,"issue_type":"task","created_at":"2025-10-31T20:08:40.545173-07:00","updated_at":"2025-10-31T20:19:22.411066-07:00","closed_at":"2025-10-31T20:19:22.411066-07:00"}