bd daemon sync: 2026-01-11 22:58:54
This commit is contained in:
committed by
Steve Yegge
parent
a023eb6a62
commit
baf884cbf4
@@ -209,6 +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-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"}
|
||||
@@ -1028,6 +1029,7 @@
|
||||
{"id":"bd-dpbm","title":"Test no validate","description":"Quick capture","status":"closed","priority":2,"issue_type":"bug","created_at":"2026-01-01T19:24:58.637574-08:00","created_by":"beads/polecats/opal","updated_at":"2026-01-01T19:25:09.044121-08:00","closed_at":"2026-01-01T19:25:09.044121-08:00","close_reason":"Test issue cleanup"}
|
||||
{"id":"bd-dpkdm","title":"Add AllowStale option to beads List API for resilient GUPP detection","description":"## Problem\n\nWhen the beads database is out of sync with the JSONL file (common after another agent syncs), `bd list` fails with \"Database out of sync with JSONL\". This causes `checkSlungWork()` in gastown's `gt prime` to silently fail, which means:\n\n1. AUTONOMOUS WORK MODE is never shown\n2. Normal startup directive is displayed instead\n3. Agents follow that instead of GUPP\n4. **Hooked work sits idle - massive GUPP violation**\n\nRoot cause: Commit 1da3e18 made staleness checks stricter, and `checkSlungWork()` silently returns false on error.\n\n## Solution\n\nImplement a resilient three-layer approach:\n\n### Step 1: Add AllowStale to ListOptions (beads)\n- Add `AllowStale bool` field to `ListOptions` struct\n- Update `List()` to pass `--allow-stale` flag when set\n\n### Step 2: Update checkSlungWork in gastown\n- Try quick `bd sync --import-only` first (best effort)\n- Try normal list\n- If error, log warning and retry with `AllowStale: true`\n- Only return false if both attempts fail\n\n### Step 3: Never fail silently\n- Always log errors instead of silent `return false`\n\n## Concurrency Note\n\nMultiple workers may spin up and try `bd sync` simultaneously. SQLite's own locking serializes writes, so this is safe but potentially slow. No additional mutex needed for correctness.\n\n## Files to Change\n\n**In beads:**\n- `internal/beads/beads.go` - Add AllowStale to ListOptions, update List()\n\n**In gastown (separate PR):**\n- `internal/cmd/prime.go` - Update checkSlungWork() with resilient logic\n\n## Testing\n- Simulate stale DB by modifying JSONL without importing\n- Verify AUTONOMOUS MODE shows with AllowStale fallback\n- Test concurrent worker startup","status":"closed","priority":1,"issue_type":"epic","assignee":"beads/crew/dave","created_at":"2026-01-09T00:36:54.636297-08:00","created_by":"gastown/crew/george","updated_at":"2026-01-09T00:42:33.462367-08:00","closed_at":"2026-01-09T00:42:33.462367-08:00","close_reason":"Implemented AllowStale option in List API - added to ListArgs struct and CLI passthrough. Daemon already handles staleness gracefully. Gastown step 2 pending separately."}
|
||||
{"id":"bd-dq74","title":"bd repair: Handle .beads/redirect files","description":"The bd repair command hardcodes .beads/beads.db path but doesn't follow .beads/redirect files like other commands do. This means repair won't work on clones that use redirected beads directories.\n\nFix: Check for .beads/redirect file and follow it to find the actual database location.","status":"closed","priority":2,"issue_type":"bug","created_at":"2025-12-29T12:47:53.089729-08:00","created_by":"stevey","updated_at":"2025-12-29T12:59:05.121303-08:00","closed_at":"2025-12-29T12:59:05.121303-08:00","close_reason":"Fixed in commit d7a67ad6"}
|
||||
{"id":"bd-dq8pu","title":"Session ended: gt-beads-refinery","status":"closed","priority":2,"issue_type":"event","owner":"steve.yegge@gmail.com","created_at":"2026-01-11T22:58:53.861683-08:00","created_by":"beads/refinery","updated_at":"2026-01-11T22:58:53.906534-08:00","closed_at":"2026-01-11T22:58:53.906534-08:00","close_reason":"auto-closed session cost wisp","ephemeral":true}
|
||||
{"id":"bd-dqck","title":"Version Bump: test-squash","description":"Release checklist for version test-squash. This molecule ensures all release steps are completed properly.","status":"tombstone","priority":1,"issue_type":"epic","created_at":"2025-12-21T13:52:33.065408-08:00","updated_at":"2025-12-21T13:53:41.946036-08:00","deleted_at":"2025-12-21T13:53:41.946036-08:00","deleted_by":"stevey","delete_reason":"manual delete","original_type":"epic"}
|
||||
{"id":"bd-dqmb1","title":"Fix: SQLite WAL fails on WSL2 /mnt/c/ (GH#920)","description":"dispatched_by: beads/crew/dave\n\nGitHub issue #920. SQLite WAL mode fails when database is on Windows filesystem via WSL2.","status":"closed","priority":2,"issue_type":"bug","assignee":"beads/crew/dave","created_at":"2026-01-09T22:20:24.108375-08:00","created_by":"beads/crew/dave","updated_at":"2026-01-09T23:03:05.074957-08:00","closed_at":"2026-01-09T23:03:05.074957-08:00","close_reason":"Fixed: auto-detect WSL2 Windows filesystem and use DELETE mode"}
|
||||
{"id":"bd-dqu8","title":"Restart running daemons","description":"Kill and restart any running bd daemons to pick up new version: pkill -f 'bd daemon' \u0026\u0026 bd daemon --start","status":"closed","priority":1,"issue_type":"task","created_at":"2025-12-20T00:32:26.559311-08:00","updated_at":"2025-12-20T00:32:59.123766-08:00","closed_at":"2025-12-20T00:32:59.123766-08:00","dependencies":[{"issue_id":"bd-dqu8","depends_on_id":"bd-6s61","type":"parent-child","created_at":"2025-12-20T00:32:39.36213-08:00","created_by":"daemon"},{"issue_id":"bd-dqu8","depends_on_id":"bd-fgw3","type":"blocks","created_at":"2025-12-20T00:32:39.427846-08:00","created_by":"daemon"}]}
|
||||
@@ -2181,6 +2183,7 @@
|
||||
{"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}
|
||||
|
||||
Reference in New Issue
Block a user