Expand description
Two snapshots compared (RFC 13 §4.4; #219): by key, facet by facet, bounded, with both spans carried through untouched.
Pure: two Snapshots in hand become one SnapshotDiff. The value
facet goes through the same two-level comparison the History pane runs
(crate::model::diff) — structural where both sides have a structural
form, bytes otherwise, and which one ran is never hidden. The other
facets (verdict, registration, holder) are compared whole and reported
only where they differ, so a consumer that reads a KeyChange reads
exactly the facets that moved and nothing that did not.
Two entry points, one comparison. diff_snapshots keys on the wire
key verbatim and leaves the alignment fields not asked.
diff_normalized (#220) takes a MapPlan — which host in b is
which host in a — rewrites b onto a’s origins and base, runs the
same comparison, and rolls it up per subject, so a fleet-wide drift
reads as one line (“sysinfo/cpu/usage differs on 3 of 12 origins”)
rather than N. It refuses over an incomplete plan: an origin the
plan could not pair is listed, never dropped (RFC 13 §4.4), and no
comparison is made over it, because a diff that quietly compared the
rest would let “it works in staging” survive on the keys it skipped.
Structs§
- Diff
Opts - The two bounds a diff runs under (RFC 09 §5.1 O6 — a bound that hides data says so).
Functions§
- diff_
normalized - Compare
aagainstbwithb’s origins read throughplan, and roll the result up per subject. - diff_
snapshots - Compare
aagainstb, key by key.