Module compare

Module compare 

Source
Expand description

2026-09-26: Round comparison: every replay round against the reference round.

Owner: bench, SSM poisoning gate. Invariants:

  • A round is Invariant only when every turn’s canonical transcript and token count equal the reference turn’s.
  • A differing turn is collapsed when its finish reason differs or its token ratio leaves COLLAPSE_RATIO_FLOOR..=COLLAPSE_RATIO_CEIL, and jittered otherwise.
  • A round’s verdict is Collapsed if any turn collapsed, else Unmeasured if any turn was, else Jittered if any turn jittered.

Structs§

TurnDelta
2026-09-26: One differing turn’s shape.

Enums§

RoundVerdict
2026-09-26: The outcome of comparing one replay round to the reference round.

Constants§

COLLAPSE_RATIO_CEIL
2026-09-26: A replay turn longer than this multiple of the reference turn is a collapse too.
COLLAPSE_RATIO_FLOOR
2026-09-26: A replay turn shorter than this fraction of the reference turn, in completion tokens, is a collapse.

Functions§

compare_round
2026-09-26: Compare a reference turn list against a replay turn list. A replay whose turn count differs from the reference’s is Unmeasured, never Invariant.