fix(cli): state each option default once in help output #7334
All Vouch review confidence checks passed
Residual risk 0.38 = Change Risk (0.52) × (1 − Review Confidence (0.27)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.52 · 650 lines diff across 8 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.02 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 52% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.388
Shallow Review Depth
shallow_review_depth
0.344
Real PR Conversation Timeline
1 comments
"Review active on #7334"
general
weight: 0.35
greptile-apps[bot]
Summary
Six CLI commands printed an option default twice in
--helpoutput: once as prose inside the option description and once as the automatic(default: …)annotation the help renderer appends when the option has a schema default. This removes the redundant prose from the CLI-layer option descriptions so each default is stated exactly once, and adds a boundary test covering all six commands.Fixes #7306
Problem and expected behavior
Smallest trigger:
node scripts/rea.mjs inspect-byte-entropy --helpprints--block-size <number> Power-of-two block size from 256 to 65536 bytes (default 4096) (default: 4096). The violated invariant is that an option's help presents its default once. Both annotations carried the same value in the same units, so the defect was purely presentational redundancy across 11 entries in six commands:inspect-byte-entropy(--block-size,--offset),inspect-devicetree(four--max-*options),decode-signal-recording(--line_offset),inspect-packet-capture(--match_offset),inspect-packet-fields(--kind,--offset), andinspect-signal-decoders(--offset).Change and scope
The redundant text lived in two layers:
src/cli/binaryDiagnosticsCommands.ts— the CLI-layer.describe()overrides themselves appended(default N); those clauses are dropped.src/cli/captureCommands.tsandsrc/cli/signalCommands.ts— the commands spread shared domain-schema shapes, whose descriptions say "default 0" / "defaults to protocols". Following the existing pattern in those files (the CLI-layerlimitoverrides), the affected fields are re-described at the CLI wiring layer with the default mention removed.The domain schemas and the MCP tool contracts are intentionally unchanged, so machine-readable schema defaults and advertised tool descriptions are untouched. No help content beyond the duplicated default wording is altered.
Contribution scope: not applicable; ordinary presentation fix within the existing CLI surface.
Contract and boundary impact
Expected effects: documentation or usability only; no target interaction.
Evidence and regression coverage
tests/boundary/cli/helpDefaultAnnotation.test.tsruns--helpfor the six affected commands and asserts that no help line restates the automatic(default: …)annotation's value in its description (matching(default X),default X, ordefaults to Xprose before the automatic annotation).077de9259the new test fails with exactly the reported lines, e.g.--block-size <number> Power-of-two block size from 256 to 65536 bytes (default 4096) (default: 4096)and--offset <number> Window start as a decimal file byte offset (default 0) (default: 0); after the fix it passes.inspect-byte-entropy --helpnow shows--block-size <number> Power-of-two block size from 256 to 65536 bytes (default: 4096); the same single-annotation presentation applies to the other ten entries.Boundary regressions: not applicable (no boundary or lifecycle behavior changed).
Validation performed
npx vitest run tests/boundary/cli/helpDefaultAnnotation.test.ts— red on base (failed with the two byte-entropy duplicate lines and the equivalent duplicates in the other five commands), green after the fix.npx vitest run tests/boundary/cli/— 1198 passed; 33 failures in 11 files are pre-existing environment issues on this machine (local Node is 24.21.0 whilesupported_runtimerequires^24.22.1, and IDA/Hopper/provider probes are absent); none touch the six affected commands or help rendering.node scripts/rea.mjs <command> --helpfor the six commands against a local build — all exit 0 with each default shown once.Compatibility, safety, and release
Author readiness
Human owner: @akushonkamen
Before merge
type(scope): outcome.