bd sync: 2025-10-27 17:29:14

This commit is contained in:
Steve Yegge
2025-10-27 17:29:14 -07:00
parent adfe177dba
commit f1e2ffb135

View File

@@ -90,6 +90,9 @@
{"id":"bd-18","title":"Consider adding UnderlyingConn(ctx) for safer scoped DB access","description":"Currently UnderlyingDB() returns *sql.DB which is correct for most uses, but for extension migrations/DDL, a scoped connection might be safer.\n\n**Proposal:** Add optional UnderlyingConn(ctx) (*sql.Conn, error) method that:\n- Returns a scoped connection via s.db.Conn(ctx)\n- Encourages lifetime-bounded usage\n- Reduces temptation to tune global pool settings\n- Better for one-time DDL operations like CREATE TABLE\n\n**Implementation:**\n```go\n// UnderlyingConn returns a single connection from the pool for scoped use\n// Useful for migrations and DDL. Close the connection when done.\nfunc (s *SQLiteStorage) UnderlyingConn(ctx context.Context) (*sql.Conn, error) {\n return s.db.Conn(ctx)\n}\n```\n\n**Benefits:**\n- Safer for migrations (explicit scope)\n- Complements UnderlyingDB() for different use cases\n- Low implementation cost\n\n**Trade-off:** Adds another method to maintain, but Oracle considers this balanced compromise between safety and flexibility.\n\n**Decision:** This is optional - evaluate based on VC's actual usage patterns.","status":"closed","priority":3,"issue_type":"feature","created_at":"2025-10-22T17:07:56.832638-07:00","updated_at":"2025-10-25T23:15:33.479496-07:00","closed_at":"2025-10-22T22:02:18.479512-07:00","dependencies":[{"issue_id":"bd-18","depends_on_id":"bd-10","type":"related","created_at":"2025-10-24T13:17:40.325463-07:00","created_by":"renumber"}]}
{"id":"bd-180","title":"Address gosec security warnings (102 issues)","description":"Security linter warnings: file permissions (0755 should be 0750), G304 file inclusion via variable, G204 subprocess launches. Many are false positives but should be reviewed.","design":"Review each gosec warning. Add exclusions for legitimate cases to .golangci.yml. Fix real security issues (overly permissive file modes).","status":"open","priority":2,"issue_type":"task","created_at":"2025-10-27T13:08:48.798508-07:00","updated_at":"2025-10-27T13:08:48.798508-07:00"}
{"id":"bd-181","title":"Add optional post-merge git hook example for bd sync","description":"Create example git hook that auto-runs bd sync after git pull/merge.\n\nAdd to examples/git-hooks/:\n- post-merge hook that checks if .beads/issues.jsonl changed\n- If changed: run `bd sync` automatically\n- Make it optional/documented (not auto-installed)\n\nBenefits:\n- Zero-friction sync after git pull\n- Complements auto-detection as belt-and-suspenders\n\nNote: post-merge hook already exists for pre-commit/post-merge. Extend it to support sync.","status":"open","priority":2,"issue_type":"task","created_at":"2025-10-27T13:08:48.799037-07:00","updated_at":"2025-10-27T13:08:48.799037-07:00"}
{"id":"bd-182","title":"Remove duplicate code from cmd/bd/import_shared.go","description":"Clean up cmd/bd/import_shared.go to remove code duplication with internal/importer.\n\nAfter bd-132, we have duplicate implementations of:\n- Field comparators (issueDataChanged, fieldComparator)\n- ID renaming logic (renameImportedIssuePrefixes, replaceIDReferences, replaceBoundaryAware)\n\nThese should be thin wrappers calling internal/importer to avoid drift.","design":"1. Keep only ImportOptions and ImportResult type definitions in import_shared.go\n2. Remove duplicate comparator/rename functions\n3. Ensure all cmd/bd code calls internal/importer functions\n4. Verify all tests still pass","status":"open","priority":3,"issue_type":"chore","created_at":"2025-10-27T16:28:53.186639-07:00","updated_at":"2025-10-27T16:28:53.186639-07:00"}
{"id":"bd-183","title":"Add unit tests for internal/importer package","description":"Add comprehensive unit tests for the new internal/importer package created in bd-132.\n\nCurrently the package has no tests, relying on cmd/bd integration tests.\n\nTest coverage needed:\n- Prefix mismatch cases (rename on import, validation)\n- Collision cases (resolve vs error)\n- Upsert logic (unchanged, updated, duplicates)\n- Deps/labels/comments deduplication","status":"open","priority":2,"issue_type":"task","created_at":"2025-10-27T16:29:17.67769-07:00","updated_at":"2025-10-27T16:29:17.67769-07:00"}
{"id":"bd-184","title":"Add integration tests for daemon auto-import","description":"Add integration tests for daemon auto-import behavior after bd-132 implementation.\n\nCurrent RPC tests don't specifically test the auto-import flow.\n\nTest scenarios needed:\n- Mtime gate fast path (no import when unchanged)\n- Hash change triggers import\n- Concurrency single-flight pattern\n- ID remap triggers export to JSONL","status":"open","priority":2,"issue_type":"task","created_at":"2025-10-27T16:29:17.68737-07:00","updated_at":"2025-10-27T16:29:17.68737-07:00"}
{"id":"bd-19","title":"MCP close tool method signature error - takes 1 positional argument but 2 were given","description":"The close approval routing fix in beads-mcp v0.11.0 works correctly and successfully routes update(status=\"closed\") calls to close() tool. However, the close() tool has a Python method signature bug that prevents execution.\n\nImpact: All MCP-based close operations are broken. Workaround: Use bd CLI directly.\n\nError: BdDaemonClient.close() takes 1 positional argument but 2 were given\n\nRoot cause: BdDaemonClient.close() only accepts self, but MCP tool passes issue_id and reason.\n\nAdditional issue: CLI close has FOREIGN KEY constraint error when recording reason parameter.\n\nSee GitHub issue #107 for full details.","status":"closed","priority":0,"issue_type":"bug","created_at":"2025-10-22T17:25:34.67056-07:00","updated_at":"2025-10-25T23:15:33.480292-07:00","closed_at":"2025-10-22T17:36:55.463445-07:00"}
{"id":"bd-2","title":"Improve error handling in dependency removal during remapping","description":"In updateDependencyReferences(), RemoveDependency errors are caught and ignored with continue (line 392). Comment says 'if dependency doesn't exist' but this catches ALL errors including real failures. Should check error type with errors.Is(err, ErrDependencyNotFound) and only ignore not-found errors, returning other errors properly.","status":"closed","priority":3,"issue_type":"bug","created_at":"2025-10-21T23:53:44.31362-07:00","updated_at":"2025-10-25T23:15:33.462194-07:00","closed_at":"2025-10-18T09:41:18.209717-07:00"}
{"id":"bd-20","title":"Fix pre-existing MCP test failures - show/update return arrays not dicts","description":"9 tests fail in beads-mcp because bd CLI commands return arrays but MCP client expects dicts:\n\nFailing tests:\n- test_create_and_show_issue: show returns array, expects dict\n- test_update_issue: update returns array, expects dict \n- test_add_dependency: show returns array, expects dict\n- test_invalid_issue_id: show returns empty dict instead of error\n- test_dependency_types: show returns array, expects dict\n- test_show_issue_tool: show returns array, expects dict\n- test_update_issue_tool: update returns array, expects dict\n- test_update_partial_fields: update returns array, expects dict\n- test_client_lazy_initialization: BdClient import issue\n\nRoot cause: bd CLI commands like 'bd show' and 'bd update' output JSON arrays, but BdCliClient.show() and BdCliClient.update() expect single dict objects.\n\nExample:\n```bash\nbd show test-1 --json\n[{\"id\":\"test-1\",...}] # Array, not dict\n```\n\nFix needed: Update bd_client.py to handle array responses and extract first element, or change CLI to return single object for single-ID operations.","status":"closed","priority":1,"issue_type":"bug","created_at":"2025-10-22T17:43:23.29302-07:00","updated_at":"2025-10-25T23:15:33.481154-07:00","closed_at":"2025-10-22T20:05:49.3826-07:00"}