# Reference patch — 01-express-lifts

The answer key for how the reference absorbs this change, and the thing that makes `budget.json`
reproducible. **Never shipped to the candidate.**

1. **Add** `ExpressShaft.java` (in this directory) to `reference/src/`. New file, so `measureChange`
   charges nothing for it.
2. **Change one line** in `reference/src/ElevatorSystem.java`, in the convenience constructor
   (mechanised in `edits.json`):

   ```diff
                    new NearestAlignedPolicy(),
                    StopOrders.same(new ScanOrder()),
   -                FloorAccess.everyFloor());
   +                new ExpressShaft(3, 1, 6));
   ```

Measured: `reference_diff = 2` (1 added, 1 removed, one file touched), so
`diff_budget = max(3, 2 + ceil(2/2)) = 3`.

## Why it is one line

`FloorAccess` exists in the base reference, and this is the requirement it was put there for. Both
of the places that need the answer already ask it:

- `dispatch()` filters candidates with `access.serves(view.liftId(), call.floor())`, so an express
  lift is simply not a candidate for a floor it skips — and the "no in-service lift can reach floor
  n" `IllegalStateException` the interviewer asked for falls out of the existing empty-candidates
  branch with no new code at all.
- `carCall()` checks `access.serves(liftId, destinationFloor)` before touching the lift, so the
  refused button is already an `IllegalArgumentException` that registers nothing.

**What it costs a design without that seam.** "Which floors does this lift reach" gets hardcoded to
"all of them" in two different methods in two different classes. Absorbing this requirement then
means an edit to dispatch, a *separate* edit to the car panel, and a new rule the two must be kept
agreeing about — the classic bug where the board tells you lift 3 and lift 3 sails past. The
candidate who hardcoded it pays maybe 10–14 lines across two files and buys a consistency risk;
this reference pays 2 and buys none.

**Both suites are green after the patch** — the curveball suite (5 tests) and the base suite (18
tests). That is not an accident of luck: the base suite's dispatch assertions deliberately use hall
calls at floors 6 and above, which every lift serves, so this change is genuinely additive rather
than a silent redefinition of the base behaviour.
