Repository navigation
fix(fleet-agent): a broker lane verdict is a rejected queue rung, not down (#6853 criterion 2) - #13001
Merged
Conversation
… down For #6853, criterion 2. The queue rung of `fleet agent next` recorded every failed claim as "down", including claims the broker answered and refused over the lane itself (`claim_repo_task: lane ... belongs to worker ...` / `is disabled` / `is for queue ...` / `registration did not land`). That made a healthy broker's verdict indistinguishable from a store outage — visible in the 2026-11-23 06:29Z recurrence, where the rung read "down" with the claim error embedded in the why. Classify before falling through to "down": when the claim's answer carries a lane verdict — in the fallback-switch envelope's `error` field or in the error text itself — the rung records "rejected" with the verdict as its why. Other `claim_repo_task:` errors (e.g. transfer refusals) and all store failures keep the "down" reading. Oracle: three fake-claim tests — the verdict in its fallback-switch spelling, the verdict on the plain error path, and a non-lane claim failure staying "down". Suite: cargo test -p fleet-agent, 86 passed / 0 failed. This addresses criterion 2 only; the issue stays open on the live front-door acceptance remainder.
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 58 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
3 tasks
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.
For #6853, criterion 2 only — the issue stays open on its live front-door acceptance remainder.
Problem
The queue rung of
fleet agent nextrecorded every failed claim asdown, including claims the broker answered and refused over the lane itself (claim_repo_task: lane ... belongs to worker .../is disabled/is for queue .../registration did not land). A healthy broker's verdict was indistinguishable from a store outage — visible in the 2026-11-23 06:29Z recurrence, where the rung readdownwith the claim error embedded in the why, sending the reader to fix the store instead of the lane registration.Change
pkgs/fleet/crates/fleet-agent/src/next.rs:lane_verdictclassifier: searches the failed claim's answer for the broker's lane-verdict markerclaim_repo_task: lane— in the fallback-switch envelope'serrorfield (stdout JSON) first, then the error text (the wrapper's stderr line, or the plain die-on-error spelling) — and extracts the verdict itself, stopping before the wrapper's appended sentence.rejectedwith the verdict as itswhywhen a verdict is present; anything else — otherclaim_repo_task:errors such as transfer refusals, and all store failures — keeps thedownreading.Verification
cargo test -p fleet-agentin a laptop worktree off main: 86 passed / 0 failed, including three new fake-claim oracle tests:queue:rejected, why carries the verdict without the wrapper's sentence;queue:rejected;claim_repo_task: transfer refused: ...) → staysqueue:down.cargo fmt --check -p fleet-agentclean.Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.