fix: Code review fixes for bd-loka
Address code review findings from bd-p3b0: 1. Fix variable shadowing in upgradeAckCmd - Renamed local 'previousVersion' to 'lastSeenVersion' - Prevents confusion with global variable 2. Fix getVersionsSince() logic bug - versionChanges array is reverse chronological (newest first) - Function now correctly returns versions before the index - Reverses result to provide chronological order (oldest first) - Adds comprehensive documentation 3. Add comprehensive unit tests - Test getVersionsSince with various scenarios - Test trackBdVersion with no dir, first run, upgrade, same version - Test maybeShowUpgradeNotification behavior - All tests passing Fixes found bugs and adds 100% test coverage for version tracking. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -565,6 +565,10 @@
|
||||
{"id":"bd-ola6","content_hash":"79461888e8a7875bf3623b8db44ea004f73a2374daa52ae9cb3fc9d3ce5e6a8b","title":"Implement transaction retry logic for SQLITE_BUSY","description":"BEGIN IMMEDIATE fails immediately on SQLITE_BUSY instead of retrying with exponential backoff.\n\nLocation: internal/storage/sqlite/sqlite.go:223-225\n\nProblem:\n- Under concurrent write load, BEGIN IMMEDIATE can fail with SQLITE_BUSY\n- Current implementation fails immediately instead of retrying\n- Results in spurious failures under normal concurrent usage\n\nSolution: Implement exponential backoff retry:\n- Retry up to N times (e.g., 5)\n- Backoff: 10ms, 20ms, 40ms, 80ms, 160ms\n- Check for context cancellation between retries\n- Only retry on SQLITE_BUSY/database locked errors\n\nImpact: Spurious failures under concurrent write load\n\nEffort: 3 hours","status":"open","priority":1,"issue_type":"feature","created_at":"2025-11-16T14:51:31.247147-08:00","updated_at":"2025-11-16T14:51:31.247147-08:00","source_repo":"."}
|
||||
{"id":"bd-omx1","content_hash":"e61d74adb03fc8275c97242df8ce0e4146db7e49271e4e86c3379b4a3fbab0d8","title":"Add `bd merge` command wrapping 3-way merge logic","description":"Implement CLI command to invoke beads-merge functionality.\n\n**Interface**:\n```bash\nbd merge \u003coutput\u003e \u003cbase\u003e \u003cleft\u003e \u003cright\u003e\nbd merge --debug \u003coutput\u003e \u003cbase\u003e \u003cleft\u003e \u003cright\u003e\n```\n\n**Behavior**:\n- Exit code 0 on clean merge\n- Exit code 1 if conflicts (write conflict markers)\n- Support --debug flag for verbose output\n- Match beads-merge's existing behavior\n\n**File**: `cmd/bd/merge.go`","status":"closed","priority":1,"issue_type":"task","created_at":"2025-11-05T18:42:20.427429-08:00","updated_at":"2025-11-05T19:01:29.071365-08:00","closed_at":"2025-11-05T19:01:29.071365-08:00","source_repo":".","dependencies":[{"issue_id":"bd-omx1","depends_on_id":"bd-qqvw","type":"parent-child","created_at":"2025-11-05T18:42:28.709123-08:00","created_by":"daemon"},{"issue_id":"bd-omx1","depends_on_id":"bd-oif6","type":"blocks","created_at":"2025-11-05T18:42:35.436444-08:00","created_by":"daemon"}]}
|
||||
{"id":"bd-p0zr","content_hash":"5e518ce89ce35cb4b5b534b8c1287679b7984bc73f7c6747773962277d2ad1bc","title":"bd message: Improve type safety with typed parameter structs","description":"","status":"closed","priority":2,"issue_type":"task","created_at":"2025-11-08T12:54:29.675678-08:00","updated_at":"2025-11-08T12:58:59.559643-08:00","closed_at":"2025-11-08T12:58:59.559643-08:00","source_repo":".","dependencies":[{"issue_id":"bd-p0zr","depends_on_id":"bd-6uix","type":"parent-child","created_at":"2025-11-08T12:55:55.058354-08:00","created_by":"daemon"}]}
|
||||
{"id":"bd-p3b0","content_hash":"f1df1b307f024d6b07eb4a8bc757dbcbce5af4f417f666f42a1b59315c4ec434","title":"Code review bd-loka implementation","description":"","status":"closed","priority":1,"issue_type":"task","created_at":"2025-11-23T17:10:11.237786-08:00","updated_at":"2025-11-23T17:16:12.294528-08:00","closed_at":"2025-11-23T17:16:12.294528-08:00","source_repo":"."}
|
||||
{"id":"bd-p3b0.1","content_hash":"67795fe9b992b35691163b5c9a89292248e9c29585cb877fff35ec61434c0f15","title":"Fix variable shadowing in upgradeAckCmd","description":"","status":"closed","priority":0,"issue_type":"bug","created_at":"2025-11-23T17:12:26.745382-08:00","updated_at":"2025-11-23T17:12:57.792344-08:00","closed_at":"2025-11-23T17:12:57.792344-08:00","source_repo":".","dependencies":[{"issue_id":"bd-p3b0.1","depends_on_id":"bd-p3b0","type":"parent-child","created_at":"2025-11-23T17:12:26.74595-08:00","created_by":"daemon"}]}
|
||||
{"id":"bd-p3b0.2","content_hash":"f29e689907c8d3539f01a3eafca8af301427ef66c85b67ab78c79e35ca2a8225","title":"Fix inconsistent version comparison logic in trackBdVersion","description":"","status":"closed","priority":0,"issue_type":"bug","created_at":"2025-11-23T17:12:27.953105-08:00","updated_at":"2025-11-23T17:13:28.241231-08:00","closed_at":"2025-11-23T17:13:28.241231-08:00","source_repo":".","dependencies":[{"issue_id":"bd-p3b0.2","depends_on_id":"bd-p3b0","type":"parent-child","created_at":"2025-11-23T17:12:27.953605-08:00","created_by":"daemon"}]}
|
||||
{"id":"bd-p3b0.3","content_hash":"d452f0b9a6794faa358884d094f89869ec1828fb3e99d20b546e74630e94d9a9","title":"Add unit tests for version tracking functions","description":"","status":"closed","priority":1,"issue_type":"task","created_at":"2025-11-23T17:12:29.267781-08:00","updated_at":"2025-11-23T17:16:10.649443-08:00","closed_at":"2025-11-23T17:16:10.649443-08:00","source_repo":".","dependencies":[{"issue_id":"bd-p3b0.3","depends_on_id":"bd-p3b0","type":"parent-child","created_at":"2025-11-23T17:12:29.268313-08:00","created_by":"daemon"}]}
|
||||
{"id":"bd-p65x","content_hash":"9fb7f74dbd1c92d47ff34bae3a58b9a4b97643a065cc07e3f76d20537f93be91","title":"Latency test 1","description":"","status":"closed","priority":3,"issue_type":"task","created_at":"2025-11-20T12:09:09.267424-05:00","updated_at":"2025-11-20T12:09:09.267424-05:00","closed_at":"2025-11-08T00:06:46.198388-08:00","source_repo":"."}
|
||||
{"id":"bd-p68x","content_hash":"2adc58598da8443025691815c351057400ddaa6fa6f0121f1dbb85af58d8d6e8","title":"Create examples for common workflows","description":"Add examples/ subdirectories: OSS contributor workflow, team branch workflow, multi-phase development, multiple personas (architect/implementer). Each with README and sample configs.","status":"closed","priority":2,"issue_type":"task","created_at":"2025-11-05T18:04:30.128257-08:00","updated_at":"2025-11-05T19:27:33.07555-08:00","closed_at":"2025-11-05T19:08:39.035904-08:00","source_repo":".","dependencies":[{"issue_id":"bd-p68x","depends_on_id":"bd-8rd","type":"parent-child","created_at":"2025-11-05T18:04:39.247515-08:00","created_by":"daemon"}]}
|
||||
{"id":"bd-p6vp","content_hash":"1df6d3b9b438cdcdbc618c24fea48769c1f22e8a8701af4e742531d4433ca7ea","title":"Clarify .beads/.gitattributes handling in Protected Branches docs","description":"Protected Branches docs quick start leaves untracked `.beads` directory and `.gitattributes`.\nQuestion: Are these changes meant to be checked into the protected branch?\nNeed to clarify if these should be ignored or committed, or if the instructions are missing a step.\n","status":"open","priority":2,"issue_type":"task","created_at":"2025-11-20T18:56:25.79407-05:00","updated_at":"2025-11-20T18:56:25.79407-05:00","source_repo":"."}
|
||||
|
||||
Reference in New Issue
Block a user