fix: restore two schema checks dropped by #64's conflict resolution#65
Draft
macanderson wants to merge 1 commit into
Draft
fix: restore two schema checks dropped by #64's conflict resolution#65macanderson wants to merge 1 commit into
macanderson wants to merge 1 commit into
Conversation
#64's merge with main kept its own `schema/validate-examples.py` wholesale, silently discarding both checks #63 had added to that file: * the reference-SERIALIZED vector validation (issue #54) — the half that catches schema/serializer disagreement, which curated examples cannot; * the `$id` + served-copy check, asserting `$id` names the live domain and `site/public/schema/` stays byte-identical to the source. Neither loss was visible in CI. Both are additive validations, so deleting them removes coverage without failing anything: #64 was green with them gone, and main is green now. The second loss is not theoretical — main is currently serving a stale schema. #64 rewrote the ContextQuery `$comment`, so the copy under `site/public/schema/` no longer matches the source. That is the exact "stale schema that still resolves is worse than a 404" case #63's comment describes, and the check that would have caught it went out in the same commit that caused it. Resolves the drift by taking #63's `$comment` wording over #64's: the two fixed the same bug independently, and #63's is the better text (it names the conformance suite's own sample_query() and records that absence and [] mean the same thing). `schema/contextgraph-envelope.schema.json` is byte-identical to the served copy again. CHANGELOG: reworded #64's ContextQuery bullet, which claimed a schema fix that had already landed in #63, to claim only the regression test and the cross-audit it actually contributed. Section numbering reconciled: 1-2 examples/, 3 reference vectors, 4 SPEC.md, 5 schema identity. Both restored checks are mutation-tested rather than assumed: the $id check fails on main's current drift, and the vector check fails when ContextQuery's `required` is reverted to the pre-#63 list. validate-examples.py: 39 checks (37 on main — the two dropped ones back). cargo test --workspace: 292 passed, 0 failed. fmt and clippy -D warnings clean.
There was a problem hiding this comment.
Sorry @macanderson, you have reached your weekly rate limit of 500000 diff characters.
Please try again later or upgrade to continue using Sourcery
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.
Follow-up to #64.
mainis currently serving a stale schema, and the check that would catch it was deleted in the same merge.What happened
#64's conflict resolution kept its own
schema/validate-examples.pywholesale, discarding both checks #63 had added to that file onmain:$id+ served-copy byte-identity$idnames the live domain andsite/public/schema/matches the sourceNeither loss was visible in CI. Both are additive validations — deleting them removes coverage without failing anything. #64 went green with them gone, and
mainis green right now.This is not theoretical
#64 rewrote the
ContextQuery$comment. The served copy undersite/public/schema/was never refreshed, so onmaintoday:That is exactly the case #63's comment describes — "a stale schema that still resolves is one that silently validates the wrong thing", worse than a 404. The merge introduced the drift and deleted the detector in one move.
The
$commentcollisionWorth flagging: #63 and #64 fixed the
ContextQuery.requiredbug independently and identically. Both removedkinds/anchors; only the$commentprose differed. This PR takes #63's wording, which is the better text — it names the conformance suite's ownsample_query()and records that absence and[]mean the same thing.schema/is byte-identical to the served copy again.The CHANGELOG bullet from #64 claiming that schema fix is reworded to claim only what #64 actually contributed uniquely: the regression test and the cross-audit.
Verification
Both restored checks are mutation-tested, not assumed:
python3 schema/validate-examples.pycargo test --workspacecargo fmt --all --checkcargo clippy --workspace --all-targets -- -D warningsReview notes
examples/, 3 reference vectors, 4SPEC.md, 5 schema identity.