Skip to content

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

Closed

Description

@dezren39

Found while surveying for the fleet book (#13165). In the fleet-queue client, four flags are shown as optional in help/usage but are required by the parser (missing them exits 2):

  • queue release --reason — required by source (feat(queue): batch claim (--count N) + per-item dedicated sub-task dispatch #8217 gate), optional in help.
  • queue checkpoint --stage — required by source, optional in help.
  • queue cancel --reason — required by source, optional in help. Cancel's default worker is also fleet-monitor, not the repo-worker-code the surrounding text implies.
  • queue fail --error — required by source, optional in help. --reason-class is a hidden closed enum defaulting to transient and appears in no usage string.

Also: queue complete --queue is parsed and shown in help but never read anywhere in the source — a dead flag.

Fix shape: correct the usage strings (per-verb usage() in the client support module), decide the dead flag (wire it or remove it), and extend the usage↔parser parity test so required-vs-optional is part of the checked contract.

Activity

  1. developing-today commented on Nov 23, 2026

    @developing-today
    Contributor
  2. dezren39 commented on Nov 23, 2026

    @dezren39
    MemberAuthor

    Lane RA claiming this item (2026-11-23): premise + ownership check passed (issue open, no prior claim — only the Kaneo bot link). Plan: verify each cited flag against the parser in the fleet-queue client, correct the per-verb usage strings, decide the dead complete --queue flag, extend the usage↔parser parity test to cover required-vs-optional, verify with the crate test suite, PR + merge.

  3. dezren39 commented on Nov 23, 2026

    @dezren39
    MemberAuthor

    Done — Lane RA. PR #13203 merged (merge commit 9d8e45ecf4fb, head SHA-guarded at d6045040780); this issue auto-closed on merge.

    What landed, against the issue's fix shape:

    • Usage strings corrected in both the per-verb usage() and TOP_USAGE: release --reason, checkpoint --stage, cancel --reason, fail --error now written bare (required), matching the handlers' exit-2 enforcement.
    • Cancel's description now names its default worker (fleet-monitor); fail's description now names the --reason-class enum and default (transient). One refinement of the issue text: --reason-class did appear in the usage strings as [--reason-class <c>] — what was missing was the enum values and the default, which are now documented.
    • Dead flag decided: complete --queue removed (parser + both usage strings). Wiring it had nowhere to go — the broker's /complete body carries no queue field and the one-queue model (Queue/lane design rules: no by-id blocking by default, optional platform selector, triage separate from fixes #8097) leaves it nothing to scope.
    • Parity test extended: every_verb_usage_matches_its_parser now derives each verb's required set from the handlers' own die(2, ...) messages and asserts the synopsis writes exactly those flags bare and the rest bracketed. Conditional requirements (claim --bind's --session-id, lane's --limit-reason) are phrased differently in the source and stay out of the set.
    • The extension immediately caught a fifth instance of the same defect — stack replay --stack is required by its handler but was shown bracketed — fixed in the same PR.

    Verification: cargo test -p fleet-queue --features client,queue-broker on the laptop — 549 lib tests passed, 0 failed, integration suites green. Mutation check: re-bracketing checkpoint --stage makes the extended parity test fail with the new message. rustfmt flags only two pre-existing diffs in commands_lifecycle.rs, left untouched.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions