The ridl diff IR-snapshot compare engine (docs/ROADMAP.md epic E2.8a).
The engine compares two resolved IR v2 snapshots and classifies every
difference as a [Change] with a [Category] and a [Verdict]. It reads
only the IR — never source — so the comparison is honest against exactly
what a backend sees (ADR-0008 decision 14, concept note §9.1). Placement is
deliberate: this crate is an engine surfaced by the ridl facade, never by
ridlc, so the compiler stays a pure source→IR function (the ISO 26262
tool-qualification boundary, ADR-0008 decision 9).
The comparison has two halves. The walk ([walk]) says what structurally
differs, emitting one [Change] per difference with a [Category]; the
classifier ([classify], E2.8b) says which direction that difference moved
in and settles its [Verdict]. Splitting them is what lets a single
structural category — an appended interaction, a changed timing — carry
opposite verdicts depending on the direction, without the walk needing both
snapshots at every emission site.
This module owns the vocabulary ([Verdict], [Category], [Change],
[DiffReport]), the set-level comparison ([diff_sets], and
[diff_workspaces] with the system headings of [system]), snapshot
loading ([load_ir_json]), and rendering ([render_text],
[render_json]). The
classification table itself is documented per category by [explain], which
ridl diff --explain prints.