You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
A stalled provider call holds the mutation lock for the whole Library #46
enqueueMutation wraps the whole model Run, including the awaited Provider call, and src/wire/transport.ts sets no timeout. A stalled Provider therefore holds the single mutation
lock indefinitely.
src/storage/modelRuns.ts:98 — enqueueMutation(database, () => runModelPassNow(...)) wraps the
run, and runModelPassNow awaits critique inside it.
src/wire/transport.ts — fetchWithRetry has no AbortSignal.timeout; a fetch that never
settles waits forever.
src/storage/readerAccounts.ts:89 and src/storage/auditAccounts.ts — Reader Runs make one call
per Section and pass no signal at all.
src/useDocument.ts — cancelRun aborts only the model-pass controller.
Impact
A Provider that accepts the connection and then stalls blocks every later rule run, every Finding
status write (markAddressed / decline), resolveDocumentFindings, and even importLibraryBackup's flush. The Writer sees a spinner and a Library that has stopped responding,
with no way to cancel.
The queue ordering itself is correct and should stay: a Run must not interleave with a status
write.
Fix
Bound it rather than remove it:
Give fetchWithRetry a request timeout (an AbortSignal.timeout combined with the caller's
signal), surfaced as a readable error rather than a hang.
Thread a cancel signal through Reader and Audit Runs, which already accept one internally.
Add a test through the send(ModelRequest) seam that a Provider which never responds fails with
a timeout rather than blocking.
Origin
Found by the Thermos review (thermo-nuclear, storage/UI).
Fixed in #76 (merged into v1.3). Each Transport attempt now has a deadline covering fetch and body read (starting once the per-Connection slot is taken), failing with a readable TimedOutError, not retried. Reader and Audit Runs carry a cancel signal, and Cancel run aborts them. Queue ordering is unchanged.
For the Writer to confirm: the timeout is 5 minutes (DEFAULT_REQUEST_TIMEOUT_M
4DDF
S), chosen so slow reasoning models are not cut off; the issue named no value. The Judge has no cancel wiring but is bounded by the same timeout. Cancel on a stalled Reader/Audit Run was not checked in a browser.
Activity
Bound a stalled Provider call so it cannot hold the mutation lock (#46)…
kiran-brahma commentedon Sep 26, 2026
Fixed in #76 (merged into
v1.3). Each Transport attempt now has a deadline covering fetch and body read (starting once the per-Connection slot is taken), failing with a readableTimedOutError, not retried. Reader and Audit Runs carry a cancel signal, and Cancel run aborts them. Queue ordering is unchanged.For the Writer to confirm: the timeout is 5 minutes (
DEFAULT_REQUEST_TIMEOUT_M 4DDF S), chosen so slow reasoning models are not cut off; the issue named no value. The Judge has no cancel wiring but is bounded by the same timeout. Cancel on a stalled Reader/Audit Run was not checked in a browser.Generated by Claude Code