Repository navigation
fix(agent): end a bake once the server moves past it - #835
Merged
Merged
Conversation
A bake samples a target's checks until its window ends, in that target's queue (the host's, or the cluster's lane). Expediting a bake ends it on the server only, so the agent kept sampling and every later instruction for the target waited behind it: the next phase's gate health check, the next step's plan or apply. The stage showed 'baking' with nothing left baking until the old window ran out. A later rollout instruction for the same target (plan, apply, rollback, or a baseline/bake/rollout health check) now stops that target's bake as it arrives, so it is answered at once. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WkowUvm9YTtraeGrudHmJJ
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.
Requested by Ben · project thread
Follow-up to #834. Expediting the last baking host left its stage in baking with no countdown and no row left to expedite, until the host's original window ran out.
Cause
RunHealthwithuntil) samples checks in the target's queue (host queue, or the cluster's lane) until its window ends.start_gate→PhaseState::Baking), whoseRollout-scope health request queues behind the still-running bake loop on the expedited host.Fix
session/bakes.rs: as instructions arrive, a bake registers a stop token per(cluster, workload)target; a laterRequestPlan,Apply,Rollback, orBaseline/Bake/Rollouthealth check for the same target cancels it. A bake superseded before it starts takes one sample.session.rs) and lane (targets.rs) bake loops end on that token.Manual/Drifthealth and other workloads' instructions leave a bake alone.Tests
a_bake_ends_when_the_server_moves_past_it(gate, newer bake) anda_cluster_bake_ends_when_the_server_moves_past_it: the next request is answered within 2m of a 15m bake and the old bake stops sampling. Both fail without the fix.Takes effect once agents run this release (Upgrade agent).
Generated by Claude Code