Skip to content

test: check that every advised rocm command parses; fix dashboard labels that don't - #535

Open
rominf wants to merge 22 commits into
mainfrom
test/advised-commands-parse
Open

rominf wants to merge 22 commits into
mainfrom
test/advised-commands-parse

Conversation

@rominf

@rominf rominf commented Oct 5, 2026 •

Copy link
Copy Markdown
Collaborator

Fixes #534.

Remediation lines, help examples and docs tell users which rocm commands to run, but tests pin only their wording at most. A renamed flag or a removed subcommand therefore leaves users with advice that fails.

This adds a test that collects every rocm/rocmd command the project advises, from:

  • the --help of every visible command
  • production string literals: labelled next step:/Try:/apply with: lines, the rocm fix recipe commands and dashboard labels
  • README.md, docs/, skills/, and the demo tapes

It fills in placeholders and routes each command through the same entry points rocm uses: the natural-language router, then the real clap definition. It fails when:

  • clap rejects an advised command
  • a single word falls through to the planner, meaning the advised subcommand does not exist
  • a line meant to be run as written omits a required argument (inline prose, or text marked with …, may leave values out)

Each source must still yield a known command and a minimum count, so a broken extractor cannot pass silently. The templated retry advice for services stop/restart is checked through the real message function.

It found four broken commands, fixed here:

  • The dashboard's ROCm tab showed three:

    • Runs: rocm install --channel … --format … (missing sdk)
    • Runs: rocm update --check (no such flag)
    • Runs: rocm doctor (not a subcommand; from a shell it reaches the planner and does nothing)

    They now name what each screen actually runs, and a new unit test, rocm_runs_labels_name_what_each_manager_spawns, ties each label to the argv that screen's manager builds.

  • README's rocm storage [report] [--json] implied rocm storage --json, which is rejected. It is now rocm storage [report [--json]].

Scenario. dash-01 (@id:dash-opens-and-navigates) now selects the diagnose action and asserts Runs: rocm examine and no rocm doctor on screen. It fails against the old label and runs on the Linux lanes (@requires-os:linux). The unit test still derives each expected label from the argv the manager builds.

Verification. Every guard was mutation-checked. The test goes red for each of these:

  • reverting each fix
  • a bad flag injected into help text, a Rust literal, a doc, or a tape
  • making rocm examine require an argument (19 findings)
  • disabling each source extractor
  • changing a dashboard label to rocm update --apply

The new tests run in about 1 s and are pure: no environment, filesystem or process side effects. rocmd advice goes through a new rocmd::parse_args, which runs nothing, so it gets full clap validation (conflicts and required values included).

Local gates:

  • cargo fmt --all --check: 0
  • both clippy invocations: 0
  • cargo xtask manifest --check: 0
  • cargo test -p rocm --all-targets: 975 passed. Two tests unrelated to this change failed once under the parallel run and pass in isolation.
  • rocm-dash-tui ui:: tests: 0

docs/testing.md describes the check and when an exclusion is appropriate.

Also in this PR

  • A README fix found by the scanner: EAI-7404: make runtime activation and rollback transactional #424's rocm runtimes activate|rollback [--restart-services] [--yes] advertised a --yes the parser rejects on its own. It is now [--restart-services [--yes]].
  • Templated hints from main are checked through their real builders: every_service_action_hint_verb_parses, and runtime_restart_retry_advice_parses_and_clears_the_refusal. The latter needed the runtimes approval check moved into ensure_runtime_service_restart_approved, with no change in behaviour.
  • Known gap: a runtime selector containing whitespace or starting with - would make the runtimes Try: line unrunnable, because that hint (from EAI-7404: make runtime activation and rollback transactional #424) does no shell quoting. Such a selector can't match a real runtime.

@rominf
rominf requested a review from a team as a code owner October 5, 2026 07:50
@rominf
rominf requested a review from juhovainio October 5, 2026 07:50
@juhovainio

Copy link
Copy Markdown
Collaborator

I read through this PR in full (the new advised_commands.rs scanner, the three dashboard label fixes, the README tweak, and the new argv-tying unit test) against AGENTS.md/CONTRIBUTING.md and didn't find anything I'd block on.

What I checked specifically:

  • The three claimed CLI bugs are real and the fixes are correct: rocm install --channel/--format needs the nested sdk subcommand to be valid, rocm update --check isn't a flag (bare rocm update already does the check), and rocm doctor isn't a real subcommand (only a natural-language-planner alias) — confirmed directly against apps/rocm/src/main.rs's Command enum rather than taking the PR body's word for it.
  • The new scanner's extraction logic (backtick-span parity, literal-invocation detection skipping comments/#[cfg(test)], synopsis expansion for [...]/a|b/ellipsis, placeholder substitution) looks sound on a manual trace, and it's routed through the real clap parsing entry points rather than a reimplementation.
  • The NOT_INVOCATIONS exclusion list entries all look like genuinely non-advice text (comments, unrelated prose), not a cover for a real gap — and there's a dedicated test (exclusions_still_match_something) guarding against an exclusion going stale.
  • The new rocm_runs_labels_name_what_each_manager_spawns test genuinely ties the dashboard labels to the real argv-producing code (EXAMINE_ARGS, UpdateAction::Check.args(), build_args()) rather than just restating the string.
  • Scope is tight (one logical change: advised-command drift), no internal-content leaks, test-only module is properly #[cfg(test)]-gated.

This looks safe to approve after final validation (CI green, a maintainer's own pass) — this is a diff-only read on my end, not a substitute for that.

juhovainio
juhovainio previously approved these changes Oct 5, 2026

@juhovainio juhovainio 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.

Reviewed the full diff (the new advised_commands.rs scanner, the three dashboard label fixes, the README tweak, and the new argv-tying unit test) against AGENTS.md/CONTRIBUTING.md. No blocking issues.

What I checked:

  • The three claimed CLI bugs are real and the fixes are correct: rocm install --channel/--format needs the nested sdk subcommand, rocm update --check isn't a flag (bare rocm update already does the check), and rocm doctor isn't a real subcommand (only a natural-language-planner alias) — confirmed directly against apps/rocm/src/main.rs's Command enum rather than trusting the PR body.
  • The scanner's extraction logic (backtick-span parity, literal-invocation detection skipping comments/#[cfg(test)], synopsis expansion, placeholder substitution) looks sound and is routed through the real clap parsing entry points, not a reimplementation.
  • NOT_INVOCATIONS entries all look like genuinely non-advice text, and there's a dedicated test guarding against an exclusion going stale.
  • The new rocm_runs_labels_name_what_each_manager_spawns test genuinely ties the dashboard labels to the real argv-producing code, not just a restated string.
  • Scope is tight, no internal-content leaks, test-only module is properly #[cfg(test)]-gated.

Looks good to merge pending CI.

@rominf
rominf added this pull request to the merge queue Oct 5, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Oct 5, 2026
@rominf

rominf commented Oct 5, 2026

Copy link
Copy Markdown
Collaborator Author

The merge-queue run failed on every_advised_command_parses. It flagged rocm diagnose --model {}: {} in crates/rocm-core/src/model_readiness.rs, which arrived on main with #407 after this branch was approved. That line is the heading of the model-readiness report (<command>: <verdict>), not advice to run anything, so it's now in NOT_INVOCATIONS with that reason (ca0e0ada), next to the other status headings. I rebased onto current main (5c4f401d) first, since the exclusion has to match text that exists on the branch, and confirmed it's the only new hit. The CodeQL failure in that run was a side effect: its upload failed because the queue branch had already been deleted on ejection.

Verified locally: advised_commands (7), xtask (255), e2e-cucumber lib and feature_naming, cargo check --test e2e, and clippy -D warnings for both --all-targets and --test e2e. The push moves the head past the existing approval, so this needs a re-approval before it can go back into the queue.

@rominf
rominf force-pushed the test/advised-commands-parse branch from 2e88b6c to ca0e0ad Compare October 5, 2026 13:31

@siloteemu siloteemu left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🔴 Automated review · pr-review-watcher · ca0e0ad

This automation never files a GitHub approval, so no approving review will
appear here whatever the outcome — the merge decision stays with a human
reviewer.

Review — no blocking findings

Full review of the whole change.
Closes #534 completely: the three wrong dashboard Runs: labels and the README rocm storage synopsis are fixed, and the new check is what found them.

Blocking

None

Non-blocking

  • The checker lets some commands through that clap would reject, and the docs say it checks "every" command — apps/rocm/src/advised_commands.rs:462-473, apps/rocm/src/advised_commands.rs:992-995, apps/rocm/src/advised_commands.rs:1036, docs/testing.md:118-142
    To test this I added a fenced block to a scratch doc under docs/ and ran every_advised_command_parses. Only the bare rocm frobnicate line was reported. Three lines that would fail for a user passed:

    • rocm update && rocm frobnicate --x: command_part cuts the line at &&, so only the first command is checked. The same happens at ;, | and ||.
    • rocm install sdk --channel release --bogus-flag: command_part also cuts at a double space, so the bad flag is never seen.
    • rocm frobnicate <TEXT>: the checker's own placeholder fills <TEXT> with "start a local model". That value contains whitespace, so is_deliberate_natural_language accepts it as a deliberate natural-language request. A removed subcommand with a required text-like argument is therefore never caught. Advice like this only exists today as rocm --yes <request>, so this is latent, not a current miss.

    docs/testing.md says the test "checks every command that the CLI or its docs tell a user to run" and that "a command that clap rejects" fails it. The cases above show both statements are wider than what the code does. The same section says every_source_is_scanned "requires each source to still yield a known command". In the code (advised_commands.rs:1117-1152), only the help and Rust sources are checked for a named command. Markdown and tapes are checked by count alone.
    Confidence 100 (reproduced by running the test) · logic · Fix: the code should govern, because it is what actually runs. Three options:

    • Check every &&/;-separated rocm segment.
    • Stop cutting at a double space for anything except help EXAMPLES rows.
    • Only accept a request as deliberate natural language when the multi-word value came from the advice text, not from a filled-in placeholder.

    Otherwise, list these limits in docs/testing.md the way that file already lists the blind spots of the environment-test scan, and correct the every_source_is_scanned sentence.

Decisions for the author

  • A text scanner over source code, versus structured advice — tradeoff
    advised_commands.rs finds advice by reading Rust and Markdown as text. It works line by line, matches labels like next step:, and skips #[cfg(test)] items by counting braces. That needs no change to production code and covers every surface today, including help and tapes.
    The cost is that each heuristic has edges that pass silently:

    • A rocm … line inside a raw or multi-line Rust string is never extracted.
    • A backtick span that wraps across lines in rendered help is dropped.
    • A { or } inside a string within a #[cfg(test)] item could make the skip run to the end of the file.

    The other choice is to keep advice in typed constants that tests can list, which is more reliable but means changing every call site. The minimum-count floors are a reasonable backstop. Confirm the text approach is deliberate.

  • The Install label test checks only a prefix and the flag names — tradeoff
    rocm_runs_labels_name_what_each_manager_spawns checks that the label starts with rocm install sdk and contains --channel and --format. A label with literal values, extra flags or reordered flags would still pass. The flag list is written out by hand rather than taken from build_args(). Exact matching is impossible because the label shows … for values the user picks, so a partial check is defensible. Confirm it is enough.

Positive signals

  • The Update and Examine labels are checked against what the screen actually runs (UpdateAction::Check.args() and the new EXAMINE_ARGS, which run_examine now uses), so the test proves the label is true rather than pinning a string. I confirmed each of the three label fixes is caught on its own: putting each old label back one at a time made the test fail at rocm.rs:207, :212 and :225.
  • rocmd_verdict appends --help, so Cli::try_parse_from stops at the parser before the tokio runtime is built. rocmd advice is checked against the real definition without running anything.
  • Each NOT_INVOCATIONS entry is keyed by file plus exact text and carries a reason. exclusions_still_match_something keeps the list from going stale.

Deployment notes

None

What this covered

I read every file in the change in full: all 1,354 lines of advised_commands.rs, the four dash-tui files, and the README and docs/testing.md hunks. I also read the routing in apps/rocm/src/main.rs that the checker reuses (run, parse_freeform_invocation, should_treat_as_freeform, command_invocation_error, cli_command), the clap definitions for storage, install sdk, update and examine, and rocmd::run_from_args. Range: 2d45c61…ca0e0ada.

Tests I ran:

  • cargo test -p rocm --bin rocm advised_commands: 7 passed, 1 ignored.
  • The three-way revert of the labels described above.
  • The false-pass probe described in the finding, using a scratch doc that I deleted afterwards.

The four code passes ran as separate read-only workers. History, agent-instruction adherence and code-comment compliance ran as one combined worker. I did not run separate Step 7 workers for the design questions. I settled those myself from the worker reports and my own runs, so that step was not independent. The prior-changes pass did not run, because earlier reviews of these files are not readable from here.

CI at review time: E2E tests (MI300X) and E2E tests (MI350P) were still queued and had not reported, so nothing here rests on them. Skill checks (skillscope) had not reported at handoff and has since reported as skipped. Every other check passed.

The PR text explains why there is no Gherkin scenario (the dashboard fix changes display text only, and dash-01 does not assert the Runs: text), as AGENTS.md §3 requires. The leak scan of the diff found nothing beyond the license headers and sign-off identities.

This review was not reconciled against the PR discussion.

@rominf
rominf force-pushed the test/advised-commands-parse branch from ca0e0ad to 9ad9f3d Compare October 6, 2026 13:46
@rominf

rominf commented Oct 6, 2026

Copy link
Copy Markdown
Collaborator Author

Addressing the automated review on ca0e0ada. Rebased onto f9a80117 (now 9ad9f3d5). All three false passes reproduced and are fixed in b24da211 and 0fa6ba49, each with a fixture test that fails when its fix is reverted:

  1. Shell lists. Advice is now split at &&, ||, ; and a standalone |, but not inside quotes, <…>, […] or {…}, and stop|restart stays intact. Every part that runs rocm/rocmd is checked, and parts for other tools are skipped. rocm update && rocm frobnicate --x is now a finding.
  2. Double space. It is no longer a general cut. Only the description column of EXAMPLES rows needs it, so it now applies only to an indented row: the rendered help and the after_help literal those rows are written in. rocm install sdk --channel release --bogus-flag is now a finding. README's aligned synopsis rows are also checked past their padding now, and all of them parse.
  3. Placeholder-filled requests. Each argv word now remembers the advice word it came from. A natural-language verdict counts as deliberate only if the advice itself is multi-word (a quoted request or <natural language request>), so rocm frobnicate <TEXT> is now a finding.

8ee20a46 makes docs/testing.md state exactly what is scanned and checked. every_source_is_scanned now also requires Markdown and tapes to yield a named command, not just a count.

The rebase surfaced a semantic conflict with main. Main's out-of-memory recipes (#251) advise rocm serve <model> <case-appropriate options above>. The checker filled that placeholder with an invented value, which clap rejects. 9ad9f3d5 treats a placeholder that names options as standing for no arguments, so rocm serve <model> is still checked rather than excluded; disabling the rule fails both its unit test and the full-tree check. The same commit lists two prose notes from #384 that open with rocm serve/rocm chat as not advice.

On the two decisions:

(a) Text scanner vs typed advice constants: deliberate. A scanner needs no production change and reaches help output, tapes and docs, which typed constants could not. The per-source named-command checks and count floors guard against an extractor going blind. The edges you listed are now in a "Known gaps" list in docs/testing.md:

  • raw or multi-line Rust strings
  • backtick spans wrapped across lines in a Rust string
  • {/} inside strings in a #[cfg(test)] item throwing off the skip

(b) Install label: tightened in c79e9f7e. The expected label is now built from build_args() on the default form: the subcommand, then every value flag with its value shown as …. Mode switches such as --dry-run and the approval flag are left out, since they depend on what the user picks. The comparison is exact, so an added, dropped or invented flag fails it.

Re-ran locally on the rebased head, all clean:

  • rocm --bin rocm (1024 passed), xtask (271), e2e-cucumber lib (136), feature_naming and the --test e2e check
  • both clippy invocations and fmt

@rominf
rominf dismissed juhovainio’s stale review October 8, 2026 13:39

Stale: approved 2e88b6c; head is now 9ad9f3d, so a fresh look is needed on the current head. Since the approval: rebased onto main, with a model-readiness exemption for a semantic conflict (b6b9500); the automated review's three false passes closed: shell lists, double space, placeholder-filled requests (b24da21, 0fa6ba4); docs say exactly what is checked (8ee20a4); the Install label is derived from build_args() (c79e9f7); and an options-placeholder rule for a second semantic conflict with main's OOM recipes (9ad9f3d).

@rominf
rominf force-pushed the test/advised-commands-parse branch from 9ad9f3d to 4c69543 Compare October 9, 2026 07:20
@rominf

rominf commented Oct 9, 2026

Copy link
Copy Markdown
Collaborator Author

Rebased onto 5eca5a66 (now 4c695435), with one new commit for a semantic conflict that the textual merge did not show.

Earlier extractions on main (#483, #487, #528) moved four strings this check excludes out of apps/rocmd/src/lib.rs and crates/rocm-core/src/lib.rs into sandbox.rs, service.rs and host_gpu.rs:

  • rocmd executable has no parent directory
  • rocmd automation supervisor started / … stopped
  • rocm debug: command capture …

Exclusions are keyed by file, so after the move the checker reported those strings as advice that does not parse, and the old entries as matching nothing. The branch still merged cleanly into main; I found this by running the checker against a merge of current main. 4c695435 points the four entries at their new files.

Re-ran locally:

  • clean: fmt; xtask; e2e-cucumber --lib, feature_naming and check --test e2e; both clippy invocations
  • rocm --bin rocm 1023 tests, all passing on 3/3 runs when alternated with unmodified main under the same load. animated_spinner_keeps_ticking_without_progress_calls failed twice at peak load from concurrent builds; it is a 60 ms timing test that this PR does not touch.

jussielo-amd
jussielo-amd previously approved these changes Oct 12, 2026

@jussielo-amd jussielo-amd 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.

Reviewed the full diff (origin/main...HEAD at commit 4c69543) covering the new apps/rocm/src/advised_commands.rs scanner, the three dashboard Runs: label fixes in crates/rocm-dash-tui/src/ui/tabs/rocm.rs, the README storage synopsis fix, and the docs/testing.md addition.

This PR already had two review rounds. @juhovainio approved (dismissed by a later push) at 2e88b6c, and an automated review at ca0e0ada flagged three non-blocking precision gaps in the scanner (shell-list splitting only checking the first command, a double-space cut hiding bad flags, and a filled-in placeholder being misread as a deliberate natural-language request) plus a note that the Install label test only checked a prefix and hard-coded flag names. I verified each of these against the current HEAD rather than trusting the earlier review's resolution: split_shell_list() (apps/rocm/src/advised_commands.rs:490) now splits on &&/||/;/bare |, the double-space cut in command_part is now gated to indented EXAMPLES rows only (advised_commands.rs:432-434), is_deliberate_natural_language (advised_commands.rs:1150) now checks whether the request words are multi-word in the advised text rather than the substituted placeholder, and rocm_runs_labels_name_what_each_manager_spawns in rocm.rs:191 now derives the expected Install label from InstallManagerState::build_args() rather than a hand-written prefix/flag check. All four corresponding regression tests (every_command_in_a_shell_list_is_checked, a_double_space_does_not_hide_the_rest_of_a_command, only_advised_text_makes_a_request_deliberate, and the updated dash-tui test) pass locally. The prior findings are resolved.

My own pass surfaced a few more precision gaps in the scanner, none of which are currently triggered by any shipped advice text: may_omit_required_values (advised_commands.rs:1179) suppresses the missing-argument check if any word in the command ends in an ellipsis, not specifically the word next to the omitted value; rust_production_lines's #[cfg(test)] skip (advised_commands.rs:199) only matches when the attribute is the entire trimmed line, so a one-line #[cfg(test)] fn ... would be scanned as production text (no such one-liner exists in the tree today); and the new rocm_runs_labels_name_what_each_manager_spawns loop in rocm.rs:202 has no arm for a trailing boolean flag with no value after it, so it only passes today because --dry-run happens to be last in build_args(). These are all in the same spirit as the scanner's already-documented "Known gaps" in docs/testing.md:166, and worth a follow-up, but none produce a wrong result against the advice text that exists in the repo right now, and the core bugs this PR set out to fix (the three wrong dashboard labels and the README synopsis) are correctly fixed and verified against the actual clap definitions.

The "no Gherkin scenario" justification in the PR body holds: this changes display-only text in the ROCm tab's detail pane, not spawned behavior, and the new unit test ties each label to the real argv the manager builds rather than pinning a string.

CI is green except for E2E tests (MI300X), which fails on bench-load-real-serve, chat-end-to-end-local-model, serve-vllm-inference, and the live ROCm-10 install scenario — all GPU-hardware-dependent serving/install paths this diff does not touch (it only touches the CLI advice scanner and dashboard label strings), so this looks like a pre-existing hardware/infra flake rather than a regression from this change.

No blocking issues. Approving.

@rominf
rominf added this pull request to the merge queue Oct 12, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Oct 12, 2026
@rominf
rominf force-pushed the test/advised-commands-parse branch from 4c69543 to fb7bad2 Compare October 12, 2026 17:54
@rominf

rominf commented Oct 12, 2026 •

Copy link
Copy Markdown
Collaborator Author

The merge queue ejected this on 4c695435. On main merged with this branch, every_advised_command_parses failed on two lines from apps/rocm/src/deletion_properties.rs, which #562 added: a comment mentioning rocm dirs, and an ignore reason starting rocm uninstall applies no guard …. That file is test-only, declared as #[cfg(all(test, unix))] mod deletion_properties;. The scanner skipped only *tests.rs files and items gated on exactly #[cfg(test)].

Rebased onto main ec07bf7a; the head is now fb7bad26.

  • fb7bad26: the scanner now skips every file declared only as a test module, following #[path] (test: property-test every archive extractor against the filesystem #559's archive_props.rs is declared that way), and treats #[cfg(all(test, …))] items like #[cfg(test)] ones.
  • Tests: test_only_module_files_follow_the_declaration and an_item_gated_on_all_test_is_not_production_text. Removing the file skip fails every_advised_command_parses; narrowing the cfg check fails three tests; ignoring #[path] fails the declaration test.
  • Docs: the module doc and docs/testing.md now say what is skipped.

The approval's three precision notes are separate from this fix and will follow in a separate PR:

  • the ellipsis check;
  • a one-line #[cfg(test)] fn … still being scanned, because the in-file skip matches only a whole-line attribute;
  • the trailing boolean flag in the dashboard label test.

Verified locally:

  • fmt
  • rocm --bin rocm (1056), rocm-dash-tui, rocm-core --features e2e-test-hooks, xtask and e2e-cucumber lib, plus feature_naming
  • check --test e2e
  • both clippy invocations, on Linux and for x86_64-pc-windows-gnu

@rominf
rominf dismissed jussielo-amd’s stale review October 12, 2026 17:54

This approved 4c69543. The head is now fb7bad2: a rebase onto main ec07bf7, plus fb7bad2, which makes the advice scanner skip test-only module files. The queue ejected 4c69543 because #562's deletion_properties.rs read as advice. A fresh approval is needed on the current head.

@siloteemu siloteemu left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🔴 Automated review · pr-review-watcher · fb7bad2

This automation never files a GitHub approval, so no approving review will
appear here whatever the outcome — the merge decision stays with a human
reviewer.

Review — needs work

Full review of the whole change (prw-base...HEAD, 14 commits, 8 files).
Fixes #534 (dashboard Runs: labels that do not parse, plus a README synopsis). The change also adds the advised-command checker that the issue's root cause calls for, which the description covers.

Blocking

  • new · A removed subcommand followed by a quoted multi-word argument passes as "deliberate natural language" — apps/rocm/src/advised_commands.rs:1222-1230 (call site :1276), docs/testing.md:148-152
    is_deliberate_natural_language ends in request_words.iter().any(|word| word.advised.contains(char::is_whitespace)), so a quoted word anywhere in the request counts. Real routing (command_invocation_error, apps/rocm/src/main.rs:1689) treats the request as prose only when its first word has whitespace. I ran a scratch fixture: rocm frobnicate "two words" yields 0 findings, while rocm frobnicate <TEXT> yields 1. docs/testing.md promises that "a removed subcommand that took a text argument ... still fails". That holds for a placeholder but not for a quoted argument. No self-test covers the any: only_advised_text_makes_a_request_deliberate uses only <TEXT>. The code is the side that governs, because the doc states the intent and the PR description lists "a single word falls through to the planner" as a failure condition.
    Confidence 100 · logic · Fix: judge only the first request word, which is what real routing judges. Add rocm frobnicate "two words" as a failing fixture.

  • new · rocmd commands are checked with --help appended, which skips conflict and required-argument validation, and the docs do not say so — apps/rocm/src/advised_commands.rs:1032-1050, docs/testing.md:147 (and the "every command that runs rocm or rocmd is checked" sentence at :135)
    clap returns DisplayHelp before it validates conflicts_with and required arguments. Scratch fixture: rocmd supervise x --engine e --model-ref m --canonical-model-id c --port 1 --runtime-id a --env-id b yields 0 findings. The two ids are declared conflicting in apps/rocmd/src/cli.rs:38-40. rocmd frobnicate yields 1.
    The code comment admits that missing required values are not checked, but nothing admits conflicts. docs/testing.md lists "a command that clap rejects" with no rocmd caveat, and its known-gaps list omits this. Only two self-tests touch rocmd, and both use an unknown flag. The behaviour is a deliberate trade, so the docs must say it. Alternatively, close the gap by parsing without --help where possible.
    Confidence 100 · logic · Fix: state the limitation (unknown words and invalid values only) in docs/testing.md, or close it. Add a self-test that pins whichever is chosen.

  • new · Two branches of the Markdown extractor can be broken with every test still green — apps/rocm/src/advised_commands.rs:362-363 ($ and PS> prefix stripping), :388 (wrapped inline-span joining)
    I ran each mutation alone against cargo test -p rocm --bin rocm advised_commands:

    • Replacing both prefixes with non-matching strings leaves 13 passed, 0 failed.
    • Changing % 2 == 1 to % 2 == 7 leaves 13 passed, 0 failed.
    • By contrast, disabling fenced \/` continuation does turn every_advised_command_parses red, through real docs content.

    The floors in every_source_is_scanned are far looser than one branch, and no self-test feeds these shapes. The description says "Every guard was mutation-checked". These two were not, or were not pinned by a test. Advice written behind a $ prompt or in a wrapped span is then silently unchecked.
    Confidence 100 · logic · Fix: add a self-test for extract_markdown covering a $ /PS> fenced line and a span wrapped across two lines, each with a bad command that must be reported.

  • new · The dashboard Runs: text change has no Gherkin scenario, and the stated exemption is not one the rule allows — crates/rocm-dash-tui/src/ui/tabs/rocm.rs:33,47,57,61, crates/rocm-dash-tui/src/ui/tabs/pane.rs:273; AGENTS.md §3
    §3 requires a scenario for anything a user of the CLI can observe. It says a unit test on the helper "does NOT discharge this", and its only exemption is purely internal changes (refactors, CI plumbing, docs). The PR text argues the labels are "display-only text" proved by a unit test, and notes that dash-01 does not assert Runs:. Rendered text in the ROCm tab is what the user sees. The new test reads the VERBS data rather than the rendered line, so it would stay green if pane.rs stopped printing cmd. A scenario is cheap to add: dash-01 (tests/e2e-cucumber/features/dash.feature:8) already opens the ROCm tab.
    Confidence 75 · architectural · Fix: extend dash-01, or add a sibling scenario, to assert one corrected Runs: line (for example Runs: rocm examine) with its step definition. Or have the PR text name a lane that cannot run it.

Non-blocking

  • new · A fenced line ending in \ leaks state across the closing fence and EOF — apps/rocm/src/advised_commands.rs:337-399
    The closing fence takes the continue at the fence test without clearing pending, and EOF never flushes it. The stranded command is not checked, and the next fence's first line is glued onto it: rocm serve foo \ as the last line of a fence becomes rocm serve foo rocm examine. This is latent today.
    Confidence 70 · logic · Fix: clear pending (after pushing it) on a fence line and at EOF.

  • new · Wrapped inline spans in --help output are not seen, and the known-gaps list omits this — apps/rocm/src/advised_commands.rs:515-531, docs/testing.md "Known gaps"
    help.lines() is scanned span by span, and clap wraps at a fixed width. A span broken across lines leaves an odd backtick on each and is dropped. A wrapped EXAMPLES row is checked only up to the wrap. Markdown wrapping is handled and help wrapping is not.
    Confidence 70 · logic · Fix: add it to the known gaps, or join wrapped help lines as Markdown prose is joined.

  • new · Synopsis expansion mishandles a group whose first word is a|b, and nested groups — apps/rocm/src/advised_commands.rs:840-867
    [a|b] as the first word of a group extends current with both values (argv ... a b) instead of branching. [report [--json]] closes at the first ], so rocm storage report alone is never tried. Nothing in the current docs uses the first-word form. synopsis_notation_expands_to_each_documented_form covers neither case, including the README form this PR introduces.
    Confidence 70 · logic · Fix: test and handle both forms, or list them as known gaps.

  • new · "Comments are skipped" overclaims — docs/testing.md:126, apps/rocm/src/advised_commands.rs:292
    Only whole-line // comments are dropped. A trailing // ... \rocm x`comment or a/* */block on a production line is scanned, becausebacktick_spans` runs over the whole line. The code governs; narrow the doc.
    Confidence 70 · mechanical.

  • new · The label test's docstring promises more than it checks — crates/rocm-dash-tui/src/ui/tabs/rocm.rs:198-200, loop at :224-236
    "a user who copies it to a shell gets the same command" cannot hold for the Install label:

    • It contains ….
    • The form defaults to --dry-run, which the derivation drops, as it does any boolean flag.
    • --prefix is never exercised, because the default is empty.

    I mutated the Update label back to rocm update --check and the test went red, so the claimed regression coverage is real. Only the docstring is too wide.
    Confidence 70 · mechanical · Fix: narrow it to "names the subcommand and value flags".

  • new · Brittle and redundant bits in the new test file — apps/rocm/src/advised_commands.rs:457, :1610, :1441-1450

    • name == "advised_commands.rs" is already covered by the #[cfg(test)] mod advised_commands; declaration.
    • #[cfg(test)] on fixture sits in a module that is already test-only.
    • checker_rejects_what_users_would_hit uses rocm doctor and rocm update --check as negatives. A future legitimate doctor alias or --check flag would break it for no regression reason. Other tests use frobnicate.

    Confidence 70 · mechanical.

  • new · Commit history carries follow-up noise — e2827e5, c9f568a, 632877c, e06c2c8
    These read as fixups of d3389bb: a clippy fix, a one-line test pin with no body, and doc and rustfmt follow-ups. The catch-up commits (4179081, ebb5575, 0e0216f, fb7bad2) explain themselves.
    Confidence 70 · mechanical · Fix: fixup-squash before merge if history cleanliness matters here.

Decisions for the author

  • Text scanner over Rust source versus typed advice constants — tradeoff
    The scanner reaches README, docs, skills, tapes and Rust literals with one mechanism and needs no refactor. The cost is a lexer with documented gaps and a hand-maintained NOT_INVOCATIONS list. About 15 of its 27 entries today are error, log or heading text, so an unrelated PR that adds bail!("rocm serve failed: ...") will fail this test and need an entry. The failure is loud and its message says what to do. Exclusions are keyed by file plus exact text, so they cannot go stale silently. A typed-constant registry would drop the lexer but means changing hundreds of call sites. Confirm the recurring cost is accepted.

  • The routing replica mirrors run()'s sequence rather than calling one shared function — non-blocking-improvement
    rocm_verdict (advised_commands.rs:1011-1030) calls the real helpers but repeats the order from apps/rocm/src/main.rs:1443-1470. It already omits the approve bail. No false pass results today, because Cli has no top-level --yes. A pre-dispatch step added to run() later would not be mirrored. A small shared route() helper used by both would remove the drift risk.

  • One PR for a label fix and a 1,790-line checker — tradeoff
    The fixes are exactly what the checker finds, and it cannot land green without them, so one change is defensible. The PR explains this. Against that, a small user-visible bug fix and a large test framework review differently. A fix PR followed by a stacked checker PR would be easier to read. AGENTS.md §11 does not forbid either.

Positive signals

  • rocm_runs_labels_name_what_each_manager_spawns derives its expected labels from build_args(), UpdateAction::Check.args() and the new EXAMINE_ARGS that run_examine actually consumes, not from a second hard-coded copy. Reverting the Update label turns it red.
  • rocm_verdict calls the real parse_freeform_invocation, should_treat_as_freeform, command_invocation_error and cli_command() instead of re-implementing routing.
  • Exclusions are keyed by (file, exact text) with exclusions_still_match_something, so moved or edited text fails loudly instead of going stale.
  • service_action_retry_advice_parses_for_generated_ids runs the real message function over a character-class corpus and asserts the exact argv. That makes excluding the templated line honest.
  • The checker found a real README defect: rocm storage [report] [--json] implied a rejected rocm storage --json. The fix matches StorageCommand::Report { json }.

Deployment notes

None.

What this covered

I read every file in the change completely: apps/rocm/src/advised_commands.rs, the main.rs module declaration, the four rocm-dash-tui files, docs/testing.md and the README hunk. I also read the clap definitions and routing in apps/rocm/src/main.rs, apps/rocmd/src/cli.rs, and the dashboard pane renderer. All of it was read against ee3131be…fb7bad26 (prw-base...HEAD, merge base ec07bf7a…).

Four read-only workers covered the scanner, the dashboard labels, the source-reading passes and the design questions. I ran:

  • cargo test -p rocm --bin rocm advised_commands (13 passed, 1 ignored)
  • cargo test -p rocm-dash-tui rocm_runs_labels (1 passed)
  • scratch fixtures for the first two blocking findings
  • single-branch mutations of the Markdown extractor and of the Update label

I read the description and #534 after the findings were settled. The description's "every guard was mutation-checked" claim is partly contradicted by the third blocking finding.

CI at this head (live rollup): E2E tests (Strix Halo, Ubuntu) (release) and E2E tests (Strix Halo, Ubuntu) (nightly) concluded CANCELLED, and Skill checks (skillscope) was SKIPPED. None of the three passed. I did not establish why, and a cancelled or skipped check is not evidence for or against the change. All other checks concluded SUCCESS, including clippy, prek, build-and-test, windows-build-and-test, MI300X, Strix Halo Windows and WSL2 E2E, coverage, docs and signatures.

Did not run:

  • A full-workspace test, clippy, or scripts/smoke_local.py.
  • Windows-specific behaviour, which was reviewed by reading only; the Windows CI lane passed.

The "Prior changes" pass made two API queries for review comments on earlier changes to the touched dashboard file and found none. Not reconciled against any discussion on the PR here.

@rominf

rominf commented Oct 13, 2026

Copy link
Copy Markdown
Collaborator Author

Rebased onto main 10345e7e; the head is now dc06c3c9. That rebase surfaced three semantic conflicts with code main moved, and this push also addresses the automated review of fb7bad26.

Rebase catch-up

Blocking

  1. Quoted multi-word argument. is_deliberate_natural_language now judges only the first request word, as real routing does. rocm frobnicate "two words" is a failing fixture in only_advised_text_makes_a_request_deliberate.
  2. rocmd and --help. Closed rather than documented. rocmd now exposes a parse_args that runs nothing, and the check uses it, so rocmd advice gets full clap validation. checker_rejects_what_users_would_hit pins conflicting --runtime-id --env-id as rejected and a missing required value as incomplete.
  3. Markdown branches. every_markdown_shape_is_extracted_and_checked puts a removed subcommand in each shape (inline, wrapped span, $ , PS> and \-continued) and requires each to be reported.
  4. Scenario. dash-01 (@id:dash-opens-and-navigates) now selects the diagnose action and asserts Runs: rocm examine, and that no rocm doctor appears. It fails against cmd: "rocm doctor". I extended dash-01 rather than adding a sibling, to avoid another terminal session on the no-GPU lane. It runs on the Linux lanes (@requires-os:linux).

Non-blocking

  • A \ continuation is flushed at a closing fence and at end of file.
  • Spans broken across help lines are joined; a broken EXAMPLES row is listed in Known gaps.
  • A value list first in a group now branches, and nested groups try each prefix.
  • The "Comments are skipped" claim, the label-test docstring, the redundant skip and cfg(test), and the doctor/--check negatives are fixed as suggested.
  • History is left as is, since the PR lands as a squash commit.

Decisions: I accept the recurring cost of maintaining NOT_INVOCATIONS, since a failure is loud and says what to do. A shared route() helper would be a fair follow-up.

Each new test was checked by breaking the code it covers. Verified locally:

  • fmt
  • tests for rocm --bin (1112), rocm-dash-tui, rocm-core (622), rocmd (132), xtask (252) and e2e-cucumber lib (142), plus feature_naming
  • check --test e2e
  • both clippy invocations, on Linux and for x86_64-pc-windows-gnu

The one local failure was the known spinner timing flake.

@rominf
rominf force-pushed the test/advised-commands-parse branch from fb7bad2 to dc06c3c Compare October 13, 2026 18:10
@rominf
rominf dismissed siloteemu’s stale review October 13, 2026 18:53

Addressed on dc06c3c (rebased onto 10345e7). Each blocking finding is answered point by point in the PR comment of 2026-10-13 18:10 UTC.

The ROCm tab's "Runs:" line named commands that do not exist:
`rocm install --channel … --format …` (the install manager runs
`rocm install sdk …`; clap rejects --channel on `install`),
`rocm update --check` (no such flag; the manager runs `rocm update`),
and `rocm doctor` (not a subcommand; from a shell it reaches the
natural-language planner and prints "No ROCm action matched"; the
manager runs `rocm examine`). A user copying them hits an error.

The README storage synopsis `rocm storage [report] [--json]` implied
`rocm storage --json`, which clap rejects: --json belongs to `report`.

Signed-off-by: Roman Inflianskas <Roman.Inflianskas@amd.com>
Remediation and help text name commands for users to run, but tests only
pin the wording, so a renamed flag or removed subcommand strands users
silently. Enumerate every advised invocation (rendered --help of every
visible command, production Rust string literals, README/docs/skills
markdown, VHS tapes), substitute placeholders, and route each through
the same entry points run() uses: the natural-language router, then the
real clap tree (rocmd via its own parser).

A single-word request that falls through to the planner is flagged too:
it means the advised subcommand does not exist. Templated retry advice
for services stop/restart is checked through the real message function
for every engine and every character class a model ref can contribute.

Signed-off-by: Roman Inflianskas <Roman.Inflianskas@amd.com>
Also apply rustfmt to the new module.

Signed-off-by: Roman Inflianskas <Roman.Inflianskas@amd.com>
A label that parses is not a label that is true. Pin each label to the
argv its manager builds: Update to UpdateAction::Check, doctor to the
examine screen's argv (now one EXAMINE_ARGS constant), and Install to
build_args()'s subcommand and value flags.

Signed-off-by: Roman Inflianskas <Roman.Inflianskas@amd.com>
A missing required argument was always accepted as a prose reference, so
if a command gained a required argument every bare copy of it in RECIPES,
next-step lines, fenced examples and help EXAMPLES would stay green.
Record which kind of text each invocation came from and allow the
omission only in inline prose spans or text that marks it with an
ellipsis.

A single total floor also let one extractor break silently while the
others kept the count up; require each source to still yield a known
command and a minimum count. Skip clap's generated help subcommand so a
help-text problem is reported once.

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

Signed-off-by: Roman Inflianskas <Roman.Inflianskas@amd.com>
rominf added 16 commits October 17, 2026 14:50
…and check

#407 landed `render_model_readiness_text`, whose first line is
`rocm diagnose --model <ref>: <verdict>`: a heading naming the command
that produced the report, not advice to run anything. The advised-command
check reads it as an invocation, substitutes both placeholders, and fails
because `<verdict>` becomes a second positional argument. That is what
ejected this change from the merge queue once main gained #407.

Exempt it in NOT_INVOCATIONS with that reason, beside the other status
headings. It is the only new hit from rebasing onto current main.

Signed-off-by: Roman Inflianskas <Roman.Inflianskas@amd.com>
- Check every command of a shell list: split at `&&`, `||`, `;` and a
  standalone `|` (not inside quotes, `<…>`, `[…]` or `{…}`), and check
  each part that runs `rocm`/`rocmd`. Before, only the first was seen.
- Stop cutting a command at a double space. Only an indented EXAMPLES
  row (rendered help, or the after_help literal it is written in) has a
  description column after one; README synopsis rows are now checked
  past their alignment padding.
- Treat a freeform verdict as a deliberate request only when the advice
  itself is multi-word (a quoted request or `<natural language
  request>`), not when a placeholder filled in several words:
  `rocm frobnicate <TEXT>` no longer passes.

Signed-off-by: Roman Inflianskas <Roman.Inflianskas@amd.com>
Signed-off-by: Roman Inflianskas <Roman.Inflianskas@amd.com>
The section said it checks "every command" and that each source must
still yield a known command, but only help and Rust were held to a named
command; Markdown and tapes were checked by count alone. Hold those two
to a named command as well (README fenced and inline lines, the CLI
tape), and describe the shell-list split, the EXAMPLES-row column cut,
the natural-language rule, and the scanner's known gaps.

Signed-off-by: Roman Inflianskas <Roman.Inflianskas@amd.com>
The label test checked the subcommand prefix and two hard-coded flag
names, so a label that grew an invented flag still passed. Build the
expected label from the default form's argv instead: the subcommand,
then every value flag with its value elided as `…`.

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

Main's out-of-memory recipes advise
`rocm serve <model> <case-appropriate options above>`, and the checker
filled that placeholder with an invented value that clap rejects. A
placeholder naming options stands for flags the reader picks from the
text above it, so it now contributes no words and `rocm serve <model>`
is still checked.

The code object manager probe's notes start with `rocm serve/rocm chat`
as prose about what those commands load; they are listed as not advice.

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

Main's rocmd and rocm-core extractions moved four excluded log and error
strings out of `apps/rocmd/src/lib.rs` and `crates/rocm-core/src/lib.rs`
into `sandbox.rs`, `service.rs` and `host_gpu.rs`. Exclusions are keyed by
file, so the moved strings were reported as advice that does not parse
and the old entries as matching nothing. Point the entries at the
strings' new files.

Signed-off-by: Roman Inflianskas <Roman.Inflianskas@amd.com>
main gained deletion_properties.rs (#562) and archive_props.rs (#559),
declared as #[cfg(all(test, unix))] modules, the second through #[path].
Their comments and ignore reasons read as advised commands (`rocm dirs`,
`rocm uninstall applies no guard ...`), so every_advised_command_parses
failed on main merged with this branch. The scanner skipped only whole
*tests.rs files and items gated on exactly #[cfg(test)].

Skip every file declared only as a test module, following #[path], and
treat #[cfg(all(test, ...))] items like #[cfg(test)] ones. Removing either
change, or ignoring #[path], turns a test red.

Signed-off-by: Roman Inflianskas <Roman.Inflianskas@amd.com>
Main moved the service hints into service_hints.rs (#604), added the
runtime-activation retry hint (#424) and moved the labelled `stop:` line
out of a literal (#625). Re-key the services exclusion and add one for
the runtimes hint; both are format templates, so each gets a test that
checks every real value against the parser: the literal verbs callers
pass to service_action_hint (found in the source, so a new caller is
covered), and the refusal for every `rocm runtimes` subcommand taking
--restart-services, re-parsed to show following it clears the refusal.
That check is hoisted into ensure_runtime_service_restart_approved so
the test exercises the dispatch's own hint, not a copy of it.

README advertised `[--restart-services] [--yes]`, but --yes requires
--restart-services, so `rocm runtimes rollback --yes` fails. Nest the
flag, and teach the scanner nested groups: each prefix of a nested
group is now its own form, so `[--distro [NAME]]` also checks bare
--distro. The architecture doc names the hint's real verbs, so it is
checked rather than excluded.

Signed-off-by: Roman Inflianskas <Roman.Inflianskas@amd.com>
Natural language: a quoted argument after one word passed as a
deliberate request, so `rocm frobnicate "two words"` was never
reported. Judge only the first request word, which is what routing
judges.

rocmd: the check appended `--help`, and clap stops at help before it
validates conflicting or required arguments. Parse with rocmd's own
parser through a new run-nothing `rocmd::parse_args` instead, so
rocmd advice gets the same validation as rocm advice.

Markdown: the `$ `/`PS> ` prompt stripping and the wrapped-span join
had no test. Add one carrying a removed subcommand in each shape. A
`\` continuation cut off by the closing fence or the end of the file
is now checked as it stands instead of swallowing the next fence's
first line. Swap negatives that a future alias or flag could make
legitimate for `frobnicate`.

Signed-off-by: Roman Inflianskas <Roman.Inflianskas@amd.com>
A span an author breaks across `--help` lines is joined and checked,
as wrapped Markdown spans already are. In a synopsis group a value
list now branches the alternative and later words extend every branch,
so `[stop|restart <id>]` yields both forms with the id rather than
`stop restart <id>`; nested groups are tried with and without their
inner part.

Say exactly what is skipped: whole-line comments only, not a trailing
comment on a line of code. Narrow the dashboard label test's doc to
what it checks, drop a skip the test-module rule already covers, and
bring the testing guide up to date with these and the earlier fixes.

Signed-off-by: Roman Inflianskas <Roman.Inflianskas@amd.com>
The ROCm view's `Runs:` line is a command a user can copy into a shell,
and it named `rocm doctor`, which does not exist. The unit test checks
the labels against what each screen runs; this checks the rendered line
through the real TUI. It extends dash-01 rather than opening another
dashboard session on the no-GPU lane, whose dash timing scenarios are
sensitive to added load.

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

`advised_commands.rs` is declared only as `#[cfg(test)] mod advised_commands;`,
so none of its literals reach a binary. The ASCII-output contract's test-only
detection is path-based and cannot see that, so the checker's prose markers
(em dash, en dash, arrow), its ellipsis needle and a Unicode model-reference
fixture were reported as output. Exempt the file with the reason; `\u{..}`
escapes would not help, since the scan flags those too.

Signed-off-by: Roman Inflianskas <Roman.Inflianskas@amd.com>
Main moved `chat_tool_call_display_label` and its `rocm command` fallback
label out of main.rs into chat.rs. The NOT_INVOCATIONS entry still named
main.rs, so the label was reported as unparseable advice and the entry as
stale.

Signed-off-by: Roman Inflianskas <Roman.Inflianskas@amd.com>
`command_parts` cuts a command at an em dash, en dash or arrow so the
description after it is not read as arguments, but no test exercised those
markers: removing any of them passed the suite, before and after main's
ASCII conversion of CLI output. Pin each one.

Signed-off-by: Roman Inflianskas <Roman.Inflianskas@amd.com>
Main's chat/MCP-bridge extraction moved the `rocm tools: {}` status row,
the planner's natural-language phrases (`rocm install folder`, `rocm
installed at`, `rocm installed`, `rocm please`) and the `rocm` tool's
empty-argv validation error from main.rs into chat.rs, verbatim. None of
them is advice to run a command; only the file the exclusions name changes.

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

rominf commented Oct 17, 2026

Copy link
Copy Markdown
Collaborator Author

Rebased onto main d4e7c751; the head is now 90749658. None of the fallout below is a parse failure on main.

Merged with current main, cargo test -p xtask (313) and the advised_commands tests (20) pass. On the head, these also pass: fmt, the rocm tests, e2e-cucumber lib and feature_naming, and clippy on Linux and the Windows target.

@rominf
rominf force-pushed the test/advised-commands-parse branch from dc06c3c to 9074965 Compare October 17, 2026 15:13

@juhovainio juhovainio 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.

Reviewed the full diff against the current repo state (no blocking findings).

Verified by hand-tracing rather than taking the PR's claims at face value:

  • advised_commands::rocm_verdict mirrors the real dispatch in main.rs::run() (parse_freeform_invocation -> should_treat_as_freeform -> command_invocation_error) for every path I could construct. One minor divergence: rocm_verdict doesn't replicate the --yes-without-freeform-request bail, but no argv shape makes that produce a false "Parses" result since clap rejects it too, just with a different error. Non-blocking.
  • The dashboard "Runs:" label test derives its expectation from the real InstallManagerState::build_args() defaults, and I confirmed the label-building loop correctly drops the trailing dry-run flag and matches the static label. Same pattern checked for update/doctor labels.
  • ensure_runtime_service_restart_approved being hoisted out of the match arms is behaviorally identical to the inline checks it replaces, and the new standalone function is an exhaustive match over all RuntimesCommand variants, so a future variant can't silently skip the check.

Non-blocking notes:

  • The advised-command variant generator only toggles one optional flag group at a time, so it wouldn't catch a bug that only manifests when two optional flags combine. Likely an intentional tradeoff given current advice shapes, but worth a one-line mention in the "Known gaps" section alongside the other documented limitations.
  • is_test_cfg's string-prefix matching (e.g. won't match #[cfg(any(test, ...))]) is already disclosed as a known limitation of the text-scanner approach, so not a hidden defect.

CI: one failing check, Strix Halo Windows E2E (diagnose-fix-path-prepends-with-apostrophe-intact), which is a known PATH-apostrophe flake that fails identically on main and is unrelated to this diff. Everything else is green.

Scope matches issue #534 (the three broken dashboard labels + README synopsis bug), with the additional README runtimes-flag fix and the scanner module itself transparently called out in the PR description as "Also in this PR" rather than undisclosed scope creep.

Good use of real manager state (build_args()/EXAMINE_ARGS) to derive expected labels instead of re-encoding them as string literals, that's exactly what closes the gap the ticket describes.

@rominf

rominf commented Oct 21, 2026

Copy link
Copy Markdown
Collaborator Author

Thanks.

  • --yes without a freeform request: agreed, the verdict differs but no argv flips from failing to parsing, so I am leaving it.
  • Combinations of optional flags: I will add a line about them to the "Known gaps" list in docs/testing.md, in a small follow-up after this lands.
  • is_test_cfg prefix matching: already listed, as you noted.

@rominf
rominf added this pull request to the merge queue Oct 21, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Oct 21, 2026
@rominf
rominf added this pull request to the merge queue Oct 21, 2026
@rominf

rominf commented Oct 21, 2026

Copy link
Copy Markdown
Collaborator Author

The merge queue ejected this on the intermittent dashboard-quit timeouts dash-gen-tps-expiry-boundary and dash-esc-menu-quit-row-confirms-when-serving (merge-group run 39596723091, ubuntu-26.04). These also hit #668, #658, #712 and #437, and this PR does not touch them. Re-queued once.

@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Oct 21, 2026
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.

dash: ROCm tab 'Runs:' lines name commands that don't parse (install --channel, update --check, doctor)

4 participants