Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

effect: action on a missing actor instance fails as internal_error instead of actor.aborted

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

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

まだ誰も着手していません。

評価

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

調査の方向性

rivetkit-typescript/packages/effect/src/internal/ActionDispatcher.tsから始め、不足しているインスタンスの分岐を、既存の中断されたアクションの処理とあわせて調べてください。Issueには、ActionDispatcher.makeでgetInstanceがundefinedを返す決定論的なユニット再現手順があります。これを実行するか適宜調整して、エラーがactor.abortedであることを確認してください。説明にある対応するdist/internal/ActionDispatcher.jsを確認し、回帰ケースが成功することを確かめてください。

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

説明

Summary

In @rivetkit/effect (2.3.25 through 2.3.27, and main at the time of writing), an action that reaches a worker after the actor's instance has been removed, but before the request's abort signal has fired, fails with a plain Error("actor instance missing"). The core then returns it to the client as rivetkit.internal_error (HTTP 500) instead of actor.aborted.

rivetkit-typescript/packages/effect/src/internal/ActionDispatcher.ts:

const instance = getInstance(c.actorId);
if (!instance) {
  if (c.abortSignal.aborted) throw makeActorAbortedError();
  throw new Error("actor instance missing");
}

The same dispatcher already maps interrupted actions to actor.aborted ("Surface those lifecycle exits as RivetKit's structured action-aborted error instead of an internal error"). The missing-instance branch is the same lifecycle exit, seen slightly earlier.

How it shows up

During a graceful worker stop, an HTTP action can arrive in that window. We captured it with the dispatcher instrumented: the action found no instance and c.abortSignal.aborted was false, 53 ms after native shutdown began. The core then logged:

level=warn message="actor framework action error response" … group=rivetkit code=internal_error

A client that retries on actor.aborted (waiting for the actor to be ready again) cannot distinguish this from a genuine internal failure, so it gives up. In our tests it happened in roughly 1 of 20 to 1 of 80 graceful worker restarts with a live reader.

Reproduction (deterministic, unit level)

import { dirname, join } from "node:path";
import { Action, Actor } from "@rivetkit/effect";

// the dispatcher is internal; load it next to the package entry (exports "./src/mod.ts")
const ActionDispatcher = await import(join(dirname(Bun.resolveSync("@rivetkit/effect", import.meta.dir)), "internal/ActionDispatcher.ts"));
const Ping = Action.make("Ping");
const handlers = ActionDispatcher.make({ actor: Actor.make("Probe", { actions: [Ping] }), getInstance: () => undefined });
await handlers.Ping({ actorId: "probe", abortSignal: new AbortController().signal }, undefined);
// rejects with Error("actor instance missing"); expected RivetError actor.aborted

Suggested fix

Treat a missing instance as a lifecycle abort regardless of the signal:

if (!instance) throw makeActorAbortedError();

(and the same in dist/internal/ActionDispatcher.js). We run this as a local patch and the failure no longer occurs.

主要言語
Rust
スター
6.3k
フォーク
279
平均マージ
1日 9時間
マージ済み PR(30日)
53

環境構築

  • Dockerfile・Docker Compose ファイルなし
  • プルリクエストのテンプレートあり
  • コントリビューションガイドなし

はじめの一歩

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

rivet-dev/rivet のほかの issue

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

似ている issue

Rust の issue をもっと見る

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

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