formats: JSON Schema unevaluatedProperties and unevaluatedItems in std/json-schema (step 3 of #80) #690
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Context
Step 3 of the epic #80. Steps 1, 2a and 2b have landed;
unevaluatedPropertiesandunevaluatedItemsare still refused byJsonSchema.readwith an error that names them, and the validator (src/validate.trb,evaluated) returns only a list ofValidationError, so a subschema cannot tell its parent what it evaluated.Goal
std/json-schemavalidatesunevaluatedPropertiesandunevaluatedItemsof 2020-12 (specification section 11), with the annotation collection they need: which properties and array items each successful subschema evaluated, through$ref,$dynamicRef,allOf/anyOf/oneOf,if/then/else,properties/patternProperties/additionalProperties,prefixItems/items/contains, and nestedunevaluated*.Source
src/schema.trb(model and reader),src/keywords.trb,src/validate.trb,tests/suite.test.trb(exclusions,fileExclusions).Acceptance criteria
unevaluatedPropertiesandunevaluatedItems(any schema) into the model; the "keywords of a later step" refusal and its unit test go.anyOfbranch,not, a failedifor a failedcontainsmatch are dropped), andunevaluated*sees the annotations of its adjacent keywords and of references, not of siblings./unevaluatedProperties, instance pointer of the offending property or item).unevaluatedPropertiesandunevaluatedItemsare generated intosuite-cases.trb(the generator note in its header is updated) and pass, andfileExclusionsdrops both. The three namedexclusionsthat wait on this step (ref"ref creates new scope when adjacent to keywords",dynamicRef"strict-tree schema, guards against misspelled properties",not"collect annotations inside a 'not', even if collection is disabled") are removed and their cases pass.allOf, through$ref, through$dynamicRefacross two resources, and a failed branch not contributing.docs/standard-library/json-schema.mddocuments both keywords and drops them from the "later step" list;skills/regenerated;sh tools/gates.sh agreen in forge CI.Design record point
ROADMAP "Which versions a format supports"; ENCODING.md section 9. Decided by the loop: the annotation collection is internal to the validator (a result type carrying errors plus the evaluated names/indices, merged by the applicators); no public annotation output yet, OpenAPI (#76) and the tool layer do not need it.
Seed impact
None: the compiler does not import
std/json-schemaand no std name is looked up by string.Size
One PR, two Conventional Commits: (1)
feat(std/json-schema): collect evaluated properties and itemswithunevaluatedProperties/unevaluatedItemsand unit tests; (2)test(std/json-schema): run the unevaluated suite fileswith the regenerated cases, removed exclusions, docs and skill regeneration.Dependencies
Needs #567 (landed). Part of #80; unblocks steps 4 to 7.
[loop:torbscript] claim implement by session:loop-torbscript-20261030 @anthropic:theorben until 2026-10-30T12:11Z
[loop:torbscript] release implement by session:loop-torbscript-20261030: worker ended (gateway restart) after its work was pushed: PR #693 (head
f8004b30, two commits, not draft, argus requested, Closes #690). CI pending.next: waiting (CI and Argus review on #693)
formatassertion for the formats std can parse (step 4a of #80) #697