Record named steps when a seat is recycled - #1062
Merged
Merged
Conversation
There was a problem hiding this comment.
All reported issues were addressed across 9 files
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
There was a problem hiding this comment.
All reported issues were addressed across 4 files (changes from recent commits).
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
There was a problem hiding this comment.
All reported issues were addressed across 2 files (changes from recent commits).
Tip: Review your code locally with the cubic CLI to iterate faster.
Re-trigger cubic
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.
Operator summary
Before
When a seat was recycled — replaced with a fresh session — observers could not tell which step had actually finished. A failed or retried attempt could also leave a leftover in-progress mark that hid a later successful recycle.
Change
Recycle now records four named steps: handoff written, waiting for close, fallback respawn, and takeover confirmed. Each attempt owns its own record. If an attempt retries or is superseded, that record is removed before the next try; a cleanup failure stops the retry instead of leaving a stale in-progress mark.
After
recycle statuscan report which step the current attempt is in. A finished successful recycle is not hidden by an abandoned retry.Identifiers
agent/retro-0905-p1-l-recycle-phases83ef2a367c2109d9dac118d9e4ba01bea2878c606e1c66496918fc6ed9750e0bef7f36b650719335Summary
Adds typed recycle lifecycle phases (
handoff-written,awaiting-close,fallback-respawn,takeover-confirmed) and token-safe phase sidecar finalization. A retryable post-handoff busy path removes that attempt's phase record before continue; cleanup failure is joined to the busy error and breaks the loop. Stale-retry and concurrent-newer-token controls remain.This branch is based on recycle lifecycle hardening already present on
0299b8bd(not the later GHI bounce head). Unique vs that parent:cmd/flotilla/recycle.go,cmd/flotilla/recycle_test.go,openspec/specs/recycle/spec.md.Summary by cubic
Recycle now records four named lifecycle phases —
handoff-written,awaiting-close,fallback-respawn,takeover-confirmed— and exposes them throughflotilla recycle status --json, so observers can see exactly which step an attempt is in. A retried or superseded attempt removes its own phase record before continuing, so an abandoned retry can no longer leave an in-progress mark that hides a later successful recycle.Behavior
Status records
Written for commit 093e084. Summary will update on new commits.