Problem
--assert-status accepts any integer, including values no HTTP response can carry. The assertion is then guaranteed to fail at runtime with exit 93.
Reproduction
$ http-assert --assert-status 999 http://127.0.0.1:8099/ok
- status: expected 999, got 200 ("200 OK")
$ echo $?
93
$ http-assert --assert-status -1 http://127.0.0.1:8099/ok
- status: expected -1, got 200 ("200 OK")
$ echo $?
93
Why it matters
An unsatisfiable status is a typo in the invocation, not a fact about the service, so 93 sends the wrong signal: a CI job reading the exit code concludes the service is broken. This is the distinction #86 set out to make.
The tool already validates the other numeric flags at invocation time, and does it well:
$ http-assert --retry -3 ...
Error: Invalid value for --retry flag: -3; it counts retries, so the smallest meaningful value is 0
--assert-status is the outlier.
Suggested fix
Reject values outside 100–599 with exit 71, in the style of the --retry and --max-redirs messages.
Problem
--assert-statusaccepts any integer, including values no HTTP response can carry. The assertion is then guaranteed to fail at runtime with exit 93.Reproduction
Why it matters
An unsatisfiable status is a typo in the invocation, not a fact about the service, so 93 sends the wrong signal: a CI job reading the exit code concludes the service is broken. This is the distinction #86 set out to make.
The tool already validates the other numeric flags at invocation time, and does it well:
--assert-statusis the outlier.Suggested fix
Reject values outside 100–599 with exit 71, in the style of the
--retryand--max-redirsmessages.