Files
beads/internal
garnet e8a4474788 fix(storage): use strict INSERT for batch issue creation (GH#956)
Add insertIssuesStrict function that uses plain INSERT instead of
INSERT OR IGNORE. Update bulkInsertIssues and transactional CreateIssues
to use the strict variant.

This fixes a race condition where INSERT OR IGNORE could silently skip
duplicate insertions, but the code would still attempt to record events
for those "inserted" issues, causing FOREIGN KEY constraint failures.

The strict INSERT will now fail explicitly if a duplicate is encountered,
which should never happen since checkForExistingIDs runs first within
the same transaction.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-12 19:42:04 -08:00
..