You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(core, cli, run-engine): route uncaught exceptions through new INTERNAL_ERROR code
Introduce TASK_RUN_UNCAUGHT_EXCEPTION as a dedicated TaskRunInternalError
code so the engine handles retry through its existing crash-style pathway
(lockedRetryConfig lookup), and the dashboard renders these failures as
"Failed" rather than "System failure".
The previous BUILT_IN_ERROR approach showed the right status but didn't
respect the user's retry policy: BUILT_IN_ERROR with retry: undefined
short-circuits to fail_run because shouldLookupRetrySettings(BUILT_IN_ERROR)
returns false. Inline retry calculation in cli-v3 was rejected as
duplicating logic already owned by the engine.
This change mirrors how TASK_PROCESS_EXITED_WITH_NON_ZERO_CODE,
TASK_PROCESS_SIGTERM, and TASK_PROCESS_SIGSEGV already work — same
lookup-and-retry pathway, just with a different surface status (Failed
vs Crashed) and the original error's message + stackTrace carried on the
INTERNAL_ERROR payload. No global behaviour changes; the new code is
opt-in via parseExecuteError's UncaughtExceptionError branch.
Touchpoints:
- packages/core/src/v3/schemas/common.ts: enum entry
- packages/core/src/v3/errors.ts: shouldRetryError, shouldLookupRetrySettings
- internal-packages/run-engine/src/engine/errors.ts: runStatusFromError
- packages/cli-v3/src/executions/taskRunProcess.ts: parseExecuteError + revert TaskRunError widening
- tests + changeset + server-changes entry
Fail attempts on uncaught exceptions instead of hanging to `MAX_DURATION_EXCEEDED`. A Node `EventEmitter` (e.g. `node-redis`) emitting `"error"` with no `.on("error", ...)` listener escalates to `uncaughtException`, which the worker previously reported but did not act on — runs drifted to maxDuration with empty attempts. They now fail fast with the original error and status `FAILED`. You should still attach `.on("error", ...)` listeners to long-lived clients to handle errors gracefully.
6
+
Fail attempts on uncaught exceptions instead of hanging to `MAX_DURATION_EXCEEDED`. A Node `EventEmitter` (e.g. `node-redis`) emitting `"error"` with no `.on("error", ...)` listener escalates to `uncaughtException`, which the worker previously reported but did not act on — runs drifted to maxDuration with empty attempts. They now fail fast with the original error and status `FAILED`, and respect the task's normal retry policy. You should still attach `.on("error", ...)` listeners to long-lived clients to handle errors gracefully.
0 commit comments