bd daemon sync: 2026-01-12 02:05:31
This commit is contained in:
committed by
Steve Yegge
parent
7de2c9eb85
commit
5579a941e0
@@ -512,6 +512,7 @@
|
||||
{"id":"bd-6x6g","title":"Add multi-repo target repo switching in bd create","description":"In cmd/bd/create.go:164, there's a TODO to switch to the target repo for multi-repo support when creating issues. Currently the code may not properly handle creating issues in a different repo than the current one.\n\nFile: cmd/bd/create.go:164","status":"hooked","priority":3,"issue_type":"feature","created_at":"2025-12-28T16:32:37.130679-08:00","created_by":"stevey","updated_at":"2025-12-30T15:44:43.361095-08:00"}
|
||||
{"id":"bd-6xfz","title":"GH#517: Fix Claude setting wrong priority syntax on new install","description":"Claude uses 'medium' instead of P2/2 for priority, causing infinite error loops. bd prime hook or docs not clear enough. See: https://github.com/steveyegge/beads/issues/517","status":"closed","priority":1,"issue_type":"bug","created_at":"2025-12-14T16:31:55.740197-08:00","updated_at":"2025-12-16T14:39:19.051677-08:00","closed_at":"2025-12-16T01:08:05.911031-08:00"}
|
||||
{"id":"bd-6z7l","title":"Auto-detect scenarios and prompt users","description":"Detect when user is in fork/contributor scenario and prompt with helpful suggestions. Check: git remote relationships, existing .beads config, repo ownership. Suggest appropriate wizard.","status":"closed","priority":2,"issue_type":"task","created_at":"2025-11-05T18:04:30.070695-08:00","updated_at":"2025-11-05T19:27:33.074733-08:00","closed_at":"2025-11-05T18:57:03.315476-08:00","dependencies":[{"issue_id":"bd-6z7l","depends_on_id":"bd-8rd","type":"parent-child","created_at":"2025-11-05T18:04:39.205478-08:00","created_by":"daemon"}]}
|
||||
{"id":"bd-6zatq","title":"Session ended: gt-beads-refinery","status":"closed","priority":2,"issue_type":"event","owner":"steve.yegge@gmail.com","created_at":"2026-01-12T02:01:59.821496-08:00","created_by":"beads/refinery","updated_at":"2026-01-12T02:01:59.888043-08:00","closed_at":"2026-01-12T02:01:59.888043-08:00","close_reason":"auto-closed session cost wisp","ephemeral":true}
|
||||
{"id":"bd-70419816","title":"Export deduplication breaks when JSONL and export_hashes table diverge","description":"## Problem\n\nThe export deduplication feature (timestamp-only skipping) breaks when the JSONL file and export_hashes table get out of sync, causing exports to skip issues that aren't actually in the file.\n\n## Symptoms\n\n- `bd export` reports \"Skipped 128 issue(s) with timestamp-only changes\"\n- JSONL file only has 38 lines but DB has 149 issues\n- export_hashes table has 149 entries\n- Auto-import doesn't trigger (hash matches despite missing data)\n- Two repos on same commit show different issue counts\n\n## Root Cause\n\nshouldSkipExport() in autoflush.go compares current issue hash with stored export_hashes entry. If they match, it skips export assuming the issue is already in the JSONL.\n\nThis assumption fails when:\n1. Git operations (pull, reset, checkout) change JSONL without clearing export_hashes\n2. Manual JSONL edits or corruption\n3. Import operations that modify DB but don't update export_hashes\n4. Partial exports that update export_hashes but don't complete\n\n## Impact\n\n- **Critical data loss risk**: Issues appear to be tracked but aren't persisted to git\n- Breaks multi-repo sync (root cause of today's debugging session)\n- Auto-import fails to detect staleness (hash matches despite missing data)\n- Silent data corruption (no error messages, just missing issues)\n\n## Reproduction\n\n1. Have DB with 149 issues, all in export_hashes table\n2. Truncate JSONL to 38 lines (simulate git reset or corruption)\n3. Run `bd export` - it skips 128 issues\n4. JSONL still has only 38 lines but export thinks it succeeded\n\n## Current Workaround\n\n```bash\nsqlite3 .beads/beads.db \"DELETE FROM export_hashes\"\nbd export -o .beads/beads.jsonl\n```\n\n## Proposed Solutions\n\n**Option 1: Verify JSONL integrity before skipping**\n- Count lines in JSONL, compare with export_hashes count\n- If mismatch, clear export_hashes and force full export\n- Safe but adds I/O overhead\n\n**Option 2: Hash-based JSONL validation**\n- Store hash of entire JSONL file in metadata\n- Before export, check if JSONL hash matches\n- If mismatch, clear export_hashes\n- More efficient, detects any JSONL corruption\n\n**Option 3: Disable timestamp-only deduplication**\n- Remove the feature entirely\n- Always export all issues\n- Simplest and safest, but creates larger git commits\n\n**Option 4: Clear export_hashes on git operations**\n- Add post-merge hook to clear export_hashes\n- Clear on any import operation\n- Defensive approach but may over-clear\n\n## Recommended Fix\n\nCombination of Options 2 + 4:\n1. Store JSONL file hash in metadata after export\n2. Check hash before export, clear export_hashes if mismatch \n3. Clear export_hashes on import operations\n4. Add `bd validate` check for JSONL/export_hashes sync\n\n## Files Involved\n\n- cmd/bd/autoflush.go (shouldSkipExport)\n- cmd/bd/export.go (export with deduplication)\n- internal/storage/sqlite/metadata.go (export_hashes table)","status":"closed","priority":0,"issue_type":"bug","created_at":"2025-10-29T23:05:13.960352-07:00","updated_at":"2025-10-30T17:12:58.19679-07:00","closed_at":"2025-10-29T22:22:20.406934-07:00"}
|
||||
{"id":"bd-70an","title":"test pin","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-21T11:19:16.760214-08:00","updated_at":"2025-12-21T11:19:46.500688-08:00","closed_at":"2025-12-21T11:19:46.500688-08:00"}
|
||||
{"id":"bd-70c4","title":"Gate await fields cleared by --no-daemon CLI access (not multi-repo)","status":"closed","priority":1,"issue_type":"bug","created_at":"2025-12-25T23:30:38.648182-08:00","updated_at":"2025-12-26T23:38:47.972075-08:00","closed_at":"2025-12-26T23:38:47.972075-08:00","comments":[{"id":3,"issue_id":"bd-70c4","author":"mayor","text":"## Summary\nGate await fields (await_type, await_id, timeout_ns, waiters) are cleared when a CLI command accesses the database directly (--no-daemon) while the daemon is running. This is separate from the multi-repo issue fixed in bd-gr4q.\n\n## Reproduction\n1. Start daemon: bd daemon --start\n2. Create gate: bd gate create --await timer:5s (fields stored correctly)\n3. Verify: sqlite3 .beads/beads.db shows timer|5s\n4. Run CLI with --no-daemon: bd show \u003cid\u003e --no-daemon --no-auto-import --no-auto-flush\n5. Check again: fields are now empty\n\n## Investigation Notes\n- NOT caused by autoImportIfNewer (verified with --no-auto-import flag)\n- NOT caused by HydrateFromMultiRepo (no multi-repo config, returns early)\n- NOT caused by molecule loader (only creates new issues)\n- NOT caused by migrations (gate_columns only adds columns)\n- No database triggers found\n\nThe clearing happens somewhere in sqlite.NewWithTimeout() initialization or command execution path.\n\n## Related\n- bd-gr4q fixed the multi-repo path but this is a different code path\n- The fix pattern (COALESCE/NULLIF) may need to be applied elsewhere","created_at":"2025-12-26T07:30:49Z"}]}
|
||||
@@ -1350,7 +1351,7 @@
|
||||
{"id":"bd-ifa0","title":"Merge: amber-1767146829144","description":"branch: polecat/amber-1767146829144\ntarget: main\nsource_issue: amber-1767146829144\nrig: beads","status":"closed","priority":2,"issue_type":"merge-request","created_at":"2025-12-30T18:11:33.875918-08:00","created_by":"beads/polecats/amber","updated_at":"2025-12-30T19:35:50.452577-08:00","closed_at":"2025-12-30T18:16:13.605293-08:00"}
|
||||
{"id":"bd-ifuw","title":"test hook pin fix","status":"tombstone","priority":2,"issue_type":"task","created_at":"2025-12-23T04:43:15.598698-08:00","updated_at":"2025-12-23T04:51:29.438139-08:00","deleted_at":"2025-12-23T04:51:29.438139-08:00","deleted_by":"daemon","delete_reason":"delete","original_type":"task"}
|
||||
{"id":"bd-ihp9","title":"Fix FOREIGN KEY constraint failures in AddComment and ApplyCompaction","description":"The 'CloseIssue', 'UpdateIssueID', and 'RemoveLabel' methods were fixed in PR #348 to prevent foreign key constraint failures when operating on non-existent issues.\n\nHowever, the Oracle identified two other methods that follow the same problematic pattern:\n1. `AddComment` (in `internal/storage/sqlite/events.go`)\n2. `ApplyCompaction` (in `internal/storage/sqlite/compact.go`)\n\nThese methods attempt to insert an event record after updating the issue, without verifying that the issue update actually affected any rows. This leads to a foreign key constraint failure if the issue does not exist.\n\nWe need to:\n1. Create reproduction tests for these failure cases\n2. Apply the same fix pattern: check `RowsAffected()` after the update, and return a proper \"issue not found\" error if it is 0, before attempting to insert the event.\n3. Standardize the error message format to \"issue %s not found\" or \"issue not found: %s\" for consistency.","status":"closed","priority":1,"issue_type":"task","created_at":"2025-11-20T09:49:55.090644-08:00","updated_at":"2025-11-20T09:53:54.466769-08:00","closed_at":"2025-11-20T09:53:54.466769-08:00"}
|
||||
{"id":"bd-ihu31","title":"Add --ready flag to bd list to show only available work","description":"## Problem\n`bd list` by default shows all non-closed issues including hooked ones. Hooked work is actively being worked on and shouldn't appear in the pool of available work.\n\n## Solution\nAdd a `--ready` flag to `bd list` that filters to show only work that can actually be picked up:\n- Status is `open` (not hooked, not in_progress, not blocked, not deferred)\n- Could potentially also exclude assigned issues (optional consideration)\n\n## Current Workaround\n`bd list --status open` works but isn't as intuitive as `--ready`\n\n## Implementation\n- Add `--ready` boolean flag to list command\n- When set, filter to status=open only\n- Consider if it should also filter out assigned issues (probably not by default)","status":"hooked","priority":1,"issue_type":"feature","assignee":"beads/crew/dave","owner":"steve.yegge@gmail.com","created_at":"2026-01-12T01:59:57.131925-08:00","created_by":"beads/crew/dave","updated_at":"2026-01-12T02:00:08.686385-08:00"}
|
||||
{"id":"bd-ihu31","title":"Add --ready flag to bd list to show only available work","description":"## Problem\n`bd list` by default shows all non-closed issues including hooked ones. Hooked work is actively being worked on and shouldn't appear in the pool of available work.\n\n## Solution\nAdd a `--ready` flag to `bd list` that filters to show only work that can actually be picked up:\n- Status is `open` (not hooked, not in_progress, not blocked, not deferred)\n- Could potentially also exclude assigned issues (optional consideration)\n\n## Current Workaround\n`bd list --status open` works but isn't as intuitive as `--ready`\n\n## Implementation\n- Add `--ready` boolean flag to list command\n- When set, filter to status=open only\n- Consider if it should also filter out assigned issues (probably not by default)","status":"closed","priority":1,"issue_type":"feature","assignee":"beads/crew/dave","owner":"steve.yegge@gmail.com","created_at":"2026-01-12T01:59:57.131925-08:00","created_by":"beads/crew/dave","updated_at":"2026-01-12T02:05:30.421139-08:00","closed_at":"2026-01-12T02:05:30.421139-08:00","close_reason":"Implemented --ready flag for bd list"}
|
||||
{"id":"bd-ii8ug","title":"Session ended: gt-beads-refinery","status":"closed","priority":2,"issue_type":"event","owner":"steve.yegge@gmail.com","created_at":"2026-01-11T05:08:11.390419-08:00","created_by":"beads/refinery","updated_at":"2026-01-11T05:08:11.459049-08:00","closed_at":"2026-01-11T05:08:11.459049-08:00","close_reason":"auto-closed session cost wisp","ephemeral":true}
|
||||
{"id":"bd-iic1","title":"Phase 2.2: Switch bdt storage to TOON format","description":"Currently bdt stores issues in JSONL format in issues.toon file. Phase 2.2 must implement actual TOON format storage - this is the fundamental goal of the bdtoon project.\n\n## Current State (Phase 2.1)\n- issues.toon stores JSONL (intermediate format)\n- --toon flag allows output in TOON format for LLM consumption\n- Problem: We're not actually using TOON as the fundamental storage format\n\n## Required Work (Phase 2.2)\n1. Switch issue file I/O to write TOON format instead of JSONL\n - Update cmd/bdt/storage.go to use EncodeTOON for writing\n - Update cmd/bdt/storage.go to decode TOON (currently decodes JSON)\n - Ensure round-trip: write TOON → read TOON → write TOON is byte-identical\n\n2. Update command implementations\n - cmd/bdt/create.go: Write newly created issues to TOON format\n - cmd/bdt/list.go: Read issues from TOON format\n - cmd/bdt/show.go: Read from TOON format\n - cmd/bdt/import.go: Convert imported JSONL to TOON\n - cmd/bdt/export.go: Export TOON to JSONL (for bd compatibility)\n\n3. Implement TOON parser that handles gotoon's encoder-only limitation\n - Since gotoon doesn't decode TOON, need custom TOON→JSON decoder\n - OR continue storing TOON but decoding via intermediate JSON conversion\n\n4. Git merge driver optimization\n - TOON is line-oriented, better for 3-way merges than binary formats\n - Configure git merge driver for .toon files\n\n5. Comprehensive testing\n - Round-trip tests: Issue → TOON → storage → read → Issue\n - Merge conflict resolution tests with TOON format\n - Large issue set performance tests\n\n## Success Criteria\n- issues.toon stores actual TOON format (not JSONL)\n- bdt list reads from TOON file\n- bdt create writes to TOON file\n- Round-trip: create issue → list → show returns identical data\n- All 65+ tests still passing\n- Performance comparable to JSONL storage","status":"closed","priority":1,"issue_type":"task","created_at":"2025-12-19T14:05:41.394964404-07:00","updated_at":"2025-12-19T14:37:17.879612634-07:00","closed_at":"2025-12-19T14:37:17.879612634-07:00"}
|
||||
{"id":"bd-ik1b","title":"Add --validate flag to bd create","description":"Opt-in strict mode that fails creation if required sections are missing. Uses ValidateTemplate() under the hood.","status":"closed","priority":3,"issue_type":"task","created_at":"2026-01-01T11:19:09.036754-08:00","created_by":"beads/crew/grip","updated_at":"2026-01-04T15:22:08.701283-08:00","closed_at":"2026-01-01T14:20:06.932309-08:00","close_reason":"Implemented --validate flag for bd create command","dependencies":[{"issue_id":"bd-ik1b","depends_on_id":"bd-ou35","type":"parent-child","created_at":"2026-01-01T11:19:22.754415-08:00","created_by":"beads/crew/grip"},{"issue_id":"bd-ik1b","depends_on_id":"bd-615z","type":"blocks","created_at":"2026-01-01T11:19:23.964595-08:00","created_by":"beads/crew/grip"}]}
|
||||
|
||||
Reference in New Issue
Block a user