Repository navigation
Conversation
Fixes opis#167. Record the instance path on shared schema frames and merge evaluated properties/items only when frames describe the same data location. Preserve same-location allOf and reference annotation propagation. AI assistance: OpenAI GPT-6 (Codex) investigated the issue and JSON Schema specification, implemented the scoped fix, and ran 22 new regression cases plus all 6299 tests locally. No human review is claimed.
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.
Fixes #167.
Evaluated property names from a child object currently reach the parent schema's shared state. This lets an otherwise forbidden root property pass
unevaluatedProperties: falsewhen its name was validated inside a child.Record the instance path for each shared schema frame and merge evaluated annotations only between frames describing the same data location. This retains same-location
allOfand$refpropagation while keeping child property names and array indices local. The change follows JSON Schema Core's instance-location rules for annotations and unevaluated applicators: https://json-schema.org/draft/2020-12/json-schema-core#name-unevaluatedproperties.The new cases cover draft 2019-09 and 2020-12, multiple nesting levels, references, valid controls, and the array counterpart of the same shared-state problem. This does not address the separate dynamic-anchor resolution issue in #163.
Validation on macOS with PHP 8.4.26 and PHPUnit 9.6.38:
composer run tests: 6,299 tests, 6,349 assertions, all pass.php -lfor both changed files andgit diff --check: pass.Dependencies were resolved with
composer update --no-interaction --no-progress, matching CI. Generated vendor files and the lock file are excluded. Other PHP versions and Linux were not tested locally; upstream CI is separate.AI assistance: OpenAI GPT-6 (Codex) investigated, implemented, tested, and drafted this PR. Independent automated Standards/Spec reviews found no outstanding issues; no human review is claimed.