mirror of
https://github.com/l0ng-ai/tty7.git
synced 2026-09-22 00:02:23 +00:00
`CONTROL_VERSION`'s doc states the rule — move it whenever a variant is added to or removed from `ControlRequest`, `ReplyOk` or `ControlEvent` — and states what happens when it is missed: the frame fails to decode, the read loop that failed on it takes the whole link down, and a remote workspace opens with no tabs. The same doc records that this is not hypothetical. The v5→v6 drift was most of the dialect, and all of it shipped against a number that never moved. Only one of the three enums was actually protected, and by accident: `ControlRequest::deadline` matches exhaustively, so a new request cannot be added without the compiler asking about it. `ReplyOk` and `ControlEvent` had nothing. Checked rather than assumed — a probe variant added to both compiled clean across the whole workspace, all targets, no warnings. The hand-written `every_reply` / `every_event` lists cannot catch it either. They are cross-checked against other hand-written lists, so a variant missing from the enum coverage *and* the list leaves every count in agreement. So: one exhaustive match per enum, in the test module, called from a test so it cannot rot into dead code. Confirmed it fails for the case it exists for — a probe variant in either enum is now an E0004 naming the variant, at compile time, where it cannot be skipped.