Repository navigation
feat(sdk): add WithRequireUnprefixedManifestName to reject 0.manifest.json - #4051
Open
pflynn-virtru wants to merge 1 commit into
Open
pflynn-virtru wants to merge 1 commit into
pflynn-virtru wants to merge 1 commit into
Conversation
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 59 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
pflynn-virtru
added this pull request to stack #4052
September 15, 2026 18:18
Contributor
Benchmark results, click to expandBenchmark authorization.GetDecisions Results:
Benchmark authorization.v2.GetMultiResourceDecision Results:
Benchmark Statistics
Bulk Benchmark Results
TDF3 Benchmark Results:
|
Contributor
….json Readers accept both manifest.json and 0.manifest.json so archives written by earlier releases keep working. A caller that wants to accept only the unprefixed entry name had no way to say so. WithRequireUnprefixedManifestName drops the fallback: an archive whose manifest is filed under 0.manifest.json fails with ErrPrefixedManifestName instead of being read. The prefixed entry is still looked up in that mode, so an archive with a misnamed manifest is reported differently from one with no manifest at all. This is deliberately separate from WithSchemaValidation rather than folded into Strict. Schema validation inspects the manifest document; the entry name is archive layout and never reaches the validator, so no schema setting can express this. Overloading Strict would also start rejecting archives that pass the schema, changing behaviour for callers already using it. Off by default, so this adds no new failure mode to existing readers. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Signed-off-by: Paul Flynn <pflynn-virtru@users.noreply.github.com>
pflynn-virtru
force-pushed
the
feat/3513-require-spec-manifest-name
branch
from
October 19, 2026 22:58
35b64b9 to
619dd34
Compare
pflynn-virtru
marked this pull request as ready for review
October 19, 2026 22:58
Contributor
Benchmark results, click to expandBulk Benchmark Results
TDF3 Benchmark Results
|
Contributor
|
Contributor
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.
Proposed Changes
Adds
WithRequireUnprefixedManifestName(), aTDFReaderOptionthat rejects an archive whose manifest is stored only under the legacy name0.manifest.json. Off by default; no existing reader changes behavior.manifest.jsonand0.manifest.jsonby default (fix(sdk): read the TDF manifest under the spec name manifest.json #4063). This option lets a caller accept only the name the spec defines.ErrPrefixedManifestNamewhile a missing one still reports a missing entry.WithSchemaValidation(Strict)can't do this: schema validation inspects the manifest document, and the zip entry name never reaches the validator. A separate option keepsStrictschema-only.This PR no longer stacks on #4049; it targets
maindirectly. Names follow the format-describing convention ofWithHexlessPolicyBinding(#4232) andWithUnprefixedManifestName(#4049).Refs #3513.
Checklist
Testing Instructions
cd sdk && go test ./... -racegolangci-lint run --new-from-rev=origin/main ./...insdk: 0 new issues.TestManifest_RequireUnprefixedName_{RejectsPrefixedName,ReadsUnprefixedName,MissingEntirely}(zipstream) andTDFSuite.Test_LoadTDF_RequireUnprefixedManifestName(end to end; builds themanifest.jsonarchive by repacking, so it doesn't depend on any writer option).🤖 Generated with Claude Code