workflow-engine: step timeout over ~24.8 days (or Infinity) fires after 1ms

オープン 初心者向け
#5,970 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

@poojagosika がすでに取り組んでいます。

2026年11月7日 から。

  • #5976 @poojagosika による — オープン

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
84/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
node.js, typescript
領域
backend, testing

調査の方向性

rivetkit-typescript/packages/workflow-engine/src/context.ts の executeWithTimeout から始め、次に utils.ts の setLongTimeout ヘルパーと、それを index.ts がどのように使っているかを確認してください。2^31-1 ms を超えるタイムアウトと Infinity のテストを追加してください。長いタイムアウトがすぐに発火せず、Infinity でタイムアウトが無効になれば完了です。

索引モデルが issue の本文から書いたものです。

説明

executeWithTimeout in rivetkit-typescript/packages/workflow-engine/src/context.ts uses a plain setTimeout(reject, timeoutMs). Node can't wait longer than 2^31-1 ms (~24.8 days) that way: anything bigger, including Infinity, is clamped to 1ms with a TimeoutOverflowWarning.

So a step like this fails right away with StepTimeoutError, even though it would finish fine:

await ctx.step({
name: "long-job",
timeout: Infinity, // or 30 * 24 * 60 * 60 * 1000
run: async () => { ... },
});

Repro with the same logic as executeWithTimeout, running a 200ms step:

  • timeout 60_000 -> "done"
  • timeout 2_592_000_000 (30 days) -> StepTimeoutError after 3ms
  • timeout Infinity -> StepTimeoutError after 1ms

Since timeouts aren't retried by default, the step is marked exhausted and the workflow fails.

Expected: the step waits for the full timeout (and Infinity means no timeout).

Fix idea: use the setLongTimeout helper from utils.ts (already used for the scheduler wait in index.ts), and treat a non-finite timeout as disabled like 0. Happy to send a PR with tests.

主要言語
Rust
スター
6.6k
フォーク
304
平均マージ
19時間 50分
マージ済み PR(30日)
28

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

rivet-dev/rivet のほかの issue

rivet-dev/rivet の issue をすべて見る

似ている issue

Rust の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。