Problem
In a resumable backfill, page.completed is recorded (and the resume cursor advanced) before the page's data is persisted, so a crash in that window loses records silently.
onPage (src/interpreter/fetch-handler.ts:453-460) appends the page.completed event and advances pageProgress inside the fetch loop, while the page is still only in the in-memory allResults array. The downstream store step persists it afterwards. A crash between the final page.completed and the store's effect.applied advances pageProgress past pages that exist only in memory — on resume the fetch restarts after them and they're gone.
The page.completed docstring used to claim the data was "fetched and persisted." That's now corrected to say plainly it's fetched-only, with a pointer here (src/execution-log/events.ts).
Why it was deferred
A correct fix defers the resume-cursor advance until after the downstream store step. That restructures how backfill pagination and the store step interact (today they're decoupled — fetch accumulates all pages, then a single store step writes them), so it warrants its own change with a dedicated crash-injection test that exercises a backfill-plus-store mission. The current crash-injection suite only covers store-only missions.
See CODE_REVIEW.md (C2).
Problem
In a resumable backfill,
page.completedis recorded (and the resume cursor advanced) before the page's data is persisted, so a crash in that window loses records silently.onPage(src/interpreter/fetch-handler.ts:453-460) appends thepage.completedevent and advancespageProgressinside the fetch loop, while the page is still only in the in-memoryallResultsarray. The downstream store step persists it afterwards. A crash between the finalpage.completedand the store'seffect.appliedadvancespageProgresspast pages that exist only in memory — on resume the fetch restarts after them and they're gone.The
page.completeddocstring used to claim the data was "fetched and persisted." That's now corrected to say plainly it's fetched-only, with a pointer here (src/execution-log/events.ts).Why it was deferred
A correct fix defers the resume-cursor advance until after the downstream store step. That restructures how backfill pagination and the store step interact (today they're decoupled — fetch accumulates all pages, then a single store step writes them), so it warrants its own change with a dedicated crash-injection test that exercises a backfill-plus-store mission. The current crash-injection suite only covers store-only missions.
See
CODE_REVIEW.md(C2).