fix(cli): correct stale help text that contradicts actual behavior#418
Open
pstayets wants to merge 1 commit into
Open
fix(cli): correct stale help text that contradicts actual behavior#418pstayets wants to merge 1 commit into
pstayets wants to merge 1 commit into
Conversation
Every change is a string-only edit to embedded help/usage text (or the machine-readable `pilotctl context` catalog) where the text contradicted the implementation. Each was verified against the code before editing: - quickstart: help claimed it "detects whether the daemon is already running" — cmdQuickstart is a bare fmt.Print of a static banner. Help (and the context-catalog entry) now describe the static 3-step cheat-sheet. - updates: help said --count default 5; cmdUpdates uses flagInt(flags, "count", 10). - init: help marked --registry as required; every cmdInit flag is optional with a default (registry 34.71.57.205:9000), and --socket was undocumented. - network: dispatch handles `reject` and `role` but help omitted both. - network create: help showed positional `create <name>`; the command requires --name (also fixed the stale context-catalog args, which listed nonexistent --managed/--policy flags). - skills: dispatch handles disable/enable/set-mode, which help omitted; disable/enable accept only `all` (per-skill is unimplemented); the fixed toolchain list was replaced with wording matching skillinject, whose manifest is fetched at runtime; the "To re-enable" hint printed a command form that errors out (missing `all`). - trusted: cmdTrusted rejects everything except `trusted list`, but help/usage showed bare `trusted`. - send-file: help claimed a 256 MiB frame cap; dataexchange DefaultMaxFrameSize is 1<<30 (1 GiB), env-overridable within [64 KiB, 2 GiB). - bench: help said --timeout default 30s; cmdBench uses 120s. - gateway: "requires root for ports <1024" — pilot-gateway shells out to `ifconfig lo0 alias` / `ip addr add` for loopback aliasing, which needs root regardless of port. - daemon -dataexchange-b64: flag help said data_b64 is written "alongside" data; the dataexchange service's if/else writes data_b64 in place of data. - top-level help: `dgram` exists in the dispatch and had per-command help but was missing from the command listing. docs/cli-reference.md regenerated via scripts/gen-cli-reference.sh (it is an auto-generated capture of `pilotctl --help`; CI enforces it). Verified: gofmt clean; go build ./cmd/... ok; go test ./cmd/pilotctl ok. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0142ryqVGEmJN66VZtCC7wFD
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.
The binary's embedded help text has drifted from the implementation in a number of places (the website docs already state the correct behavior — it is the CLI's own
--helpthat is stale). This PR fixes the strings only; there is zero behavior change. Every item below was verified against the current code onmainbefore editing, and each changed string was grepped across the repo (including tests) to confirm nothing depends on it.pilotctl quickstart --helpclaimed "it detects whether the daemon is already running and points you to the next action" →cmdQuickstart(cmd/pilotctl/main.go:1983) is a barefmt.Printof a static banner. New text: prints a fixed 3-step cheat-sheet (DISCOVER, TRUST, TALK) and does not inspect daemon state. Thepilotctl contextcatalog entry forquickstartrepeated the same claim (plus a structured-returnsshape the command never emits) and was corrected too.pilotctl updates --help: "--count <n>… (default: 5)" →cmd/pilotctl/updates.go:133isflagInt(flags, "count", 10)(the doc comment above it already says 10). Help now says 10.pilotctl init --help: showed "--registry <addr>registry address (required)" → every flag incmdInit(cmd/pilotctl/main.go:2010) is optional with a default (registrydefaults to34.71.57.205:9000), and the accepted--socketflag was undocumented. Help now marks flags optional with their defaults and documents--socket.pilotctl network --help: subcommand list omittedrejectandrole, both present in the dispatch (cmd/pilotctl/main.go:1835,1850). Added.network create: help showed positionalcreate <name>→ the command requires--name(cmd/pilotctl/main.go:7044:usage: pilotctl network create --name <name> …). Help aligned. Thepilotctl contextcatalog entry additionally advertised nonexistent--managed/--policy <file>flags — replaced with the real flag set (--name,--join-rule,--token,--enterprise,--rules/--rules-file).pilotctl skills --help: listed onlystatus|paths|check→ the dispatch (cmd/pilotctl/skills.go:37-54) also handlesset-mode|disable|enable.disable/enablerequire an argument and accept onlyall(skills.goexplicitly rejects anything else: "only 'all' is supported; per-skill disable is not yet implemented") — now documented. The hardcoded toolchain list "(Claude Code, OpenClaw, PicoClaw)" was replaced with generic wording: the skillinject manifest is fetched at runtime from the pilot-skills repository, so the supported set is not fixed at compile time. Also fixed theskills disablesuccess hint, which told users to runpilotctl skills enable— a form that errors out (skill id required).pilotctl trusted --help/ top-level help showed baretrusted→cmd/pilotctl/trusted.go:12rejects everything excepttrusted list. Usage fixed topilotctl trusted list(help text, top-level listing, and the context-catalogargs).send-filehelp claimed a "256 MiB" frame cap →dataexchange.DefaultMaxFrameSizeis1 << 30(1 GiB), overridable viaPILOT_DATAEXCHANGE_MAX_FRAMEwithin [64 KiB, 2 GiB). Help now says 1 GiB and mentions the accepted range.bench --helpclaimed timeout "default: 30s" →cmdBench(cmd/pilotctl/main.go) usesflagDuration(flags, "timeout", 120*time.Second). Help now says 120s. (traceroute's 30s claim was checked and is correct — untouched.)ifconfig lo0 alias(darwin) /ip addr add(linux) to create loopback interface aliases (loopback_darwin.go/loopback_linux.goin pilot-protocol/gateway), which needs root regardless of port. New text: "requires root — creates loopback interface aliases". Daemon-dataexchange-b64flag help said the base64 field is added "alongsidedata" → the dataexchange service'sif/else(service.go:351) writesdata_b64in place ofdata. Fixed.pilotctl --helpomitteddgram, which exists in the dispatch (cmd/pilotctl/main.go:1782) and has its own per-command help. Added to the Communication commands listing.docs/cli-reference.mdis regenerated viascripts/gen-cli-reference.sh(it is an auto-generated capture ofpilotctl --helpthat CI checks for drift); its diff is exactly the top-level-help changes above.Verification level: built locally with Go 1.26.3 —
gofmt -lclean on touched files,go build ./cmd/...succeeds,go test ./cmd/pilotctlpasses (12.9s, ok).🤖 Generated with Claude Code
https://claude.ai/code/session_0142ryqVGEmJN66VZtCC7wFD