Repository navigation
RFC 0005: schema version signals (v1.4.0) - #43
Merged
Merged
Conversation
…ansparency Design for closing the schema/validator version-skew gaps surfaced when the playground silently served an outdated validator. Covers meta.min_schema_version, machine-readable x-ocf-version, versions.json manifest, a major guard + minor-gap handling (warn + on-demand fetch), auto-republish CI, and playground transparency. Site multi-sport redesign is deliberately a separate later spec. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
ajv strict mode rejects unknown keywords (the design assumed they'd be silently ignored — they are not under ajv strictSchema). Add --strict-schema=false to the validate script and check-invalid.mjs so the custom x-ocf-version keyword is accepted while strictTypes stays on. This matches the ocf-validator's own ajv config (strictSchema:false).
Both new suites passed only under manual node --test; add test:version and test:manifest and chain them so CI actually guards x-ocf-version consistency and the manifest generator against regressions. (Review follow-up.)
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.
Implements the accepted RFC 0005 — the schema-side signals a version-aware validator needs (Strand A of the version-aware-validator design). Also lands the design doc + Plan 1.
What (all additive → minor v1.4.0)
meta.min_schema_version(optional SemVer): the minimum schema version needed to validate a document correctly, so a validator can tell "document is wrong" from "I'm out of date." Reuses the exact SemVer pattern frombased_on_formation.source_version.x-ocf-version(root keyword): machine-readable schema version, so tools stop parsing the$commentprose.versions.json: published manifest of all released schema versions +latest, assembled at release time from the gh-pagesv*dirs plus the new tag.Notable
x-ocf-versionbrokenpm run validate/check-invalid.mjs. Fixed with--strict-schema=false(keeps strictTypes; matches the ocf-validator's own ajv config). The design's "unknown keywords are ignored" assumption did not hold under ajv strict — documented in the commit.versions.jsongenerator is pure + unit-tested (semver sort verified, e.g. 1.10.0 after 1.2.0), separate from the workflow wiring.test:version+test:manifestsuites are chained intonpm test(review follow-up) so the coverage runs in CI.Verification
npm test— all suites pass (validate + invalid + positions + sport + version + manifest); no "unknown keyword" emitted.min_schema_versionpattern).$comment,x-ocf-version, adoc:version:, README badge, changelog.Strand B (validator consumption: major guard, minor-gap warn + on-demand fetch,
Result.schema, auto-republish) and Strand C (site redesign) are separate, later plans.🤖 Generated with Claude Code