[Bug]: /api/benchmark/status reports idle while a benchmark is running - double-run 409 guard never fires

Author: chriscrosstalkCreated Sep 8, 2026Updated Sep 25, 2026

GET /api/benchmark/status returns BenchmarkService.getStatus(), which reads in-memory state - but benchmarks execute as a BullMQ job in the queue worker process, so the state lives in the worker while the endpoint answers from the web process. The web process's copy is always idle.

Two symptoms, both reproduced on NOMAD6 (v1.34.1, 2026-09-08):

  1. Status lies during a run. 15 seconds into a running full benchmark, /api/benchmark/status returned {"status":"idle","benchmarkId":null} while the worker's logs showed the CPU phase in progress.

  2. The double-run guard never fires. BenchmarkController.run 409s when getStatus() is not idle - but since the web process always sees idle, a second POST /api/benchmark/run was accepted (success: true) while a full benchmark was mid-flight. The two jobs then run back to back in the queue, and the second run's results silently reflect whatever system state the first run left behind.

Anything that polls the status endpoint (scripts, external monitors) sees an instantly-idle benchmark; polling /api/benchmark/results for a new row is the only reliable signal today.

Likely fix direction: keep the run status somewhere both processes can see (Redis, or derive it from the BullMQ queue state), and have both the status endpoint and the 409 guard read that.

Source: Crosstalk-Solutions/project-nomad