Repository navigation
Conversation
RESPONSE_BODY_LIMIT_BYTES sets the limit for PUT /response/:id only; unset keeps 5 MiB. The client reads replies of up to 22 MiB, and a histogram records the stored response size. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This branch has not been deployed
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.
WIP-109 registration responses grow to 15 MiB + 4 KiB of plaintext (world-id-protocol#1246), which is about 20 MiB after sealing, AES-GCM and base64. The bridge rejects bodies over 5 MiB on every route, so such a response cannot be stored.
Changes
RESPONSE_BODY_LIMIT_BYTESsets the body limit forPUT /response/:idonly. Unset keeps 5 MiB, so merging this changes nothing until a deployment sets it. Every other route keeps the 5 MiB limit. A malformed value fails startup.message_bridge.response_stored_bytesrecords the size of each stored response.message_bridge::appandserver::starttake the limit as a new argument.Rollout
RESPONSE_BODY_LIMIT_BYTES=23068672(22 MiB) on staging first. Clearing the variable and restarting restores 5 MiB.cache.t4g.micro(about 0.5 GiB), so a few dozen full-size responses fill it; check Redis memory and the new histogram before raising the limit in production.Not changed
400, the same status as a missing session.Validation
cargo fmt --all -- --check,cargo clippy --workspace --all-targets --all-features,cargo build --workspace --lockedandcargo test --workspace --all-features(70 tests, local Redis) pass. The new integration test checks that onlyPUT /response/:idfollows the configured limit.🤖 Generated with Claude Code