Skip to content

fix(cli): turn clap help back on — no binary could print its own help - #99

Merged
CharmingGroot merged 1 commit into
mainfrom
fix/cli-help-feature
Sep 1, 2026
Merged

CharmingGroot merged 1 commit into
mainfrom
fix/cli-help-feature

Conversation

@CharmingGroot

Copy link
Copy Markdown
Owner

Closes #97.

$ pasu-proxy --help
error: unexpected argument found

Every flag these binaries have is documented only in --help, so the answer to "what can this do" was read the source.

Not a code bug

clap's help and usage are default features. The workspace sets default-features = false and named only std. With help absent, --help is not a flag at all, so clap answers it as an unknown argument.

error-context comes with the fix. Without it a missing required argument said only that one was missing; it now names which:

error: the following required arguments were not provided:
  --policy <POLICY>
  --upstream <UPSTREAM>

Colour and suggestions stay off — they were not what was missing.

All three binaries, all three tested

pasu, pasu-daemon and pasu-proxy share the workspace dependency, so all three were affected. Each now carries the same test: --help must produce DisplayHelp, not UnknownArgument. One test in one crate would leave the next feature trim free to break the other two silently.

Only pasu-proxy builds on macOS (the others pull the eBPF stack), so the Linux job is what proves the other two.

The comment sits on the dependency line, since that is where the mistake was made and where it would be made again.

🤖 Generated with Claude Code

  $ pasu-proxy --help
  error: unexpected argument found

Every flag these binaries have is documented only in --help, so the answer to
"what can this do" was "read the source". It was not a code bug: clap's help
and usage are DEFAULT features, the workspace sets default-features = false,
and the feature list named only std. With help absent, --help is not a flag,
so clap answers it as an unknown argument.

error-context comes with it. Without that, a missing required argument said
only that one was missing; it now names which:

  error: the following required arguments were not provided:
    --policy <POLICY>
    --upstream <UPSTREAM>

Colour and suggestions stay off — they were not what was missing.

All three binaries share the workspace dependency, so all three were affected,
and all three now carry the same test: --help must produce DisplayHelp rather
than UnknownArgument. One test in one crate would leave the next feature trim
free to break the other two silently.

The comment sits on the dependency line, since that is where the mistake was
made and where it would be made again.

Closes #97

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@CharmingGroot
CharmingGroot merged commit 2a92547 into main Sep 1, 2026
5 checks passed
@CharmingGroot
CharmingGroot deleted the fix/cli-help-feature branch September 1, 2026 02:33
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.

pasu-proxy --help does not print help

1 participant