Skip to content

decrating: Phase 6 — schema vs types audit [FOLD]#77

Merged
EffortlessSteven merged 1 commit into
mainfrom
feature/decrating-phase6-schema-audit
Apr 15, 2026
Merged

decrating: Phase 6 — schema vs types audit [FOLD]#77
EffortlessSteven merged 1 commit into
mainfrom
feature/decrating-phase6-schema-audit

Conversation

@EffortlessSteven

Copy link
Copy Markdown
Member

Summary

Phase 6 of the decrating effort: audit whether shipper-schema should remain a standalone published crate or be folded into shipper-types.

Decision: FOLD. shipper-schema is now shipper_types::schema. The published-crate count drops from 13 to 12.

Audit findings

Dimension Finding
Public API surface 2 functions: parse_schema_version, validate_schema_version
Implementation LOC ~57 lines in src/lib.rs (rest was tests)
Runtime dependencies anyhow only
Own domain types None — returns u32 / Result<()>
Migration logic / compat ladder None
Workspace consumers shipper-config, shipper (state::store, state::execution_state), fuzz, tests
External consumers None
Conceptual independence None — the shipper.<doctype>.vN format is hard-coded into the parse function itself

Against the rubric in the task spec, every "fold" criterion was met and no "keep" criterion applied.

What changed

  • crates/shipper-schema/src/lib.rscrates/shipper-types/src/schema.rs (with pub mod schema; in shipper-types/src/lib.rs)
  • Integration tests moved to crates/shipper-types/tests/schema_contract_integration.rs and schema_snapshot_tests.rs
  • All inline and integration snapshots moved and renamed (shipper_schema__tests__*shipper_types__schema__tests__*; snapshot_tests__*schema_snapshot_tests__*) with their source: paths updated
  • Added anyhow = "1.0" to shipper-types (same dep shipper-config and shipper already use)
  • Mechanical shipper_schema::Xshipper_types::schema::X rename across five files
  • Removed shipper-schema from: workspace members, shipper/Cargo.toml, shipper-config/Cargo.toml, fuzz/Cargo.toml
  • Updated .github/workflows/mutation.yml, .github/workflows/release.yml, docs/decrating-plan.md (Phase 6 section + ring 1 table + publish order), docs/architecture.md (tables + dependency graph), docs/testing.md, RELEASE_CHECKLIST_v0.3.0.md
  • Deleted crates/shipper-schema/ directory

Test plan

  • cargo check --workspace — clean
  • cargo test -p shipper-types — 245 unit + 17 schema_snapshot + 2 schema_contract + 3 doc tests all pass (snapshots matched exactly after rename + source-path rewrite)
  • cargo test -p shipper-config — 15 tests pass
  • cargo test -p shipper --lib state::store::tests — schema-related tests pass
  • cargo test -p shipper --lib state::execution_state::tests::parse_schema_version — 7 tests pass
  • cargo clippy -p shipper-types --all-targets --all-features -- -D warnings — clean
  • cargo fmt --all -- --check — clean
  • CI green on main-merge workflows

Audit found shipper-schema was two string-parsing functions
(parse_schema_version, validate_schema_version), ~57 lines of implementation,
one anyhow dep, and zero external consumers. The format it parses
(`shipper.<doctype>.vN`) is hard-coded into the function itself — no
conceptual independence from shipper's state-file types.

- Move src/lib.rs to crates/shipper-types/src/schema.rs (with inline tests)
- Move external integration tests to crates/shipper-types/tests/
- Rename snapshots to match new module path (shipper_types__schema__tests__*)
- Add anyhow dep to shipper-types
- Update shipper_schema::X -> shipper_types::schema::X across:
  shipper-config, shipper (state::store, state::execution_state), fuzz target
- Remove shipper-schema from workspace members, Cargo.toml dep lists,
  mutation/release CI workflows, and RELEASE_CHECKLIST_v0.3.0.md
- Delete crates/shipper-schema/
- Update docs/decrating-plan.md Phase 6 with decision rationale
- Update docs/architecture.md tables and dependency graph

Drops the published-crate count from 13 to 12. All shipper-types tests
pass (245 unit + 17 schema_snapshot + 2 schema_contract). Full workspace
cargo check and cargo fmt clean.
@EffortlessSteven EffortlessSteven merged commit 62f40be into main Apr 15, 2026
8 of 14 checks passed

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request implements Phase 6 of the decrating effort by folding the standalone shipper-schema crate into shipper-types as a dedicated schema module. The changes involve moving the core logic and snapshot tests, updating workspace dependencies in Cargo.toml and Cargo.lock, and performing a mechanical rename of call sites across the shipper-config and shipper crates. Documentation, including the architecture guide and decrating plan, has been updated to reflect this consolidation. I have no feedback to provide.

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