OpenRailAssociation / OpenRailAssociation/osrd

Wrong duplicate waypoints bugs the time input and output

Open
#9,727 8 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

area:front kind:bug postponed severity:critical
Dominant language
TypeScript
Stars
660
Forks
87
Avg merge
3d 4h
Merged PRs (30d)
269

Description

What happened?

Some waypoints are identical and still appear twice in the Add Waypoints modal, while searching for an itinerary.
When adding a value in the TimeStopsInput for one of the duplicates, the value gets added to both.
It results in the processing of the second value as happening at Day+1.

https://github.com/user-attachments/assets/489eb3c1-d31b-43f8-953f-36d63f7634b6

What did you expect to happen?

We should not have duplicates in the waypoints, or process them correctly in the timeStopsInput.

How can we reproduce it (as minimally and precisely as possible)?

Create a scenario
Search an itinerary with trigram VCE BRI
Try adding a waypoint with the modal, and see duplicates for Veynes
Go to Time and Stops tab and try modifying the values in the duplicate steps Veynes.

Solutions for the fix, after workshop (16/02/24) :

We noticed this was happening because the duplicated waypoint is located just between the end of the last track and the beginning of the new one.
We decided it was best to filter out one of the waypoint to avoid the issue mentioned in this ticket.
A solution to not lose informations about the fact that the waypoint is located between two tracks, is to display the two tracks in the track input of the input table. (Example : Track A - Waypoint - Track B = Track A-B in the input table).

We will need to know which tracks are connected, thanks to a new endpoint in the backend.
About the display in the graphs, we'll need to know which track offset to display, as it can be the one from track A or the one from track B (it won't change the overall calculations).

On which environments the bug occurs?

Local

On which browser the bug occurs?

Firefox

OSRD version (top right corner Account button > Informations)

.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the issue with trigram VCE BRI, then inspect the Add Waypoints modal and the Time and Stops tab where duplicate Veynes entries share edited values. The proposed fix is to filter one duplicate, use a backend endpoint to identify connected tracks, and resolve the appropriate track offset for graph display. Done means duplicate waypoints no longer corrupt time input or output.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
api, frontend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.