Skip to content

docs(testing): list untried optional-group combinations as a scanner gap - #727

Merged
rominf merged 1 commit into
mainfrom
docs/advised-commands-flag-combination-gap
Oct 26, 2026
Merged

rominf merged 1 commit into
mainfrom
docs/advised-commands-flag-combination-gap

Conversation

@rominf

@rominf rominf commented Oct 26, 2026

Copy link
Copy Markdown
Collaborator

Follow-up to #535, from the non-blocking note in @juhovainio's approving review: the advised-command variant generator toggles one optional flag group at a time, so a bug that shows only when two optional flags are combined is not caught.

This adds that limitation to the scanner's "Known gaps" list in docs/testing.md. The wording says separate groups, because a nested group such as [--restart-services [--yes]] is already tried with its inner part. The example rocm dash [--demo] [--replay <file>] is the one command_variants gives for why the groups are tried separately: those two flags conflict.

This is docs only, so no scenario is needed. docs/testing.md is among the files the scanner reads, so I re-ran its tests on this change.

Verified locally:

  • fmt

  • advised_commands tests: 20 pass

  • xtask tests: 317 pass

  • both clippy invocations on Linux

  • Not a bug fix; no xfail rows apply.

  • No new subcommand or subsystem.

  • No user-facing message changed.

The advised-command scanner tries each separate optional synopsis group
on its own, never two together, so a command that only fails when flags
from two such groups are combined is not caught. Say so in its Known
gaps list.

Signed-off-by: Roman Inflianskas <Roman.Inflianskas@amd.com>

@tomastola tomastola left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

The new bullet matches the scanner's behaviour: command_variants adds at most one optional group per variant, so side-by-side groups are never combined.

  • Saying separate optional groups is what makes the bullet accurate: synopsis_items already expands a nested group ([--restart-services [--yes]]) into each prefix, so only side-by-side groups are never combined.
  • The example shows the gap is deliberate: --demo is declared conflicts_with = "replay" (apps/rocm/src/main.rs:644), so trying every combination would report false failures. The wording also matches the doc comment on command_variants.

@rominf
rominf added this pull request to the merge queue Oct 26, 2026
Merged via the queue into main with commit 63ecab2 Oct 26, 2026
31 checks passed
@rominf
rominf deleted the docs/advised-commands-flag-combination-gap branch October 26, 2026 11:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants