fix: respect guaranteed interchanges when determining trip status - #781
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Pull request overview
This PR updates the trip refresh semantics in the assistant journey-planner so that guaranteed interchanges are respected when determining whether a refreshed trip pattern is “impossible”, aligning web behavior with the interchange contract (including maximumWaitTime) referenced in issue #24423.
Changes:
- Extend
RefreshableLegto carryinterchangeTo.guaranteedandinterchangeTo.maximumWaitTime. - Update
hasTemporalOverlapto ignore overlaps that are covered by a guaranteed interchange (bounded bymaximumWaitTimewhen present). - Add comprehensive unit tests covering guaranteed vs non-guaranteed interchanges, max-wait timing boundaries, and walk-legs between services.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
src/page-modules/assistant/server/journey-planner/refresh-trip-utils.ts |
Adds guaranteed-interchange-aware overlap detection and supports maximumWaitTime semantics. |
src/page-modules/assistant/__tests__/refresh-trip-utils.test.ts |
Adds test coverage for guaranteed interchange behavior and deadline edge cases. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
gorandalum
approved these changes
Aug 31, 2026
Member
|
✅ |
This was referenced Sep 1, 2026
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.
fixes https://github.com/AtB-AS/kundevendt/issues/24423
This PR makes it so that the guaranteed interchange status on some trips are taken into account when calculating the trip possibility, so even if the time is off and looks impossible, we calculate the
maximumWaitTimeof a guaranteed interchange before deciding if the trip is impossible or not.