Skip to content

fix(fleet): close the remaining fleet help gaps (#13175) - #13232

Merged
dezren39 merged 2 commits into
mainfrom
lane-sh-13175
Nov 23, 2026
Merged

dezren39 merged 2 commits into
mainfrom
lane-sh-13175

Conversation

@dezren39

@dezren39 dezren39 commented Nov 23, 2026 •

Copy link
Copy Markdown
Member

Closes #13175.

Every bullet of #13175 was re-verified against a binary built from current main before fixing. One bullet was already stale: bridge per-verb help landed with #13197 (PR #13213), so it is not repeated here. One same-class gap found during verification is included: queue surfaces --help was ignored and printed the registry JSON.

What changed

  • queue TOP_USAGE — release/heartbeat/checkpoint/park/block/fail/complete lines now list [--lane <id>]; the fallback line lists the full subcommand set (complete included). New parity test (top_usage_lines_match_per_verb_usage) compares each single-verb TOP_USAGE line's flag set against that verb's own usage synopsis so the two cannot drift apart again.
  • queue fallback GROUP_USAGE — scan line corrected to scan [--repo <repo>] [--limit <1..100>] [--lease-min <minutes>].
  • queue session — a help flag after status/result prints the session usage, exit 0, instead of being looked up as a session handle (no session with handle --help).
  • queue surfaces — --help prints a short usage instead of the registry.
  • agent — per-verb help via verb_usage() on the fleet bridge: status line advertises per-verb --help, but every verb returns one shared USAGE text #13197 bridge pattern (kinds/enroll/doctor/next/shortlist); unknown verbs keep the shared USAGE; USAGE_FOOTER pins the shared tail.
  • gh — tiers --help prints its own usage (was exit 2); closures --help prints its own usage (was silent exit 0); the gh usage synopsis gains the missing closures line.
  • serve — serve queue-broker --help / serve secrets-broker --help print the role's own usage (its environment configuration surface); a serve list with --help prints the serve domain help instead of dying in parse_serve_list.
  • shell — fleet shell --help reaches the shell's own usage when the Agent capability is available, instead of the registry domain help that lists only targets.
  • built-ins — version/capabilities/help with a lone --help print their own short usage, exit 0; any other trailing argument still errors exit 2.
  • laptop-agent — a help token before the -- separator (not swallowed as an option's value) prints USAGE and exits 0 before any transport; poll --help no longer polls a job named --help.

Verification

  • Test suites on the laptop: fleet-agent 93/93, fleet-laptop-agent 20/20, fleet bin 122/122. fleet-queue: 565 passed, 1 failed — the failure is pre-existing on main (turso_queue::closed_bound::tests::sweep_wiring_runs_the_detective_beside_the_recheckers expects a call shape that core.rs outgrew when it gained .unwrap_or(200); both files are untouched by this PR) and is filed as fleet-queue: sweep_wiring test expects a stale call shape (core.rs gained .unwrap_or(200)) #13230.
  • Premise battery re-run against the rebuilt binary: all 21 invocations behave as specified above, including the unchanged error paths (version extra still exit 2, gh closures with two items still exit 2).
  • Book updated in the same change per the DOC-01 contract: reference chapters builtins, agent, gh, laptop-agent, queue-core, queue-lifecycle (the four fleet help: required flags documented as optional (release/checkpoint/cancel/fail) + dead complete --queue flag #13174-era stale notes there are corrected to current behaviour), queue-dispatch, queue-fallback, serve, shell; concepts agents/placement/gh; the dispatch tutorial. nix build .#fleet-docs builds clean.
{
  "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-23T11:48:31Z",
    "session_id": null,
    "lane": null,
    "host": "amd",
    "worktree": "/home/user/wt-lane-sh-13175",
    "model": null,
    "lane_start_issues": [],
    "workspace_ref": {
      "kind": "worktree",
      "id": "/home/user/wt-lane-sh-13175",
      "repo": "developing-today/code",
      "branch": "lane-sh-13175",
      "sha": "8ea847091dad353fba2947b7f2d8a968b45af3f6"
    },
    "auth_subject": "oc-code-04",
    "stamped_by": "fleet 0.1.0 (native)"
  }
}

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

Every item verified against a binary built from current main first;
the bridge per-verb bullet was already fixed by #13197 and is not
repeated here.

- queue TOP_USAGE: release/heartbeat/checkpoint/park/block/fail/
  complete lines now list [--lane <id>]; the fallback line lists the
  full subcommand set (complete included). New parity test compares
  each single-verb TOP_USAGE line's flags against that verb's own
  usage synopsis so the two cannot drift apart again.
- queue fallback GROUP_USAGE: scan line corrected to
  scan [--repo <repo>] [--limit <1..100>] [--lease-min <minutes>].
- queue session status/result --help: a help flag after the
  subcommand prints the session usage and exits 0 instead of being
  looked up as a session handle.
- queue surfaces --help: prints a short usage instead of being
  ignored (it printed the registry JSON).
- agent: per-verb help via verb_usage() on the #13197 bridge pattern
  (kinds/enroll/doctor/next/shortlist); unknown verbs keep the
  shared USAGE. USAGE_FOOTER pins the shared tail.
- gh tiers --help prints its own usage (was exit 2); gh closures
  --help prints its own usage (was silent exit 0); the gh usage
  synopsis gains the missing closures line.
- serve queue-broker/secrets-broker --help prints the role's own
  usage (env configuration surface); a serve list with --help prints
  the serve domain help instead of dying in parse_serve_list.
- shell --help reaches the shell's own usage when the Agent
  capability is available, instead of the registry domain help that
  lists only targets.
- built-ins: version/capabilities/help with a lone --help print
  their own short usage and exit 0; any other trailing argument
  still errors exit 2.
- laptop-agent: a help token before the -- separator (not swallowed
  as an option value) prints USAGE and exits 0 before any transport;
  poll --help no longer polls a job named --help.

Tests: fleet-queue 565 passed + 1 pre-existing failure on main
(sweep_wiring call-shape drift, filed as #13230); fleet-agent 93;
fleet-laptop-agent 20; fleet bin 122. Book chapters updated in the
same change per DOC-01 (builtins, agent, gh, laptop-agent,
queue-core, queue-lifecycle, queue-dispatch, queue-fallback, serve,
shell, concepts/agents, concepts/placement, concepts/gh, and the
dispatch tutorial); fleet-docs builds clean.
@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 42 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: 74910f2d-c9f8-4c8a-bdfc-099277914536
Commits

Reviewing files that changed from the base of the PR and between 36b25a0 and 6f04eb3.

Files selected for processing: 23

  • pkgs/fleet/book/concepts/agents.md
  • pkgs/fleet/book/concepts/gh.md
  • pkgs/fleet/book/concepts/placement.md
  • pkgs/fleet/book/reference/agent.md
  • pkgs/fleet/book/reference/builtins.md
  • pkgs/fleet/book/reference/gh.md
  • pkgs/fleet/book/reference/laptop-agent.md
  • pkgs/fleet/book/reference/queue-core.md
  • pkgs/fleet/book/reference/queue-dispatch.md
  • pkgs/fleet/book/reference/queue-fallback.md
  • pkgs/fleet/book/reference/queue-lifecycle.md
  • pkgs/fleet/book/reference/serve.md
  • pkgs/fleet/book/reference/shell.md
  • pkgs/fleet/book/tutorials/dispatch-a-build.md
  • pkgs/fleet/crates/fleet-agent/src/lib.rs
  • pkgs/fleet/crates/fleet-agent/src/tests.rs
  • pkgs/fleet/crates/fleet-laptop-agent/src/cli.rs
  • pkgs/fleet/crates/fleet-queue/src/client.rs
  • pkgs/fleet/crates/fleet-queue/src/client/support.rs
  • pkgs/fleet/crates/fleet-queue/src/fallback.rs
  • pkgs/fleet/crates/fleet-queue/src/placement.rs
  • pkgs/fleet/crates/fleet/src/gh.rs
  • pkgs/fleet/crates/fleet/src/main.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-23T11:52:32.345421Z 6f04eb3 New commits
ℹ️ 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.

# Conflicts:
#	pkgs/fleet/book/reference/laptop-agent.md
@dezren39
dezren39 merged commit d18c12f into main Nov 23, 2026
2 checks passed
@dezren39
dezren39 deleted the lane-sh-13175 branch November 23, 2026 11:59
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 gaps: missing/erroring --help surfaces (laptop-agent, gh closures/tiers, queue session, shell, serve, built-ins) + TOP_USAGE omissions

1 participant