-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
area: buildBuild, Makefile, toolchainBuild, Makefile, toolchainarea: ciCI/CD workflowsCI/CD workflowsarea: schemasJSON Schemas and examplesJSON Schemas and examplesarea: xtaskRust xtask toolingRust xtask toolingpriority: p2Normal priorityNormal prioritytype: enhancementFeature or enhancementFeature or enhancement
Description
Summary
Adopt a Rust-native JSON Schema validation path for xtask schemas using the jsonschema crate, run in parallel with the current AJV (Dockerized) implementation, and migrate once parity is demonstrated.
Motivation
- Remove remaining Node dependency from schema validation.
- Speed and portability benefits from a Rust-only toolchain.
Scope / Plan
- Add
cargo run -p xtask -- schemas --engine rust:- Use
jsonschemacrate - Draft: start with Draft 7 (crate default), evaluate Draft 2020-12 coverage
- Implement a resolver that loads
$reffiles from the repo (no network)
- Use
- Cross-check in CI:
- Run both AJV (Docker) and Rust engines on the same corpus
- Compare pass/fail sets; report diffs
- Close gaps:
- Formats:
base64url, ISO-8601 durations, etc. (custom format handlers) - Multi-file
$refresolution and$idhandling
- Formats:
- Migrate:
- Flip CI to Rust engine as primary; keep AJV as optional fallback for a cycle
Acceptance
- CI job shows Rust validator matches AJV results on all compiled schemas and example documents.
- No network I/O during validation;
$refresolution is repo-local and deterministic. - Clear failure messages (path to error, schema location).
Non-goals (for now)
- Rewriting schemas; only the validator path changes.
- Introducing network fetches for
$ref.
Risks / Notes
- Draft 2020-12 features may need additional coverage; start with Draft 7 where stable.
- Resolver + custom formats add code; keep well-tested and isolated.
Tracking
- After the label sync workflow merges, tag with: area: schemas, type: tooling, priority: p2
Metadata
Metadata
Assignees
Labels
area: buildBuild, Makefile, toolchainBuild, Makefile, toolchainarea: ciCI/CD workflowsCI/CD workflowsarea: schemasJSON Schemas and examplesJSON Schemas and examplesarea: xtaskRust xtask toolingRust xtask toolingpriority: p2Normal priorityNormal prioritytype: enhancementFeature or enhancementFeature or enhancement