chore: Update Beads issue tracker and ignore malformed DB files

- Export latest issue state to beads.jsonl
- Add gitignore entries for malformed SQLite DB files created by old buggy code
- Ignore bd-original backup

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Steve Yegge
2025-11-03 18:03:07 -08:00
parent e972f1d866
commit 07668e7346
2 changed files with 5 additions and 1 deletions

View File

@@ -186,7 +186,7 @@
{"id":"bd-be7a","content_hash":"d9043a7a49f8e42dc88c3c01aaa178c1560b67c1637c3373b39c387272e8b725","title":"Create npm package structure with package.json","description":"Set up initial npm package structure for @beads/bd:\n\n## Files to create\n- npm/package.json - Package metadata, dependencies, scripts\n- npm/bin/bd - CLI wrapper script that invokes native binary\n- npm/.gitignore - Ignore downloaded binaries\n- npm/README.md - Installation and usage instructions\n\n## package.json structure\n- Name: @beads/bd (scoped package)\n- Main: index.js (exports binary path)\n- Bin: bin/bd (CLI entry point)\n- Scripts: postinstall (download binary)\n- Keywords: issue-tracker, cli, beads, bd\n- License: MIT\n\n## Bin wrapper\nSimple Node.js script that:\n- Spawns native binary with child_process.spawn\n- Passes through all arguments and stdio\n- Exits with binary's exit code","status":"closed","priority":1,"issue_type":"task","created_at":"2025-11-02T23:39:47.416779-08:00","updated_at":"2025-11-03T10:31:45.381258-08:00","closed_at":"2025-11-03T10:31:45.381258-08:00","dependencies":[{"issue_id":"bd-be7a","depends_on_id":"bd-febc","type":"parent-child","created_at":"2025-11-02T23:40:32.923859-08:00","created_by":"daemon"}]}
{"id":"bd-c01f","content_hash":"b183cc4d99f74e9314f67d927f1bd1255608632b47ce0352af97af5872275fec","title":"Implement bd stale command to find abandoned/forgotten issues","description":"Add bd stale command to surface issues that haven't been updated recently and may need attention.\n\nUse cases:\n- In-progress issues with no recent activity (may be abandoned)\n- Open issues that have been forgotten\n- Issues that might be outdated or no longer relevant\n\nQuery logic should find non-closed issues where updated_at exceeds a time threshold.\n\nShould support:\n- --days N flag (default 30-90 days)\n- --status filter (e.g., only in_progress)\n- --json output for automation\n\nReferences GitHub issue #184 where user expected this command to exist.","design":"Implementation approach:\n1. Add new command in cmd/bd/stale.go\n2. Query issues with: status != 'closed' AND updated_at \u003c (now - N days)\n3. Support filtering by status (open, in_progress, blocked)\n4. Default threshold: 30 days (configurable via --days)\n5. JSON output for agent consumption\n6. Order by updated_at ASC (oldest first)","status":"closed","priority":2,"issue_type":"epic","created_at":"2025-10-31T22:48:46.85435-07:00","updated_at":"2025-10-31T22:54:33.704492-07:00","closed_at":"2025-10-31T22:54:33.704492-07:00"}
{"id":"bd-c362","content_hash":"3b9c44101d7f31fb6cbf4913873a4e140e74fbe7403907e8532bfaaabf875197","title":"Extract database search logic into helper function","description":"The logic for finding a database in a beads directory is duplicated:\n- FindDatabasePath() BEADS_DIR section (beads.go:141-169)\n- findDatabaseInTree() (beads.go:248-280)\n\nBoth implement the same search order:\n1. Check config.json first (single source of truth)\n2. Fall back to canonical beads.db\n3. Search for *.db files, filtering backups and vc.db\n\nRefactoring suggestion:\nExtract to a helper function like:\n func findDatabaseInBeadsDir(beadsDir string) string\n\nBenefits:\n- Single source of truth for database search logic\n- Easier to maintain and update search order\n- Reduces code duplication\n\nRelated to bd-e16b implementation.","status":"open","priority":3,"issue_type":"chore","created_at":"2025-11-02T18:34:02.831543-08:00","updated_at":"2025-11-02T18:34:02.831543-08:00","dependencies":[{"issue_id":"bd-c362","depends_on_id":"bd-e16b","type":"blocks","created_at":"2025-11-02T18:34:02.832607-08:00","created_by":"daemon"}]}
{"id":"bd-c54b","content_hash":"a3d37caf244691a47e839fa78acc06ee88509a8347e7602a1d49385e3c2ea062","title":"SQLite driver creates database files with query params in filename","description":"The modernc.org/sqlite (or ncruces/go-sqlite3) driver is creating database files with the full connection string in the filename, including query parameters.\n\n**Current behavior:**\n`bd init` creates: `.beads/beads.db?_pragma=journal_mode(WAL)\u0026_pragma=foreign_keys(ON)\u0026_pragma=busy_timeout(30000)\u0026_time_format=sqlite`\n\n**Expected behavior:**\nShould create: `.beads/beads.db`\n\n**Root cause:**\nIn internal/storage/sqlite/sqlite.go:57, we append query params directly to the file path instead of using proper URI syntax with `file:` scheme.\n\n**Impact:**\n- Tests fail because they look for 'beads.db' but find the file with query params\n- Breaks gitignore patterns\n- Confusing for users\n- May cause issues with tools that parse .beads/ directory\n\n**Note on sqlite version:**\nWe're currently on an older version of the sqlite driver due to a previous database constraint error. We should investigate:\n1. Whether that constraint issue still happens with latest driver\n2. Whether upgrading would fix this filename issue\n3. Proper URI syntax for file paths with pragmas","status":"open","priority":0,"issue_type":"bug","created_at":"2025-11-03T15:05:09.113556-08:00","updated_at":"2025-11-03T15:05:09.113556-08:00"}
{"id":"bd-c54b","content_hash":"fc2dddf360212eddaf3f71733bfd1e83c490e15f07c9b9ce4ed29835a76fd8ff","title":"SQLite driver creates database files with query params in filename","description":"The modernc.org/sqlite (or ncruces/go-sqlite3) driver is creating database files with the full connection string in the filename, including query parameters.\n\n**Current behavior:**\n`bd init` creates: `.beads/beads.db?_pragma=journal_mode(WAL)\u0026_pragma=foreign_keys(ON)\u0026_pragma=busy_timeout(30000)\u0026_time_format=sqlite`\n\n**Expected behavior:**\nShould create: `.beads/beads.db`\n\n**Root cause:**\nIn internal/storage/sqlite/sqlite.go:57, we append query params directly to the file path instead of using proper URI syntax with `file:` scheme.\n\n**Impact:**\n- Tests fail because they look for 'beads.db' but find the file with query params\n- Breaks gitignore patterns\n- Confusing for users\n- May cause issues with tools that parse .beads/ directory\n\n**Note on sqlite version:**\nWe're currently on an older version of the sqlite driver due to a previous database constraint error. We should investigate:\n1. Whether that constraint issue still happens with latest driver\n2. Whether upgrading would fix this filename issue\n3. Proper URI syntax for file paths with pragmas","status":"closed","priority":0,"issue_type":"bug","created_at":"2025-11-03T15:05:09.113556-08:00","updated_at":"2025-11-03T15:07:11.922659-08:00","closed_at":"2025-11-03T15:07:11.922659-08:00"}
{"id":"bd-c66a","content_hash":"60aebff5c08e0921b1c4285f4909da469c487fb7743658d3d292de8216013319","title":"Remove hardcoded issues.jsonl expectation - make JSONL filename configurable","description":"Currently bd expects the JSONL file to be named `issues.jsonl`, but this is hardcoded and breaks when users have `beads.jsonl` (the old/original filename).\n\nThe JSONL filename should be configurable via config.yaml, not hardcoded. This would allow:\n- Backward compatibility with existing beads.jsonl files\n- User choice of naming convention\n- Smoother migrations between versions\n\nContext: User has beads.jsonl and bd is failing to find it because it expects issues.jsonl.","status":"closed","priority":1,"issue_type":"bug","created_at":"2025-11-03T10:28:44.655972-08:00","updated_at":"2025-11-03T10:35:06.713125-08:00","closed_at":"2025-11-03T10:35:06.713125-08:00"}
{"id":"bd-c77d","content_hash":"5d66618a9b287d1af262d989cb26932cb50b0cb0aa8e8e9365c3298a39db5f2d","title":"Test SQLite WASM compatibility","description":"Verify modernc.org/sqlite works in WASM target. Child of epic bd-44d0.\n\n## Tasks\n- [ ] Compile minimal SQLite test to WASM\n- [ ] Test database create/open operations\n- [ ] Test query execution\n- [ ] Test JSONL import/export\n- [ ] Benchmark performance vs native\n\n## Decision Point\nIf modernc.org/sqlite issues, evaluate ncruces/go-sqlite3 alternative.","status":"open","priority":0,"issue_type":"task","created_at":"2025-11-02T18:33:31.247537-08:00","updated_at":"2025-11-02T18:33:31.247537-08:00","dependencies":[{"issue_id":"bd-c77d","depends_on_id":"bd-197b","type":"blocks","created_at":"2025-11-02T18:33:31.248112-08:00","created_by":"daemon"}]}
{"id":"bd-c796","content_hash":"3d36861edfa65fd43101c2ac0a2ec0a6bf931c84fcb2d6468a2e14f3fac367df","title":"Extract batch operations to batch_ops.go","description":"Move validateBatchIssues, generateBatchIDs, bulkInsertIssues, bulkRecordEvents, bulkMarkDirty, CreateIssues to batch_ops.go","status":"closed","priority":1,"issue_type":"task","created_at":"2025-11-01T19:28:54.887487-07:00","updated_at":"2025-11-01T23:38:31.841775-07:00","closed_at":"2025-11-01T23:38:31.841775-07:00"}
@@ -274,3 +274,5 @@
{"id":"bd-fd56","content_hash":"71946aa48a3fa7836f905d340f73428416aeb8a190069ff3bb737eafbeed0d5e","title":"Wrap git operations in GitClient interface","description":"Create internal/daemonrunner/git.go with GitClient interface (HasUpstream, HasChanges, Commit, Push, Pull). Default implementation using os/exec. Use in Syncer and Run loop for testability.","status":"closed","priority":1,"issue_type":"task","created_at":"2025-11-01T11:41:14.88734-07:00","updated_at":"2025-11-01T22:56:08.354697-07:00","closed_at":"2025-11-01T22:56:08.354697-07:00"}
{"id":"bd-fd8753d9","content_hash":"ae13fc833baa7d586a48ca62648dd4f0ee61fcc96aa1f238fb2639b6657b07da","title":"Document bd edit command and verify MCP exclusion","description":"Follow-up from PR #152:\n1. Add \"bd edit\" to AGENTS.md with \"Humans only\" note\n2. Verify MCP server doesn't expose bd edit command\n3. Consider adding test for command registration","status":"open","priority":2,"issue_type":"task","created_at":"2025-10-26T13:23:47.982295-07:00","updated_at":"2025-10-30T17:12:58.226229-07:00"}
{"id":"bd-febc","content_hash":"686e0d5e3d56abe0edbd203d3d138ee3b013f55b6aed1eac05a56e6e3a5cc261","title":"npm package for bd with native binaries","description":"Create an npm package that wraps native bd binaries for easy installation in Claude Code for Web and other Node.js environments.\n\n## Problem\nClaude Code for Web sandboxes are full Linux VMs with npm support, but cannot easily download binaries from GitHub releases due to network restrictions or tooling limitations.\n\n## Solution\nPublish bd as an npm package that:\n- Downloads platform-specific native binaries during postinstall\n- Provides a CLI wrapper that invokes the native binary\n- Works seamlessly in Claude Code for Web SessionStart hooks\n- Maintains full feature parity (uses native SQLite)\n\n## Benefits vs WASM\n- ✅ Full SQLite support (no custom VFS needed)\n- ✅ All features work identically to native bd\n- ✅ Better performance (native vs WASM overhead)\n- ✅ ~4 hours effort vs ~2 days for WASM\n- ✅ Minimal maintenance burden\n\n## Success Criteria\n- npm install @beads/bd works in Claude Code for Web\n- All bd commands function identically to native binary\n- SessionStart hook documented for auto-installation\n- Package published to npm registry","status":"closed","priority":1,"issue_type":"epic","created_at":"2025-11-02T23:39:37.684109-08:00","updated_at":"2025-11-03T10:39:44.932565-08:00","closed_at":"2025-11-03T10:39:44.932565-08:00"}
{"id":"tst-4yrg","content_hash":"1da9cbeff48e405b1df7bfe8e750e27c0be0ff5fd253a81784d50597dd612219","title":"Test base36 ID in beads repo","description":"","status":"open","priority":2,"issue_type":"task","created_at":"2025-11-03T11:19:52.273193-08:00","updated_at":"2025-11-03T11:19:52.273193-08:00"}
{"id":"tst-6rni","content_hash":"8fcf8bd223896b510e50e48c172fde32162dd0fba238262eadca87a77f214a3c","title":"Testing base36 generation","description":"","status":"open","priority":2,"issue_type":"task","created_at":"2025-11-03T11:19:46.194198-08:00","updated_at":"2025-11-03T11:19:46.194198-08:00"}

2
.gitignore vendored
View File

@@ -67,3 +67,5 @@ npm-package/bin/LICENSE
npm-package/bin/README.md
npm-package/node_modules/
npm-package/package-lock.json
.beads/beads.db?*
bd-original