bd daemon sync: 2026-01-12 01:26:27

This commit is contained in:
beads/witness
2026-01-12 01:26:27 -08:00
committed by Steve Yegge
parent 1c1972e29c
commit 0acdd52282

View File

@@ -2398,6 +2398,7 @@
{"id":"bd-zt59","title":"Deferred HOP schema additions (P2/P3)","description":"Deferred from bd-7pwh after review. Add when semantics are clearer and actually needed:\n\n- assignee_ref: Structured EntityRef alongside string assignee\n- work_type: 'mutex' vs 'open_competition' (everything is mutex in v0.1)\n- crystallizes: bool for work that compounds vs evaporates (can derive from issue_type)\n- cross_refs: URIs to beads in other repos (needs federation first)\n- skill_vector: []float32 embeddings placeholder (YAGNI)\n\nThese can be added later without breaking changes (all optional fields).","status":"closed","priority":4,"issue_type":"task","created_at":"2025-12-22T17:54:20.02496-08:00","updated_at":"2026-01-06T19:29:46.239397-08:00","closed_at":"2026-01-06T19:29:46.239397-08:00","close_reason":"Moved to town HQ: hq-my0dy9 (HOP-specific concerns are out of scope for beads tool)"}
{"id":"bd-ztnzl","title":"Fix bd init spins forever creating C:\\.beads outside git (GH#996)","description":"dispatched_by: mayor\n\nbd init on Windows spins forever trying to create C:\\.beads when run outside of .git. See https://github.com/steveyegge/beads/issues/996","status":"closed","priority":2,"issue_type":"task","assignee":"beads/crew/giles","created_at":"2026-01-10T12:18:38.637359-08:00","created_by":"mayor","updated_at":"2026-01-10T12:28:14.994264-08:00","closed_at":"2026-01-10T12:28:14.994264-08:00","close_reason":"Fixed infinite loop in findLocalBeadsDir() and findOriginalBeadsDir() on Windows - same pattern as PR #991 fix for FindBeadsDir(). On Windows, filepath.Dir(\"C:\\\\\") returns \"C:\\\\\" (not \"/\" or \".\"), so the loop condition must check if parent == dir to detect filesystem root.","labels":["bug"]}
{"id":"bd-zw72","title":"Investigate incremental blocked_issues_cache updates at scale","description":"Current blocked_issues_cache strategy does full DELETE + INSERT on every dependency/status change.\n\n**Problem at scale:**\n- 10K issues: ~50ms rebuild (acceptable)\n- 100K issues: ~500ms rebuild (noticeable)\n- 1M issues: multi-second rebuilds (problematic)\n\n**Current implementation (blocked_cache.go:104-154):**\n- DELETE FROM blocked_issues_cache\n- INSERT with recursive CTE\n\n**Potential optimizations:**\n1. **Incremental updates:** Only add/remove affected issue IDs instead of full rebuild\n2. **Dirty tracking:** Skip rebuild if cache is already valid\n3. **Async rebuild:** Rebuild in background, serve stale cache briefly\n4. **Partial invalidation:** Only invalidate affected subtree\n\n**Decision needed:** Is this premature optimization? Current target is \u003c100K issues.\n\n**Benchmark:** Add benchmark for cache rebuild at 100K scale to measure actual impact.","status":"open","priority":3,"issue_type":"task","created_at":"2025-12-22T22:58:55.165718-08:00","updated_at":"2026-01-02T00:17:14.280698-08:00","dependencies":[{"issue_id":"bd-zw72","depends_on_id":"bd-h0we","type":"discovered-from","created_at":"2025-12-22T22:58:55.166427-08:00","created_by":"daemon"}],"comments":[{"id":10,"issue_id":"bd-zw72","author":"beads/crew/wolf","text":"## Benchmark Investigation Results (2026-01-02)\n\n**Cache rebuild timing:**\n- 10K issues: 773ms (Go benchmark), ~270ms (raw SQL)\n- 20K issues: 1,298ms\n- Extrapolated 100K: ~6.5 seconds\n\nOriginal estimates were 15x too optimistic. Go/CGO/WAL adds ~3x overhead.\n\n**Key insight:** Most dependency changes only affect a localized subgraph. Incremental updates could reduce 773ms to \u003c50ms for typical ops.\n\n**Added:** BenchmarkRebuildBlockedCache_Large/XLarge in sqlite_bench_test.go","created_at":"2026-01-03T01:29:51Z"},{"id":11,"issue_id":"bd-zw72","author":"beads/crew/wolf","text":"## Incremental Update Design Sketch\n\n**When to update cache:**\n1. Add blocks dep → add blocked issue + descendants to cache\n2. Remove blocks dep → check if still blocked, remove if not + propagate to descendants \n3. Close issue → check dependents, remove unblocked + descendants\n4. Reopen issue → add dependents + descendants back\n\n**Key insight:** Adding to cache is simple (just insert). Removing is complex (must verify no alternate blocking path).\n\n**Proposed approach:**\n- For additions: \\`INSERT OR IGNORE\\` the affected subgraph (fast, O(affected_nodes))\n- For removals: Rebuild only for the affected subgraph, not entire cache\n- Keep full rebuild as fallback for complex cases (waits-for, conditional-blocks)\n\n**Estimated improvement:**\n- Typical add/remove: O(affected_nodes) vs O(all_issues)\n- 10K DB with 1 affected node: ~5ms vs 773ms (150x faster)\n- Worst case (unblock entire graph): same as now\n\n**Implementation complexity:** Medium - need to handle transitive parent-child correctly","created_at":"2026-01-03T01:30:30Z"}]}
{"id":"bd-zw7pp","title":"Add defensive fix in importer to auto-correct status when deleted_at present","description":"Similar to the existing defensive fix for closed_at (lines 260-267 in multirepo.go), add a fix for the reverse case:\n\nIf an issue has deleted_at set but status != tombstone, auto-correct status to tombstone during import.\n\nThis handles corrupted data gracefully instead of failing import.\n\nExisting pattern in `upsertIssueInTx`:\n```go\n// Defensive fix for deleted_at invariant: tombstones must have deleted_at\nif issue.Status == types.StatusTombstone \u0026\u0026 issue.DeletedAt == nil {\n maxTime := issue.CreatedAt\n if issue.UpdatedAt.After(maxTime) {\n maxTime = issue.UpdatedAt\n }\n deletedAt := maxTime.Add(time.Second)\n issue.DeletedAt = \u0026deletedAt\n}\n```\n\nNeed to add the reverse:\n```go\n// Defensive fix: if deleted_at is set, status must be tombstone\nif issue.Status != types.StatusTombstone \u0026\u0026 issue.DeletedAt != nil {\n issue.Status = types.StatusTombstone\n}\n```","status":"open","priority":2,"issue_type":"task","owner":"steve.yegge@gmail.com","created_at":"2026-01-12T01:26:27.02309-08:00","created_by":"mayor","updated_at":"2026-01-12T01:26:27.02309-08:00"}
{"id":"bd-zwpw","title":"Test dependency child","status":"closed","priority":2,"issue_type":"task","created_at":"2025-11-05T11:23:05.998311-08:00","updated_at":"2025-11-05T11:23:30.389454-08:00","closed_at":"2025-11-05T11:23:30.389454-08:00","dependencies":[{"issue_id":"bd-zwpw","depends_on_id":"bd-k0j9","type":"blocks","created_at":"2025-11-05T11:23:05.998981-08:00","created_by":"daemon"}]}
{"id":"bd-zwtq","title":"Run bd doctor at end of bd init to verify setup","description":"Run bd doctor diagnostics at end of bd init (after line 398 in init.go). If issues found, warn user immediately: '⚠ Setup incomplete. Run bd doctor --fix to complete setup.' Catches configuration problems before user encounters them in normal workflow.","status":"closed","priority":1,"issue_type":"feature","created_at":"2025-11-21T23:16:09.596778-08:00","updated_at":"2025-12-23T04:20:51.887338-08:00","closed_at":"2025-12-23T04:20:51.887338-08:00","dependencies":[{"issue_id":"bd-zwtq","depends_on_id":"bd-tbz3","type":"parent-child","created_at":"2025-11-21T23:16:09.597617-08:00","created_by":"daemon"}]}
{"id":"bd-zy3z","title":"Support wisps in nodb mode for lightweight Gas Town rigs","description":"Enable proper wisp support in --no-db mode to allow lightweight Gas Town rigs (including HQ/Mayor) to run without SQLite overhead.\n\n## Motivation\nGas Town HQ and simple rigs could benefit from nodb mode's simplicity. Currently wisps don't work properly in nodb mode.\n\n## Proposed Design\n\n### Phase 1: Session-scoped wisps\n- Memory storage already has Wisp field on Issue\n- Wisps exist only for the session lifetime\n- Acceptable for patrol cycles that complete within a session\n- Depends on: bd-9avq (fix the leak)\n\n### Phase 2: Optional wisp persistence\n- Add `.beads/wisps.jsonl` for wisp storage (gitignored)\n- Load wisps from this file on nodb startup\n- Save wisps to this file on nodb exit\n- Wisps persist across restarts but don't sync via git\n\n### Phase 3: Verify mol commands\n- Test mol squash, burn, bond work with memory storage\n- These currently check for SQLite storage type\n- May need interface-based approach instead of type assertions\n\n## Files affected\n- cmd/bd/nodb.go - wisp filtering and optional persistence\n- internal/storage/memory/ - verify wisp field handling\n- cmd/bd/mol_*.go - verify memory storage compatibility\n- .beads/.gitignore - add wisps.jsonl","status":"closed","priority":3,"issue_type":"feature","created_at":"2025-12-24T21:15:59.658799-08:00","updated_at":"2025-12-24T21:17:11.570958-08:00","closed_at":"2025-12-24T21:17:11.570958-08:00","dependencies":[{"issue_id":"bd-zy3z","depends_on_id":"bd-9avq","type":"blocks","created_at":"2025-12-24T21:16:04.649866-08:00","created_by":"daemon"}]}