fix(config): reject timeouts above the timer limit

Merged
BA
4d ago
+69-12

What and why

  • timeout, launchTimeout, actionTimeout, assertionTimeout, cleanupTimeout, app.command.startupTimeout / shutdownTimeout and agents.<name>.judgmentTimeout now go through timerMs (packages/e2e/src/config/validate.ts) instead of positiveInt. A value above 2147483647 ms is INVALID_CONFIG, like the CLI flags and maxDuration already are.
  • A test's or group's own { timeout } gets the same bound in collect/registry.ts, so it fails collection instead of timing out at once.
  • positiveInt is unchanged, since it also guards non-timer integers.
  • Docs: the limit is noted in docs/reference/config.mdx (top-level rules) and docs/reference/test.mdx (timeout). Patch changeset for e2e.

Issue

Fixes #1739

Verified

Ran it locally: yes

  • New unit tests per key family (config top-level, app.command, judgmentTimeout, test/describe timeout) fail on main and pass here.
  • e2e run in apps/testbed with a config that sets timeout: 3_000_000_000:
mainthis branch
config accepted; every test fails at once with TEST_TIMEOUT (the issue repro)INVALID_CONFIG (config) timeout must be at most 2147483647 milliseconds, got 3000000000, exit 2

Checklist

  • Changeset added (pnpm changeset) for any change to a published package, or the change is testbed, docs, or CI only.
  • Breaking change: title carries !, the changeset body names what breaks and what replaces it, and the deprecation warning landed a window earlier (stability policy in CONTRIBUTING.md).
  • Docs updated in the same PR: the docs/**/*.mdx page for the behavior, and skills/e2e/ if the skill describes it.
  • Contract change: emitted .d.ts reviewed, tests/types/sdk-types.ts updated; wire change edits the schema and both fixtures.
  • Engine contract change (e2e/engine): changesets for e2e, @e2e-dev/web, and @e2e-dev/mobile.