Skip to content

fix(fleet-queue): write required flags bare in queue usage; drop dead complete --queue - #13203

Merged
dezren39 merged 1 commit into
mainfrom
lane-ra-13174
Nov 23, 2026
Merged

dezren39 merged 1 commit into
mainfrom
lane-ra-13174

Conversation

@dezren39

@dezren39 dezren39 commented Nov 23, 2026 •

Copy link
Copy Markdown
Member

Fixes the help/parser drift found in #13174 (surveyed for the fleet book, #13165).

Usage corrections (per-verb usage + TOP_USAGE in client/support.rs):

  • release --reason, checkpoint --stage, cancel --reason, fail --error are required by their handlers (missing them dies with exit 2) but were shown bracketed as optional — now written bare.
  • cancel's description now names its default worker, fleet-monitor.
  • fail's description now names the --reason-class closed enum and its default: one of transient (the default), deterministic, blocked. (Refinement of the issue text: the flag did appear in the usage strings as [--reason-class <c>]; what was missing was the enum values and the default.)
  • stack replay --stack — a fifth instance of the same defect, caught by the extended parity test below; its usage is fixed too.

Dead flag removed: complete --queue was parsed and shown in help but never read anywhere in the source. Removed from the parser and both usage strings rather than wired: the broker's /complete body has no queue field and the one-queue model (#8097) leaves it nothing to scope.

Parity test extended (every_verb_usage_matches_its_parser in client.rs): required-vs-optional is now part of the checked contract. For each verb, the required set is derived from the handlers' own die(2, ...) messages (<verb>: --<flag> ... is required, plus the <verb> requires --<flag> form release uses) and the synopsis must write exactly those flags bare and the rest bracketed. Conditional requirements are phrased differently in the source (claim --bind's --session-id, lane's --limit-reason) and stay out of the set.

Verification:

  • cargo test -p fleet-queue --features client,queue-broker on the laptop: 549 lib tests passed, 0 failed; integration suites green (2 + 5).
  • Mutation check: re-bracketing checkpoint --stage makes the extended parity test fail with the new required-vs-optional message.
  • rustfmt --check on the three touched files flags only two pre-existing diffs in commands_lifecycle.rs (import order, an unrelated bind block) — left untouched; the changed regions are fmt-clean.

Closes #13174.

{
  "direct_parent": null,
  "links": [],
  "lineage": {
    "design": null,
    "roadmap_item": null,
    "priority": null
  },
  "pm_meta": 1,
  "provenance": {
    "queue_id": null,
    "scheduled_start": null,
    "picked_up_at": null,
    "work_started_at": null,
    "created_at": "2026-11-23T10:43:09Z",
    "session_id": null,
    "lane": null,
    "host": "htch-runtime",
    "worktree": null,
    "model": null,
    "lane_start_issues": [],
    "workspace_ref": null,
    "auth_subject": "archer",
    "stamped_by": "fleet 0.1.0 (native)"
  }
}

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

… complete --queue

Four lifecycle verbs documented parser-required flags as optional:
release --reason (#8217 gate), checkpoint --stage, cancel --reason and
fail --error all die(2) when missing but were shown bracketed in both
the per-verb usage and TOP_USAGE. Cancel also never named its default
worker (fleet-monitor), and fail never named the --reason-class enum
or its transient default; both descriptions now do.

complete --queue was parsed and shown in help but never read anywhere
in the source — removed from the parser and both usage strings (the
broker's /complete body has no queue field; the one-queue model makes
it meaningless).

The usage/parser parity test now also checks required-vs-optional:
for every verb it derives the required set from the handlers' own
die(2, ...) messages ("<verb>: --<flag> ... is required" and
"<verb> requires --<flag>") and asserts the synopsis writes exactly
those flags bare and the rest bracketed. The extension immediately
caught a fifth instance of the same defect — stack replay --stack,
also required by its handler — whose usage is fixed here too.

Verification: cargo test -p fleet-queue --features client,queue-broker
— 549 lib tests passed, 0 failed, plus integration suites green.
Mutation check: re-bracketing checkpoint --stage makes the extended
parity test fail with the new message.
@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 33 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: 25b2c098-bbd5-4965-9e0f-2647972d00a0
Commits

Reviewing files that changed from the base of the PR and between c7ef51f and d604504.

Files selected for processing: 3

  • pkgs/fleet/crates/fleet-queue/src/client.rs
  • pkgs/fleet/crates/fleet-queue/src/client/commands_lifecycle.rs
  • pkgs/fleet/crates/fleet-queue/src/client/support.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-23T10:44:43.251088Z d604504 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 9d8e45e into main Nov 23, 2026
2 checks passed
@dezren39
dezren39 deleted the lane-ra-13174 branch November 23, 2026 10:43
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.

fleet help: required flags documented as optional (release/checkpoint/cancel/fail) + dead complete --queue flag

1 participant