bd sync: 2025-11-06 17:52:29

This commit is contained in:
Steve Yegge
2025-11-06 17:52:30 -08:00
parent f9108ff498
commit b201eecd55

View File

@@ -222,7 +222,7 @@
{"id":"bd-gm7p","content_hash":"4bc3ca7545527e791e7282ad7596cb39f024e20fda1845c3498ffef1ba0100fd","title":"Use in-memory filesystem for test git operations","description":"Use tmpfs/ramdisk for git operations in tests to reduce I/O overhead.\n\nOptions:\n1. Mount /tmp as tmpfs in CI (GitHub Actions supports this)\n2. Use Go's testing.TB.TempDir() which may already use tmpfs on some systems\n3. Explicitly create ramdisk for tests on macOS\n\nExpected savings: 20-30% reduction in git operation time","status":"closed","priority":3,"issue_type":"task","created_at":"2025-11-04T01:24:19.803224-08:00","updated_at":"2025-11-04T12:27:51.428975-08:00","closed_at":"2025-11-04T12:27:51.428978-08:00","source_repo":".","dependencies":[{"issue_id":"bd-gm7p","depends_on_id":"bd-l5gq","type":"blocks","created_at":"2025-11-04T01:24:19.80414-08:00","created_by":"daemon"}]}
{"id":"bd-gpe7","content_hash":"abafcc321674aa66d99dc353641fe183e510f4b89624adcaf8ffe0cea5ffb1ef","title":"Tests take too long - unacceptable for project size","description":"## Problem\n\nRunning `go test ./internal/importer/... -v` takes an unacceptably long time (minutes). For a project this size, tests should complete in seconds.\n\n## Impact\n\n- Slows down development iteration\n- AI agents waste time waiting for tests\n- Blocks rapid bug fixes and validation\n- Poor developer experience\n\n## Investigation Needed\n\n- Profile which tests are slow\n- Check for unnecessary sleeps, timeouts, or integration tests\n- Look for tests that could be parallelized\n- Consider splitting unit vs integration tests\n\n## Goal\n\nTest suite for a single package should complete in \u003c5 seconds, ideally \u003c2 seconds.","notes":"## Optimizations Applied\n\n1. **Added t.Parallel() to CLI tests** (13 tests) - allows concurrent execution\n2. **Removed unnecessary 200ms sleep** in daemon_autoimport_test.go - Execute() forces auto-import synchronously\n3. **Reduced filesystem settle wait** from 100ms → 50ms on non-Windows platforms\n4. **Optimized debouncer test sleeps** (9 reductions):\n - Before debounce waits: 30ms → 20ms, 20ms → 10ms\n - After debounce waits: 40ms → 35ms, 30ms → 35ms, etc.\n - Thread safety test: 100ms → 70ms\n - Sequential cycles: 50ms → 40ms (3x)\n - Cancel tests: 70-80ms → 60ms\n\n## Results\n\n### cmd/bd package (main improvement target):\n- **Before**: 5+ minutes (timeout)\n- **After**: ~18-20 seconds\n- **Speedup**: ~15-18x faster\n\n### internal/importer package:\n- **After**: \u003c1 second (0.9s)\n\n### Full test suite (with `-short` flag):\n- Most packages complete in \u003c2s\n- Total runtime constrained by sequential integration tests\n\n## Known Issues\n\n- TestConcurrentExternalRefImports hangs due to :memory: connection pool issue (bd-b121)\n- Some sync_branch tests may need sequential execution (git worktree conflicts)","status":"closed","priority":0,"issue_type":"bug","created_at":"2025-11-05T00:54:47.784504-08:00","updated_at":"2025-11-05T10:55:27.261404-08:00","closed_at":"2025-11-05T01:41:57.544395-08:00","source_repo":"."}
{"id":"bd-h4hc","content_hash":"43c11155d74ce32355129c3aac019c07279a4d31c0d58334e9fd5cb100108373","title":"Test child issue","description":"","status":"closed","priority":1,"issue_type":"task","created_at":"2025-11-05T13:00:42.368282-08:00","updated_at":"2025-11-05T13:01:11.64526-08:00","closed_at":"2025-11-05T13:01:11.64526-08:00","source_repo":"."}
{"id":"bd-hv01","content_hash":"cfa89d4d4e1c183c1d602c61fe46d5fc1222db5362ac2d332735a36ee152d38a","title":"Deletions not propagated across multi-workspace sync","description":"## Problem\n\nWhen working with multiple beads workspaces (clones) sharing the same git remote, deleted issues keep coming back.\n\n## Reproduction\n\n1. Clone A deletes issue `bd-xyz` via `bd delete bd-xyz --force`\n2. Clone A daemon syncs and pushes to GitHub\n3. Clone B still has `bd-xyz` in its database\n4. Clone B daemon exports and pushes its JSONL\n5. Clone A pulls and imports → `bd-xyz` comes back!\n\n## Root Cause\n\n**No deletion tracking mechanism.** The system has no way to distinguish between:\n- \"Issue doesn't exist in JSONL because it was deleted\" \n- \"Issue doesn't exist in JSONL because the export is stale\"\n\nImport treats missing issues as \"not in this export\" rather than \"explicitly deleted.\"\n\n## Solution Options\n\n1. **Tombstone records** - Keep deleted issues in JSONL with `\"status\":\"deleted\"` or `\"deleted_at\"` field\n2. **Deletion log** - Separate `.beads/deletions.jsonl` file tracking all deleted IDs\n3. **Three-way merge** - Import compares: DB state, old JSONL, new JSONL\n4. **Manual conflict resolution** - Detect resurrection and prompt user\n\n## Related\n\n- Similar to resurrection logic for orphaned children (bd-cc4f)\n- beads-merge tool handles this better with 3-way merge","status":"open","priority":1,"issue_type":"bug","created_at":"2025-11-05T18:34:24.094474-08:00","updated_at":"2025-11-05T18:34:24.094474-08:00","source_repo":".","dependencies":[{"issue_id":"bd-hv01","depends_on_id":"bd-qqvw","type":"blocks","created_at":"2025-11-05T18:42:35.485002-08:00","created_by":"daemon"}]}
{"id":"bd-hv01","content_hash":"cfa89d4d4e1c183c1d602c61fe46d5fc1222db5362ac2d332735a36ee152d38a","title":"Deletions not propagated across multi-workspace sync","description":"## Problem\n\nWhen working with multiple beads workspaces (clones) sharing the same git remote, deleted issues keep coming back.\n\n## Reproduction\n\n1. Clone A deletes issue `bd-xyz` via `bd delete bd-xyz --force`\n2. Clone A daemon syncs and pushes to GitHub\n3. Clone B still has `bd-xyz` in its database\n4. Clone B daemon exports and pushes its JSONL\n5. Clone A pulls and imports → `bd-xyz` comes back!\n\n## Root Cause\n\n**No deletion tracking mechanism.** The system has no way to distinguish between:\n- \"Issue doesn't exist in JSONL because it was deleted\" \n- \"Issue doesn't exist in JSONL because the export is stale\"\n\nImport treats missing issues as \"not in this export\" rather than \"explicitly deleted.\"\n\n## Solution Options\n\n1. **Tombstone records** - Keep deleted issues in JSONL with `\"status\":\"deleted\"` or `\"deleted_at\"` field\n2. **Deletion log** - Separate `.beads/deletions.jsonl` file tracking all deleted IDs\n3. **Three-way merge** - Import compares: DB state, old JSONL, new JSONL\n4. **Manual conflict resolution** - Detect resurrection and prompt user\n\n## Related\n\n- Similar to resurrection logic for orphaned children (bd-cc4f)\n- beads-merge tool handles this better with 3-way merge","status":"closed","priority":1,"issue_type":"bug","created_at":"2025-11-05T18:34:24.094474-08:00","updated_at":"2025-11-06T17:52:24.860716-08:00","closed_at":"2025-11-06T17:52:24.860716-08:00","source_repo":".","dependencies":[{"issue_id":"bd-hv01","depends_on_id":"bd-qqvw","type":"blocks","created_at":"2025-11-05T18:42:35.485002-08:00","created_by":"daemon"}]}
{"id":"bd-hw3c","content_hash":"83359ec96e2b8fc9ce2ece25d56bfbc1c1f948b27dfa56cc7b3715dc86c6d024","title":"Fix GH #227: bd edit broken pipe errors","description":"bd edit command gets \"broken pipe\" errors when using daemon mode because editing can take minutes and the daemon connection times out.\n\nSolution: Force bd edit to always use direct mode (--no-daemon) since it's human-only and interactive.\n\nFixed by checking cmd.Name() == \"edit\" in main.go PersistentPreRun and setting noDaemon = true.","status":"closed","priority":1,"issue_type":"bug","created_at":"2025-11-05T14:36:04.289431-08:00","updated_at":"2025-11-05T14:36:08.103964-08:00","closed_at":"2025-11-05T14:36:08.103964-08:00","source_repo":"."}
{"id":"bd-iou5","content_hash":"bfbbced6cfdc0a9746475fa63d6703aa863929836a302fc77c87f6e94fc892c6","title":"Detect and warn about outdated git hooks","description":"Users may have outdated git hooks installed that reference removed flags (e.g., --resolve-collisions). bd should detect this and warn users to reinstall.","design":"\n- Add version comments to hook templates (e.g., # bd-hooks-v0.21.0)\n- Check during 'bd info' or 'bd daemon start' (not every command to avoid overhead)\n- Compare installed hook version against current bd version\n- Warn with clear message: 'Git hooks are outdated (v0.X.Y), run: examples/git-hooks/install.sh'\n- Could also check if hooks exist but aren't installed at all","status":"closed","priority":2,"issue_type":"feature","created_at":"2025-11-06T13:59:45.778781-08:00","updated_at":"2025-11-06T15:02:16.928192-08:00","closed_at":"2025-11-06T15:02:16.928192-08:00","source_repo":"."}
{"id":"bd-iov0","content_hash":"7af34c76aafce5c69f7b28fb99805b2b78f5dbb5b11a55f349090fa876636a79","title":"Document -short flag in testing guide","description":"Add documentation about the -short flag and how it's used to skip slow tests. Should explain that developers can run 'go test -short ./...' for fast iteration and 'go test ./...' for full coverage.","status":"open","priority":3,"issue_type":"task","created_at":"2025-11-06T17:30:49.618187-08:00","updated_at":"2025-11-06T17:30:49.618187-08:00","source_repo":"."}