From 10a0c108db07a00039d27b73a5ff930ba2d9014c Mon Sep 17 00:00:00 2001 From: Steve Yegge Date: Mon, 27 Oct 2025 21:30:04 -0700 Subject: [PATCH] bd sync: 2025-10-27 21:30:03 --- .beads/beads.jsonl | 1 + 1 file changed, 1 insertion(+) diff --git a/.beads/beads.jsonl b/.beads/beads.jsonl index eadfe20c..2b407f65 100644 --- a/.beads/beads.jsonl +++ b/.beads/beads.jsonl @@ -153,6 +153,7 @@ {"id":"bd-236","title":"Remove unreachable RPC methods","description":"Several RPC server and client methods are unreachable and should be removed:\n\nServer methods (internal/rpc/server.go):\n- `Server.GetLastImportTime` (line 2116)\n- `Server.SetLastImportTime` (line 2123)\n- `Server.findJSONLPath` (line 2255)\n\nClient methods (internal/rpc/client.go):\n- `Client.Import` (line 311) - RPC import not used (daemon uses autoimport)\n\nEvidence:\n```bash\ngo run golang.org/x/tools/cmd/deadcode@latest -test ./...\n```\n\nImpact: Removes ~80 LOC of unused RPC code","acceptance_criteria":"- Remove the 4 unreachable methods (~80 LOC total)\n- Verify no callers: `grep -r \"GetLastImportTime\\|SetLastImportTime\\|findJSONLPath\" .`\n- All tests pass: `go test ./internal/rpc/...`\n- Daemon functionality works: test daemon start/stop/operations","status":"closed","priority":2,"issue_type":"task","created_at":"2025-10-27T21:14:42.648671-07:00","updated_at":"2025-10-27T21:22:48.190878-07:00","closed_at":"2025-10-27T21:22:48.190878-07:00","labels":["cleanup","dead-code","phase-1","rpc"]} {"id":"bd-237","title":"Remove unreachable utility functions","description":"Several small utility functions are unreachable:\n\nFiles to clean:\n1. `internal/storage/sqlite/hash.go` - `computeIssueContentHash` (line 17)\n - Check if entire file can be deleted if only contains this function\n\n2. `internal/config/config.go` - `FileUsed` (line 151)\n - Delete unused config helper\n\n3. `cmd/bd/git_sync_test.go` - `verifyIssueOpen` (line 300)\n - Delete dead test helper\n\n4. `internal/compact/haiku.go` - `HaikuClient.SummarizeTier2` (line 81)\n - Tier 2 summarization not implemented\n - Options: implement feature OR delete method\n\nImpact: Removes 50-100 LOC depending on decisions","acceptance_criteria":"- Remove unreachable functions\n- If entire files can be deleted (like hash.go), delete them\n- For SummarizeTier2: decide to implement or delete, document decision\n- All tests pass: `go test ./...`\n- Verify no callers exist for each function","status":"closed","priority":2,"issue_type":"task","created_at":"2025-10-27T21:14:42.64898-07:00","updated_at":"2025-10-27T21:22:48.027735-07:00","closed_at":"2025-10-27T21:22:48.027735-07:00","labels":["cleanup","dead-code","phase-1"]} {"id":"bd-238","title":"Split internal/rpc/server.go into focused modules","description":"The file `internal/rpc/server.go` is 2,273 lines with 50+ methods, making it difficult to navigate and prone to merge conflicts. Split into 8 focused files with clear responsibilities.\n\nCurrent structure: Single 2,273-line file with:\n- Connection handling\n- Request routing\n- All 40+ RPC method implementations\n- Storage caching\n- Health checks \u0026 metrics\n- Cleanup loops\n\nTarget structure:\n```\ninternal/rpc/\n├── server.go # Core server, connection handling (~300 lines)\n├── methods_issue.go # Issue operations (~400 lines)\n├── methods_deps.go # Dependency operations (~200 lines)\n├── methods_labels.go # Label operations (~150 lines)\n├── methods_ready.go # Ready work queries (~150 lines)\n├── methods_compact.go # Compaction operations (~200 lines)\n├── methods_comments.go # Comment operations (~150 lines)\n├── storage_cache.go # Storage caching logic (~300 lines)\n└── health.go # Health \u0026 metrics (~200 lines)\n```\n\nMigration strategy:\n1. Create new files with appropriate methods\n2. Keep `server.go` as main file with core server logic\n3. Test incrementally after each file split\n4. Final verification with full test suite","acceptance_criteria":"- All 50 methods split into appropriate files\n- Each file \u003c500 LOC\n- All methods remain on `*Server` receiver (no behavior change)\n- All tests pass: `go test ./internal/rpc/...`\n- Verify daemon works: start daemon, run operations, check health\n- Update internal documentation if needed\n- No change to public API","status":"closed","priority":1,"issue_type":"task","created_at":"2025-10-27T21:14:42.649349-07:00","updated_at":"2025-10-27T21:14:42.649349-07:00","closed_at":"2025-10-27T21:09:03.4525-07:00","labels":["architecture","phase-2","refactor"]} +{"id":"bd-239","title":"Add cross-DB content dedup to prevent duplicate issues on import","description":"When importing issues, we only dedupe within the import batch, not against existing DB content. This causes duplicates when:\n- Different branches create same issue with different IDs\n- Auto-import treats each as \"new\" since ID differs\n- Result: bd-161 created 5 times as bd-161, bd-170, bd-173, bd-183, bd-194\n\nRoot cause (per Oracle analysis):\n- sqlite.deduplicateIncomingIssues only dedupes within incoming batch\n- Collision handling only triggers on same-ID-different-content\n- Auto-import always resolves collisions but never checks for content duplicates in DB\n\nSolution: Add pre-create content check in importer.ImportIssues:\n1. When existing == nil (would create new issue), check DB for matching content\n2. Use same contentKey as duplicates.go (title+desc+design+acceptance+notes+status+priority+type+assignee)\n3. If match found, skip creation (increment Skipped count)\n4. Enable by default for auto-import and CLI import\n5. Add regression test\n\nImpact: Prevents ~50 duplicate issues from 24 duplicate groups we just cleaned up.","status":"open","priority":1,"issue_type":"bug","created_at":"2025-10-27T21:23:03.900347-07:00","updated_at":"2025-10-27T21:23:03.900347-07:00"} {"id":"bd-24","title":"Git worktree support - ensure --no-daemon works correctly","description":"Users working with git worktrees report that beads MCP commits to the wrong branch (main instead of worktree branch). \n\n**Root cause:** Git worktrees share the same .beads directory, so the daemon/MCP server doesn't know which branch the worktree has checked out.\n\n**Current state:**\n- Daemon mode: Cannot work properly with worktrees (fundamental limitation - shared .beads, unknown branch)\n- CLI with --no-daemon: Should work but needs verification\n\n**Action items:**\n1. Test and verify --no-daemon works correctly in worktrees\n2. Document the limitation in README/AGENTS.md\n3. Add clear error/warning when using daemon with worktrees\n4. Consider if MCP server can detect worktree usage and auto-disable daemon\n\n**Workaround for users:**\nUse --no-daemon flag when working in worktrees, or set BEADS_AUTO_DAEMON=false\n\n**Related:** GH issue #55","notes":"**Implementation completed with oracle review improvements:**\n\n1. **Robust detection** - Changed from substring check to canonical git-dir vs git-common-dir comparison\n2. **Correct warning gate** - Now only checks isGitWorktree() and only called when daemon is actually connected\n3. **Complete coverage** - Added warning to `bd daemon` command start path\n4. **Better UX** - Shows shared database path and clarifies BEADS_AUTO_START_DAEMON behavior\n5. **Improved tests** - Validates canonical detection method and path truncation\n\n**Files changed:**\n- cmd/bd/worktree.go - Improved detection and warning\n- cmd/bd/worktree_test.go - Better test coverage\n- cmd/bd/main.go - Warning after daemon connection (2 places)\n- cmd/bd/daemon.go - Warning when starting daemon\n- README.md \u0026 AGENTS.md - Documented limitations and solutions","status":"closed","priority":2,"issue_type":"bug","created_at":"2025-10-22T22:38:52.438601-07:00","updated_at":"2025-10-25T23:15:33.484321-07:00","closed_at":"2025-10-22T22:51:45.464598-07:00"} {"id":"bd-25","title":"Investigate jujutsu integration for beads","description":"Research and document how beads could integrate with jujutsu (jj), the next-generation VCS. Key areas to explore:\n- How jj's operation model differs from git (immutable operations, working-copy-as-commit)\n- JSONL sync strategy with jj's conflict resolution model\n- Daemon compatibility with jj's more frequent rewrites\n- Whether auto-import/export needs changes for jj workflows\n- Example configurations and documentation updates needed","status":"open","priority":3,"issue_type":"task","created_at":"2025-10-23T09:23:23.582009-07:00","updated_at":"2025-10-25T23:15:33.484928-07:00"} {"id":"bd-26","title":"Add description parameter to bd update command and MCP server","description":"Issue #114 and #122 show that agents expect to update issue descriptions. Currently only create supports description. Need to add --description flag to CLI update command and description parameter to MCP update_issue tool.","status":"closed","priority":1,"issue_type":"feature","created_at":"2025-10-23T10:46:00.481647-07:00","updated_at":"2025-10-25T23:15:33.485577-07:00","closed_at":"2025-10-23T10:52:49.825354-07:00"}