osrd
osrd copied to clipboard
front: match PathStep and SuggestedOP with pathStepId
Last episode: https://github.com/OpenRailAssociation/osrd/pull/9967
Matching via uic/trigram/ch/etc is unreliable because:
- Two OPs can have the same trigram/ch.
- The same OP could appear multiple times at different spots in a path.
Moreover, we had multiple variants of the matching with slight differences. Some of the matching logic got adjusted to account for specific bugs, while others were left alone.
Each path step can be identified with a unique ID stored in PathStep.id. Use that instead.
(The refactoring has been split into small digestible commits to ease bisecting and make it more obvious why type and test adjustments are necessary.)
Fyi : https://github.com/OpenRailAssociation/osrd/pull/10334#discussion_r1920020968