fix(driving): correct planned-stop exit warnings and stuck ramps#102
Merged
Orinks merged 2 commits intoJul 20, 2026
Merged
Conversation
The "you drove past your planned stop" warning fired purely on the highway odometer, with no awareness of the exit/ramp/signal state, so signaling and braking down the ramp toward the stop triggered a false cancellation. While investigating we also found there was no invalidation of a stop when the driver signaled and took the ramp but never actually stopped: the ramp waited indefinitely, speed enforcement stayed off, the highway odometer kept advancing, and stopping miles later still opened that stop's menu. That gap predates the planned-stop work (it came in with the original highway-exits feature) and is now corrected. - Trip._check_stops suppresses the warning while the planned stop's exit is signaled or on the ramp (published each tick via Trip._exit_in_progress), and otherwise warns once the exit marker is passed (no longer takeable). - A signaled-but-too-fast miss folds the cancellation into its single spoken line instead of emitting a second cue. - A taken exit that never stops is declared blown once it rolls RAMP_OVERSHOOT_MI past the ramp end, cancelling the plan and handing the highway back. - While on the ramp the truck is off the highway: the mile marker holds and the ramp consumes the movement (Trip.on_ramp / last_moved_mi) instead of the highway odometer. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Orinks
enabled auto-merge
July 20, 2026 20:16
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed and why
The "You drove past your planned stop" warning was decided purely from the highway odometer in
Trip._check_stops, with no awareness of the exit/ramp/signal state. So signaling a planned stop and braking down the exit ramp toward it triggered a false "plan cancelled" the moment the mile marker slipped behind, even though the driver was stopping there.While investigating, we also discovered there was no invalidation of a stop when the driver signaled and took the ramp but never actually stopped: the ramp waited indefinitely, speed enforcement stayed off, the highway odometer kept advancing, and stopping miles later still opened that stop's menu. That gap predates the planned-stop work — it came in with the original highway-exits feature — and has now been corrected.
The fix:
Trip._check_stopssuppresses the warning while the planned stop's exit is signaled or on the ramp (published each tick viaTrip._exit_in_progress), and otherwise warns once the exit marker is passed — the point past which the ramp is no longer takeable.RAMP_OVERSHOOT_MI(0.5 mi) past the end of the ramp, cancelling the plan and handing normal highway behaviour back (enforcement, lane physics).Trip.on_ramp/Trip.last_moved_mi) instead of the highway odometer.What players will notice
Tests run
uv run pytest(full suite) — green.test_plan_survives_while_descending_ramp,test_too_fast_miss_cancels_plan_once,test_taken_exit_blown_when_never_stopping, andtest_highway_odometer_holds_on_the_rampintests/test_stop_detail.py.uv run ruff check src tests— clean.Accessibility impact
All changes are to spoken cues. The false cancellation is gone; the real cases each speak a single, clear line ("...drove past your planned stop. Plan cancelled." / "...too fast for the ramp and missed... Plan cancelled." / "You never stopped and drove past... Plan cancelled."), with terse-speech variants preserved. No information moved to a visual-only cue.
Changelog
## Unreleased→FixedinCHANGELOG.md.🤖 Generated with Claude Code