# Requirement change

Drivers cancel too, and right now we have nothing for it — dispatch has been faking it by cancelling
the rider's trip, which is wrong, because the rider still wants a car.

So: a new event, **`DriverCancelled`**, carrying the driver who backed out and their reason. Your
contract folder has an updated `TripEvent` and a new `DriverCancelled` alongside it; `TripEvent` is
still sealed, so it now permits six kinds of event rather than five. Drop both files over the ones you
were given.

**What a driver cancellation does.** The trip goes **back to `REQUESTED`**. It does not get cancelled
— dispatch starts looking for another driver, and the rider is still waiting. Concretely:

- Legal from **`MATCHED`** and from **`DRIVER_ARRIVED`**, and in both cases the trip lands on
  `REQUESTED`.
- **The trip has no driver afterwards.** `driverId()` must go back to empty, because there genuinely
  is no driver any more. This is the part that matters: the trip has been matched before, so anything
  that just remembers the last driver it ever saw will give the wrong answer.
- **Refused from `REQUESTED`** — there is no driver to cancel — and refused once the trip is
  `IN_PROGRESS`. Same exception as any other illegal event.
- **Refused on a finished trip**, and with the same distinction as before: a completed or cancelled
  trip answers that it is finished, not that the event was illegal.
- **A new `Matched` after a driver cancellation is legal**, and the trip carries on from there
  normally: `DriverArrived`, `TripStarted`, `TripCompleted`. A trip may go round the loop as many
  times as it takes.

**Downstream of it.** The rider has to be told the search has restarted — that is a notification like
any other, so it goes wherever your other notifications go, and it must run for this transition too.
Nothing about how side effects behave changes: they still run only for an accepted transition, still
in order, and a failure still does not undo it.

**The history keeps recording everything it recorded before**, so a trip that went round the loop
twice has both round trips in its history, in order, and replaying that history still rebuilds the
trip exactly.

Everything else is untouched: the rider's own cancellation and where it is allowed, the refusal
precedence, the clock being read once per accepted transition, and the two exception types.
