Repository navigation
fix(core): close the operation host audit follow-ups - #414
Merged
Merged
Conversation
Each run of a call gets its own read budget, shared by what it calls, so reruns under contention still answer. A staged write the host refused fails the mutation whether App code awaited it or not. The read that would assert one guard more than a commit holds is refused with data.guard_limit. Stale comments go, callMaxDepth comes from appCallLimits, dead refusals are dropped, settle clears its timer, and the SDK documents that actions aren't atomic across calls and that derived-key places follow the data.
nickruigrok
marked this pull request as ready for review
October 11, 2026 16:49
Contributor
Author
|
@greptileai review |
|
… the channel A plain query never commits its guards, so asserting more revisions than a commit can check no longer fails it. A write refused at the channel boundary (a value that isn't JSON, for example) is now remembered like one refused by staging, so a mutation that catches it can't commit the rest. Refused nested calls and resource requests stay catchable.
Contributor
Author
|
@greptileai review |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-ups from the post-merge audit of the operation host (GRA-442, after #400, #402 and #405). The audit found the composition sound. These close the gaps it named.
What changes
apps/core/src/operations.ts).operation.read_limiton its third run. A mutation that staged about 700 KB could run out ofstagedReadMaxBytesacross attempts.callMaxNestedand the depth limit). The rerun limit bounds the whole call..catch(() => null)), rejected before the handler settled. The mutation committed without it and answered ok.data.guard_limit. Before, the mutation ran in full and then failed at commit with an opaquedata.invalid.#withGenerationsbecame#readIn).callMaxDepthnow comes fromappCallLimits.depth.operation.not_found.settlenow cancels its deadline timer once the calls settle.ActionCtx,packages/sdk/src/server.ts):submission.key_conflict.Tests (workerd, through the real store and host)
New in
apps/core/test/operations.test.ts, under "audit follow-ups". Each one reproduced its finding before the fix:data.invalid, and nothing is stored;data.guard_limitat the read.Mutation-checked: removing the per-run reset fails the first two tests; ignoring the refused write fails the third; removing the read-time guard check fails the fourth.
754 targeted tests pass (actions, operations, operation-roles, data-stores, data-store-receipts, store-reader, store-queries, shared, sdk), run with at most 3 workers.
vp checkis clean.