Repository navigation
Preflight locked batch limits before trusted context lookup - #346
Merged
Merged
Conversation
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.
Problem
Locked HTTP batch requests reached the trusted context resolver before checking
locked_policy.max_batch_items. An oversized request could spend resolver work and even return503 trusted_context_unavailableinstead of the documented batch ceiling response. With a healthy resolver it returned a different 400 error than the unlocked path.Change
Preflight the server-owned batch ceiling before context resolution and audit ID allocation. Both locked and unlocked oversized batches now return
413 batch_limit_exceeded. The locked and unlocked ceilings remain independently configured.Verification
A new regression failed before the change: an oversized locked batch invoked a throwing resolver and returned 503. It now returns 413 without calling that resolver; an in-limit request still reaches the resolver and fails closed. Focused HTTP/deployment tests (44/44), the full Node test suite, public contract, deployment surface, and link checks pass.
This removes unnecessary trusted callback work for invalid batches; it does not replace edge rate limits or authentication.