bd daemon sync: 2026-01-08 14:30:53

This commit is contained in:
emma
2026-01-08 14:30:53 -08:00
committed by Steve Yegge
parent 29858230d5
commit 9ea8fa5d68

View File

@@ -1450,7 +1450,7 @@
{"id":"bd-phin","title":"bd wisp create doesn't set Wisp flag on spawned issues","description":"When running 'bd wisp create \u003cproto\u003e', the spawned issues don't have Wisp: true set. They show up in 'bd ready' and get synced to JSONL.\n\nExample: gt-lqc6m and gt-wisp-ry9 are mol-deacon-patrol issues that should be wisps but have wisp: null.\n\nThis causes patrol cycles to pollute the issue database and show up as ready work.","status":"closed","priority":1,"issue_type":"bug","created_at":"2025-12-27T00:34:06.684776-08:00","created_by":"mayor","updated_at":"2025-12-27T14:48:01.774826-08:00","closed_at":"2025-12-27T14:48:01.774826-08:00"}
{"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-piywi","title":"Review PR #953: Fix --due/--defer in daemon mode","description":"Review and verify PR #953 (steveyegge/beads)\n\nPR: https://github.com/steveyegge/beads/pull/953\nAuthor: peterkc\nFixes: #952, #950\n\nFixes daemon mode silently ignoring --due and --defer flags.\n- gh pr view 953 --repo steveyegge/beads\n- gh pr diff 953 --repo steveyegge/beads\n- If good: gh pr merge 953 --repo steveyegge/beads --squash","status":"open","priority":2,"issue_type":"task","created_at":"2026-01-08T14:30:25.036198-08:00","created_by":"beads/crew/emma","updated_at":"2026-01-08T14:30:25.036198-08:00"}
{"id":"bd-piywi","title":"Review PR #953: Fix --due/--defer in daemon mode","description":"dispatched_by: beads/crew/emma\n\nReview and verify PR #953 (steveyegge/beads)\n\nPR: https://github.com/steveyegge/beads/pull/953\nAuthor: peterkc\nFixes: #952, #950\n\nFixes daemon mode silently ignoring --due and --defer flags.\n- gh pr view 953 --repo steveyegge/beads\n- gh pr diff 953 --repo steveyegge/beads\n- If good: gh pr merge 953 --repo steveyegge/beads --squash","status":"hooked","priority":2,"issue_type":"task","assignee":"beads/crew/wolf","created_at":"2026-01-08T14:30:25.036198-08:00","created_by":"beads/crew/emma","updated_at":"2026-01-08T14:30:53.153489-08:00"}
{"id":"bd-pmuu","title":"Create architecture decision record (ADR)","description":"Document why we chose Agent Mail, alternatives considered, and tradeoffs.\n\nAcceptance Criteria:\n- Problem statement (git traffic, no locks)\n- Alternatives considered (custom RPC, Redis, etc.)\n- Why Agent Mail fits Beads\n- Integration principles (optional, graceful degradation)\n- Future considerations\n\nFile: docs/adr/002-agent-mail-integration.md","status":"closed","priority":2,"issue_type":"task","created_at":"2025-11-07T22:42:51.420203-08:00","updated_at":"2025-11-08T00:06:01.816892-08:00","closed_at":"2025-11-08T00:06:01.816892-08:00","dependencies":[{"issue_id":"bd-pmuu","depends_on_id":"bd-spmx","type":"parent-child","created_at":"2025-11-08T00:02:47.93119-08:00","created_by":"daemon"}]}
{"id":"bd-pn0t","title":"Add 0.33.2 to versionChanges in info.go","description":"Add new entry at TOP of versionChanges in cmd/bd/info.go with release notes from CHANGELOG.md. Must do before bump-version.sh --commit.","status":"tombstone","priority":1,"issue_type":"task","created_at":"2025-12-21T16:10:13.760056-08:00","updated_at":"2025-12-21T17:29:31.791368-08:00","deleted_at":"2025-12-21T17:29:31.791368-08:00","deleted_by":"batch delete","delete_reason":"batch delete","original_type":"task"}
{"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"}]}