Repository navigation
Advertise the real CAS size limits in GetCapabilities - #3160
Open
rajputdivyanshu81 wants to merge 2 commits into
Open
rajputdivyanshu81 wants to merge 2 commits into
rajputdivyanshu81 wants to merge 2 commits into
Conversation
max_batch_total_size_bytes was a hard-coded 64 KiB, unrelated to the 4 MiB gRPC decoding limit the listener enforces, which pushed most blobs onto ByteStream. max_cas_blob_size_bytes (REAPI 2.12) was always 0, even when the CAS store caps blob size. The batch limit now follows the listener's max_decoding_message_size, less 1/16 for per-blob framing, and max_cas_blob_size_bytes is the CAS store's max_upload_size(), or 0 (no limit) when the store has none. Refs TraceMachina#3117 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This was referenced Nov 11, 2026
This branch was successfully 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.
What and why
max_batch_total_size_byteswas a hard-coded 64 KiB, unrelated to the 4 MiB gRPC decoding limit the listener actually enforces, so clients sent most blobs over ByteStream even when a batch would have fit.max_cas_blob_size_bytes(REAPI 2.12) was always 0 ("no limit"), even when the CAS store caps blob size, as the memory store does. The batch limit now follows the listener'smax_decoding_message_size(4 MiB when unset), less 1/16 for per-blob framing.max_cas_blob_size_bytesis the CAS store'smax_upload_size()(#3097), or 0 when the store has no limit, as Sumon suggested in #3117.Refs #3117
How was this verified?
New test
cache_size_limits_follow_listener_and_store: a 16 MiB listener limit advertises 15 MiB, and a store without a limit advertises 0. Unit tests cover the two conversions.capabilities_server_test(4) passes on current main locally (Windows, cargo), and the server crate type-checks. I haven't run the Bazel targets locally; CI covers them.reference/protocol-api.mdxis updated for both fields.Risk
Low. Clients batch more blobs per request, up to the limit the server already enforced. A client that honors
max_cas_blob_size_bytesstops sending blobs the store would have rejected anyway.AI assistance
Claude Code found this during a REAPI conformance audit, made the change, wrote the tests and ran them. I reviewed every line.