Repository navigation
test: reconcile encrypted-parts attributes test with #119 write validation - #135
Merged
Merged
Conversation
…ation TestAPIGetObjectAttributesEncryptedPartLengths (from #128) built its fixtures by PutObjectPart-ing plaintext bodies under encrypted-object metadata with per-part sizes 5245473 and 1. Since #119, PutObjectPart always derives an encrypted part's plaintext length from the bytes written and rejects a part that cannot be a valid sio stream, so those fixtures can no longer be created through a normal write and both variants failed at write time. Such an on-disk shape now only exists as pre-#119 data or from an old peer, which is exactly the state the GetObjectAttributes per-part tamper check (#128) defends. Inject that ObjectInfo directly through a stub object layer (the setObjectLayer pattern used by the #110 tamper test) and exercise the handler, which is what this test pins. The handler path, the crafted part sizes, and both assertions (separately-encrypted-parts -> ErrObjectTampered; legacy-single-stream -> stored fragment sizes) are unchanged. Test-only; reconciles two already-merged correct changes (#119 and #128). Co-Authored-By: Claude Opus 4.8 <[email protected]> Claude-Session: https://claude.ai/code/session_01L7qJqWwy8oFA6aCXWRzXQe Signed-off-by: Feng Ruohang <[email protected]>
2 tasks done
This was referenced Sep 6, 2026
Closed
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.
Description
Fix-forward for the
mainGo CI failure that surfaced only after #128 and #119 were both merged. Individually green, they interact: test-only, no product change.TestAPIGetObjectAttributesEncryptedPartLengths(added in #128) built its fixtures byPutObjectPart-ing plaintext bodies under encrypted-object metadata with per-part sizes5245473and1. Since #119,PutObjectPartalways derives an encrypted part's plaintext length from the bytes written and rejects a part that cannot be a validsiostream — so those fixtures can no longer be created through a normal write, and both variants failed at write time (errObjectTampered).That on-disk shape now only exists as pre-#119 data or from an old peer — exactly the state the GetObjectAttributes per-part tamper check (#128) is defense-in-depth for. This injects that
ObjectInfodirectly through a stub object layer (thesetObjectLayerpattern already used by the #110 tamper test) and exercises the handler, which is what the test pins.Unchanged: the handler path, the crafted part sizes, and both assertions
separately-encrypted-parts→ErrObjectTamperedlegacy-single-stream→ stored fragment sizes returnedHow to test
Locally green on both FS and Erasure instance types;
go vet,go build ./..., and theTestObjectTampered*/TestPartNumberToRangeSpec*/TestAPISSEC*/TestReplica*regressions pass.Types of changes
Checklist
git commit -s) per the DCOgofmt/go vetclean, package tests pass🤖 Generated with Claude Code
https://claude.ai/code/session_01L7qJqWwy8oFA6aCXWRzXQe