feat(schema): schemars 1.x + Draft-2020-12 + TOML round-trip tests#5
Merged
Conversation
Chunk M1-W1-C of M1 plan — closes Plan §6.1. Workspace dep: - schemars 0.8 → 1 (latest 1.2.1; MSRV 1.74 stays well below our 1.85 pin). 1.x emits Draft 2020-12 by default; the existing JsonSchema derives compile unchanged. pearlite-schema dev-dep: - serde_json (workspace dep, used only in tests). Two acceptance tests in lib.rs::cross_cutting_tests: - schemars_output_is_draft_2020_12 — generates the JSON Schema for DeclaredState and asserts the $schema field claims Draft 2020-12. This is the Plan §6.1 "schema: schemars_output_is_2020_12" gate. - declared_state_round_trips_through_toml — parses host_full.toml, serializes it back, re-parses, and asserts equality. This is the "round-trip: declared_state_serde — every field round-trips through TOML" gate. Plan §6.1 "Done when" status now: - Public types derive Serialize, Deserialize, JsonSchema, Debug, Clone (+Eq/PartialEq/Hash/Default where applicable). ✓ - cargo doc --no-deps emits zero "missing docs" warnings. ✓ - A representative resolved.toml fixture round-trips without loss. ✓ - schemars output validates as Draft 2020-12. ✓ - Zero unwrap()/expect()/panic! in production code paths. ✓ (lints enforce workspace-wide). - pearlite-audit reports no §13 violations. ✓ What's NOT in this chunk (deferred per Plan §6.1): - Property tests with proptest — Plan §6.1 doesn't list any property test for pearlite-schema (proptest gates apply to pearlite-state §6.2 and pearlite-diff §6.3). Verification: - cargo test -p pearlite-schema (14 passed; 0 failed) - cargo doc -p pearlite-schema --no-deps (zero warnings) - cargo clippy --workspace --all-targets -- -D warnings (zero warnings) - cargo fmt --all --check - scripts/ci/check-spdx.sh - pearlite-audit check . (1 check, 0 violations) Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.
Chunk M1-W1-C of M1 plan — closes Plan §6.1.
Workspace dep bump
schemars0.8 → 1 (latest 1.2.1; MSRV 1.74, well below our 1.85 pin). 1.x emits Draft 2020-12 by default; existingJsonSchemaderives compile unchanged.Two new tests in
lib.rs::cross_cutting_testsschemars_output_is_draft_2020_12schema: schemars_output_is_2020_12declared_state_round_trips_through_tomlround-trip: declared_state_serdePlan §6.1 Done when status
Serialize, Deserialize, JsonSchema, Debug, Clone.cargo doc --no-depsemits zeromissing docswarnings.resolved.tomlfixture round-trips without loss.unwrap()/expect()/panic!in production code paths.pearlite-auditreports no §13 violations.pearlite-schemais now fully done per Plan §6.1.Out of scope
Property tests — Plan §6.1 doesn't list any for
pearlite-schema. The proptest gates apply topearlite-state(§6.2) andpearlite-diff(§6.3) instead.Verification
cargo test -p pearlite-schema— 14 passed; 0 failedcargo doc -p pearlite-schema --no-deps— zero warningscargo clippy --workspace --all-targets -- -D warningscargo fmt --all --checkscripts/ci/check-spdx.shpearlite-audit check .— 1 check, 0 violations🤖 Generated with Claude Code