bd sync: 2025-12-29 13:45:51
This commit is contained in:
@@ -310,7 +310,7 @@
|
||||
{"id":"bd-e8kq","title":"Consolidate migrate-* commands into migrate subcommands","description":"Move migrate-hash-ids, migrate-issues, migrate-sync, migrate-tombstones under 'migrate' as subcommands. Reduces 5 top-level commands to 1.","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-28T12:59:09.187369-08:00","created_by":"stevey","updated_at":"2025-12-28T13:02:51.321846-08:00","closed_at":"2025-12-28T13:02:51.321848-08:00"}
|
||||
{"id":"bd-efo6","title":"Test cross-rig issue creation","description":"Testing --rig flag from town root","status":"tombstone","priority":3,"issue_type":"task","created_at":"2025-12-27T00:43:21.006012-08:00","created_by":"stevey","updated_at":"2025-12-27T00:43:27.389223-08:00","deleted_at":"2025-12-27T00:43:27.389223-08:00","deleted_by":"daemon","delete_reason":"delete","original_type":"task"}
|
||||
{"id":"bd-eijl","title":"bd ship command for publishing capabilities","description":"Add `bd ship \u003ccapability\u003e` command that:\n\n1. Finds issue with `export:\u003ccapability\u003e` label\n2. Validates issue is closed (or --force to override)\n3. Adds `provides:\u003ccapability\u003e` label\n4. Protects `provides:*` namespace (only bd ship can add these labels)\n\nExample:\n```bash\nbd ship mol-run-assignee\n# Output: Shipped mol-run-assignee (bd-xyz)\n```\n\nPart of cross-project dependency system.\nSee: gastown/docs/cross-project-deps.md","status":"closed","priority":2,"issue_type":"feature","created_at":"2025-12-21T22:37:19.123024-08:00","updated_at":"2025-12-21T23:11:47.498859-08:00","closed_at":"2025-12-21T23:11:47.498859-08:00"}
|
||||
{"id":"bd-eko4","title":"Add pre-migration orphan cleanup to avoid chicken-and-egg fix failure","description":"## Problem\n\nWhen the database has orphaned foreign key references (dependencies or labels pointing to non-existent issues), the migration invariant check fails, preventing the database from opening. This creates a chicken-and-egg problem:\n\n1. `bd doctor --fix` tries to open the database\n2. Opening triggers migrations with invariant checks\n3. Invariant check fails due to orphaned refs\n4. Fix never runs because database won't open\n\n## Root Cause\n\nAggressive tombstone deletion (e.g., deleting ~1000 old tombstones) left behind orphaned:\n- 218+ dependencies where issue_id not in issues\n- 222+ dependencies where depends_on_id not in issues \n- 30+ labels where issue_id not in issues\n\n## Current Workaround\n\nDirect SQL to clean up before bd can run:\n```sql\nDELETE FROM dependencies WHERE NOT EXISTS (SELECT 1 FROM issues WHERE id = issue_id);\nDELETE FROM dependencies WHERE NOT EXISTS (SELECT 1 FROM issues WHERE id = depends_on_id) AND depends_on_id NOT LIKE 'external:%';\nDELETE FROM labels WHERE NOT EXISTS (SELECT 1 FROM issues WHERE id = issue_id);\n```\n\n## Proposed Fix\n\nAdd a pre-migration cleanup step that runs BEFORE invariant checks:\n1. Option A: Run orphan cleanup as part of migrations (before invariant check)\n2. Option B: Add `bd doctor --force-fix` that bypasses invariant checks\n3. Option C: Have invariant check auto-clean orphans instead of failing\n\nOption A is cleanest - orphan cleanup should be part of normal migration.","status":"open","priority":2,"issue_type":"bug","created_at":"2025-12-28T23:18:24.65227-08:00","created_by":"beads/crew/dave","updated_at":"2025-12-28T23:18:24.65227-08:00"}
|
||||
{"id":"bd-eko4","title":"Add pre-migration orphan cleanup to avoid chicken-and-egg fix failure","description":"## Problem\n\nWhen the database has orphaned foreign key references (dependencies or labels pointing to non-existent issues), the migration invariant check fails, preventing the database from opening. This creates a chicken-and-egg problem:\n\n1. `bd doctor --fix` tries to open the database\n2. Opening triggers migrations with invariant checks\n3. Invariant check fails due to orphaned refs\n4. Fix never runs because database won't open\n\n## Root Cause\n\nAggressive tombstone deletion (e.g., deleting ~1000 old tombstones) left behind orphaned:\n- 218+ dependencies where issue_id not in issues\n- 222+ dependencies where depends_on_id not in issues \n- 30+ labels where issue_id not in issues\n\n## Current Workaround\n\nDirect SQL to clean up before bd can run:\n```sql\nDELETE FROM dependencies WHERE NOT EXISTS (SELECT 1 FROM issues WHERE id = issue_id);\nDELETE FROM dependencies WHERE NOT EXISTS (SELECT 1 FROM issues WHERE id = depends_on_id) AND depends_on_id NOT LIKE 'external:%';\nDELETE FROM labels WHERE NOT EXISTS (SELECT 1 FROM issues WHERE id = issue_id);\n```\n\n## Proposed Fix\n\nAdd a pre-migration cleanup step that runs BEFORE invariant checks:\n1. Option A: Run orphan cleanup as part of migrations (before invariant check)\n2. Option B: Add `bd doctor --force-fix` that bypasses invariant checks\n3. Option C: Have invariant check auto-clean orphans instead of failing\n\nOption A is cleanest - orphan cleanup should be part of normal migration.","status":"in_progress","priority":2,"issue_type":"bug","created_at":"2025-12-28T23:18:24.65227-08:00","created_by":"beads/crew/dave","updated_at":"2025-12-29T13:43:37.58118-08:00"}
|
||||
{"id":"bd-elqd","title":"Systematic bd sync stability investigation","description":"## Context\n\nbd sync has chronic instability issues that have persisted since inception:\n- issues.jsonl is always dirty after push\n- bd sync often creates messes requiring manual cleanup\n- Problems escalating despite accumulated bug fixes\n- Workarounds are getting increasingly draconian\n\n## Goal\n\nSystematically observe and diagnose bd sync failures rather than applying band-aid fixes.\n\n## Approach\n\n1. Start fresh session with latest binary (all fixes applied)\n2. Run bd sync and carefully observe what happens\n3. Document exact sequence of events when things go wrong\n4. File specific issues for each discrete problem identified\n5. Track the root causes, not just symptoms\n\n## Test Environment\n\n- Fresh clone or clean state\n- Latest bd binary with all bug fixes\n- Monitor both local and remote JSONL state\n- Check for timing issues, race conditions, merge conflicts\n\n## Success Criteria\n\n- Identify root causes of sync instability\n- Create actionable issues for each problem\n- Eventually achieve stable bd sync (no manual intervention needed)","status":"tombstone","priority":1,"issue_type":"task","created_at":"2025-12-16T22:57:25.35289-08:00","updated_at":"2025-12-17T16:11:17.070763-08:00","deleted_at":"2025-12-17T16:11:17.070763-08:00","deleted_by":"batch delete","delete_reason":"batch delete","original_type":"task"}
|
||||
{"id":"bd-epww","title":"Document pinned status in CLI_REFERENCE.md","description":"## Task\n\nThe `pinned` status is a valid issue status but is not documented in CLI_REFERENCE.md.\n\n## Current Status Values (from types.go:295-301)\n\n- open\n- in_progress\n- blocked\n- deferred\n- closed\n- tombstone\n- **pinned** ← undocumented\n\n## Definition\n\n`StatusPinned Status = \"pinned\" // Persistent bead that stays open indefinitely (bd-6v2)`\n\n## Where to Document\n\nAdd to the 'Issue Types' or create a new 'Issue Statuses' section in docs/CLI_REFERENCE.md.\n\n## Related\n\nThe pinned status is heavily used by gt for hook management (`--status=pinned`).","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-27T17:12:35.296002-08:00","created_by":"gastown/crew/joe","updated_at":"2025-12-27T19:13:05.640767-08:00","closed_at":"2025-12-27T19:13:05.640767-08:00"}
|
||||
{"id":"bd-etyv","title":"Smart --var detection for mol distill","description":"Implemented bidirectional syntax support for mol distill --var flag.\n\n**Problem:**\n- spawn uses: --var variable=value (assignment style)\n- distill used: --var value=variable (substitution style)\n- Agents would naturally guess spawn-style for both\n\n**Solution:**\nSmart detection that accepts BOTH syntaxes by checking which side appears in the epic text:\n- --var branch=feature-auth → finds 'feature-auth' in text → works\n- --var feature-auth=branch → finds 'feature-auth' in text → also works\n\n**Changes:**\n- Added parseDistillVar() with smart detection\n- Added collectSubgraphText() helper\n- Restructured runMolDistill to load subgraph before parsing vars\n- Updated help text to document both syntaxes\n- Added comprehensive tests in mol_test.go\n\n**Edge cases handled:**\n- Both sides found: prefers spawn-style (more common guess)\n- Neither found: helpful error message\n- Empty sides: validation error\n- Values containing '=' (e.g., KEY=VALUE): works via SplitN\n\nEmbodies the Beads philosophy: watch what agents do, make their guess correct.","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-21T11:08:50.83923-08:00","updated_at":"2025-12-21T11:08:56.432536-08:00","closed_at":"2025-12-21T11:08:56.432536-08:00"}
|
||||
@@ -562,7 +562,7 @@
|
||||
{"id":"bd-phtv","title":"bd pin: pinned field overwritten by subsequent bd commands","description":"## Summary\n\nThe `bd pin` command correctly sets `pinned=1` in SQLite, but any subsequent `bd` command (including read-only commands like `bd show`) resets `pinned` to 0.\n\n## Reproduction Steps\n\n```bash\nbd --no-daemon pin \u003cissue-id\u003e --for=max\nsqlite3 .beads/beads.db \"SELECT id, pinned FROM issues WHERE id=\\\"\u003cissue-id\u003e\\\"\"\n# Shows pinned=1 ✓\n\nbd --no-daemon show \u003cissue-id\u003e --json\nsqlite3 .beads/beads.db \"SELECT id, pinned FROM issues WHERE id=\\\"\u003cissue-id\u003e\\\"\"\n# Shows pinned=0 ✗ WRONG\n```\n\n## Root Cause Investigation\n\n### Prime Suspects\n\n1. **JSONL import overwrites DB** - The `pinned` field has `omitempty` so false values arent in JSONL. When JSONL is imported, it overwrites the DB pinned=1 with default pinned=0.\n\n2. **Files to check:**\n - `internal/importer/importer.go` - ImportIssue() may unconditionally set all fields\n - `internal/storage/sqlite/issues.go` - UpsertIssue() may not preserve pinned\n - `cmd/bd/main.go` - ensureStoreActive() may trigger import\n\n### Debug Steps\n\n```bash\n# Add debug logging to track what is writing pinned=0\ngrep -rn \"pinned\" internal/storage/sqlite/*.go\ngrep -rn \"Pinned\" internal/importer/*.go\n```\n\n## Likely Fix\n\nIn `internal/importer/importer.go` or `internal/storage/sqlite/issues.go`:\n\n```go\n// When upserting from JSONL, preserve pinned field if already set\nfunc (s *SQLiteStorage) UpsertIssue(ctx context.Context, issue *types.Issue) error {\n // Check if issue exists and is pinned\n existing, _ := s.GetIssue(ctx, issue.ID)\n if existing != nil \u0026\u0026 existing.Pinned \u0026\u0026 !issue.Pinned {\n // Preserve existing pinned status\n issue.Pinned = existing.Pinned\n }\n // ... rest of upsert\n}\n```\n\nOR the import should skip fields that are omitempty and not present in JSONL:\n\n```go\n// In importer, only update fields that are explicitly set in JSONL\n// Pinned with omitempty means absent = dont change, not absent = false\n```\n\n## Testing\n\n```bash\n# After fix:\nbd --no-daemon pin \u003cissue-id\u003e --for=max\nbd --no-daemon show \u003cissue-id\u003e --json # Should not reset pinned\nbd list --pinned # Should show the pinned issue\nbd hook --agent max # Should show pinned work\n```\n\n## Files to Modify\n\n1. **internal/importer/importer.go** - Preserve pinned on import\n2. **internal/storage/sqlite/issues.go** - UpsertIssue preserve pinned\n3. **Add test** in internal/importer/importer_test.go\n\n## Success Criteria\n- `bd pin` survives subsequent bd commands\n- `bd list --pinned` shows pinned issues\n- `bd hook --agent X` shows pinned work\n- Existing tests still pass","status":"closed","priority":1,"issue_type":"bug","created_at":"2025-12-23T12:32:20.046988-08:00","updated_at":"2025-12-23T13:47:49.936021-08:00","closed_at":"2025-12-23T13:47:49.936021-08:00","labels":["export:pinned-field-fix"],"dependencies":[{"issue_id":"bd-phtv","depends_on_id":"bd-iz5t","type":"parent-child","created_at":"2025-12-23T12:44:07.140151-08:00","created_by":"daemon"}]}
|
||||
{"id":"bd-phwd","title":"Add timeout message for long-running git push operations","description":"When git push hangs waiting for credential/browser auth, show a periodic message to the user instead of appearing frozen. Add timeout messaging after N seconds of inactivity during git operations.","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-21T11:44:57.318984535-07:00","updated_at":"2025-12-21T11:46:05.218023559-07:00","closed_at":"2025-12-21T11:46:05.218023559-07:00"}
|
||||
{"id":"bd-pndo","title":"Technical debt: Multiple deprecated command aliases still exist","description":"attached_args: Remove deprecated command aliases\n\nSeveral deprecated command aliases are still present in the codebase:\n\n1. cmd/bd/relate.go:51 - 'bd relate' deprecated for 'bd dep relate'\n2. cmd/bd/relate.go:56 - 'bd unrelate' deprecated for 'bd dep unrelate'\n3. cmd/bd/daemons.go:618 - 'bd daemons' deprecated for 'bd daemon \u003csubcommand\u003e'\n4. cmd/bd/migrate_hash_ids.go:433 - alias for 'bd migrate hash-ids'\n5. cmd/bd/migrate_tombstones.go:352 - alias for 'bd migrate tombstones'\n6. cmd/bd/migrate_sync.go:68 - alias for 'bd migrate sync'\n7. cmd/bd/migrate_issues.go:717 - alias for 'bd migrate issues'\n8. cmd/bd/comments.go:214 - deprecated for 'bd comments add'\n9. cmd/bd/template.go:64,82,147,226 - multiple template commands deprecated for 'bd mol'\n10. cmd/bd/admin_aliases.go - multiple admin aliases deprecated\n11. cmd/bd/detect_pollution.go:24 - deprecated for 'bd doctor --check=pollution'\n\nConsider:\n1. Setting a deprecation timeline (e.g., remove in v2.0)\n2. Adding warnings when deprecated commands are used\n3. Documenting migration path in CHANGELOG\n\nLocation: Various files in cmd/bd/","status":"closed","priority":4,"issue_type":"chore","created_at":"2025-12-28T15:32:56.11458-08:00","created_by":"beads/crew/dave","updated_at":"2025-12-28T16:43:56.279146-08:00","closed_at":"2025-12-28T16:43:56.279146-08:00","dependencies":[{"issue_id":"bd-pndo","depends_on_id":"bd-784c","type":"parent-child","created_at":"2025-12-28T15:38:04.31481-08:00","created_by":"daemon"}]}
|
||||
{"id":"bd-posw","title":"hq- prefix routing fails: '.' resolves relative to cwd, not town root","description":"## Problem\nThe hq- prefix in routes.jsonl maps to '.' which is interpreted relative to the current working directory, not the town root.\n\n## Reproduction\n```bash\ncd ~/gt \u0026\u0026 bd show hq-2cchm # Works\ncd ~/gt/beads/crew/emma \u0026\u0026 bd show hq-2cchm # Fails: 'no issue found'\n```\n\n## Root Cause\nroutes.jsonl has: {\"prefix\": \"hq-\", \"path\": \".\"}\n\nThe '.' is resolved relative to cwd, so from crew/emma it looks for ~/gt/beads/crew/emma/.beads/ instead of ~/gt/.beads/\n\n## Fix\nThe routing logic should resolve '.' as the town root, or the route should use an absolute path or a sentinel like 'TOWN_ROOT'.","status":"open","priority":2,"issue_type":"bug","created_at":"2025-12-29T12:31:37.258235-08:00","created_by":"stevey","updated_at":"2025-12-29T12:33:38.622325-08:00"}
|
||||
{"id":"bd-posw","title":"hq- prefix routing fails: '.' resolves relative to cwd, not town root","description":"## Problem\nThe hq- prefix in routes.jsonl maps to '.' which is interpreted relative to the current working directory, not the town root.\n\n## Reproduction\n```bash\ncd ~/gt \u0026\u0026 bd show hq-2cchm # Works\ncd ~/gt/beads/crew/emma \u0026\u0026 bd show hq-2cchm # Fails: 'no issue found'\n```\n\n## Root Cause\nroutes.jsonl has: {\"prefix\": \"hq-\", \"path\": \".\"}\n\nThe '.' is resolved relative to cwd, so from crew/emma it looks for ~/gt/beads/crew/emma/.beads/ instead of ~/gt/.beads/\n\n## Fix\nThe routing logic should resolve '.' as the town root, or the route should use an absolute path or a sentinel like 'TOWN_ROOT'.","status":"closed","priority":2,"issue_type":"bug","created_at":"2025-12-29T12:31:37.258235-08:00","created_by":"stevey","updated_at":"2025-12-29T13:45:37.471123-08:00","closed_at":"2025-12-29T13:45:37.471123-08:00","close_reason":"Fixed by adding town-aware route resolution"}
|
||||
{"id":"bd-psg","title":"Add tests for dependency management","description":"Key dependency functions like mergeBidirectionalTrees, GetDependencyTree, and DetectCycles have low or no coverage. These are essential for maintaining data integrity in the dependency graph.","status":"closed","priority":1,"issue_type":"task","created_at":"2025-12-18T07:00:43.458548462-07:00","updated_at":"2025-12-19T09:54:57.018745301-07:00","closed_at":"2025-12-18T10:24:56.271508339-07:00","dependencies":[{"issue_id":"bd-psg","depends_on_id":"bd-6ss","type":"discovered-from","created_at":"2025-12-18T07:00:43.463910911-07:00","created_by":"matt"}]}
|
||||
{"id":"bd-pspk","title":"Fix: Empty coordinator shows blank in bd swarm create output","description":"Line 992 prints 'Coordinator: ' even when coordinator is empty string.\n\nShould either:\n- Print 'Coordinator: (none)' \n- Skip the line entirely when empty\n\nMinor polish issue.","status":"closed","priority":3,"issue_type":"bug","created_at":"2025-12-28T21:38:28.651591-08:00","created_by":"beads/crew/dave","updated_at":"2025-12-28T22:00:57.569797-08:00","closed_at":"2025-12-28T22:00:57.569797-08:00","dependencies":[{"issue_id":"bd-pspk","depends_on_id":"bd-2ubv","type":"parent-child","created_at":"2025-12-28T21:38:44.844669-08:00","created_by":"daemon"}]}
|
||||
{"id":"bd-pvu0","title":"Merge: bd-4opy","description":"branch: polecat/angharad\ntarget: main\nsource_issue: bd-4opy\nrig: beads","status":"closed","priority":2,"issue_type":"merge-request","created_at":"2025-12-23T00:24:44.057267-08:00","updated_at":"2025-12-23T01:33:25.730271-08:00","closed_at":"2025-12-23T01:33:25.730271-08:00"}
|
||||
|
||||
Reference in New Issue
Block a user