Skip to content

fix(fleet-agent): a broker lane verdict is a rejected queue rung, not down (#6853 criterion 2) - #13001

Merged
dezren39 merged 1 commit into
mainfrom
lane-ig/6853-claim-verdict
Nov 23, 2026
Merged

dezren39 merged 1 commit into
mainfrom
lane-ig/6853-claim-verdict

Conversation

@dezren39

@dezren39 dezren39 commented Nov 23, 2026 •

Copy link
Copy Markdown
Member

For #6853, criterion 2 only — the issue stays open on its live front-door acceptance remainder.

Problem

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). A healthy broker's verdict was 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, sending the reader to fix the store instead of the lane registration.

Change

pkgs/fleet/crates/fleet-agent/src/next.rs:

  • New lane_verdict classifier: searches the failed claim's answer for the broker's lane-verdict marker claim_repo_task: lane — in the fallback-switch envelope's error field (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.
  • The queue rung's fallthrough arm now records rejected with the verdict as its why when a verdict is present; anything else — other claim_repo_task: errors such as transfer refusals, and all store failures — keeps the down reading.

Verification

  • cargo test -p fleet-agent in a laptop worktree off main: 86 passed / 0 failed, including three new fake-claim oracle tests:
    • the verdict in its fallback-switch spelling (exit 6 + envelope) → queue:rejected, why carries the verdict without the wrapper's sentence;
    • the verdict on the plain error path (exit 4, stderr only) → queue:rejected;
    • a non-lane claim failure (claim_repo_task: transfer refused: ...) → stays queue:down.
  • cargo fmt --check -p fleet-agent clean.

Run Proof on this PR
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

… 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.
@coderabbitai

coderabbitai Bot commented Nov 23, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You'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.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 9bf18408-ccd3-4d87-b538-dd24f0a76a8a
Commits

Reviewing files that changed from the base of the PR and between ff1adde and b6dc16a.

Files selected for processing: 2

  • pkgs/fleet/crates/fleet-agent/src/next.rs
  • pkgs/fleet/crates/fleet-agent/src/tests.rs
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

Share

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 23, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-23T06:53:07.278018Z b6dc16a PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@dezren39
dezren39 merged commit 07940fd into main Nov 23, 2026
2 checks passed
@dezren39
dezren39 deleted the lane-ig/6853-claim-verdict branch November 23, 2026 06:53
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.

1 participant