Skip to content

atelet: Serialize lifecycle RPCs per actor - #2890

Merged
Zoe Zhao (zoez7) merged 1 commit into
agent-substrate:mainfrom
msau42:atelet-serialize-rpcs
Oct 19, 2026
Merged

Zoe Zhao (zoez7) merged 1 commit into
agent-substrate:mainfrom
msau42:atelet-serialize-rpcs

Conversation

@msau42

Copy link
Copy Markdown
Collaborator

Atelet now runs at most one lifecycle RPC per actor at a time. Run, Restore, Checkpoint, PromoteSnapshot, DetachActor, and Terminate wait their turn for the actor.

Before, Terminate could forget an actor and delete its local snapshots and directories while a Checkpoint or Restore of the actor was still using them, and a Checkpoint that committed afterward recreated snapshot state for the terminated actor.

Terminate waits for any in-flight RPC for that actor to finish before forgetting its snapshot state and removing its local snapshots and actor directories. With RPCs serialized at the atelet boundary, snapshottracker only coordinates background uploads, detaches, and reports against the active RPC.

Part of #2069, #2571, #2836

  • Tests pass
  • Appropriate changes to documentation are included in the PR

Atelet now runs at most one lifecycle RPC per actor at a time. Run,
Restore, Checkpoint, PromoteSnapshot, DetachActor, and Terminate wait
their turn for the actor.

Before, Terminate could forget an actor and delete its local snapshots
and directories while a Checkpoint or Restore of the actor was still
using them, and a Checkpoint that committed afterward recreated snapshot
state for the terminated actor.

Terminate waits for any in-flight RPC for that actor to finish before
forgetting its snapshot state and removing its local snapshots and actor
directories. With RPCs serialized at the atelet boundary, snapshottracker
only coordinates background uploads, detaches, and reports against the
active RPC.
holdStart // Run or Restore
holdCheckpoint // Checkpoint
holdPromote // PromoteSnapshot
)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Should we also prevent a Terminate RPC to happen in parallel with background detach? (i.e. let the background upload finish, before handling the Terminate RPC)

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Yes, I can handle it as part of #2833

@zoez7
Zoe Zhao (zoez7) added this pull request to the merge queue Oct 19, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Oct 19, 2026
@zoez7
Zoe Zhao (zoez7) added this pull request to the merge queue Oct 19, 2026
Merged via the queue into agent-substrate:main with commit 0fdb67b Oct 19, 2026
15 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.

2 participants