Skip to content

Require snapshot generation to be passed to atelet - #2690

Merged
Zoe Zhao (zoez7) merged 1 commit into
agent-substrate:mainfrom
msau42:snapshot-generation
Oct 15, 2026
Merged

Zoe Zhao (zoez7) merged 1 commit into
agent-substrate:mainfrom
msau42:snapshot-generation

Conversation

@msau42

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

Copy link
Copy Markdown
Collaborator

Part of #2069

ateapi assigns each actor snapshot a generation, but never passed it to atelet: every ateletpb.Snapshot it builds left generation unset. That covers the pause and suspend Checkpoint, the paused-actor PromoteSnapshot, and both Restore paths. This sets it from the snapshot each request names, and narrows the TODO on Snapshot.generation to say only that atelet does not check it yet.

Atelet requires generation to be set but doesn't use the value yet. Once #2677 lands, atelet can reject a Checkpoint or PromoteSnapshot whose generation is stale, as the Snapshot.generation doc describes. That check came up in review on #2677.

It's a good idea to open an issue first for discussion.

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

ateapi numbers each actor's snapshots with a generation, but its
Checkpoint, PromoteSnapshot, and Restore requests to atelet left
Snapshot.generation unset, so atelet saw every snapshot as generation 0.
Set it from the snapshot each request names, and have atelet reject a
request that leaves it unset.

Atelet does not yet compare the generation with the snapshots it holds.
Once it does, it can reject a Checkpoint or PromoteSnapshot that carries
a stale view of the actor's snapshots, as Snapshot.generation describes.
@msau42
Michelle Au (msau42) marked this pull request as ready for review October 15, 2026 03:52
// TODO: Temporarily, atelet does not compare it with the snapshots it holds.
//
// +k8s:optional
// +k8s:required

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 🟢 – This also makes atelet reject every Checkpoint, Restore, and PromoteSnapshot that carries no generation, so an atelet upgraded ahead of ateapi fails all three until ateapi rolls. The commit title says "and require them" but the PR title and description only say "pass". Worth stating the new requirement there so the rollout order is visible to whoever deploys it.

@msau42 Michelle Au (msau42) Oct 15, 2026 •

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.

are we supporting upgrades pre-1.0? I've updated the title

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.

backwards incompatible changes are fine pre-1.0

@msau42 Michelle Au (msau42) changed the title ateapi: Pass snapshot generations to atelet ateapi: Require snapshot generations to be passed to atelet Oct 15, 2026
@msau42 Michelle Au (msau42) changed the title ateapi: Require snapshot generations to be passed to atelet Require snapshot generation to be passed to atelet Oct 15, 2026
// TODO: Temporarily, atelet does not compare it with the snapshots it holds.
//
// +k8s:optional
// +k8s:required

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.

backwards incompatible changes are fine pre-1.0

@zoez7
Zoe Zhao (zoez7) added this pull request to the merge queue Oct 15, 2026
Merged via the queue into agent-substrate:main with commit 971236d Oct 15, 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.

3 participants