Skip to content

fix(substrate): revert crashed actors instead of recreating them - #432

Merged
rakyll merged 1 commit into
google:mainfrom
AlexsJones:fix/revert-crashed-actor
Sep 27, 2026
Merged

rakyll merged 1 commit into
google:mainfrom
AlexsJones:fix/revert-crashed-actor

Conversation

@AlexsJones

Copy link
Copy Markdown
Collaborator

Fixes #431.

EnsureActor now calls RevertActor on a crashed actor, which returns it to SUSPENDED at its last snapshot. If the revert fails, it falls back to the existing delete-and-recreate.

RevertActor needs a newer Substrate, so this bumps agent-substrate/substrate to the commit that added it (agent-substrate/substrate#1675). That commit predates the readyz→wakeupProbe and SnapshotsConfig renames, so nothing else changes.

Added a test that a crashed actor is reverted, not deleted. It fails without the fix; go test -race ./... passes.

@google-cla

google-cla Bot commented Sep 27, 2026

Copy link
Copy Markdown

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

Deleting and recreating a crashed actor discards its durable workspace and
snapshot history. RevertActor returns it to SUSPENDED at its last snapshot;
delete and recreate remains the fallback when the revert fails.

Bumps agent-substrate/substrate to the commit that adds RevertActor.
@AlexsJones
AlexsJones force-pushed the fix/revert-crashed-actor branch from d29109c to 0a4d9a2 Compare September 27, 2026 16:01
@rakyll

rakyll commented Sep 27, 2026

Copy link
Copy Markdown
Member

We are going to revisit the entire task cycle once Agent Substrate lands the new actor lifecycle. I'm not sure if a a crashed actor should be automatically reverted to a previous state yet. It should be an explicit RPC call initiated by the client, the way Agent Substrate works.

@rakyll rakyll left a comment

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.

We may need to revisit how we deal with crashes as a part of the big rewrite we will have to land for #433. LGTM right now.

@rakyll
rakyll merged commit 9edb7b1 into google:main Sep 27, 2026
9 checks passed
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.

Resuming a crashed task deletes its actor and loses the workspace

2 participants