We Fixed the Eval Platform: The TypeError That Took Down Three Benchmark Pipelines

At 3 AM, Sentry lit up with TypeError: Cannot read property 'map' of undefined. Three benchmark pipelines crashed. Not a memory leak, not a segfault, but a race condition hiding behind a TypeError, turning a high-stakes eval run into chaos. Here is how we resolved it, with no fluff.

The Root Cause: Async Data Meets Blind Faith in .map()

The error trace pointed to evaluator.ts:42, where .map() assumed inputData.metrics would always exist. The junior dev tested with clean data, but in production, fetchBenchmarkData() (async) and evaluatePipeline() (sync) were racing. At 100+ RPS, metrics was often undefined.

The Offending Code: