Two lines where 52,000 were, and the resume that wrote one twice
Fixed TMR with one stuck replica logged every tick for 110 seconds. The log collapsed to two lines, and then a reset under emulation duplicated one of them.
Fixed TMR with one good replica and one stuck one detects a disagreement on
every tick, and wrote one line per tick: 1.2 MB in a 110 second run, with the
package due that day. The event writer now keeps a streak: what, detail,
first tick, last tick, count. Identical consecutive events collapse to the
first line and a closing one, 4500,detected,Compare repeated 4250x ticks 251-4500. A run that wrote 52,000 lines writes two. The TMR log fell to 262
bytes. Version 0.3.0 was cut for it, so the package could use a released
binary.
The next day CI saw killed,0 twice in one log. Once, under emulation. The
voter flushed the log before it wrote the checkpoint, and a reset between the
two left events in the log that the resumed run wrote again. The checkpoint
now records how many bytes of the log belong to it, and the streak in
progress. On resume the log is truncated to that length and the streak
continues, so the closing line after a resume still counts from the start.
Scenario 18 plants a killed line after the checkpoint tick and checks that
the resume removes it.
The scenario had a defect of its own. grep -c exits 1 when it counts zero,
and under set -e that was the end of the script.