v0.7.9.7 — a device that said it was available all day after it was gone

The last item off 0.7.9.6's sweep, parked there as the one genuine maybe.
It had a second half worth more than the first.

#101 — Telegraph (+4), Telephone (+8) and Radio (+12) are "once a day,
when dispatching facing trains, add +N to the other train's number".
`enhancementText(key)` takes only the KEY, so the tooltip could not vary
with anything: a spent Radio read "Once a day, add +12..." for the rest
of the Day, advertising a bonus that was not there. That is `trainRules`
before #100, in another corner of the same view.

THE HALF THAT ACTUALLY SURPRISES. `spendDispatchBonus` reads
`areaOf(s, s.clock.superintendent)` — the SUPERINTENDENT's own devices,
not the train owner's — and the Fedora moves every STAGES_PER_SHIFT (3)
Stages, four times a Day. So a player's Radio does nothing at all for
three-quarters of the Day, and is spent automatically, without its owner
being asked, during the quarter it is theirs. Neither half was anywhere
on the board.

The card now reads as one of three states — available and dispatching,
unspent but idle while somebody else holds the Fedora, or spent until the
next Day — and names the shift length, because "not now" without "for how
long" is half an answer. A spent device is struck through on the board.
Shown on EVERY district, not only the viewer's (Jesse's call): it is
public, and a rival's spent Radio is what you want to know before forcing
a meet.

What counts as a device is `enhancementRule(key)?.dispatchBonus` rather
than three keys written out in the view — the ladder lives in
ENHANCEMENT_RULES and a fourth rung would otherwise be silently exempt.

A STALE COMMENT CORRECTED, AND PINNED. `advance.ts` warned that indexing
a SEAT-keyed area with the PLAYER holding the Fedora "is right only while
seating is the identity map". It read as a live Employee Rotation bug and
was not one: `areaOf(s, p)` IS `areaAtSeat(s, seatOf(s, p))`. A comment
that sends the next reader chasing a bug that does not exist costs about
what the bug would. Rewritten, and the claim is now a test — seating set
to a real permutation, and the Superintendent's own district rather than
the seat with the same index is the one that reads as dispatching.

TWO THINGS MUTATION CAUGHT THAT PASSING DID NOT. A test asserted the
ABSENCE of /spent|Fedora/ with the Fedora held, and a mutant with the
`dispatchBonus` guard deleted PASSED it — the leaked text in that case
says "Available today, and this district is dispatching", which contains
neither word. A test that something was left alone has to compare it
against what it should be, so it asserts equality with `enhancementText`
now, in both Fedora states. And the replay wire format needed the field:
cells pack positionally, so the flag is index 9 and reads `?? []`, the
same tolerance `standingWest` uses — older recordings report no device
spent, which is what they drew at the time, so every published replay is
unchanged.

943 tests pass, up from 934.

NOT VERIFIED AT A TABLE, like 0.7.9.6. #39 and #35 still stand.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Y5boPxP6JHRYMm8adXaF5R
This commit is contained in:
Jesse.Markowitz
2026-09-07 21:54:18 -04:00
co-authored by Claude Opus 5
parent 7f4e027258
commit 88a42ae9e2
8 changed files with 332 additions and 11 deletions
+63
View File
@@ -19,6 +19,69 @@ page as `v0.1.0 · <sha> · <date>`, so what is deployed can always be identifie
---
## 0.7.9.7 — 2026-09-07
The last item off 0.7.9.6's sweep — the one parked as a maybe, which turned out to have a second half
worth more than the first.
### A dispatch device now says whether it is still available (#101)
Telegraph (+4), Telephone (+8) and Radio (+12) are "once a day, when dispatching facing trains, add
+N to the other train's number". `enhancementText(key)` takes only the key, so the tooltip could not
vary with anything — a spent Radio read "Once a day, add +12…" for the rest of the Day, advertising a
bonus that was not there. `trainRules` before #100, in another corner of the same view.
**The half that actually surprises.** `spendDispatchBonus` reads `areaOf(s, s.clock.superintendent)`
— the **Superintendent's own** devices, not the train owner's — and the Fedora moves every
`STAGES_PER_SHIFT` (3) Stages, four times a Day. So a player's Radio does nothing at all for
three-quarters of the Day, and is spent automatically, without its owner being asked, during the
quarter it is theirs to use. Neither half was anywhere on the board.
The card now reads as one of three states — available and dispatching, unspent but idle while
somebody else holds the Fedora, or spent until the next Day — and names the shift length, because
"not now" without "for how long" is half an answer. A spent device is struck through on the board.
**On every district, not only your own** (Jesse's call): it is public, and a rival's spent Radio is
exactly what you want to know before forcing a meet. `projectDistrict` serves the player's own cells
and the common board's districts alike, so one change covers both.
What counts as a device is `enhancementRule(key)?.dispatchBonus`, not three keys written out in the
view — the ladder lives in `ENHANCEMENT_RULES`, and a fourth rung would otherwise be silently exempt.
### A stale comment corrected, and turned into a test
`advance.ts` warned that indexing a seat-keyed Office Area with the player holding the Fedora "is
right only while seating is the identity map". It reads as a live Employee Rotation bug and is not
one: `areaOf(s, p)` **is** `areaAtSeat(s, seatOf(s, p))`. A comment that sends the next reader
chasing a bug that does not exist costs about what the bug would. It is rewritten, and the claim is
now pinned by a test — seating set to a real permutation, and the Superintendent's own district, not
the seat with the same index, is the one that reads as dispatching.
### Two things caught by mutation rather than by passing
**A test that passed for the wrong reason.** "Leaves a non-dispatch enhancement alone" asserted the
absence of /spent|Fedora/ with the Fedora held — and a mutant with the `dispatchBonus` guard deleted
**passed it**, because the leaked text in that case reads "Available today, and this district is
dispatching", which contains neither word. A test that something was left alone has to compare it
against what it should be; it asserts equality with `enhancementText` now, in both Fedora states.
**The replay wire format needed the field.** Cells are packed positionally and the round-trip test
caught the loss immediately. The flag is index 9 and reads `?? []`, the same tolerance `standingWest`
uses, so recordings made before it existed report no device spent — exactly what they drew at the
time, leaving every published replay unchanged.
### Proof
943 tests pass, up from 934. The 9 new ones were written red. Mutation: using the raw player index
for the Fedora check fails 1, ignoring the spent record fails 3, and treating every enhancement as a
dispatch device fails 1 — that last one only after the test above was tightened, which is how the
hole was found.
**Not verified at a table**, like 0.7.9.6. #39 and #35 still stand, and the pre-0.8.0 session is
where they get closed.
---
## 0.7.9.6 — 2026-09-07
Three things the engine knew and the screen did not, found by looking for them rather than by