Skip to content

chore: reject the v2 timeout run option at compile time - #1250

Open
B4nan wants to merge 1 commit into
masterfrom
chore/run-timeout-rename-hint
Open

B4nan wants to merge 1 commit into
masterfrom
chore/run-timeout-rename-hint

Conversation

@B4nan

@B4nan B4nan commented Nov 26, 2026

Copy link
Copy Markdown
Member

Found while upgrading the MCP server: it passed { memory, timeout } from a variable to start(), which compiled fine and then threw at runtime. The excess property check only covers object literals.

ActorStartOptions and RunResurrectOptions (and the call/task types built on them) now declare timeout?: never, so this fails at compile time too. The runtime error says the option was renamed to runTimeoutSecs instead of the generic unrecognized key.

`start()`, `call()` and `resurrect()` refused a leftover `timeout` only at runtime when the
options came from a variable, because the excess property check covers object literals alone.
The option types now declare it as `never`, and the validation error names `runTimeoutSecs`.
@B4nan
B4nan requested a review from szaganek as a code owner November 26, 2026 08:04
@B4nan B4nan added t-tooling Issues with this label are in the ownership of the tooling team. adhoc Ad-hoc unplanned task added during the sprint. labels Nov 26, 2026
@B4nan
B4nan requested a review from barjin November 27, 2026 08:22
Comment on lines 41 to +42
runTimeoutSecs: z.number().optional(),
...renamedRunTimeoutShape,

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: Only tangentially related, but can we validate with .min(0) here (same as in start and call)?

runTimeoutSecs: z.number().min(0).optional(),

same for maxItems I suppose.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

adhoc Ad-hoc unplanned task added during the sprint. t-tooling Issues with this label are in the ownership of the tooling team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants