Files
beads/internal/storage/sqlite
aleiby 847858d3a2 refactor(sqlite): use withTx helper for remaining transaction entry points (#1276)
Refactors UpdateIssue, CloseIssue, CreateTombstone, and DeleteIssues
to use the withTx helper with BEGIN IMMEDIATE instead of BeginTx.
This completes the GH#1272 fix by ensuring all write transactions
acquire write locks early, preventing deadlocks.

Changes:
- UpdateIssue: now uses withTx and markDirty helper
- CloseIssue: now uses withTx and markDirty helper
- CreateTombstone: now uses withTx and markDirty helper
- DeleteIssues: now uses withTx with dbExecutor interface
- Helper functions (resolveDeleteSet, expandWithDependents,
  validateNoDependents, etc.) changed from *sql.Tx to dbExecutor

This is a P3 follow-up to the P1 sqlite lock fix (PR #1274).

Closes: bd-fgzp

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-24 17:11:49 -08:00
..