bd daemon sync: 2026-01-11 23:04:16

This commit is contained in:
beads/refinery
2026-01-11 23:04:16 -08:00
committed by Steve Yegge
parent baf884cbf4
commit d662d8a9d9

View File

@@ -209,7 +209,7 @@
{"id":"bd-2oo.3","title":"Update all code to use dependencies API for edges","description":"Find and update all code that reads/writes:\n- replies_to field -\u003e use dependency API\n- relates_to field -\u003e use dependency API\n- duplicate_of field -\u003e use dependency API\n- superseded_by field -\u003e use dependency API\n\nCommands affected: bd mail, bd relate, bd duplicate, bd supersede, bd show, etc.","status":"closed","priority":0,"issue_type":"task","created_at":"2025-12-18T02:02:01.317006-08:00","updated_at":"2025-12-18T02:49:10.59233-08:00","closed_at":"2025-12-18T02:49:10.59233-08:00","dependencies":[{"issue_id":"bd-2oo.3","depends_on_id":"bd-2oo","type":"parent-child","created_at":"2025-12-18T02:02:01.31856-08:00","created_by":"daemon"}]}
{"id":"bd-2oo.4","title":"Create migration script for edge field to dependency conversion","description":"Migration must:\n1. Read existing JSONL with old fields\n2. Convert field values to dependency records\n3. Write updated JSONL without old fields\n4. Handle edge cases (missing refs, duplicates)\n\nRun via: bd migrate or automatic on bd prime","status":"closed","priority":0,"issue_type":"task","created_at":"2025-12-18T02:02:01.760277-08:00","updated_at":"2025-12-18T02:49:10.602446-08:00","closed_at":"2025-12-18T02:49:10.602446-08:00","dependencies":[{"issue_id":"bd-2oo.4","depends_on_id":"bd-2oo","type":"parent-child","created_at":"2025-12-18T02:02:01.760694-08:00","created_by":"daemon"}]}
{"id":"bd-2papc","title":"Add 'attests' edge type for skill attestations","description":"dispatched_by: beads/crew/emma\n\nAdd new DependencyType 'attests' for skill attestations. Enables: Entity X attests that Entity Y has skill Z at level N. Metadata captures skill, level, date. Foundation for skill portability.","status":"closed","priority":2,"issue_type":"task","assignee":"beads/crew/dave","created_at":"2026-01-10T16:34:12.823164-08:00","created_by":"gastown/crew/max","updated_at":"2026-01-10T19:33:55.872975-08:00","closed_at":"2026-01-10T19:33:55.872975-08:00","close_reason":"Implemented attests edge type with AttestsMeta struct","dependencies":[{"issue_id":"bd-2papc","depends_on_id":"bd-imi7w","type":"parent-child","created_at":"2026-01-10T16:34:21.797147-08:00","created_by":"gastown/crew/max"}]}
{"id":"bd-2q5zk","title":"Digest: mol-refinery-patrol","description":"Patrol cycle: queue empty, no branches processed","status":"closed","priority":2,"issue_type":"task","created_at":"2026-01-11T22:58:49.807812-08:00","updated_at":"2026-01-11T22:58:49.807812-08:00","closed_at":"2026-01-11T22:58:49.807755-08:00","close_reason":"Squashed from 11 wisps","dependencies":[{"issue_id":"bd-2q5zk","depends_on_id":"bd-wisp-c5s","type":"parent-child","created_at":"2026-01-11T22:58:49.80882-08:00","created_by":"beads/refinery"}]}
{"id":"bd-2q5zk","title":"Digest: mol-refinery-patrol","description":"Patrol cycle: queue empty, no branches processed","status":"closed","priority":2,"issue_type":"task","created_at":"2026-01-11T22:58:49.807812-08:00","updated_at":"2026-01-11T22:58:49.807812-08:00","closed_at":"2026-01-11T22:58:49.807755-08:00","close_reason":"Squashed from 11 wisps"}
{"id":"bd-2q6d","title":"Beads commands operate on stale database without warning","description":"All beads read operations should validate database is in sync with JSONL before proceeding.\n\n**Current Behavior:**\n- Commands can query/read from stale database\n- Only mutation operations (like 'bd sync') check if JSONL is newer\n- User gets incorrect results without realizing database is out of sync\n\n**Expected Behavior:**\n- All beads commands should have pre-flight check for database freshness\n- If JSONL is newer than database, refuse to operate with error: \"Database out of sync. Run 'bd import' first.\"\n- Same safety check that exists for 'bd sync' should apply to ALL operations\n\n**Impact:**\n- Users make decisions based on incomplete/outdated data\n- Silent failures lead to confusion (e.g., thinking issues don't exist when they do)\n- Similar to running git commands on stale repo without being warned to pull\n\n**Example:**\n- Searched for bd-g9eu issue file: not found\n- Issue exists in .beads/issues.jsonl (in git)\n- Database was stale, but no warning was given\n- Led to incorrect conclusion that issue was already closed/deleted","notes":"## Implementation Complete\n\n**Phase 1: Created staleness check (cmd/bd/staleness.go)**\n- ensureDatabaseFresh() function checks JSONL mtime vs last_import_time\n- Returns error with helpful message when database is stale\n- Auto-skips in daemon mode (daemon has auto-import)\n\n**Phase 2: Added to all read commands**\n- list, show, ready, status, stale, info, duplicates, validate\n- Check runs before database queries in direct mode\n- Daemon mode already protected via checkAndAutoImportIfStale()\n\n**Phase 3: Code Review Findings**\nSee follow-up issues:\n- bd-XXXX: Add warning when staleness check errors\n- bd-YYYY: Improve CheckStaleness error handling\n- bd-ZZZZ: Refactor redundant daemon checks (low priority)\n\n**Testing:**\n- Build successful: go build ./cmd/bd\n- Binary works: ./bd --version\n- Ready for manual testing\n\n**Next Steps:**\n1. Test with stale database scenario\n2. Implement review improvements\n3. Close issue when tests pass","status":"tombstone","priority":1,"issue_type":"bug","created_at":"2025-11-20T19:33:40.019297-05:00","updated_at":"2025-12-25T01:21:01.952723-08:00","deleted_at":"2025-12-25T01:21:01.952723-08:00","deleted_by":"batch delete","delete_reason":"batch delete","original_type":"bug"}
{"id":"bd-2r1b","title":"fix: bd onboard hangs on Windows","status":"closed","priority":1,"issue_type":"bug","created_at":"2025-12-13T18:08:26.673076-08:00","updated_at":"2025-12-13T18:08:32.309879-08:00","closed_at":"2025-12-13T18:08:32.309879-08:00"}
{"id":"bd-2rfr","title":"GH#505: Add bd reset command to wipe database","description":"Users struggle to fully reset beads (local + remote). Need bd reset command with safety confirmation. Currently requires manual hook/dir removal. See: https://github.com/steveyegge/beads/issues/505","status":"closed","priority":2,"issue_type":"feature","created_at":"2025-12-14T16:32:02.919494-08:00","updated_at":"2025-12-16T14:39:19.050872-08:00","closed_at":"2025-12-16T01:09:44.996918-08:00"}
@@ -1188,6 +1188,7 @@
{"id":"bd-fkp68","title":"Digest: mol-refinery-patrol","description":"Patrol: queue empty, no work processed","status":"closed","priority":2,"issue_type":"task","created_at":"2026-01-10T23:37:26.823421-08:00","updated_at":"2026-01-10T23:37:26.823421-08:00","closed_at":"2026-01-10T23:37:26.823378-08:00","close_reason":"Squashed from 11 wisps","dependencies":[{"issue_id":"bd-fkp68","depends_on_id":"bd-wisp-7gd","type":"parent-child","created_at":"2026-01-10T23:37:26.824301-08:00","created_by":"beads/refinery"}]}
{"id":"bd-fl9xb","title":"Review PR #960: Fix filepath.Rel sync error","description":"dispatched_by: beads/crew/emma\n\nReview and verify PR #960 (steveyegge/beads)\n\nPR: https://github.com/steveyegge/beads/pull/960\nAuthor: peterkc\nFixes: #959\n\nFixes bd sync failing with filepath.Rel error when dbPath is relative.\n- gh pr view 960 --repo steveyegge/beads\n- gh pr diff 960 --repo steveyegge/beads\n- If good: gh pr merge 960 --repo steveyegge/beads --squash","status":"closed","priority":2,"issue_type":"task","assignee":"beads/crew/giles","created_at":"2026-01-08T14:30:23.843917-08:00","created_by":"beads/crew/emma","updated_at":"2026-01-08T14:37:19.657459-08:00","closed_at":"2026-01-08T14:37:19.657459-08:00","close_reason":"PR #960 reviewed and merged. Fix ensures dbPath is always absolute via CanonicalizePath, preventing filepath.Rel errors in sync-branch mode."}
{"id":"bd-fmdy","title":"Merge: bd-kzda","description":"branch: polecat/toast\ntarget: main\nsource_issue: bd-kzda\nrig: beads","status":"closed","priority":3,"issue_type":"merge-request","created_at":"2025-12-23T00:27:28.952413-08:00","updated_at":"2025-12-23T01:33:25.731326-08:00","closed_at":"2025-12-23T01:33:25.731326-08:00"}
{"id":"bd-fmyez","title":"Session ended: gt-beads-refinery","status":"closed","priority":2,"issue_type":"event","owner":"steve.yegge@gmail.com","created_at":"2026-01-11T23:04:16.116235-08:00","created_by":"beads/refinery","updated_at":"2026-01-11T23:04:16.188262-08:00","closed_at":"2026-01-11T23:04:16.188262-08:00","close_reason":"auto-closed session cost wisp","ephemeral":true}
{"id":"bd-fom","title":"Remove all deletions.jsonl code except migration","description":"There's deletions manifest code spread across the entire codebase that should have been removed after tombstone migration:\n\nFiles with deletions code (non-migration):\n- internal/deletions/ - entire package\n- cmd/bd/sync.go - 25+ references, auto-compact, sanitize\n- cmd/bd/delete.go - dual-writes to deletions.jsonl\n- internal/importer/importer.go - checks deletions manifest\n- internal/syncbranch/worktree.go - merges deletions.jsonl\n- cmd/bd/doctor/fix/sync.go - cleanupDeletionsManifest\n- cmd/bd/doctor/fix/deletions.go - HydrateDeletionsManifest\n- cmd/bd/integrity.go - checks deletions for data loss\n- cmd/bd/deleted.go - entire command\n- cmd/bd/compact.go - pruneDeletionsManifest\n- cmd/bd/doctor.go - checkDeletionsManifest\n- Plus many more\n\nAction: Aggressively remove all non-migration deletions code. Tombstones are the only deletion mechanism now.","status":"tombstone","priority":1,"issue_type":"task","created_at":"2025-12-16T13:29:04.960863-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-fqze8","title":"Add 'crystallizes' field for work economics","description":"dispatched_by: beads/crew/emma\n\nAdd boolean field to track whether work compounds (crystallizes=true: code, features) or evaporates (crystallizes=false: ops, support). Per Decision 006, this affects CV weighting. Default: false (conservative).","status":"closed","priority":1,"issue_type":"task","assignee":"beads/crew/fang","created_at":"2026-01-10T16:34:06.487466-08:00","created_by":"gastown/crew/max","updated_at":"2026-01-10T23:21:17.458797-08:00","closed_at":"2026-01-10T23:21:17.458797-08:00","close_reason":"Crystallizes field implemented","dependencies":[{"issue_id":"bd-fqze8","depends_on_id":"bd-imi7w","type":"parent-child","created_at":"2026-01-10T16:34:21.496543-08:00","created_by":"gastown/crew/max"}]}
{"id":"bd-frkzo","title":"Session ended: gt-gastown-crew-george","status":"closed","priority":2,"issue_type":"event","created_at":"2026-01-07T21:51:17.681136-08:00","created_by":"beads/witness","updated_at":"2026-01-09T21:15:40.68839-08:00","closed_at":"2026-01-09T21:15:40.68839-08:00","close_reason":"Stale session ended events"}
@@ -2183,7 +2184,6 @@
{"id":"bd-wisp-bkf","title":"Restart daemons","description":"Restart bd daemons to pick up new version.\n\n```bash\nbd daemons killall\n```\n\nDaemons will auto-restart with new version on next bd command.\n\nVerify:\n```bash\nbd daemons list\n```\n","status":"closed","priority":2,"issue_type":"task","created_at":"2026-01-06T20:07:32.259461-08:00","updated_at":"2026-01-06T20:18:20.108169-08:00","closed_at":"2026-01-06T20:18:20.108169-08:00","close_reason":"Release v0.45.0 complete","dependencies":[{"issue_id":"bd-wisp-bkf","depends_on_id":"bd-wisp-fm4","type":"blocks","created_at":"2026-01-06T20:07:32.290802-08:00","created_by":"beads/crew/dave"}]}
{"id":"bd-wisp-bye","title":"Run bump-version.sh","description":"Update all component versions atomically.\n\n```bash\n./scripts/bump-version.sh 0.45.0\n```\n\nThis updates:\n- cmd/bd/version.go\n- .claude-plugin/*.json\n- integrations/beads-mcp/pyproject.toml\n- integrations/beads-mcp/src/beads_mcp/__init__.py\n- npm-package/package.json\n- Hook templates\n- README.md\n- CHANGELOG.md (adds date)\n","status":"closed","priority":2,"issue_type":"task","created_at":"2026-01-06T20:07:32.257161-08:00","updated_at":"2026-01-06T20:11:24.896526-08:00","closed_at":"2026-01-06T20:11:24.896526-08:00","close_reason":"Version bumped and verified: 0.45.0","dependencies":[{"issue_id":"bd-wisp-bye","depends_on_id":"bd-wisp-9kb","type":"blocks","created_at":"2026-01-06T20:07:32.275432-08:00","created_by":"beads/crew/dave"}]}
{"id":"bd-wisp-c3g","title":"mol-refinery-patrol","description":"Merge queue processor patrol loop.\n\nThe Refinery is the Engineer in the engine room. You process polecat branches, merging them to main one at a time with sequential rebasing.\n\n**The Scotty Test**: Before proceeding past any failure, ask yourself: \"Would Scotty walk past a warp core leak because it existed before his shift?\"\n\n## Merge Flow\n\nThe Refinery receives MERGE_READY mail from Witnesses when polecats complete work:\n\n```\nWitness Refinery Git\n │ │ │\n │ MERGE_READY │ │\n │─────────────────────────\u003e│ │\n │ │ │\n │ (verify branch) │\n │ │ fetch \u0026 rebase │\n │ │──────────────────────────\u003e│\n │ │ │\n │ (run tests) │\n │ │ │\n │ (if pass) │\n │ │ merge \u0026 push │\n │ │──────────────────────────\u003e│\n │ │ │\n │ MERGED │ │\n │\u003c─────────────────────────│ │\n │ │ │\n```\n\nAfter successful merge, Refinery sends MERGED mail back to Witness so it can\ncomplete cleanup (nuke the polecat worktree).","status":"open","priority":2,"issue_type":"epic","created_at":"2026-01-10T22:51:49.272262-08:00","updated_at":"2026-01-10T22:51:49.272262-08:00","ephemeral":true}
{"id":"bd-wisp-c5s","title":"mol-refinery-patrol","description":"Merge queue processor patrol loop.\n\nThe Refinery is the Engineer in the engine room. You process polecat branches, merging them to main one at a time with sequential rebasing.\n\n**The Scotty Test**: Before proceeding past any failure, ask yourself: \"Would Scotty walk past a warp core leak because it existed before his shift?\"\n\n## Merge Flow\n\nThe Refinery receives MERGE_READY mail from Witnesses when polecats complete work:\n\n```\nWitness Refinery Git\n │ │ │\n │ MERGE_READY │ │\n │─────────────────────────\u003e│ │\n │ │ │\n │ (verify branch) │\n │ │ fetch \u0026 rebase │\n │ │──────────────────────────\u003e│\n │ │ │\n │ (run tests) │\n │ │ │\n │ (if pass) │\n │ │ merge \u0026 push │\n │ │──────────────────────────\u003e│\n │ │ │\n │ MERGED │ │\n │\u003c─────────────────────────│ │\n │ │ │\n```\n\nAfter successful merge, Refinery sends MERGED mail back to Witness so it can\ncomplete cleanup (nuke the polecat worktree).","status":"open","priority":2,"issue_type":"epic","created_at":"2026-01-11T22:57:44.123716-08:00","updated_at":"2026-01-11T22:57:44.123716-08:00","ephemeral":true}
{"id":"bd-wisp-cf3","title":"Create release tag","description":"Create annotated git tag.\n\n```bash\ngit tag -a v0.45.0 -m \"Release v0.45.0\"\n```\n\nVerify: `git tag -l | tail -5`\n","status":"closed","priority":2,"issue_type":"task","created_at":"2026-01-06T20:07:32.257743-08:00","updated_at":"2026-01-06T20:12:04.079541-08:00","closed_at":"2026-01-06T20:12:04.079541-08:00","close_reason":"Tag v0.45.0 created","dependencies":[{"issue_id":"bd-wisp-cf3","depends_on_id":"bd-wisp-9ka","type":"blocks","created_at":"2026-01-06T20:07:32.278265-08:00","created_by":"beads/crew/dave"}]}
{"id":"bd-wisp-d7b","title":"mol-refinery-patrol","description":"Merge queue processor patrol loop.\n\nThe Refinery is the Engineer in the engine room. You process polecat branches, merging them to main one at a time with sequential rebasing.\n\n**The Scotty Test**: Before proceeding past any failure, ask yourself: \"Would Scotty walk past a warp core leak because it existed before his shift?\"\n\n## Merge Flow\n\nThe Refinery receives MERGE_READY mail from Witnesses when polecats complete work:\n\n```\nWitness Refinery Git\n │ │ │\n │ MERGE_READY │ │\n │─────────────────────────\u003e│ │\n │ │ │\n │ (verify branch) │\n │ │ fetch \u0026 rebase │\n │ │──────────────────────────\u003e│\n │ │ │\n │ (run tests) │\n │ │ │\n │ (if pass) │\n │ │ merge \u0026 push │\n │ │──────────────────────────\u003e│\n │ │ │\n │ MERGED │ │\n │\u003c─────────────────────────│ │\n │ │ │\n```\n\nAfter successful merge, Refinery sends MERGED mail back to Witness so it can\ncomplete cleanup (nuke the polecat worktree).","status":"closed","priority":2,"issue_type":"epic","assignee":"beads/refinery","created_at":"2026-01-10T20:13:17.442141-08:00","updated_at":"2026-01-10T20:24:29.145383-08:00","closed_at":"2026-01-10T20:24:29.145383-08:00","close_reason":"Patrol: queue empty, no branches to merge","ephemeral":true}
{"id":"bd-wisp-da9","title":"mol-refinery-patrol","description":"Merge queue processor patrol loop.\n\nThe Refinery is the Engineer in the engine room. You process polecat branches, merging them to main one at a time with sequential rebasing.\n\n**The Scotty Test**: Before proceeding past any failure, ask yourself: \"Would Scotty walk past a warp core leak because it existed before his shift?\"\n\n## Merge Flow\n\nThe Refinery receives MERGE_READY mail from Witnesses when polecats complete work:\n\n```\nWitness Refinery Git\n │ │ │\n │ MERGE_READY │ │\n │─────────────────────────\u003e│ │\n │ │ │\n │ (verify branch) │\n │ │ fetch \u0026 rebase │\n │ │──────────────────────────\u003e│\n │ │ │\n │ (run tests) │\n │ │ │\n │ (if pass) │\n │ │ merge \u0026 push │\n │ │──────────────────────────\u003e│\n │ │ │\n │ MERGED │ │\n │\u003c─────────────────────────│ │\n │ │ │\n```\n\nAfter successful merge, Refinery sends MERGED mail back to Witness so it can\ncomplete cleanup (nuke the polecat worktree).","status":"open","priority":2,"issue_type":"epic","assignee":"beads/refinery","created_at":"2026-01-10T23:02:52.077365-08:00","updated_at":"2026-01-10T23:04:32.545374-08:00","ephemeral":true}