The hardest-to-write-right code in the engine — first-to-fire racing between cancel,
timeout, and budget; the finish-line rule (cancel beats a clean result at the line); the
bail window; the consecutive-error cap — is covered only indirectly, two layers away,
through whole-loop replays.
The interfaces are already exported: drive them directly with a fake phase stream and a
fake clock, one assertion per race-table row (timer fires mid-step; cancel lands during the
final drain; budget exceeded by exactly one step; error cap at 3 consecutive). No
implementation change.
The hardest-to-write-right code in the engine — first-to-fire racing between cancel,
timeout, and budget; the finish-line rule (cancel beats a clean result at the line); the
bail window; the consecutive-error cap — is covered only indirectly, two layers away,
through whole-loop replays.
The interfaces are already exported: drive them directly with a fake phase stream and a
fake clock, one assertion per race-table row (timer fires mid-step; cancel lands during the
final drain; budget exceeded by exactly one step; error cap at 3 consecutive). No
implementation change.