The explicit `timeout: undefined` passed to p-queue's add() overrode and
disabled the queue-wide timeout, making compilationEnvTimeoutMs dead
config. A job whose promise never settled could therefore wedge a queue
slot forever — and since temp dir cleanup only runs when the queue is
fully idle, one wedged slot permanently disabled cleanup and filled a
production instance's disk (#8811). With the timeout effective, such
jobs reject after compilationEnvTimeoutMs (default 5 minutes) and the
system self-heals.
Also make the uncaughtException handler actually exit (after a one
second delay to let winston flush): a process with live server
listeners never exits "naturally", so the previous handler left the
instance limping on in an undefined state for hours. Exiting lets the
load balancer replace the instance.
The new queue timeout test fails against the previous code (the wedged
job is never rejected).
Fixes part of #8811.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>