Repository navigation
fleet bridge: per-verb --help for every bridge verb - #13213
Merged
Merged
Conversation
The bridge domain's status line advertises `fleet bridge <command> --help`, but run() answered every help request with the one shared whole-domain USAGE text. Add verb_usage(): each verb (send, agents, log, hello, inbox, post, ack, health) returns its own section of USAGE plus the shared defaults/exit-codes footer (USAGE_FOOTER, pinned by a test to stay USAGE's own tail). run() now prints the verb's own usage for `<verb> --help`/`-h`, falls back to USAGE for unknown verbs, and keeps bare/top-level help unchanged — the #10838 help-wins convention the queue client already follows. Book (DOC-01): the bridge reference and concepts chapters no longer carry the known-discrepancy note; they state the per-verb help as it now behaves.
|
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 15 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.
Closes #13197.
What
fleet bridge <verb> --helpnow prints that verb's own usage instead of the one shared whole-domain text the issue reported:fleet-bridge: newverb_usage(verb)returning each verb's section ofUSAGE(send, agents, log, hello, inbox, post, ack, health) plus the shared footer. The footer is factored out asUSAGE_FOOTER, and a test pinsUSAGEto end with it so the two cannot drift.run(): help still wins over every other argument (the repo-queue CLI has no discoverable usage: every --help is rejected and bare list hides actionable work #10838 convention) —<verb> --help/-hprints the verb's own usage, an unknown verb falls back to the whole-domainUSAGE, and bare/top-level help is byte-for-byte what it was.book/reference/bridge.mdandbook/concepts/bridge.mddrop the "known discrepancy" note and state the per-verb help as it now behaves.Verification (laptop worktree at the PR head)
cargo test -p fleet-bridge— 17 passed / 0 failed, including the newevery_verb_has_its_own_helporacle: every verbexecute()dispatches has help that starts with its own usage line, ends with the shared footer, and is not the shared USAGE text; an unknown verb returns None.cargo fmt --check -p fleet-bridge— clean.fleet bridge send --helpprints send's own usage + footer (exit 0);fleet bridge ack --helpprints ack's;fleet bridge bogus --helpfalls back to the whole-domain usage;fleet bridge --helpstill prints the domain page.cargo clippy -p fleet-bridgefails in this worktree with a pre-existing toolchain-cache error (E0514,serdecompiled by an incompatible rustc, in unrelated dependency crates) before reaching this crate's code; the test build compiles the change cleanly. CI on main is the clippy gate.Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.