Repository navigation
fix(registry): prevent schema aliases from changing frozen contracts - #95
Merged
Merged
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
This was referenced Sep 27, 2026
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.
Refs #83 and #85. A focused contract-integrity fix, not closure of the chapter-15 acceptance umbrella.
Reproduction
After
add_schemaandfreeze, mutating either the original caller dictionary or the value returned byschema()could expand nested enums, clear required fields, and permit additional properties. The validator and published contract drifted without a versioned registration.Fix
Take an owned deep snapshot before validating/storing a schema, and return independent snapshots from schema lookup. The validator and publication retain the same internal contract. Boolean JSON Schema behavior, existing error codes, operation versions and published short codes are preserved; no signed authority is regenerated or widened.
Tests
Added 7 cases for nested caller/lookup mutation, independent identical-digest snapshots, Boolean schemas, atomic rejection of remote references, and frozen registration rejection. Original implementation: 3 failed / 4 passed. Fixed implementation: 7 passed locally, Python 3.13.5. Additional dictionary/rules/authority/feature regression checks and the repository's full Python 3.15 CI must pass before merge.
Remaining #83 work includes complete requirement-to-evidence coverage, plugin migration/disable lifecycle and real deployment acceptance. This PR introduces no migration or production deployment.