Skip to content

fix(rivetkit): retry connect after guard actor_ready_timeout - #5866

Open
eersnington wants to merge 1 commit into
mainfrom
fix/client-retry-actor-ready-timeout
Open

eersnington wants to merge 1 commit into
mainfrom
fix/client-retry-actor-ready-timeout

Conversation

@eersnington

@eersnington eersnington commented Oct 12, 2026 •

Copy link
Copy Markdown
Member

On a runner drain, the gateway can reject a reconnect with guard.actor_ready_timeout while the actor finishes its work on the draining runner. The client did not classify this code as retryable, so the connection left its reconnect loop and stayed idle.

  • Add actor_ready_timeout to isRetryableGuardGatewayHttpError in rivetkit-typescript/packages/rivetkit/src/client/lifecycle-errors.ts. This matches the engine retry list in engine/packages/guard-core/src/utils.rs.
  • Connections keep reconnecting with backoff. Action calls use the existing bounded lifecycle retry.
 function isRetryableGuardGatewayHttpError(code: string): boolean {
 	return (
 		code === "service_unavailable" ||
+		code === "actor_ready_timeout" ||
 		code === "actor_wake_retries_exceeded" ||

This is part 1 of 6 in a stack:

@railway-app

railway-app Bot commented Oct 12, 2026

Copy link
Copy Markdown

This PR was not deployed automatically as @eersnington does not have access to the Railway project.

In order to get automatic PR deploys, please add @eersnington to your workspace on Railway.

@claude

claude Bot commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

Review: PR #5866

LGTM. The change adds actor_ready_timeout to isRetryableGuardGatewayHttpError, and the matching case goes into the existing test.each table.

  • Consistency: engine/packages/guard-core/src/utils.rs:484 already lists actor_ready_timeout as retryable, so the client and engine now agree. The code also maps to 503, which fits a transient condition.
  • Risk: low. Action calls stay bounded by the existing lifecycle retry, and connections use the existing backoff.
  • Tests: the new table entry covers the classification. I did not run the suite.

No blocking issues.

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

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant