# Verification and correctness (across cycles)

## Verification and correctness (across cycles)

1. **Snapshot tests** for the pretty-printer and IR emit. The diff makes
   regressions visible immediately.
2. **Property tests** for the JSON ↔ pretty-print
   [roundtrip](0009-roundtrip-invariant.md).
3. **End-to-end tests** for `examples/` with expected program output.
4. **Hash stability**: a test ensures the same def always produces the same
   hash.
5. **CI pin** of emitted output: the committed golden snapshots in
   `crates/ail/tests/snapshots/` (driven by `ir_snapshot.rs`) are
   byte-compared on every run.
6. **Rustdoc cleanliness**: `cargo doc --no-deps` runs warning-free.
   Fixing a rustdoc warning is part of the iteration that
   introduced it, not a follow-up.

Ratified by: each mechanism's own test — the round-trip property
(`crates/ailang-surface/tests/round_trip.rs`), the golden snapshots
(`crates/ail/tests/ir_snapshot.rs`), hash stability
(`crates/ailang-core/tests/hash_pin.rs`), the `examples/` e2e suite
(`crates/ail/tests/e2e.rs`), and the warning-free
`cargo doc --no-deps` build.
