Skip to content

fix(registry): prevent schema aliases from changing frozen contracts - #95

Merged
LIghtJUNction merged 1 commit into
mainfrom
fix/issue-83-frozen-schema-snapshots
Sep 27, 2026
Merged

LIghtJUNction merged 1 commit into
mainfrom
fix/issue-83-frozen-schema-snapshots

Conversation

@LIghtJUNction

Copy link
Copy Markdown
Contributor

Refs #83 and #85. A focused contract-integrity fix, not closure of the chapter-15 acceptance umbrella.

Reproduction

After add_schema and freeze, mutating either the original caller dictionary or the value returned by schema() 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.

Refs #83 and #85. Defensive copies prevent caller and lookup aliases from mutating registered validators or frozen published contracts. Retain Boolean schema behavior, error codes, operation identities and short codes.
Copilot AI lite review requested due to automatic review settings September 27, 2026 20:15

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 27, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
🔒 Security Review ✅ Completed 2026-09-27T20:19:27.051220Z 6baa103 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants