Skip to content

ROCMAI-486: split command-coverage audit out of consolidated.rs - #591

Merged
rominf merged 4 commits into
mainfrom
rocmai-486/split-command-coverage-cluster
Oct 9, 2026
Merged

rominf merged 4 commits into
mainfrom
rocmai-486/split-command-coverage-cluster

Conversation

@jussielo-amd

@jussielo-amd jussielo-amd commented Oct 7, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • crates/e2e-report/src/consolidated.rs bundles 5 distinct concerns in one ~2,980-line file. This is the first of a staged split (ROCMAI-486), extracting the lowest-risk cluster first.
  • Moved the CLI command-coverage audit table (which rocm commands were exercised by at least one platform, and whether they passed) into a new command_coverage.rs. It consumes consolidated::PlatformReport but shares no type with the Grid/reconciliation model, making it the most independent cluster to split off first.
  • Pure, behavior-preserving relocation: PlatformReport/CommandRecord and PlatformReport's commands/label fields and scenario_pass_map() method gain pub(crate) visibility so the new module can consume them, following this crate's existing parse.rs module-split precedent (EAI-8032). No logic changed. The split does introduce a back-edge — consolidated.rs calls into command_coverage.rs and command_coverage.rs consumes PlatformReport back — documented in docs/architecture.md rather than eliminated.
  • Updated docs/architecture.md's module map for crates/e2e-report accordingly.

Remaining split (tracked on ROCMAI-486 for a future pass)

consolidated.rs still bundles: manifest/command parsing, the Grid/PlatformReport reconciliation model, HTML rendering, and markdown rendering. These are more entangled with each other (the model is consumed by both renderers) than the command-coverage cluster was, so they need more careful planning before splitting — left for a follow-up pass rather than attempted here, to keep this PR small per ROCMAI-27's convention of one cluster per PR.

Note on overlap

Two other PRs from the same ROCMAI-200 backlog may also touch consolidated.rs around the same time (ROCMAI-484: redundant re-parsing; ROCMAI-485: status→glyph mapping evaluation). These may need a rebase against each other depending on merge order.

Test plan

  • cargo test -p e2e-report --all-targets — 54/54 pass (same count as before the split)
  • cargo clippy -p e2e-report --all-targets -- -D warnings — clean
  • cargo build --workspace — clean, no downstream breakage (xtask/tests/e2e-cucumber consume this crate)
  • cargo xtask check-architecture-doc — clean
  • No new regression test needed: this is a non-behavior-changing extraction; existing tests already cover output equivalence (pure unit tests for the moved helpers moved with them; the two command-coverage tests that stay in consolidated.rs do so because they need the private PlatformReport::load and the shared feature_json helper, both local to that module).

@jussielo-amd
jussielo-amd requested a review from a team as a code owner October 7, 2026 13:07
@jussielo-amd
jussielo-amd requested a review from fredespi October 7, 2026 13:07

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

🔴 Automated review · pr-review-watcher · c4f991d

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.
Implements the first cluster of ROCMAI-486 (the command-coverage audit split), not the rest of it. The description presents it that way and does not claim to close the ticket.

Blocking

None

Non-blocking

All findings below are new this round (first review of this PR).

  • The new module doc contradicts itself and the import below it — crates/e2e-report/src/command_coverage.rs:8-10
    The doc says the module "Consumes [crate::consolidated::PlatformReport] but shares no type with the Grid/PlatformReport reconciliation model itself". That names PlatformReport as both consumed and not shared. The code governs: line 15 imports PlatformReport, and the module reads its desc, commands, effective_channel() and scenario_pass_map(). docs/architecture.md:54 already has the accurate wording ("shares no type with the Grid/reconciliation model").
    Confidence 85 · mechanical · Fix: drop /PlatformReport from that sentence so it matches architecture.md.

  • The new module rebuilds a label PlatformReport already stores, and four visibility widenings exist only for that — crates/e2e-report/src/command_coverage.rs:154-157, :166-169; crates/e2e-report/src/consolidated.rs:27-29, :166, :438, :769
    PlatformReport::load already sets label = with_channel_suffix(&format!("{} {}", desc.platform, desc.os), versions.channel.as_deref().or(desc.channel_from_name)) (consolidated.rs:749-751). command_coverage_markdown computes the same string twice from desc.platform, desc.os, effective_channel() and with_channel_suffix. Those are the only uses that required making Descriptor and its platform/os fields, PlatformReport.desc, with_channel_suffix and effective_channel pub(crate). The duplicate was there before the move, but it now spans two files and can drift, and the widening is new in this change.
    Confidence 85 · mechanical · Fix: expose label (field or a pub(crate) fn) and use it in both loops. The four widenings above can then be reverted.

  • The test-module comment tells the history of the move and is incomplete — crates/e2e-report/src/consolidated.rs:2440-2444
    "...they now live with their code in command_coverage.rs. The two tests below stay here..." describes the change rather than the code, so it goes stale once merged. It also leaves out the third command-coverage integration test that stayed in this file, command_coverage_ties_to_scenario_not_rc (:1699).
    Confidence 70 · mechanical · Fix: delete it, or reduce it to a present-tense one-liner such as "pure helper tests live in command_coverage.rs".

  • The new architecture.md paragraph repeats the entry above it and sends readers to a ticket for the plan — docs/architecture.md:56
    Line 56 restates line 54's description of what consolidated.rs still holds, then says "see the ticket for the remaining-cluster plan". Readers of a public repo cannot open that tracker. The rocmd entry in the same doc names its pending clusters inline. The bare ticket ID itself is permitted by AGENTS.md §2.
    Confidence 70 · mechanical · Fix: fold line 56 into line 54 and name the remaining clusters inline.

  • Pre-existing, carried over by the move: the main function's doc comment sits on the wrong item and is wrong — crates/e2e-report/src/command_coverage.rs:30-37, :150
    The "Build the ... coverage table" doc is fused onto KNOWN_COMMAND_SURFACE's doc. As a result command_coverage_markdown, the module's only entry point, has no doc of its own. The misplaced text also says not-run cells are "blank", but the code renders `n/a` (:244-248, with a comment at :242-243 saying so). The code governs. This came over verbatim from prw-base, and the new module is the natural place to fix it.
    Confidence 85 · mechanical · Fix: move lines 30-37 onto command_coverage_markdown and change "blank" to "n/a".

  • Pre-existing, in the moved file: KNOWN_COMMAND_SURFACE has drifted from the CLI — crates/e2e-report/src/command_coverage.rs:47-97
    The list leaves out visible subcommands that exist in apps/rocm/src/main.rs:

    • storage report, storage remove-old-installs (:840-850)
    • services prune (:997)
    • config clear-default-engine (:1067)
    • several more config and services subcommands

    This shrinks the denominator, so the reported coverage % is inflated. This change does not alter the list.
    Confidence 85 · logic · Fix: a separate follow-up, not this PR.

Decisions for the author

  • The extraction creates a two-way dependency between sibling modules — non-blocking-improvement
    consolidated imports command_coverage_markdown, and command_coverage imports PlatformReport and with_channel_suffix back. docs/architecture.md:54 and components.rs:5-7 give an acyclic module graph as the reason for the previous split, and this one reverses that without saying so. Rust accepts the cycle.
    A cleaner boundary is possible:

    • Move CommandRecord and parse_commands into command_coverage.rs.
    • Have command_coverage_markdown take per-platform (label, &[CommandRecord], pass map) rows instead of &[PlatformReport].
    • The dependency then runs one way and no PlatformReport internals need widening.

    If you keep the current shape, one sentence in architecture.md acknowledging the back-edge would do.

  • KNOWN_COMMAND_SURFACE and command_coverage_summary are pub(crate) only for one test in consolidated.rs — tradeoff

    • Moving command_coverage_counts_against_known_surface next to its code would keep both private.
    • But that test builds its input with PlatformReport::load, which is private to consolidated, so moving it widens visibility elsewhere instead.

    Either choice is defensible.

Positive signals

  • A line-level diff of the removed block (prw-base:consolidated.rs) against command_coverage.rs shows the move is verbatim. The only differences are pub(crate) on three items, one signature rewrap, and two function-local uses hoisted to module scope. No logic drifted, and the channel-aware changes from #460 are intact.
  • The pure unit tests moved with their code, matching how parse.rs and components.rs keep their own mod tests.

Deployment notes

None. This is an internal crate relocation with no change to the rendered output or the public API (lib.rs re-exports are unchanged).

What this covered

Everything was read in full:

  • the whole diff and all of command_coverage.rs, lib.rs and docs/architecture.md
  • in consolidated.rs: every changed region, the Descriptor/PlatformReport/CommandRecord definitions and impl, the consolidated_summary_markdown call site, and all three command-coverage tests
  • workspace and crate lint configuration, coverage-floors.toml, sibling module headers, and the clap enums in apps/rocm/src/main.rs

Range: prw-base (2fdff46) … c4f991d.

Method:

  • Fan-out ran as three independent read-only workers: a code pass over the coupled group; agent-instruction, history and code-comment passes; and design questions. The driver then consolidated and re-verified each surviving finding against the source.
  • Verification was static only because of disk constraints. No cargo build, test, check or clippy was run, so no finding is scored on a run, and the description's test-plan claims (54/54 pass, clippy clean) were not reproduced.
  • Test verdicts:
    • The two moved tests are byte-identical and would pass with the change reverted. That is expected for a relocation that adds no behaviour.
    • Each moved branch is still exercised: the two moved tests cover command_base and matched_surface_command; the three tests that stay cover the markdown and summary paths.
    • The one exception is the cells.is_empty() early return (command_coverage.rs:203-205), which has no test before or after this change.
  • CI at c4f991d: every completed check succeeded (clippy, build-and-test, windows-build-and-test, Test (affected crates), architecture-doc citations, the GPU E2E lanes, and others). E2E tests (MI300X) was still queued, so that lane is unverified.

Did not run:

  • Prior-changes pass: not run, because reading earlier PRs' review comments was outside this run's scope.
  • Leak scan: run statically by a worker over the added lines, and clean apart from the permitted ticket IDs.

Disclosure: the driver saw the HEAD commit message while resolving scope, before findings were settled. The workers that produced the findings did not see it, the PR description, or ROCMAI-486. Those were read only at Step 9: ticket title, body and state, no comments.

No prompt-injection content was found. This report was not reconciled against the PR's discussion or earlier reviews.

@jussielo-amd

Copy link
Copy Markdown
Collaborator Author

Thanks for the review. Addressed in 455761c:

  • Module doc contradiction (command_coverage.rs:8-10) — dropped /PlatformReport from the sentence to match architecture.md.
  • Duplicate label computation / 4 visibility widenings — reused PlatformReport's existing label field in both loops instead of recomputing it, and reverted the Descriptor/platform/os/desc/with_channel_suffix/effective_channel widenings now that nothing outside consolidated.rs needs them (label itself is now pub(crate) instead).
  • Stale test-module comment — reduced it to a present-tense one-liner instead of enumerating tests, so it can't go stale or undercount again.
  • architecture.md redundant paragraph — folded into the main crates/e2e-report entry, remaining clusters named inline instead of pointing at the ticket.
  • Misplaced/wrong doc comment (blank → `n/a`) — moved the doc onto command_coverage_markdown and fixed the wording.
  • KNOWN_COMMAND_SURFACE drift vs. the real CLI surface — agreed, left out of this PR as you suggested; it's a denominator-correctness issue independent of the split.

On the two open decisions:

  • Two-way module dependency — kept the current shape rather than restructuring command_coverage_markdown's signature; docs/architecture.md's crates/e2e-report entry now names the back-edge explicitly (which symbols on each side) instead of leaving it unstated.
  • pub(crate)-for-one-test tradeoff (KNOWN_COMMAND_SURFACE/command_coverage_summary) — left as-is; not moving command_coverage_counts_against_known_surface out of consolidated.rs for this pass.

cargo test -p e2e-report (54/54), cargo clippy -p e2e-report --all-targets -- -D warnings, and cargo xtask check-architecture-doc all pass on 455761c.

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

🔴 Automated review · pr-review-watcher · 455761c

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.
Implements the first staged cluster (command-coverage audit) of ROCMAI-486, not the remaining model/HTML/markdown split; the description says so and does not claim to close the ticket.

Blocking

None

Non-blocking

All findings below are new this round. The previous round (at c4f991d) raised no blocking findings, so there were no standing blockers to settle.

  • The comment on where the command-coverage tests live is wrong, and the PR description repeats it — crates/e2e-report/src/consolidated.rs:2442-2444, crates/e2e-report/src/consolidated.rs:1469
    The comment says the command-coverage tests "here exercise the consolidated_summary_markdown integration pipeline instead". The test directly below it, command_coverage_counts_against_known_surface (:2447), does not go through that pipeline: it calls PlatformReport::load, then the pure helper command_coverage_summary, and asserts against KNOWN_COMMAND_SURFACE.len(). That is why consolidated::tests imports both items at :1469. The other command-coverage test that stays, command_coverage_ties_to_scenario_not_rc, sits at :1701, so the comment's "here" does not cover it either. The code governs: the test's real reason for staying is that it needs the private PlatformReport::load and the shared feature_json helper. The PR description's test-plan bullet makes the same "integration tests exercising the full pipeline" claim.
    Confidence 85 · mechanical · Fix: reword the comment, and the description bullet, to say these tests stay because they build PlatformReport through the private load and feature_json.
  • The new label field doc misdescribes the field — crates/e2e-report/src/consolidated.rs:167-169
    The doc calls label "the only piece of desc the command-coverage table needs". label is not part of desc: PlatformReport::load builds it from desc.platform/desc.os plus the manifest channel versions.channel (:751-753). The rationale "so a second module can't recompute it" is also stronger than what the code enforces; effective_channel is simply private.
    Confidence 85 · mechanical · Fix: describe it as the precomputed column label (platform, OS and effective channel), exposed so command_coverage.rs reuses it rather than reaching into desc/versions.
  • The architecture doc points at an "opening paragraph" that does not exist — docs/architecture.md:54
    The new sentence reads "Unlike components.rs, which this section's opening paragraph notes keeps the module graph acyclic…". The crates/e2e-report section is a single paragraph. The acyclicity note is an earlier clause in that same paragraph.
    Confidence 85 · mechanical · Fix: "which, as noted above, keeps the module graph acyclic".

Decisions for the author

  • Documenting the consolidated.rs ↔ command_coverage.rs back-edge instead of removing it — tradeoff
    The case for keeping it: the split stays a small, mechanical, behaviour-preserving move, and the cycle is documented in docs/architecture.md. The case against: the new module is not standalone. It reads PlatformReport's commands, label and scenario_pass_map(), while consolidated.rs calls command_coverage_markdown. Breaking the cycle later, by moving PlatformReport into its own model module, is the natural next phase of ROCMAI-486. Confirm the order is deliberate.

Positive signals

  • Reusing the label that PlatformReport::load already computes, instead of rebuilding with_channel_suffix(format!("{} {}", platform, os), effective_channel()) in the new module, keeps the coverage table's column headings from drifting from the per-platform detail sections. It also avoids widening Descriptor/desc. The two are equivalent: label is built only in load with exactly that expression, and nothing mutates it afterwards.
  • The split fixes a doc comment for command_coverage_markdown that at base was fused onto KNOWN_COMMAND_SURFACE. It also corrects "blank" to "n/a", matching what the code renders (command_coverage.rs:241).

Deployment notes

None

What this covered

  • What was read: every changed file in prw-base...455761c4 (command_coverage.rs, lib.rs and docs/architecture.md completely). For consolidated.rs: the full diff, the moved regions compared against prw-base line by line, plus PlatformReport/load/effective_channel and the test module.
  • Behaviour preserved: the removed and added hunks were diffed mechanically. Apart from visibility and doc edits, the only substitution is the column label reuse, and it was traced as equivalent.
  • Tests: 42 #[test] fns before, 40 + 2 after, with matching names. cargo test -p e2e-report passed 54/54, cargo clippy -p e2e-report --all-targets -D warnings was clean (re-run after touching the source), and cargo fmt --check was clean.
  • CI: all check-runs at 455761c succeeded. Skillscope and the Sphinx docs build were skipped, as not applicable.
  • Passes that ran: the code pass, agent-instruction adherence, history (including #460's channel-aware columns, confirmed preserved), prior changes (#433's test-colocation convention) and code comments, each as independent workers.
  • Not independent: the design review (Step 7) was run inline by the driver from the workers' evidence, not by separate workers. It produced only the one tradeoff above.
  • Description and ticket: the PR description and ROCMAI-486 were read via gh and the tracker. Ticket comments were not read.
  • Not reconciled: this report was not checked against the PR's discussion or earlier reviews here.

@jussielo-amd

Copy link
Copy Markdown
Collaborator Author

Thanks for the second round. Addressed in 03f4a74:

  • Test-module comment wrong, PR description repeated it (consolidated.rs:2442-2444, :1469) — reworded both to the real reason the two command-coverage tests stay here: they build PlatformReport through the private PlatformReport::load and the shared feature_json helper, not because they exercise the consolidated_summary_markdown pipeline.
  • label doc misdescribes the field (consolidated.rs:167-169) — reworded: label isn't part of desc, it's the precomputed platform/OS/effective-channel column label, exposed so command_coverage.rs reuses it instead of reaching into desc/versions.
  • architecture.md points at a nonexistent "opening paragraph" (docs/architecture.md:54) — changed to "as noted above".

On the standing decision — documenting the back-edge instead of removing it — still deliberate, same as last round: breaking it by moving PlatformReport into its own model module is the natural next phase of ROCMAI-486, left for a follow-up pass rather than folded into this split.

cargo test -p e2e-report (54/54), cargo clippy -p e2e-report --all-targets -- -D warnings, cargo fmt --check, and cargo xtask check-architecture-doc all pass on 03f4a74. CI is green (the one red run on "Coverage (rocm-dash crates, ratcheted)" was comfyui::tests::run_uv_logged_command_reports_concrete_log_path_on_failure, in a file this PR doesn't touch; it passed locally and on a clean rerun, confirming it was a flake, not a regression from this change).

consolidated.rs bundled 5 distinct concerns in one ~2,980-line file.
Extract the CLI command-coverage audit table (which rocm commands were
exercised, and whether they passed) into its own command_coverage.rs:
it consumes PlatformReport but shares no type with the Grid/
reconciliation model itself, making it the lowest-risk cluster to
split off first.

Pure, behavior-preserving relocation: PlatformReport/Descriptor/
CommandRecord and a few of PlatformReport's methods gain pub(crate)
visibility so the new module can consume them, following this crate's
existing parse.rs precedent; no logic changed. Pure unit tests for the
moved helpers move with them; two tests exercising the full
consolidated_summary_markdown pipeline stay in consolidated.rs.

consolidated.rs still bundles manifest/command parsing, the Grid/
PlatformReport model, and both HTML and markdown rendering - tracked
as remaining work on ROCMAI-486 for a future pass.

ROCMAI-486

Signed-off-by: Jussi Elo <jussi.elo@amd.com>
rominf's review of c4f991d flagged a duplicate label computation that
only existed to justify four new pub(crate) widenings in consolidated.rs
(Descriptor, its platform/os fields, PlatformReport.desc,
with_channel_suffix, effective_channel); PlatformReport already computes
the same label at load time. Reuse that field in command_coverage.rs and
revert the widenings now that nothing outside consolidated.rs needs them.

Also fixes a self-contradicting module doc comment, a doc comment fused
onto the wrong item (and still claiming "blank" cells render, when they
render `n/a`), a stale test-module comment that undercounted the tests
staying in consolidated.rs, and a docs/architecture.md paragraph that
pointed readers at the ticket instead of stating the remaining clusters
inline. Documents the back-edge the split introduced between
command_coverage.rs and consolidated.rs rather than undoing it, per
author decision; KNOWN_COMMAND_SURFACE's narrow pub(crate) visibility is
left as-is, also per author decision.

ROCMAI-486

Signed-off-by: Jussi Elo <jussi.elo@amd.com>
- reword the test-module comment: the two tests that stay in
  consolidated.rs do so because they need the private
  PlatformReport::load and the shared feature_json helper, not because
  they exercise the full consolidated_summary_markdown pipeline
- fix PlatformReport::label's doc comment: it's not part of Descriptor,
  it's the precomputed platform/OS/channel column label
- fix an architecture.md cross-reference to a nonexistent "opening
  paragraph"

Signed-off-by: Jussi Elo <jussi.elo@amd.com>
@jussielo-amd
jussielo-amd force-pushed the rocmai-486/split-command-coverage-cluster branch from 03f4a74 to bb51aa5 Compare October 8, 2026 12:40

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

🔴 Automated review · pr-review-watcher · bb51aa5

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.
Implements the first step of ROCMAI-486 (splitting the command-coverage audit out of consolidated.rs), not the model/HTML/markdown splits. The description says this and does not claim to close the ticket.

Blocking

None

Non-blocking

The finding below is new this round. The previous rounds (at c4f991d and 455761c, both since rewritten out of the branch) raised no blocking findings, so there were no standing blockers to settle.

  • The new architecture-doc text names consolidated.rs twice without a link, which the doc's own rule forbids — docs/architecture.md:54
    docs/architecture.md:11 says every concrete file citation in the Module map's per-crate inventories is a relative markdown link. It allows only two exceptions ("the old agent.rs" and report.json), and gives the reason: lychee then fails CI when a file is moved or deleted. At prw-base the Module map had no bare-backtick file citations. This change adds two: "Phase 1 of a staged further split of consolidated.rs" and "consolidated.rs still bundles manifest/command parsing…". The rule at line 11 should govern, because it is what lets lychee catch renames. That matters most here, since this paragraph describes a staged split that will move more code out of consolidated.rs.
    Confidence 85 · mechanical · Fix: turn both into [consolidated.rs](../crates/e2e-report/src/consolidated.rs) links, as the rest of the paragraph already does.

Decisions for the author

  • Moving the commands.jsonl model into the new module would remove the two-way dependency and every visibility widening — non-blocking-improvement
    The only use of CommandRecord and parse_commands in consolidated.rs is as the type of the PlatformReport.commands field and its one loader call (consolidated.rs:179, :207, :744). scenario_pass_map has one caller, command_coverage.rs:164.
    The alternative has three steps:

    • Move CommandRecord and parse_commands into command_coverage.rs.
    • Have command_coverage_markdown/command_coverage_summary take a narrow view, such as (label, &[CommandRecord], &[Feature]) per platform, and compute pass/fail there with parse::scenario_passed.
    • Map reports into that view at the single call site.

    The result:

    • The consolidated → command_coverage → consolidated back-edge goes away.
    • The eight pub(crate) widenings on PlatformReport/CommandRecord revert.
    • command_coverage_counts_against_known_surface can become a pure unit test next to the code it tests.
    • The new module then owns its input type, which docs/architecture.md:17 uses to define full domain extraction ("owns its own types… not just relocated functions").

    The current shape is a valid, smaller mechanical relocation, and the cycle is documented honestly, so this is your call.

Positive signals

  • Switching the coverage column key to the precomputed r.label removes a second copy of the with_channel_suffix(platform + os, effective_channel()) computation. Output is unchanged: load() at consolidated.rs:751-753 computes the same expression, and nothing writes to label afterwards. That was confirmed against history (#460 added both copies in the same commit).
  • The move also fixes an old misplaced doc comment. The "Build the … coverage table" text was attached to KNOWN_COMMAND_SURFACE and said "blank" where the code renders `n/a`. It now sits on command_coverage_markdown and is accurate.

Deployment notes

None

What this covered

Read completely: all four changed files (crates/e2e-report/src/command_coverage.rs, consolidated.rs, lib.rs, docs/architecture.md), plus AGENTS.md and the callers and users of the moved and widened symbols. Range: db11e474…bb51aa52 (prw-base...HEAD). Full review rather than a follow-up: the previously reviewed commit no longer exists in the branch.

Checks run:

  • cargo test -p e2e-report: 54 passed, including both command_coverage::tests::* and the three consolidated::tests::command_coverage_* tests. There are 54 #[test] fns at both base and head, and the same names.
  • cargo clippy -p e2e-report --all-targets -D warnings: clean.
  • CI checks on bb51aa5 are all green or skipped.
  • ROCMAI-486 was retrieved by its ID (title, description, status).

Passes run as independent workers: agent-instruction adherence plus code comments, history plus prior PR reviews (#433 and #460), and design.

Did not run: cargo xtask coverage locally. The per-crate floor was left to CI; no tests were deleted.

Not reconciled against any discussion on this PR here.

Two citations of consolidated.rs in the crates/e2e-report entry were
bare backtick filenames instead of the relative markdown links the
Module map's own rule requires (docs/architecture.md:11), so lychee
couldn't catch a future rename of that file.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Signed-off-by: Jussi Elo <jussi.elo@amd.com>
@jussielo-amd

Copy link
Copy Markdown
Collaborator Author

Thanks for the third round. Addressed in 9997ba2:

  • architecture.md names consolidated.rs twice without a link (docs/architecture.md:54) — turned both bare-backtick citations into [consolidated.rs](../crates/e2e-report/src/consolidated.rs) links, matching the doc's own rule and the rest of the paragraph.

On the decision for the author — moving the commands.jsonl model into the new module to remove the two-way dependency — still deliberate, same call as last round: left for a follow-up pass rather than folded into this split.

cargo test -p e2e-report (54/54) and cargo clippy -p e2e-report --all-targets -- -D warnings pass on 9997ba2. lychee isn't available locally to re-check the link offline, so I verified the target path exists by hand; CI's docs-links job will confirm.

@jussielo-amd
jussielo-amd requested a review from rominf October 9, 2026 07:57

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

🔴 Automated review · pr-review-watcher · 9997ba2

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

Review of changes since the review at bb51aa5, plus the files they touch (docs/architecture.md).
Implements the command-coverage cluster of ROCMAI-486 (In Progress), not the remaining model/HTML/markdown splits. The description says this and does not claim to close the ticket.

Blocking

None

Non-blocking

None

Decisions for the author

None

Positive signals

  • Every file citation in the crates/e2e-report entry is now a relative link. The one exception is report.json, which the doc lists as exempt. This makes the entry comply with the link rule in the doc's own intro paragraph (line 11), so lychee will catch a future rename of consolidated.rs.

Deployment notes

None

What this covered

  • What was read: all of docs/architecture.md against bb51aa5…9997ba29, with the crates/e2e-report entry (line 54) checked claim by claim against the source:
    • crates/e2e-report/src/lib.rs: five private mod declarations, and the pub use list matches the seven re-exported items named in the doc.
    • consolidated.rs → command_coverage::command_coverage_markdown, and command_coverage.rs → PlatformReport's commands, label and scenario_pass_map(). Both edges are as described.
  • Also checked:
    • Root AGENTS.md, the only agent-instruction file in scope.
    • The commit message of 9997ba2.
    • Local lychee --offline docs/architecture.md: 118 OK, 0 errors.
  • CI on 9997ba2: all completed checks pass, including Markdown links resolve (lychee). E2E tests (Strix Halo, Windows) and E2E tests (Strix Halo, WSL2) were still queued when read. The delta changes no code, so cargo was not run.
  • Passes:
    • Agent-instruction adherence, history and prior changes ran as independent workers. The prior-changes pass read review comments on #582 only.
    • The code pass ran as a single pass in this context, not as an independent worker. The scope was one documentation line.
    • The code-comments pass was folded into the adherence worker.
  • Dropped below threshold: a Co-Authored-By: Claude trailer on 9997ba2, scored 60 against AGENTS.md §11 "avoid AI-generated boilerplate footers". That rule addresses PR and issue text, and 4 of 221 recent commits on main carry the same trailer.
  • Not reconciled: this report was not checked against the PR's discussion or earlier reviews.

@rominf
rominf added this pull request to the merge queue Oct 9, 2026
Merged via the queue into main with commit c1c2aeb Oct 9, 2026
31 checks passed
@rominf
rominf deleted the rocmai-486/split-command-coverage-cluster branch October 9, 2026 11:39
jussielo-amd added a commit to jussielo-amd/rocm-cli that referenced this pull request Oct 14, 2026
… e2e-report

Three pure, behavior-preserving dedups in crates/e2e-report, found during
ROCMAI-27 code review and logged in ROCMAI-200 (the epic's quality-findings
backlog):

- single_report.rs::generate() and consolidated.rs::generate_consolidated()
  each inlined their own full `<!DOCTYPE html>...` page shell. Extract a
  shared page_shell() in components.rs taking the body markup and page
  title; both generators now call it. STYLE narrows from pub(crate) to
  private now that page_shell is its only caller.
- consolidated.rs's platform-ordering sort key was duplicated verbatim
  between generate_consolidated() and consolidated_summary_markdown().
  Extract platform_sort_key() and use it at both call sites.
- The "platform (+ OS)" label was independently rebuilt at two more sites:
  the markdown summary table and the HTML matrix_table each rebuilt the
  platform-only half (the same pattern that drifted once already, fixed in
  ROCm#460). Extract a shared platform_cell() for that platform-only half and
  use it at both call sites.

No rendering output or sort order changes: same markup, same ordering, less
duplication to drift out of sync in a future head-level or ordering tweak.

Adds page_shell_carries_title_and_style (components.rs), pinning every
shared piece page_shell renders: doctype, lang="en", meta charset="utf-8",
title, stylesheet, and the caller's body.

Adds generate_renders_the_body_inside_the_shared_page_shell
(single_report.rs), pinning that single_report::generate's real body — the
scenario name parsed from the report JSON — reaches the shared shell at
that call site.

Adds platform_sort_key_orders_by_platform_then_os_then_known_bugs_then_channel
(consolidated.rs), pinning all four sort-key tuple elements in precedence
order: a fourth fixture row on a different platform pins platform; two
Ubuntu rows pin os and known_bugs; a fifth/sixth row on two more platforms
with opposite channels pin that channel doesn't outrank platform; a seventh
row pins that channel doesn't outrank known_bugs either. channel's own
effect as a tie-breaker, once platform/os/known_bugs are equal, is pinned
by generate_consolidated_writes_html and
command_coverage_distinguishes_channels_on_same_platform instead of being
repeated here.

PlatformReport::label's doc comment states what the label contains
(platform, OS and effective channel) alongside its consumers.

No new test for platform_cell() itself: existing tests already exercise
both call sites' rendered output byte-for-byte
(consolidated_summary_markdown_has_a_row_per_platform and
generate_consolidated_writes_html) and pass unchanged.

command_coverage_markdown's own duplication of the full platform+OS label,
and its reuse of PlatformReport::label, already landed separately on main
through ROCm#591 — not part of this change.

cargo test -p e2e-report --all-targets: 57 passed, 0 failed.
cargo clippy -p e2e-report --all-targets -- -D warnings: clean.
cargo fmt --check: clean.
cargo build --workspace: clean, no downstream breakage (xtask consumes
this crate's public API).

Signed-off-by: Jussi Elo <jussi.elo@amd.com>
jussielo-amd added a commit to jussielo-amd/rocm-cli that referenced this pull request Oct 14, 2026
… e2e-report

Three pure, behavior-preserving dedups in crates/e2e-report, found during
ROCMAI-27 code review and logged in ROCMAI-200 (the epic's quality-findings
backlog):

- single_report.rs::generate() and consolidated.rs::generate_consolidated()
  each inlined their own full `<!DOCTYPE html>...` page shell. Extract a
  shared page_shell() in components.rs taking the body markup and page
  title; both generators now call it. STYLE narrows from pub(crate) to
  private now that page_shell is its only caller.
- consolidated.rs's platform-ordering sort key was duplicated verbatim
  between generate_consolidated() and consolidated_summary_markdown().
  Extract platform_sort_key() and use it at both call sites.
- The "platform (+ OS)" label was independently rebuilt at two more sites:
  the markdown summary table and the HTML matrix_table each rebuilt the
  platform-only half (the same pattern that drifted once already, fixed in
  ROCm#460). Extract a shared platform_cell() for that platform-only half and
  use it at both call sites.

No rendering output or sort order changes: same markup, same ordering, less
duplication to drift out of sync in a future head-level or ordering tweak.

Adds page_shell_carries_title_and_style (components.rs), pinning every
shared piece page_shell renders: doctype, lang="en", meta charset="utf-8",
title, stylesheet, and the caller's body.

Adds generate_renders_the_body_inside_the_shared_page_shell
(single_report.rs), pinning that single_report::generate's real body — the
scenario name parsed from the report JSON — reaches the shared shell at
that call site.

Adds platform_sort_key_orders_by_platform_then_os_then_known_bugs_then_channel
(consolidated.rs), pinning all four sort-key tuple elements in precedence
order: a fourth fixture row on a different platform pins platform; two
Ubuntu rows pin os and known_bugs; a fifth/sixth row on two more platforms
with opposite channels pin that channel doesn't outrank platform; a seventh
row pins that channel doesn't outrank known_bugs either. channel's own
effect as a tie-breaker, once platform/os/known_bugs are equal, is pinned
by generate_consolidated_writes_html and
command_coverage_distinguishes_channels_on_same_platform instead of being
repeated here.

PlatformReport::label's doc comment states what the label contains
(platform, OS and effective channel) alongside its consumers.

No new test for platform_cell() itself: existing tests already exercise
both call sites' rendered output byte-for-byte
(consolidated_summary_markdown_has_a_row_per_platform and
generate_consolidated_writes_html) and pass unchanged.

command_coverage_markdown's own duplication of the full platform+OS label,
and its reuse of PlatformReport::label, already landed separately on main
through ROCm#591 — not part of this change.

cargo test -p e2e-report --all-targets: 57 passed, 0 failed.
cargo clippy -p e2e-report --all-targets -- -D warnings: clean.
cargo fmt --check: clean.
cargo build --workspace: clean, no downstream breakage (xtask consumes
this crate's public API).

Signed-off-by: Jussi Elo <jussi.elo@amd.com>
jussielo-amd added a commit to jussielo-amd/rocm-cli that referenced this pull request Oct 14, 2026
Two pure, behavior-preserving dedups in crates/e2e-report, found during
ROCMAI-27 code review and logged in ROCMAI-200 (the epic's quality-findings
backlog):

- single_report.rs::generate() and consolidated.rs::generate_consolidated()
  each inlined their own full `<!DOCTYPE html>...` page shell. Extract a
  shared page_shell() in components.rs taking the body markup and page
  title; both generators now call it. STYLE narrows from pub(crate) to
  private now that page_shell is its only caller.
- The "platform (+ OS)" label was independently rebuilt at two more sites:
  the markdown summary table and the HTML matrix_table each rebuilt the
  platform-only half (the same pattern that drifted once already, fixed in
  ROCm#460). Extract a shared platform_cell() for that platform-only half and
  use it at both call sites.

A third dedup originally targeted here — the platform-ordering sort key,
duplicated between generate_consolidated() and consolidated_summary_markdown()
— landed independently on main as report_sort_key() via ROCm#592 (ROCMAI-484)
while this branch was in review. Rebasing onto that picked up the existing
extraction instead of adding a second one; this commit adds no new sort-key
function.

No rendering output or sort order changes: same markup, same ordering, less
duplication to drift out of sync in a future head-level or ordering tweak.

Adds page_shell_carries_title_and_style (components.rs), pinning every
shared piece page_shell renders: doctype, lang="en", meta charset="utf-8",
title, stylesheet, and the caller's body.

Adds generate_renders_the_body_inside_the_shared_page_shell
(single_report.rs), pinning that single_report::generate's real body — the
scenario name parsed from the report JSON — reaches the shared shell at
that call site.

Adds consolidated_summary_markdown_orders_rows_by_report_sort_key
(consolidated.rs), going through the public consolidated_summary_markdown
entry point with realistic artifact-name fixtures rather than a direct call
to report_sort_key, so a regression in load_platform_reports' use of
report_sort_key is caught even if report_sort_key itself stays correct in
isolation. Pins all four sort-key tuple elements in precedence order: a
fourth fixture row on a different platform pins platform; two Ubuntu rows
pin os and known_bugs; a fifth/sixth row on two more platforms with
opposite channels pin that channel doesn't outrank platform; a seventh row
pins that channel doesn't outrank known_bugs either. channel's own effect
as a tie-breaker, once platform/os/known_bugs are equal, is pinned by
generate_consolidated_writes_html and
command_coverage_distinguishes_channels_on_same_platform instead of being
repeated here. report_sort_key_orders_by_every_dimension (pre-existing,
landed with ROCm#592) already pins the same four dimensions via a direct call
with synthetic PlatformReports; this test complements it rather than
repeating it.

PlatformReport::label's doc comment states what the label contains
(platform, OS and effective channel) alongside its consumers.

No new test for platform_cell() itself: existing tests already exercise
both call sites' rendered output by row content
(consolidated_summary_markdown_has_a_row_per_platform and
generate_consolidated_writes_html) and pass unchanged.

command_coverage_markdown's own duplication of the full platform+OS label,
and its reuse of PlatformReport::label, already landed separately on main
through ROCm#591 — not part of this change.

cargo test -p e2e-report --all-targets: 65 passed, 0 failed.
cargo clippy -p e2e-report --all-targets -- -D warnings: clean.
cargo fmt --check: clean.
cargo build --workspace: clean, no downstream breakage (xtask consumes
this crate's public API).

Signed-off-by: Jussi Elo <jussi.elo@amd.com>
jussielo-amd added a commit to jussielo-amd/rocm-cli that referenced this pull request Oct 16, 2026
…m#585)

* dedup: share HTML page shell and platform cell in e2e-report

Two pure, behavior-preserving dedups in crates/e2e-report, found during
ROCMAI-27 code review and logged in ROCMAI-200 (the epic's quality-findings
backlog):

- single_report.rs::generate() and consolidated.rs::generate_consolidated()
  each inlined their own full `<!DOCTYPE html>...` page shell. Extract a
  shared page_shell() in components.rs taking the body markup and page
  title; both generators now call it. STYLE narrows from pub(crate) to
  private now that page_shell is its only caller.
- The "platform (+ OS)" label was independently rebuilt at two more sites:
  the markdown summary table and the HTML matrix_table each rebuilt the
  platform-only half (the same pattern that drifted once already, fixed in
  ROCm#460). Extract a shared platform_cell() for that platform-only half and
  use it at both call sites.

A third dedup originally targeted here — the platform-ordering sort key,
duplicated between generate_consolidated() and consolidated_summary_markdown()
— landed independently on main as report_sort_key() via ROCm#592 (ROCMAI-484)
while this branch was in review. Rebasing onto that picked up the existing
extraction instead of adding a second one; this commit adds no new sort-key
function.

No rendering output or sort order changes: same markup, same ordering, less
duplication to drift out of sync in a future head-level or ordering tweak.

Adds page_shell_carries_title_and_style (components.rs), pinning every
shared piece page_shell renders: doctype, lang="en", meta charset="utf-8",
title, stylesheet, and the caller's body.

Adds generate_renders_the_body_inside_the_shared_page_shell
(single_report.rs), pinning that single_report::generate's real body — the
scenario name parsed from the report JSON — reaches the shared shell at
that call site.

Adds consolidated_summary_markdown_orders_rows_by_report_sort_key
(consolidated.rs), going through the public consolidated_summary_markdown
entry point with realistic artifact-name fixtures rather than a direct call
to report_sort_key, so a regression in load_platform_reports' use of
report_sort_key is caught even if report_sort_key itself stays correct in
isolation. Pins all four sort-key tuple elements in precedence order: a
fourth fixture row on a different platform pins platform; two Ubuntu rows
pin os and known_bugs; a fifth/sixth row on two more platforms with
opposite channels pin that channel doesn't outrank platform; a seventh row
pins that channel doesn't outrank known_bugs either. channel's own effect
as a tie-breaker, once platform/os/known_bugs are equal, is pinned by
generate_consolidated_writes_html and
command_coverage_distinguishes_channels_on_same_platform instead of being
repeated here. report_sort_key_orders_by_every_dimension (pre-existing,
landed with ROCm#592) already pins the same four dimensions via a direct call
with synthetic PlatformReports; this test complements it rather than
repeating it.

PlatformReport::label's doc comment states what the label contains
(platform, OS and effective channel) alongside its consumers.

No new test for platform_cell() itself: existing tests already exercise
both call sites' rendered output by row content
(consolidated_summary_markdown_has_a_row_per_platform and
generate_consolidated_writes_html) and pass unchanged.

command_coverage_markdown's own duplication of the full platform+OS label,
and its reuse of PlatformReport::label, already landed separately on main
through ROCm#591 — not part of this change.

cargo test -p e2e-report --all-targets: 65 passed, 0 failed.
cargo clippy -p e2e-report --all-targets -- -D warnings: clean.
cargo fmt --check: clean.
cargo build --workspace: clean, no downstream breakage (xtask consumes
this crate's public API).

Signed-off-by: Jussi Elo <jussi.elo@amd.com>

* address non-blocking review findings on e2e-report dedup

- pin the consolidated report's <title> separately from its <h1>,
  which happened to share the same string
- route PlatformReport::load's channel fallback through the same
  resolve_channel() rule effective_channel() uses, instead of
  duplicating it
- mention page_shell in the components.rs module doc
- reflow a doc comment line that split mid-phrase

Signed-off-by: Jussi Elo <jussi.elo@amd.com>

---------

Signed-off-by: Jussi Elo <jussi.elo@amd.com>
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