Skip to content

Add spec submodule and schema-driven compliance tests#96

Merged
gvonness-apolitical merged 1 commit intomainfrom
feat/spec-submodule-compliance-tests
Feb 16, 2026
Merged

Add spec submodule and schema-driven compliance tests#96
gvonness-apolitical merged 1 commit intomainfrom
feat/spec-submodule-compliance-tests

Conversation

@gvonness-apolitical
Copy link
Collaborator

Summary

  • Add codex-file-format-spec as a git submodule at spec/ for single-source-of-truth schema validation
  • Create spec_compliance.rs with 35 tests across 3 modules:
    • Schema validation (10 tests): validates all mark constructors against spec JSON schemas
    • Backward compatibility (15 tests): consolidates citation/glossary migration tests
    • Example deserialization (10 tests): roundtrips spec example documents through cdx-core types
  • Delete extension_schema.rs (all tests superseded by spec-driven validation)
  • Remove 7 duplicated tests from conformance.rs
  • Update CI to checkout submodules for test/msrv/cli-tests/coverage/feature-matrix jobs
  • Add weekly spec staleness check workflow (.github/workflows/spec-check.yml)

Test plan

  • cargo test -p cdx-core --test spec_compliance — all 33 non-ignored tests pass
  • cargo test -p cdx-core --test conformance — 59 remaining tests pass
  • cargo test --workspace --all-features — full suite passes (1060 tests)
  • cargo clippy --workspace --all-features -- -D warnings — no warnings
  • CI jobs with submodules: true checkout spec correctly

Pin the codex-file-format-spec repo as a git submodule at spec/ so
tests validate against the actual spec schemas rather than hand-written
field assertions.

- Add jsonschema dev-dependency for Draft 2020-12 validation
- New spec_compliance.rs with 35 tests across three modules:
  mark_schema_validation (10), backward_compatibility (15),
  example_deserialization (10, 2 ignored for tableCell divergence)
- Delete extension_schema.rs (superseded by spec_compliance.rs)
- Remove 7 duplicated tests from conformance.rs
- Update CI checkout with submodules: true for test jobs
- Add weekly spec-check.yml staleness workflow
@codecov
Copy link

codecov bot commented Feb 16, 2026

Codecov Report

❌ Patch coverage is 91.89189% with 21 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
cdx-core/tests/spec_compliance.rs 91.89% 21 Missing ⚠️

📢 Thoughts on this report? Let us know!

@gvonness-apolitical gvonness-apolitical merged commit e42ff8f into main Feb 16, 2026
16 checks passed
@gvonness-apolitical gvonness-apolitical deleted the feat/spec-submodule-compliance-tests branch February 16, 2026 23:10
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