Skip to content

tool_paramhlp: --proto only supports one modifier - #22687

Closed
bagder wants to merge 1 commit into
masterfrom
bagder/proto-modifier
Closed

bagder wants to merge 1 commit into
masterfrom
bagder/proto-modifier

Conversation

@bagder

@bagder bagder commented Aug 26, 2026

Copy link
Copy Markdown
Member

1 - clarify the documentation

2 - make curl exit with an error for unknown protocols to make users
better notice when they get it wrong

Verified in test 322

1 - clarify the documentation

2 - make curl exit with an error for unknown protocols to make users
    better notice when they get it wrong

Verified in test 322
@github-actions github-actions Bot added the tests label Aug 26, 2026
@bagder
bagder marked this pull request as ready for review August 26, 2026 10:06
@bagder
bagder requested a lite review from Copilot August 26, 2026 10:13

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates --proto handling to better communicate misuse: documentation clarifies modifier usage and the CLI now treats unknown protocol tokens as a fatal parameter error (validated with a new regression test).

Changes:

  • Add test322 to ensure --proto with multiple modifiers fails with exit code 2 and expected stderr.
  • Change --proto parsing to error out (not just warn) on unrecognized protocol tokens.
  • Clarify --proto documentation to indicate a single modifier (rather than “zero or more”).

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
tests/data/test322 New regression test for --proto with multiple modifiers (expects PARAM_BAD_USE).
tests/data/Makefile.am Registers test322 in the test list.
src/tool_paramhlp.c Makes unknown protocol tokens in --proto a hard error (PARAM_BAD_USE).
docs/cmdline-opts/proto.md Adjusts wording about modifier count (but still needs a follow-up doc fix—see comment).
Suppressed comments (1)

docs/cmdline-opts/proto.md:25

  • The text later in this document still says unknown/disabled protocols only produce a warning, but the implementation now errors out and exits (see updated proto2num behavior and test322 expectations). Update the documentation to match the new fatal-error behavior.
prefixed by a modifier. Available modifiers are:

## +
Permit this protocol in addition to protocols already permitted (this is
the default if no modifier is used).

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread tests/data/Makefile.am
@testclutch

Copy link
Copy Markdown

Analysis of PR #22687 at ac295499:

Test 322 failed, which has NOT been flaky recently, so there could be a real issue in this PR. Note that this test has failed in 12 different CI jobs (the link just goes to one of them).

Generated by Testclutch

@bagder bagder closed this in 6017e6f Aug 26, 2026
@bagder
bagder deleted the bagder/proto-modifier branch August 26, 2026 12:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

3 participants