Skip to content

(session-index): bound writer command deadlines by the work a folder write carries - #1166

Merged
devsuitup merged 4 commits into
mainfrom
fix/1135-large-folder-scan-under-load
Nov 21, 2026
Merged

devsuitup merged 4 commits into
mainfrom
fix/1135-large-folder-scan-under-load

Conversation

@devsuitup

Copy link
Copy Markdown
Owner

Closes #1135

Under load the cold scan of the largest project folder never completed: its folder write timed out (writer command timed out … outcome unknown), the whole folder restarted, and the initial scan never finished.

  • The deadlines of the effects, certifyFullReads and deriveCachedNames writer commands now scale with the work they carry: the 30 s base is multiplied by the larger of the 32 KiB serialized-payload blocks and the 32-entry blocks (nested arrays included). Other commands and transaction packing are unchanged.
  • A retry after an unknown outcome reuses rows already durably committed (pending token, configuration, full-read certificate and re-read content must all match), instead of rewriting the folder from the start.
  • (session-cache): a warm start re-reads only transcripts changed since their last full read #1144 rules are unchanged: the seal stays last, an unknown seal outcome is logged, a folder with an unpublished row stays pending.

Tests: test/session-index-large-folder-1135.test.js (stubbed slow writer on a large synthetic folder, a few rows with a large text, and an unknown-outcome batch), red on main first.

…er write carries

Effects, certificate and name-derivation commands get a deadline that scales
with their serialized payload and entry count, so a large folder finishes
on a busy machine, and a retry after an unknown outcome reuses rows that are
already durably committed.
…scaled deadline

The deadline estimate no longer serializes the payload on the main thread,
the scaled deadline is capped at ten minutes, and the resume guards
(deletion on a full retry, durable witness, source stamp) are tested.
@devsuitup
devsuitup merged commit 55e0777 into main Nov 21, 2026
11 of 12 checks passed
@devsuitup
devsuitup deleted the fix/1135-large-folder-scan-under-load branch November 21, 2026 05:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

(session-cache): the cold scan of a large project folder never completes under load (writer command timed out)

1 participant