Skip to content

fix(docs): report missing required options in command resolver - #6373

Merged
dan-petty merged 2 commits into
mainfrom
fix/4862-the-argv-check-finds-a-missing-required-option
Nov 20, 2026
Merged

dan-petty merged 2 commits into
mainfrom
fix/4862-the-argv-check-finds-a-missing-required-option

Conversation

@dan-petty

@dan-petty dan-petty commented Nov 19, 2026 •

Copy link
Copy Markdown
Owner

The devops-pr-ci skill told agents to run devops pr describe <issue> with no --summary. The command resolver of devops docs check and the stage plan-check did not find a missing required option or argument, so agents copied the line and failed.

The resolver now reports missing_required with the parameter name. When the strict parse fails, it asks Click's option parser, consume_value and value_is_missing on a probe context, because a placeholder that fails conversion hides MissingParameter. A placeholder fills an argument, never an option. A bare command mention gives no finding.

The change corrects the nine document lines that the check found. It adds the capability docs-command-lines and one requirement in roadmap-stage/claims.

Closes #4862

Change: openspec/changes/archive/2026-11-20-4862-the-argv-check-finds-a-missing-required-option/

@dan-petty dan-petty added type/bug Type bug: the code does not do what it must scope/docs Documents, guides, ADRs and generated references labels Nov 19, 2026
The devops-pr-ci skill instructs agents to run `uv run devops pr describe <issue>`. The command requires the option `--summary`. The command resolver only checks for unknown commands, unknown options, and unexpected arguments. It does not report a missing required option or argument. Because of this omission, documentation checks and stage plan checks accept invalid command lines. Agents then copy these invalid command lines and encounter runtime errors.

Closes #4862

Change: `openspec/changes/archive/2026-11-19-4862-the-argv-check-finds-a-missing-required-option/`
The first draft scanned the tokens for each required option by hand. It
missed Click forms such as `-sx` when a placeholder failed conversion
first, and it ignored a default and an environment variable. The resolver
now runs Click's option parser, `consume_value` and `value_is_missing` on
a probe context, the same probe that `_gives_action_option` uses.

The new check finds `devops review benchmark --no-static-scan` in
docs/SELF_IMPROVEMENT.md, which gives no targets: the line now names
`<targets>`.

The change carries spec deltas, because `devops docs check` and the stage
plan-check show the new message: the new capability docs-command-lines
and one requirement in roadmap-stage/claims.
@dan-petty
dan-petty force-pushed the fix/4862-the-argv-check-finds-a-missing-required-option branch from fd66446 to d5124c6 Compare November 20, 2026 16:42
@dan-petty
dan-petty marked this pull request as ready for review November 20, 2026 16:49
@dan-petty
dan-petty merged commit 1b52008 into main Nov 20, 2026
27 checks passed
@dan-petty
dan-petty deleted the fix/4862-the-argv-check-finds-a-missing-required-option branch November 20, 2026 17:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

scope/docs Documents, guides, ADRs and generated references type/bug Type bug: the code does not do what it must

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(docs): the argv check finds a missing required option

1 participant