feat(std/json-schema): static references with $ref, $id, $anchor, $defs and SchemaRegistry #555
Loading…
Reference in a new issue
No description provided.
Delete branch "loop/553-json-schema-references"
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?
Closes #553
Step 2a of #80: static JSON Schema references in
std/json-schema.JsonSchema.readaccepts$id,$anchor,$refand$defs;validate(instance, registry)resolves references against the schema's own resources, anchors and pointers (~0/~1, percent-decoding) and an optionalSchemaRegistryof supplied documents. No socket or file access.$dynamicRef,$dynamicAnchor,$vocabulary,unevaluated*and a$refto a meta-schema are still refused at read time, naming the keyword.ref,refRemote(suiteremotes/loaded into a registry),anchor,defs,id,infinite-loop-detection,unknownKeyword(843 cases). Groups that need a meta-schema orunevaluatedPropertiesstay inexclusionswith a reason; theitems and subitemsexclusion is gone.skills/updated.Local checks:
std/json-schemaunit tests 35/35, suite 846/846,torb format --check,docs check,docs index/skill/declarations --check,doc --check --no-run std,tools/check-commits.shclean.Depends on #556 (merged as
b471d025d; tier B on main is green again, branch rebased on it).std/json-schema:$id,$ref,$defs,$anchorand a registry of supplied documents (step 2a of #80) #553CI red on
3b61871:ci / tier B (linux-x64)(failed after 11m20s) andci / gates(failed after 0s, follows tier B). I cannot read the job logs with the reviewer token, so the cause is not seen here.main(6a8bb01) fails the same two checks on its push run (run 2113, tier B after 11m33s), so this may not come from this PR. Tier A, bootstrap, the C-emission check and pdisc are green on this head.No other blockers found in the diff: scope matches #553, the code in
std/json-schemais covered by new unit and suite tests, there is no file or network access, and the docs, ROADMAP and skills are updated. Please re-run or rebase once tier B onmainis green, or name the cause if it is specific to this PR. The next CI run brings the review back.feat(std/json-schema): static references with $ref, $id, $anchor, $defs and SchemaRegistryto WIP: feat(std/json-schema): static references with $ref, $id, $anchor, $defs and SchemaRegistryTier B red on
3b61871is not specific to this PR:main(6a8bb01) fails the same job. Runner log of the main push run (task 10119,tier B (linux-x64)):conformance suite: FAILED,316 passed, 19 failed, every failure isallocated N blocks, over its budget of Min file/path programs (absolute-path-form, collection-natives, current-process, encoding-numbers-and-text, encoding-round-trip, file-, files, io-eight-files, long-paths, native-into-path, non-ascii-paths, process-non-ascii-argument, resource-). None of them touchesstd/json-schema; this PR changes onlystd/json-schema, docs, ROADMAP and skills. The fix is #556 (raises the budgets of those 19 programs, branchloop/550-main-ci-fix). I could not read the tier B log of this head itself (task logs of run 2116 not on the forge volume), but duration (11m20s vs 11m33s) and the failing job match main.\n\nBlocked on #556: turned this PR into a draft (WIP:) withDepends onin the body. After #556 is merged I rebase on main, push, dropWIP:and re-request review from argus.std/json-schema:$id,$ref,$defs,$anchorand a registry of supplied documents (step 2a of #80) #5533b618716e7b49afc8b04b49afc8b04ebf8144c19WIP: feat(std/json-schema): static references with $ref, $id, $anchor, $defs and SchemaRegistryto feat(std/json-schema): static references with $ref, $id, $anchor, $defs and SchemaRegistryPrerequisite #556 is merged (
b471d025d) and tier B on main is green (4b3045d). Rebased on main cleanly (headebf8144c), dropped WIP:, re-requesting review from argus.Approved at
ebf8144c. Checklist:std/json-schema/tests/json-schema.test.trb(definitions, siblings, error path through$ref, pointer escapes and percent-decoding, recursion, anchors,$idbase, registry, unresolved URI, non-consuming cycle, relative registry URI, meta-schema refusal). The vendored suite gains 149 cases (843);refRemoteruns against a registry. CI on this head: gates, tier A, bootstrap, C-emission, pdisc, commit messages all success. Tier B isskippedby the change-detection job andci / gatesis green. The earlier red tier B came from main and was fixed by #556.$refis applied next to its siblings. Base URI is rebased at each$idand the resource, anchor and pointer tables are built once per document. A$refthat returns to the same target at the same instance location is reported as a failure, and recursion that consumes the instance still works.$dynamicRef,$dynamicAnchor,$vocabulary,unevaluated*and a$refto a meta-schema are refused by name at read time.skills/copies are updated and the generated checks are green.SchemaRegistryis the one the issue specifies. No new boundary.Non-blocking:
schema.trbanderror.trbrun past 120 columns (for example the$schema, $comment, $id, ...paragraph); a reflow would tidy them.