FA-67104 / Railway interlocking logic / Member archive
Movement authority end computation: margin application · case 04
A length-capped authority is shortened by the safety margin.
Case contract
Sections have lengths and states locked, occupied or unlocked; the train front is offset_m into section train_sec (which it occupies itself). Scan the following sections; the end of authority is the start of the first section that is not locked (reason = its state) or the end of the last section (end-of-route). If that exceeds max_ma_m ahead of the train front, the authority is cut to front + max_ma_m (reason max-length). The margin is subtracted from the end except for a max-length cut.
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: length cap from the front | {"eoa_m": 975, "reason": "max-length"} | {"eoa_m": 1000, "reason": "max-length"} | 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 ↗