Repository navigation
fix(fleet-queue): write required flags bare in queue usage; drop dead complete --queue - #13203
Merged
Merged
Conversation
… 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.
|
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 33 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. |
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.
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 --errorare 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-classclosed 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 --queuewas 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/completebody has no queue field and the one-queue model (#8097) leaves it nothing to scope.Parity test extended (
every_verb_usage_matches_its_parserinclient.rs): required-vs-optional is now part of the checked contract. For each verb, the required set is derived from the handlers' owndie(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-brokeron the laptop: 549 lib tests passed, 0 failed; integration suites green (2 + 5).checkpoint --stagemakes the extended parity test fail with the new required-vs-optional message.rustfmt --checkon 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)" } }Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.