feat: add adopt-only migration lifecycle - #99
Merged
Conversation
agent-session-id: a078daee-6f98-4916-91a8-d21291407789 agent-tool: Codex CLI agent-tool-version: 0.145.0 agent-model: unknown agent-runtime-profile: /nix/store/mnx8agbdq3wiyb6vz63lhgscgazkrn98-coding-agent-runtime-profile/share/coding-agents/profile.json agent-skills-manifest: /nix/store/5r69m9k2llmri3na81518zx0a7y0d3cn-agent-skills-corpus/share/agent-skills/manifest.json tooling-profile: dotfiles@0fb7e03
schickling-assistant
marked this pull request as ready for review
July 30, 2026 15:01
This was referenced Jul 30, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
adopt-onlylifecycle, including the compact agent formservicebefore replacementWhy
Identity-based adoption is safe only while the expected generation is still
alive. Before this change, publishing a migration declaration also authorized
st2 to cold-launch an absent task or reap and replace a dead one. That makes a
zero-interruption catalog cutover race with the ordinary service reconciler.
adopt-onlyis a fail-closed migration fence. It does not change the defaultservice lifecycle, and
retired #trueremains the separate explicit teardowninstruction.
Addresses #98 replacement-authorization boundary. Durable generation receipts
remain the separate desired/observed generation contract tracked in #40.
The paired executable acceptance is
evals#52 /
evals PR #53.
Evidence
Red before implementation:
Green:
cargo test -p agent-spec --test discovery- 29 passedcargo test --test reconcile- 30 passedcargo test --test run- 26 passedcargo clippy --all-targets --all-features -- -D warnings- passedcargo test --no-run --all-targets --all-features- passednix flake check --print-build-logs- passedf32273d: 7 PASS / 0 FAIL / 7 gatingThe complete all-target run reached unrelated existing test
materialize::up_materialize_only_writes_the_overlay_without_needing_pty,which fails identically on
origin/mainbecause that test removesgitfromPATHwhile materialization now treats the missing safety probe as an error.Posted on behalf of @schickling
agent_nameagent_session_idagent_toolagent_tool_versionagent_runtimeagent_modelruntime_profileskills_manifestworktreemachinetooling_profile