Skip to main content

Module diff

Module diff 

Source
Expand description

What a plugin changed, derived from two consecutive snapshots.

This is computed at read time (when a trace is fetched), not while recording. Two reasons: the traced request path stays as cheap as possible, and the comparison stays a pure function with no engine coupling — trivially unit-testable in isolation.

The comparison is purpose-built rather than a generic JSON differ: it knows that headers are name → values maps and that errors is append-only, so it can emit paths a policy author recognises (request.headers.x-userinfo, message.user_id) instead of structural noise.

Structs§

Change
One field-level difference.

Enums§

ChangeKind
How a field changed between two steps.

Functions§

compact 🔒
diff
Computes what changed between two consecutive snapshots.
multi_map 🔒
Compares a name -> values map, reporting per-name adds/removes/modifies.
scalar 🔒