From 2fb2d27265ff3b8bd818a7f6590428f3977110f4 Mon Sep 17 00:00:00 2001 From: beads/refinery Date: Mon, 12 Jan 2026 02:08:05 -0800 Subject: [PATCH] bd daemon sync: 2026-01-12 02:08:05 --- .beads/issues.jsonl | 1 + 1 file changed, 1 insertion(+) diff --git a/.beads/issues.jsonl b/.beads/issues.jsonl index 62a2e6e3..8c5bc6e9 100644 --- a/.beads/issues.jsonl +++ b/.beads/issues.jsonl @@ -1685,6 +1685,7 @@ {"id":"bd-n0l8j","title":"Session ended: gt-beads-crew-fang","status":"closed","priority":2,"issue_type":"event","created_at":"2026-01-07T21:42:10.708451-08:00","created_by":"beads/crew/fang","updated_at":"2026-01-07T21:42:15.897669-08:00","closed_at":"2026-01-07T21:42:15.897669-08:00","close_reason":"auto-closed session event"} {"id":"bd-n0md6","title":"Review and merge PR #975: fix sync --import-only store nil","description":"dispatched_by: beads/crew/emma\n\n## Task\nReview and merge PR #975 from juanre.\n\n**PR**: https://github.com/steveyegge/beads/pull/975\n\n## What it does\n- Adds ensureStoreActive() call after daemon disconnect in sync.go\n- Fixes 'no database store available for inline import' error\n- Includes comprehensive test documenting the bug and fix\n\n## Easy-win criteria met\n- Bug fix with clear reproduction and solution\n- Has comprehensive test\n- Small diff (143 additions, 0 deletions)\n- Low risk\n\n## Instructions\n1. Clone/fetch the PR: gh pr checkout 975 --repo steveyegge/beads\n2. Run tests: go test ./cmd/bd/...\n3. Review the diff: gh pr diff 975 --repo steveyegge/beads\n4. If tests pass and code looks good, approve and merge\n5. Close this bead when done","status":"closed","priority":2,"issue_type":"task","assignee":"beads/crew/fang","created_at":"2026-01-09T10:59:58.832796-08:00","created_by":"beads/crew/emma","updated_at":"2026-01-09T13:44:59.1482-08:00","closed_at":"2026-01-09T13:44:59.1482-08:00","close_reason":"PR #975 reviewed, approved, and merged. Fix adds ensureStoreActive() call after daemon disconnect in sync.go to fix 'no database store available for inline import' error."} {"id":"bd-n14te","title":"Test integration issue","description":"This is a real integration test","status":"open","priority":1,"issue_type":"bug","owner":"steve.yegge@gmail.com","created_at":"2026-01-11T18:16:10.443519-08:00","created_by":"beads/crew/wolf","updated_at":"2026-01-11T18:16:10.443519-08:00"} +{"id":"bd-n1xj7","title":"Session ended: gt-beads-crew-emma","status":"closed","priority":2,"issue_type":"event","owner":"steve.yegge@gmail.com","created_at":"2026-01-12T02:08:04.628998-08:00","created_by":"beads/crew/emma","updated_at":"2026-01-12T02:08:04.673308-08:00","closed_at":"2026-01-12T02:08:04.673308-08:00","close_reason":"auto-closed session cost wisp","ephemeral":true} {"id":"bd-n25","title":"Speed up main_test.go - tests hang indefinitely due to nil rootCtx","description":"## Problem\n\nmain_test.go tests are hanging indefinitely, making them unusable and blocking development.\n\n## Root Cause\n\nTests that call flushToJSONL() or autoImportIfNewer() hang forever because:\n- rootCtx is nil in test environment (defined in cmd/bd/main.go:67)\n- flushToJSONL() uses rootCtx for DB operations (autoflush.go:503)\n- When rootCtx is nil, DB calls timeout/hang indefinitely\n\n## Affected Tests (10+)\n\n- TestAutoFlushOnExit\n- TestAutoFlushJSONLContent \n- TestAutoFlushErrorHandling\n- TestAutoImportIfNewer\n- TestAutoImportDisabled\n- TestAutoImportWithUpdate\n- TestAutoImportNoUpdate\n- TestAutoImportMergeConflict\n- TestAutoImportConflictMarkerFalsePositive\n- TestAutoImportClosedAtInvariant\n\n## Proof\n\n```bash\n# Before fix: TestAutoFlushJSONLContent HANGS (killed after 2+ min)\n# After adding rootCtx init: Completes in 0.04s\n# Speedup: ∞ → 0.04s\n```\n\n## Solution\n\nSee MAIN_TEST_OPTIMIZATION_PLAN.md for complete fix plan.\n\n**Quick Fix (5 min)**: Add to each hanging test:\n```go\nctx, cancel := context.WithTimeout(context.Background(), 30*time.Second)\ndefer cancel()\noldRootCtx := rootCtx\nrootCtx = ctx\ndefer func() { rootCtx = oldRootCtx }()\n```\n\n**Full Optimization (40 min total)**:\n1. Fix rootCtx (5 min) - unblocks tests\n2. Reduce sleep durations 10x (2 min) - saves ~280ms\n3. Use in-memory DBs (10 min) - saves ~1s\n4. Share test fixtures (15 min) - saves ~1.2s\n5. Fix skipped debounce test (5 min)\n\n## Expected Results\n\n- Tests go from hanging → \u003c5s total runtime\n- Keep critical integration test coverage\n- Tests caught real bugs: bd-270, bd-206, bd-160\n\n## Files\n\n- Analysis: MAIN_TEST_REFACTOR_NOTES.md\n- Solution: MAIN_TEST_OPTIMIZATION_PLAN.md\n- Tests: cmd/bd/main_test.go (18 tests, 1322 LOC)\n\n## Priority\n\nP1 - Blocking development, tests unusable in current state","status":"closed","priority":1,"issue_type":"bug","created_at":"2025-11-21T18:27:48.942814-05:00","updated_at":"2025-11-21T18:44:21.944901-05:00","closed_at":"2025-11-21T18:44:21.944901-05:00"} {"id":"bd-n2xsj","title":"Session ended: gt-beads-crew-emma","status":"closed","priority":2,"issue_type":"event","created_at":"2026-01-10T16:13:41.779573-08:00","created_by":"beads/crew/emma","updated_at":"2026-01-10T16:13:41.820512-08:00","closed_at":"2026-01-10T16:13:41.820512-08:00","close_reason":"auto-closed session cost wisp","ephemeral":true} {"id":"bd-n386","title":"Improve test coverage for internal/daemon (27.3% → 60%)","description":"The daemon package has only 27.3% test coverage. The daemon is critical for background operations and reliability.\n\nKey areas needing tests:\n- Daemon autostart logic\n- Socket handling\n- PID file management\n- Health checks\n\nCurrent coverage: 27.3%\nTarget coverage: 60%","status":"closed","priority":2,"issue_type":"task","created_at":"2025-12-13T20:43:00.895238-08:00","updated_at":"2025-12-23T22:36:08.583672-08:00","closed_at":"2025-12-23T22:36:08.583672-08:00"}