From 8a977ad541febe1c5469dd6ccff303cecfe8a9e7 Mon Sep 17 00:00:00 2001 From: beads/refinery Date: Sun, 11 Jan 2026 07:36:09 -0800 Subject: [PATCH] bd daemon sync: 2026-01-11 07:36:09 --- .beads/issues.jsonl | 1 + 1 file changed, 1 insertion(+) diff --git a/.beads/issues.jsonl b/.beads/issues.jsonl index d3968d18..d4f60940 100644 --- a/.beads/issues.jsonl +++ b/.beads/issues.jsonl @@ -1924,6 +1924,7 @@ {"id":"bd-usro","title":"Rename 'template instantiate' to 'mol bond'","description":"Rename the template instantiation command to match molecule metaphor.\n\nCurrent: bd template instantiate \u003cid\u003e --var key=value\nTarget: bd mol bond \u003cid\u003e --var key=value\n\nChanges needed:\n- Add 'mol' command group (or extend existing)\n- Add 'bond' subcommand that wraps template instantiate logic\n- Keep 'template instantiate' as deprecated alias for backward compat\n- Update help text and docs to use molecule terminology\n\nThe 'bond' verb captures:\n1. Chemistry metaphor (molecules bond to form structures)\n2. Dependency linking (child issues bonded in a DAG)\n3. Short and active\n\nSee also: molecule execution model in Gas Town","status":"closed","priority":1,"issue_type":"feature","created_at":"2025-12-20T16:56:37.582795-08:00","updated_at":"2025-12-20T23:22:43.567337-08:00","closed_at":"2025-12-20T23:22:43.567337-08:00"} {"id":"bd-ustlq","title":"Session ended: gt-beads-crew-dave","status":"closed","priority":2,"issue_type":"event","created_at":"2026-01-09T22:15:37.425415-08:00","created_by":"beads/crew/dave","updated_at":"2026-01-09T22:15:37.465321-08:00","closed_at":"2026-01-09T22:15:37.465321-08:00","close_reason":"auto-closed session cost wisp","ephemeral":true} {"id":"bd-usvv","title":"Defer SQLite metadata updates until after git commit succeeds","description":"Part of GH#885 fix: bulletproof sync atomicity.\n\nCurrently exportToJSONL() immediately:\n- Clears dirty flags in SQLite\n- Updates last_import_time metadata\n\nThis happens BEFORE git commit, so if commit fails, SQLite \"lies\" about sync state.\n\nFix: Move metadata updates to AFTER git commit succeeds:\n1. Export JSONL to disk (atomic file write)\n2. Stage and commit to git\n3. ONLY THEN clear dirty flags and update last_import_time\n\nKey files:\n- cmd/bd/sync_export.go:147-170 (premature updates)\n- cmd/bd/sync.go:555 (commit point)\n\nThis is the core fix for the atomicity gap.","status":"closed","priority":1,"issue_type":"task","created_at":"2026-01-04T13:53:23.619319-08:00","created_by":"beads/crew/emma","updated_at":"2026-01-04T15:22:08.704907-08:00","closed_at":"2026-01-04T15:16:21.245756-08:00","close_reason":"Implemented deferred metadata updates - finalizeExport() now runs after git commit succeeds","dependencies":[{"issue_id":"bd-usvv","depends_on_id":"bd-pnx2","type":"parent-child","created_at":"2026-01-04T13:53:55.798447-08:00","created_by":"beads/crew/emma"}]} +{"id":"bd-uswaw","title":"Session ended: gt-beads-refinery","status":"closed","priority":2,"issue_type":"event","owner":"steve.yegge@gmail.com","created_at":"2026-01-11T07:36:08.453538-08:00","created_by":"beads/refinery","updated_at":"2026-01-11T07:36:08.517511-08:00","closed_at":"2026-01-11T07:36:08.517511-08:00","close_reason":"auto-closed session cost wisp","ephemeral":true} {"id":"bd-ut5","title":"Test label update feature","status":"closed","priority":3,"issue_type":"task","created_at":"2025-11-21T22:07:25.488849-05:00","updated_at":"2025-12-14T00:32:11.0488-08:00","closed_at":"2025-12-13T23:29:56.878215-08:00"} {"id":"bd-uti26","title":"Test defer issue","status":"closed","priority":2,"issue_type":"task","created_at":"2026-01-07T21:30:33.858115-08:00","created_by":"beads/crew/emma","updated_at":"2026-01-09T21:15:41.7331-08:00","closed_at":"2026-01-09T21:15:41.7331-08:00","close_reason":"Test beads - cleanup"} {"id":"bd-uu8p","title":"Routing bypassed in daemon mode","description":"## Bug\n\nPrefix-based routing (routes.jsonl) only works in direct mode. When the daemon is running, it bypasses routing logic because:\n\n1. Daemon mode resolves IDs via RPC (`daemonClient.ResolveID`)\n2. Daemon uses its own store, which only knows about local beads\n3. The routing logic in `resolveAndGetIssueWithRouting` is only called in direct mode\n\n## Reproduction\n\n```bash\n# With daemon running:\ncd ~/gt\nbd show gt-1py3y # Fails - daemon can't find it\n\n# With daemon bypassed:\nbd --no-daemon show gt-1py3y # Works - uses routing\n```\n\n## Fix Options\n\n### Option A: Client-side routing detection (Recommended)\nBefore calling daemon RPC, check if the ID prefix matches a route to a different beads dir. If so, use direct mode with routing for that ID.\n\n```go\n// In show.go, before daemon mode:\nif daemonClient != nil \u0026\u0026 needsRouting(id) {\n // Fall back to direct mode for this ID\n result, err := resolveAndGetIssueWithRouting(ctx, store, id)\n ...\n}\n```\n\n### Option B: Daemon-side routing\nAdd routing support to the daemon RPC server. More complex - daemon would need to:\n- Load routes.jsonl on startup\n- Open connections to multiple databases\n- Route requests based on ID prefix\n\n### Option C: Hybrid\nDaemon returns \"not found + prefix hint\", client retries with routing.\n\n## Recommendation\n\nOption A is simplest. The client already has routing logic; just use it when we detect a routed prefix.","status":"closed","priority":1,"issue_type":"bug","created_at":"2025-12-26T14:52:00.452285-08:00","updated_at":"2025-12-26T14:54:51.572289-08:00","closed_at":"2025-12-26T14:54:51.572289-08:00"}