Allow timeoutSeconds: 0 to mean no timeout

Previously every script was forced to have a positive timeout capped
at 24h, with no way to run something genuinely unbounded. execa only
enforces its timeout option when it's greater than 0, so this just
relaxes the schema's lower bound from positive to >= 0 and lets that
flow through unchanged - no engine logic needed beyond a clarifying
comment. The 1800s default and 86400s cap for finite timeouts are
unchanged; 0 is an explicit opt-in, not the default.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
2026-08-15 20:57:24 +02:00
co-authored by Claude Sonnet 5
parent 97bb6cc092
commit acc6715a88
3 changed files with 4 additions and 2 deletions
+2 -1
View File
@@ -174,7 +174,8 @@ const scriptSchema = z
args: z.array(z.string()).default([]),
cwd: z.string().default("./"),
shell: z.boolean().default(false),
timeoutSeconds: z.number().int().positive().max(86400).default(1800),
// 0 means no timeout - execa only enforces the timeout when it's > 0.
timeoutSeconds: z.number().int().min(0).max(86400).default(1800),
variables: z.array(variableWithChecks).default([]),
})
.superRefine((script, ctx) => {
+1
View File
@@ -117,6 +117,7 @@ async function executeRun(
...process.env,
...invocation.env,
},
// `timeoutSeconds: 0` means no timeout - execa only enforces this when > 0.
timeout: script.timeoutSeconds * 1000,
cancelSignal: controller.signal,
reject: false,