Closed
Description
Part of #102 — wave 1.
Mini-spec
Goal: make the schema surface honest — export a schema that actually describes components, measure text with the fonts the render will use, and delete the dead style model that keeps stale vocabulary alive.
Invariants
rustmotion schemaoutput fully describes everyComponentvariant.- Validation and render resolve the same typeface for the same text.
- No public type remains that contradicts the live CSS types on casing or shape.
Out of scope: validate_attrs hardening and SceneEntry diagnostics (wave 2, L4b); the colour parser itself (L2).
Acceptance
H2—cmd_schemaemitsschemars::schema_for!(Component)(already built internally atvalidate_attrs.rs:40) soScene.childrenis no longer typeditems: true. The output must contain aoneOfover component variants.H5 (fonts)—load_custom_fontsruns insidevalidation::run_checks, before any measurement. Today it is only called on the render path (render.rs:47), so validation measures through the Helvetica/Arial fallback while the render uses the declared face.H8 (code)—LayerStyle(schema/style.rs:317+) and its orphaned siblings that shadow live CSS types (schema::BlendMode,schema::Overflow,schema::GridTrack,CardDisplay,schema::Size) are removed, along with theirpub usere-exports. Verify each is genuinely unreferenced before deleting.
Files: crates/rustmotion-core/src/schema/**, crates/rustmotion-cli/src/commands/schema.rs, crates/rustmotion-cli/src/commands/validation.rs
Note: crates/rustmotion-core/src/css/style.rs is a different file owned by L3 — do not touch it.
Verify
rtk cargo test --workspace
rtk cargo build --release
./target/release/rustmotion schema | jq '.definitions | keys | length'
for f in examples/*.json; do ./target/release/rustmotion validate -f "$f"; done
Metadata
Metadata
Assignees
Labels
No labels
Activity
feat(schema): export the component schema and load fonts before valid…
Post-audit reliability hardening — wave 1 (critical + high) (#108)
LeadcodeDev commentedon Aug 1, 2026
Merged into
mainvia #108 (squash38596ca).