perf(runner): dispatch files longest first by the previous run's timings

Merged
OK
9d ago
+145-4

What and why

  • With workers > 1, the runner orders file units by their duration in the previous report.json, longest first (packages/e2e/src/run/units.ts longestFirst). Files new since that run go first; ties keep collection order.
  • Before, a long file collected late could start last and hold the run open after every other worker went idle.
  • Report order is unchanged; it is sorted separately. Serial runs are untouched.

Verified

Ran it locally: yes

  • apps/web-benchmark, e2e run --workers 7, second run so a report exists. The suite is bounded by virtualized-table (~70s), which now starts first.
mainthis branch
run 177.9s77.3s (no previous report)
run 278.7s72.2s