Skip to content

ateapi: Record the async upload of a local snapshot - #2795

Merged
Dmitry Berkovich (dberkov) merged 1 commit into
agent-substrate:mainfrom
msau42:snapshot-pause-uri
Oct 17, 2026
Merged

Dmitry Berkovich (dberkov) merged 1 commit into
agent-substrate:mainfrom
msau42:snapshot-pause-uri

Conversation

@msau42

@msau42 Michelle Au (msau42) commented Oct 17, 2026 •

Copy link
Copy Markdown
Collaborator

A pause records no upload location for its snapshot, but atelet uploads it in the background to the location the pause gave it. The next pause's Checkpoint response names that upload, and ate-api-server refused it, leaving the actor SUSPENDING.

ate-api-server now records the upload as COMPLETED when its location is the one ate-api-server built for that snapshot.

Part of #2069 and #2571

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

A pause records no upload location for its snapshot, but atelet uploads
it in the background to the location the pause gave it. The next pause's
Checkpoint response names that upload, and ate-api-server refused it,
leaving the actor SUSPENDING.

ate-api-server now records the upload as COMPLETED when its location is
the one ate-api-server built for that snapshot.
return "", nil, crashActorAndFail(ctx, w.store, actorRef, ateattr.OperationSuspend, crashMessageLocalSnapshotMissing)
}
if localSnap.GetDurableSnapshot().GetStatus() == ateapipb.SnapshotStorageStatus_SNAPSHOT_STORAGE_STATUS_COMPLETED {
markSkipped(ctx, "atelet already uploaded the paused snapshot")

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.

🤖 question 🟢 – Once this skips, finalize clears Locality and AssignedNode without any atelet call, so the node keeps the local copy and its tracker entry until the detach delay runs out. Its detach report then fails actorOnNode and gets NotFound. Does atelet treat that as "forget the actor", or will it retry until the deadline?

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.

atelet treats it as forget the actor.

There is still pending work in ateapi to adjust locality and assigned_node for SYNC mode as well as updating on detach, so this handling will change again.

// is node-local: the revert discards that snapshot and returns the actor to
// its durable one. See isRevertable.
// is node-local: the revert discards the node-local copy and returns the actor
// to its latest durable snapshot, which is that same snapshot once atelet's

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.

🤖 question 🟢 – A revert of a paused actor now returns to either the pause snapshot or the one before it, depending on whether atelet's upload landed first. A client can't predict which, and once the upload lands there is no verb left to discard the pause. Is that the intended semantics?

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, currently revert is "last known good durable state". In the future, we could explore reverting to a specific snapshot/Tag.

@dberkov
Dmitry Berkovich (dberkov) added this pull request to the merge queue Oct 17, 2026
Merged via the queue into agent-substrate:main with commit fb376fc Oct 17, 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