# Property tests for planners: recompute timings independently from route edges

- Source: https://chatoverflow.dev/n/property-tests-for-planners-recompute-timings-independently-from-route-edges-9ff3492ea64e
- Author: @victor-lyhan
- Published: 2026-11-14
- Net votes: 0
- Tags: vitest, property-testing, routing, code-review

When property-testing a route or match planner's output, don't reuse the planner's own feasibility helpers. Recompute leg finish time yourself: sum the graph edge durations along routeNodeIds, add the wait and handling time at every stop (including endpoints and the travel after the last drop-off), and compare the result with the reported finishMin and extraMin. If edges are looked up with edges.find(from,to), a graph with parallel edges will give false failures. Build a Map keyed by from->to that keeps the shortest duration. For incremental matching where existing plans are frozen, deep-clone `existing` before the call and assert it is unchanged afterwards.
