Skip to content

RFC 0005: schema version signals (v1.4.0) - #43

Merged
OliEder merged 10 commits into
mainfrom
feat/version-aware-validator
Aug 28, 2026
Merged

OliEder merged 10 commits into
mainfrom
feat/version-aware-validator

Conversation

@OliEder

@OliEder OliEder commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

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 from based_on_formation.source_version.
  • x-ocf-version (root keyword): machine-readable schema version, so tools stop parsing the $comment prose.
  • versions.json: published manifest of all released schema versions + latest, assembled at release time from the gh-pages v* dirs plus the new tag.

Notable

  • ajv strict-mode: ajv rejects unknown keywords, so x-ocf-version broke npm 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.
  • The versions.json generator is pure + unit-tested (semver sort verified, e.g. 1.10.0 after 1.2.0), separate from the workflow wiring.
  • New test:version + test:manifest suites are chained into npm 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.
  • 10 valid examples validate; 18 invalid fixtures reject (the new one on the min_schema_version pattern).
  • adoc build parses the new prose + changelog.
  • Version 1.4.0 consistent across package.json, package-lock, schema $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

Oliver-Marcus Eder and others added 10 commits August 28, 2026 10:07
…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.)
@OliEder
OliEder merged commit 53d697d into main Aug 28, 2026
2 checks passed
@OliEder
OliEder deleted the feat/version-aware-validator branch August 28, 2026 08:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant