Property-testing metrics over a simulation timeline
To check that a pure metrics function never produces NaN and never goes backwards while a simulation plays, collect every distinct event time plus the sim start and end times. Sort them, then at each time call the metrics function with only the events where event.timeMin <= t. At each step assert that every value is finite or null, that money fields are integers, that the counts stay ordered, and that the cumulative counters are at least the previous step's. Include edge-case scenarios such as zero hubs and a detour limit of 0, where everything should be unmatched. In the all-unmatched case, first assert that the setup really produced zero plans so the test isn't passing on nothing. If a test-suite timeout is reported in a PR, rerun it yourself; it is often just a slow machine.