Repository navigation
ROCMAI-763: split the e2e-report HTML and markdown renderers out of consolidated/mod.rs - #833
Merged
jussielo-amd merged 2 commits intoNov 2, 2026
Conversation
Moves RunMeta, generate_consolidated, expectation_grid_html, matrix_table, legend and platform_section out of consolidated/mod.rs into the new child module consolidated/html.rs, together with the three tests that exercise only them (generate_consolidated_renders_the_expectation_grid, generate_consolidated_writes_html, expectation_grid_html_legend_colors_every_red_glyph). The four cross-renderer tests stay in mod.rs. As a child module it reads the private model types in the parent, so the only widening is pub(super) on expectation_grid_html, for those cross-renderer tests. lib.rs re-exports RunMeta and generate_consolidated from consolidated::html; the crate's public names are unchanged. Edits other than relocated lines, module and import wiring, and that visibility change: - the two links to load_platform_reports in generate_consolidated's doc comment became path links (super::load_platform_reports), as the target is not imported into html.rs - the three links to generate_consolidated in the docs of PlatformReports, load_platform_reports and consolidated_summary_markdown became html::generate_consolidated - one doc paragraph in generate_consolidated was re-wrapped after that link rewrite - new module doc comment in html.rs, SPDX header on the new file, and a reworded module doc in mod.rs (it no longer holds the HTML generation) - the tests module of mod.rs gained an import of the moved items, and the moved tests import test_support and the parent's loaders by path - docs/architecture.md: new entry for html.rs, reworded mod.rs entry and lib.rs re-export sentence Signed-off-by: Jussi Elo <jussi.elo@amd.com>
…rkdown Moves consolidated_summary_markdown, expectation_grid_markdown and scenario_reference_markdown, together with the command_coverage_markdown import, out of consolidated/mod.rs into the new child module consolidated/markdown.rs, and with them the 13 tests that assert on markdown output through load_platform_reports and consolidated_summary_markdown. The cross-renderer tests, the command-coverage tests and summary_status_reconciles_ xfail_as_pass stay in mod.rs. Production code in mod.rs no longer depends on command_coverage.rs (the edge is now markdown.rs to command_coverage.rs to mod.rs); only the remaining command-coverage tests in mod.rs still import from it. As a child module, markdown.rs reads the private model types in the parent, so nothing is widened. lib.rs re-exports consolidated_summary_markdown from consolidated::markdown; the crate's public names are unchanged. Edits other than relocated lines and module and import wiring (no visibility change in this commit): - in consolidated_summary_markdown's doc comment, the links to generate_consolidated and load_platform_reports became reference-style path links (super::html::generate_consolidated, super::load_platform_reports); the definitions sit at the end of the doc block so the first paragraph stays within clippy's length limit. These are doc links only, markdown.rs does not call html.rs - the two links to consolidated_summary_markdown in the docs of PlatformReports and load_platform_reports became markdown::consolidated_summary_markdown - new module doc comment in markdown.rs, SPDX header on the new file, and a reworded module doc in mod.rs (it no longer holds the markdown generation) - the tests module of mod.rs gained an import of consolidated_summary_markdown, and the moved tests import test_support and load_platform_reports by path - docs/architecture.md: new entry for markdown.rs, reworded mod.rs entry, the lib.rs re-export sentence, and the sentence about the dependency between command_coverage.rs and consolidated, which was no longer true: it now says the file-level chain is acyclic and that only the module as a whole still depends on command_coverage.rs Signed-off-by: Jussi Elo <jussi.elo@amd.com>
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues remain for the renderer-module split.
No open issues 🎉
What changed in this PR
Completes the e2e-report renderer split by moving HTML and markdown generation into dedicated modules, preserving report behavior and the crate’s public API.
Changes:
- Relocates both renderers and their tests, keeping shared models and cross-renderer tests in
consolidated/mod.rs. - Moves the production command-coverage dependency into the markdown renderer.
- Updates re-exports, intra-doc links, and architecture documentation for the new layout.
| File | Description |
|---|---|
docs/architecture.md |
Documents renderer ownership and the revised dependency structure. |
crates/e2e-report/src/lib.rs |
Preserves public names through updated re-exports. |
crates/e2e-report/src/consolidated/mod.rs |
Retains shared models, bundle construction, and cross-renderer tests. |
crates/e2e-report/src/consolidated/markdown.rs |
Houses markdown rendering, command-coverage integration, and 13 relocated tests. |
crates/e2e-report/src/consolidated/html.rs |
Houses HTML rendering, RunMeta, and three relocated tests. |
Review effort: Balanced
juhovainio
approved these changes
Nov 2, 2026
juhovainio
left a comment
Collaborator
There was a problem hiding this comment.
No blocking findings.
Verified
- The html and markdown renderers moved out of
consolidated/mod.rsas a mechanical move. Comparing removed and added lines, the only differences are licence headers, module docs, onepub(super)onexpectation_grid_html, rewritten intra-doc links, test import rewiring andmod testsscaffolding. - 16
#[test]functions removed and 16 added (3 in html, 13 in markdown), so test count is preserved. lib.rsre-exports match the API decided in the ticket.- Licence headers are present, docs are updated in the same change, and there are no internal references.
Non-blocking notes
- The html and markdown moves were planned as separate PRs; here they are two commits in one PR. Still one logical change.
- A
#[cfg(test)]use crate::command_coverageremains inmod.rsbecause the command-coverage tests stay there. The PR body discloses and justifies this.
CI: no failures at review time. windows-build-and-test and the GPU E2E lanes were still pending, so please let those finish green before merging.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
After the first half of the e2e-report split (the
consolidated/directory with its descriptor and sidecar modules),consolidated/mod.rsstill held both report renderers, HTML and markdown, together with the model, the grid and the bundle. This change moves the two renderers into modules of their own, as pure moves. It also removes the production dependency ofconsolidated/mod.rsoncommand_coverage.rsthatdocs/architecture.mddescribed as a back-edge: after it, the dependency runs one way, frommarkdown.rstocommand_coverage.rstoconsolidated. Completes ROCMAI-763; the two optional follow-up moves are tracked as ROCMAI-832.What changes
Two commits, one per step, so the branch can be reviewed commit by commit:
consolidated/html.rstakesRunMetawith itslinemethod,generate_consolidated,expectation_grid_html,matrix_table,legendandplatform_section, with the three HTML tests. Onlyexpectation_grid_htmlis widened (pub(super)), so the cross-renderer tests that stay inmod.rscan call it.consolidated/markdown.rstakesconsolidated_summary_markdown,expectation_grid_markdown,scenario_reference_markdownand thecommand_coverage_markdownimport, with the 13 tests that assert on markdown output. Nothing is widened.The four tests that assert that HTML and markdown agree over one bundle stay in
mod.rs, next to the bundle.lib.rsre-exportsRunMeta,generate_consolidatedandconsolidated_summary_markdownfrom the new modules, so the crate's public names are unchanged andxtaskcompiles untouched.html.rsandmarkdown.rsnever call each other.Besides the relocations, the commits make these edits: intra-doc links in the moved comments and in the parent's docs are rewritten to path-qualified links (
super::load_platform_reports,html::generate_consolidated,markdown::consolidated_summary_markdown, written as reference-style links inmarkdown.rsto satisfyclippy::too_long_first_doc_paragraph); each new file has a licence header and a module doc, and themod.rsmodule doc is reworded; test-module imports are rewired; anddocs/architecture.mdgets an entry per new file, with themod.rsentry, the re-export sentence and the dependency sentence rewritten to match.Verification
cargo fmt --checkandcargo clippy -p e2e-report -p xtask --all-targets -- -D warningsare clean, and each commit builds.html, 13 formarkdown).cargo xtask manifest --checkandcargo xtask check-crate-edgespass.-D rustdoc::broken_intra_doc_links -D rustdoc::private_intra_doc_links) exits non-zero onmaintoo, becauseload_platform_reportslinks to the privateload_reports; its output is the same before and after this change, so no new warning or error is added.cargo test -p xtask, thetests/e2e-cucumbersuite and the Windows lane.Scope
This is an internal refactor with no user-observable change, so no end-to-end scenario is added; the unmodified
tests/e2e-cucumbersuite covers the unchanged behaviour.consolidated/mod.rskeeps a#[cfg(test)]import fromcommand_coveragefor one test that stays there, so the dependency is gone from production code only. Not part of this PR, and tracked as ROCMAI-832: movingcommand_coverage.rsunderconsolidated/, which reverses a recorded decision and needs its author's agreement, and the optionalgrid.rssplit, which costs about fifteen widenings for little gain. Open PRs that edit the same files (#518, #241 and #284) will need rebasing onto the new layout.Template checklist: not a bug fix, so there are no stale xfail rows to narrow; no new subcommand or subsystem; no user-facing message is added or changed.