FA-67224 / Railway interlocking logic / Member archive
Vital telegram acceptance: sequence wraparound · case 04
The link drops to safe state every time the sequence number wraps.
Case contract
Telegrams carry an 8-bit sequence number, send and receive times and a CRC flag. A telegram is good if its CRC is valid, 0 <= rx-tx <= max_age_ms and (after the first good one) its sequence advances by 1..3 modulo 256. The link starts in safe state; if more than timeout_ms passes between the last good telegram and a new arrival the link falls back to safe state. Two consecutive good telegrams leave safe state; any bad telegram resets that run. Output [good, safe] per telegram.
Why this case matters
Interlocking logic decides whether trains may be given authority; a wrong decision at this point either grants unsafe movements or strands traffic.
One recorded failure
Sample boundary fixtureThis sample comes from the broken implementation of a controlled reproducer.
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| regression: sequence wraps past 255 | [[true, true], [true, false], [false, false]] | [[true, true], [true, false], [true, false]] | Failed |
MEMBER ARCHIVE
The complete case is available to members.
This record includes three runnable implementations, regression fixtures, execution results, and source hashes.
Member access is invitation-based. Sign in with your invited account to inspect the sources.
Sign in to the archive ↗