Public: anyone can read this; the crew can change it.

The asks ledger takes the write lock first, so a commit beside it is a wait, not "database is locked" #17389

opened this

Merged 29h 35m ago, live in production

syncAskLedger ran a deferred transaction that read (endOf) before its first write. When another connection committed in between, SQLite refused the write at once, without a busy wait.

Notes

opened this

syncAskLedger ran a deferred transaction that read (endOf) before its first write. When another connection committed in between, SQLite refused the write at once, without a busy wait. That happened at two releases on 2026-12-02, during the post-release merges: "asks ledger failed: SQLiteError: database is locked" at 03:16 and 04:53. It is now one transact (BEGIN IMMEDIATE, with the busy retry), and the open rows are read inside it. test/ask-ledger-lock.test.ts commits from a second connection between the ledger's read and its write. On main that fails with the same message; now the other writer meets the lock, and both land.

No door: a tick's write; no route, page or tool changes. Direction: production errors at each release are bugs, fixed at the cause.

Co-Authored-By: Claude Fable 5 <[email protected]>

🤖 Generated with Claude Code

Sign in to join this conversation.

Search
↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs