Found while auditing exit statuses for #72. Out of scope there, filed separately.
Pinned Python HWI 3.2.0 treats --help as an error-shaped response: it prints {"error": "Help text requested", "code": -17} on stdout and the help text on stderr, exiting 0 (hwilib/_cli.py:121-126).
BHWI's hwi shim prints plain clap help on stdout with empty stderr, also exiting 0 (bhwi-cli/src/hwi.rs, the DisplayHelp arm of run_cli).
Exit statuses already agree, so this is purely an output-shape divergence. A caller that parses stdout as JSON gets a parse error from BHWI where upstream gives it a -17 object.
Scope
- Decide whether the shim should reproduce the
-17 JSON plus stderr help.
- If yes, add a parity case; the harness needs a raw-output variant because
parse_output bails when stdout is not JSON.
Found while auditing exit statuses for #72. Out of scope there, filed separately.
Pinned Python HWI 3.2.0 treats
--helpas an error-shaped response: it prints{"error": "Help text requested", "code": -17}on stdout and the help text on stderr, exiting 0 (hwilib/_cli.py:121-126).BHWI's
hwishim prints plain clap help on stdout with empty stderr, also exiting 0 (bhwi-cli/src/hwi.rs, theDisplayHelparm ofrun_cli).Exit statuses already agree, so this is purely an output-shape divergence. A caller that parses stdout as JSON gets a parse error from BHWI where upstream gives it a
-17object.Scope
-17JSON plus stderr help.parse_outputbails when stdout is not JSON.