Build: Lints, Handoff Contract, README
Maps to: Task 12. Kind: Build.
Objective
Add workspace-wide lints, write the Stage-4 reliability handoff contract (a README documenting what Python reads and produces — not implemented in Rust), and write the workspace README with the run sequence and the invariants. Then a full cargo build --workspace && cargo test --workspace && cargo clippy --workspace.
Scaffold
Create: reliability/README.md (the Python handoff contract) and the workspace README.md. Modify: the root Cargo.toml (add [workspace.lints.rust] / [workspace.lints.clippy]) and every crate's Cargo.toml (add [lints] workspace = true below [package]).
Dependencies: none — this chapter adds configuration and documentation, not code.
Expected result: cargo build --workspace && cargo test --workspace && cargo clippy --workspace all clean (26 tests across the four crates: 7 core + 10 gen + 4 harness + 5 coding), with clippy warning only on intentional library unwraps, if any.
The spec (givens)
- Lints:
[workspace.lints.rust] unused_must_use = "deny"and[workspace.lints.clippy] unwrap_used = "warn"in the root manifest; every crate adds[lints] workspace = true. - The exact contents of both READMEs (files read/produced by Stage 4, the run sequence, the four invariants) are spelled out in the Answer Key — they are documentation to adapt, not prose to invent from scratch.
Full code: Answer Key, Task 12.
Concepts exercised
[workspace.lints]and per-crate[lints] workspace = true.- Documenting a language boundary as an explicit contract, not an afterthought.
- A full-workspace green build as the definition of done.
The build loop (you drive)
- Add the workspace lints; wire each crate to inherit them.
- Write
reliability/README.md: the exact files Python reads (primary.csv,second_coder.csv,blind_key.csv), what it produces (irr_report.csv, disagreement dumps), and why Python. - Write the workspace
README.md: the run sequence and the four invariants (append-only log, blinded sheets, enums-as-validation, manifest-as-join-spine). - Run the full-workspace build, test, and clippy. Fix any clippy warnings in library code.
- Commit.
Done when
cargo build --workspace && cargo test --workspace && cargo clippy --workspace is clean, and the two READMEs make the pipeline runnable and the language boundary explicit.