Repository navigation
Conversation
Record an atomic budget snapshot at read and decompression refusals, and expose the detailed gateway error code without changing client retry semantics. Reproduce repeated large-body rejection under shared pressure and document why small requests and context compaction behave differently. Refs #403.
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.
Requests refused by the local body buffer budget currently look like upstream rate limits: both use HTTP 429 and
x-thinkwatch-error: rate_limited. The refusal happens before routing and request history, so those records cannot explain it.Log the budget snapshot captured at refusal in both body-reading and decompression paths, including Core version, stage, encoding and byte counts. Add
x-thinkwatch-error-codeso the specificgw.request.memory_busycause is visible from response headers while preserving existing retry headers and client-specific JSON responses. Logs contain no body content, credentials or request URL.Regression tests demonstrate that a large body can be repeatedly refused while smaller bodies fit, and that it succeeds after competing reservations are released. This change adds diagnosis; it does not change admission policy or establish the cause of the reported incident. Refs #403.
Validation:
cargo fmt --all -- --checkcargo clippy --workspace --all-targets -- -D warningscargo nextest run --workspace --profile ci: 4,506 passed, 16 skippedcargo test --workspace --doc./scripts/smoke.sh: 87 passed, 0 failedRust compilation and tests used
CARGO_INCREMENTAL=0.