Skip to content

fix: handle unset maximumWaitTime and walk time on guaranteed interchanges - #68

Merged
reidzeibel merged 2 commits into
mainfrom
ridwan/handle-negative-wait-time-interchange
Nov 13, 2026
Merged

reidzeibel merged 2 commits into
mainfrom
ridwan/handle-negative-wait-time-interchange

Conversation

@reidzeibel

@reidzeibel reidzeibel commented Nov 13, 2026 •

Copy link
Copy Markdown
Member

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

There are no active review issues for the update that treats negative transfer wait limits as unlimited.

No open issues 🎉

What changed in this PR

Updates transfer-risk handling so negative maximumWaitTime values mean no wait limit, preventing false warnings for guaranteed transfers.

Changes:

  • Treats negative wait limits, including Entur’s -1 sentinel, like absent limits.
  • Documents the behavior and adds a regression test for a guaranteed transfer with maximumWaitTime: -1.
File Description
src/​transfer-risk/​transfer-risk.ts Handles negative wait limits as unlimited and documents the sentinel.
src/​transfer-risk/​__tests__/​transfer-risk.test.ts Verifies that a negative wait limit suppresses the transfer-risk warning.

Review effort: Balanced

@reidzeibel reidzeibel changed the title fix: treat negative maximumWaitTime as no wait limit fix: handle unset maximumWaitTime and walk time on guaranteed interchanges Nov 13, 2026
@reidzeibel
reidzeibel requested a balanced review from Copilot November 13, 2026 10:26

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues block the changes to guaranteed-interchange risk warnings.

No open issues 🎉

Review effort: Balanced

@reidzeibel
reidzeibel merged commit b615ca2 into main Nov 13, 2026
4 checks passed
@reidzeibel
reidzeibel deleted the ridwan/handle-negative-wait-time-interchange branch November 13, 2026 11:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants