Repository navigation
Conversation
This comment has been minimized.
This comment has been minimized.
b7r6
force-pushed
the
b7r6/cas-integrity-unified
branch
2 times, most recently
from
October 7, 2026 20:28
30462da to
fdd0a68
Compare
… size A ByteStream Write that sets finish_write=true before sending the full size declared in its resource name was accepted as a complete upload: the handler returned OK with committed_size equal to the full declared size, the blob then showed as present in FindMissingBlobs, and Read served the truncated bytes under a digest they do not hash to -- silent CAS content corruption. Both the streaming path (process_client_stream) and the oneshot path (inner_write_oneshot) only guarded the too-many-bytes case and committed on finish_write without checking that the received byte count equalled the declared size. A VerifyStore-fronted write path catches this on EOF, but an unverified store tier (filesystem/memory fast tier) commits the partial. Reject finish_write with InvalidArgument when bytes_received != expected_size in both paths. The compressed path already verifies decoded size and digest. Also fixes a latent same-class defect in max_decoding_message_size_test, whose success case declared a size that did not match the bytes it sent and only passed because of this bug. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Unifies the handler-level short finish_write rejection (N13, e5d1b0d) with two further CAS-integrity fixes for the same disclosure (TRA-1373): - filesystem_store: refuse to emplace a blob whose byte count disagrees with an ExactSize upload hint. A torn/aborted upload stream closes the writer half, which arrives at the store as a clean EOF; without this commit-point guard the partial bytes are stored under the full digest key regardless of any handler check (finish_write never arrives on the abort path). - bytestream_server: QueryWriteStatus clamps committed_size to the declared digest size (the filesystem store reports block-rounded on-disk footprint, e.g. 17 -> 4096) and only reports complete once the store holds at least that many bytes, instead of unconditional complete=true. Regression tests: - short_finish_write_is_rejected_and_not_committed (oneshot path, N13) - short_finish_write_is_rejected (streaming multi-message path) - aborted_mid_stream_upload_is_not_committed (EOF without finish_write; only the store-level guard can catch this) - max_decoding_message_size_test updated: it asserted the old short-upload-accepted behavior. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
b7r6
force-pushed
the
b7r6/cas-integrity-unified
branch
from
October 8, 2026 17:51
fdd0a68 to
5a7d252
Compare
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
Lane A stability fix from the findings catalog (see
nativelink-findings-2026-10-05.csvon the
meta/findings-catalog-2026-10-05branch), rebased onto OSS main@bf4b3aa855. This fork PR exists to validate the change on CI that is
representative of upstream PR lanes (public read-only cache, same endpoints)
before any upstream submission.
How was this verified?
The branch carries its own regression tests (fails-without where the fix
class allows it — see the branch's test commits). This PR's purpose is the
full representative CI run; green here rehearses the exact checks an
upstream PR would face.
Risk
Fork-internal validation PR; nothing lands anywhere by merging this. The
underlying fix's risk assessment happens at upstream-submission time.
AI assistance
Agent-assisted pipeline (Claude) for rebase and PR mechanics under my
direction; the fix itself carries verification in its tests.