I shipped a wilderness survival game with eight scenarios. The hardest one — a five-star map behind the paywall — could not be finished. Not "was brutally hard." Could not be finished. Walking onto the exact tile the design calls the ending did nothing at all.

Every test was green. That is the part worth writing down.

The bug

Locations connect through exits, and some exits stay hidden until you find them. travel() handled that discovery like this:

if exit.hiddenUntilDiscovered, !state.discoveredLocationIds.contains(target.id) {