beads/internal
beads/crew/dave ec1a32b9a8 fix(storage): add reconnectMu RLock protection to prevent race condition (#1054)
Add missing reconnectMu.RLock() protection to storage methods that were
vulnerable to the same race condition fixed in GH#607. The FreshnessChecker
can trigger reconnect() which closes s.db while queries are in flight,
causing "database is closed" errors during daemon export operations.

Protected methods:
- labels.go: GetLabelsForIssues (GetLabels intentionally unprotected - called from GetIssue which holds lock)
- comments.go: GetIssueComments, GetCommentsForIssues
- dependencies.go: GetDependencyCounts, GetDependencyRecords, GetAllDependencyRecords, GetDependencyTree, loadDependencyGraph
- config.go: SetConfig, GetConfig, GetAllConfig, DeleteConfig, SetMetadata, GetMetadata
- dirty.go: MarkIssueDirty, GetDirtyIssues, GetDirtyIssueHash, GetDirtyIssueCount
- events.go: GetEvents, GetStatistics, GetMoleculeProgress
- hash.go: All hash methods
- hash_ids.go: GetNextChildID, ensureChildCounterUpdated (getNextChildNumber unprotected - called internally)

Internal helpers called from already-locked contexts intentionally omit
RLock to avoid deadlock (Go's RWMutex doesn't support recursive locking).

Fixes: bd-vx7fp

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

Executed-By: beads/crew/dave
Rig: beads
Role: crew
2026-01-12 18:29:42 -08:00
..
audit feat(audit): add append-only agent audit trail (.beads/interactions.jsonl) 2025-12-20 03:24:51 -08:00
autoimport fix: NixOS symlink compatibility for mtime and permission checks (#459) 2025-12-05 13:22:09 -08:00
beads fix: make tests resilient to project .beads/redirect 2026-01-10 22:38:04 -08:00
compact test: expand compact and ui coverage 2025-12-29 16:01:11 -08:00
config fix: respect hierarchy.max-depth config setting (GH#995) (#997) 2026-01-10 13:36:52 -08:00
configfile feat: change deletions TTL default from 7 to 3 days 2025-12-03 22:44:59 -08:00
daemon fix: relocate daemon socket for deep paths (GH#1001) 2026-01-10 12:30:31 -08:00
debug test(coverage): add tests to meet 45% CI threshold 2025-12-18 17:45:49 -05:00
export test(coverage): add tests to meet 45% CI threshold 2025-12-18 17:45:49 -05:00
formula test: add gate field parsing tests (bd-4bt1) 2026-01-02 13:45:10 -08:00
git Fix migrate sync failing in git worktree environments (#970) 2026-01-09 11:01:56 -08:00
hooks refactor: remove unused bd pin/unpin/hook commands (bd-x0zl) 2025-12-27 16:02:15 -08:00
idgen fix(idgen): correct test vectors in hash_test.go 2025-12-19 18:13:56 -08:00
importer feat(sync): add BD_DEBUG_SYNC env for protection debugging 2026-01-04 10:41:57 -08:00
linear fix(linear): use project_id when creating issues via sync --push (GH#973) (#1012) 2026-01-10 23:46:00 -08:00
lockfile fix: eliminate 5+ second delays from stale daemon.lock files (bd-htwx) 2025-12-31 13:03:49 -08:00
merge fix(merge): add QualityScore field to merge Issue struct 2026-01-11 18:46:12 -08:00
molecules refactor: remove Gas Town references from codebase 2025-12-30 14:13:32 -08:00
recipes fix(lint): address gosec, misspell, and unparam warnings 2026-01-05 22:06:52 -08:00
routing refactor: remove Gas Town references from codebase 2025-12-30 14:13:32 -08:00
rpc fix(lint): resolve unparam warnings in doctor and rpc packages 2026-01-10 23:17:37 -08:00
storage fix(storage): add reconnectMu RLock protection to prevent race condition (#1054) 2026-01-12 18:29:42 -08:00
syncbranch fix: make tests resilient to project .beads/redirect 2026-01-10 22:38:04 -08:00
testutil Fix test compilation errors: add context.Background() to sqlite.New() calls 2025-11-21 14:57:18 -05:00
timeparsing feat(dates): add --due and --defer timestamp options with natural language parsing (#847) 2026-01-01 20:06:13 -08:00
types fix: use route prefix when creating issues in rigs (#1028) 2026-01-12 01:20:32 -08:00
ui feat(ux): visual improvements for list tree, graph, and show commands 2026-01-08 20:50:56 -08:00
util feat(list): Add type aliases for --type flag (gt-pvhsv) 2026-01-01 18:17:12 -08:00
utils fix: use SearchIssues for ID resolution (GH#942) 2026-01-10 00:37:29 -08:00
validation fix(validation): support hyphenated prefixes in ValidateIDFormat (#1013) 2026-01-11 18:16:48 -08:00