Skip to content

e2e-report: bundle reports+inputs and collapse the generate_consolidated/consolidated_summary_markdown wrapper quartet #640

Closed

Description

@jussielo-amd

Summary

Follow-up from the ROCMAI-484 review on #592 (comment: #592 (review)). Two related design points were deliberately deferred from that PR rather than folded in:

  1. generate_consolidated_from_reports(reports, inputs) / consolidated_summary_markdown_from_reports(reports, inputs) let their two parameters describe different platform sets. The matrix, per-platform details, and command-coverage table are built from reports; the expectation grid and scenario-reference sections are built independently from inputs. Nothing enforces that the two stay paired — a caller that filters, reorders, or re-pairs the Vec<PlatformReport> returned by load_platform_reports gets output that silently disagrees with itself (one section describing one platform set, another section describing a different one). from_reports_entry_points_follow_reports_not_inputs (in crates/e2e-report/src/consolidated.rs) demonstrates the mismatch is real today, on purpose.

  2. The public API grew from 3 items to 7 to add the shared-parsing path without touching any existing caller. generate_consolidated and consolidated_summary_markdown were kept as thin wrappers around the new _from_reports entry points so no existing caller/signature had to change. In practice this crate (crates/e2e-report, publish = false, internal-only) has no external consumers to protect: as of e2e-report: share parsed reports between consolidated outputs (ROCMAI-484) #592's b64edb0, both generate_consolidated and consolidated_summary_markdown have zero callers left anywhere outside this crate's own test module (workflow_contract.rs's prior call was migrated to consolidated_summary_markdown_from_reports(&[], &[])). Keeping the wrapper quartet buys little while doubling the surface area and forcing PlatformReport from pub(crate) to pub, past the encapsulation boundary docs/architecture.md calls deliberate for this crate.

Proposed direction

Address both together rather than separately:

  • Replace the (reports, inputs) pair with one opaque bundle type returned by load_platform_reports (e.g. holding both the parsed reports and the inputs they came from), so the two can't drift apart by construction.
  • Change generate_consolidated's and consolidated_summary_markdown's signatures directly to take that bundle, drop the _from_reports wrapper functions, and update the one in-repo caller (xtask/src/e2e_report.rs) and the one test caller (xtask/src/workflow_contract.rs) accordingly.
  • PlatformReport can then likely go back to pub(crate) if the bundle type is the only thing that needs to be public.

Why not fold into #592

#592 scoped itself to the literal duplication the ticket named (the Vec<PlatformReport> build+sort that was verbatim-duplicated between the two top-level functions), and explicitly deferred the Grid-sharing/API-surface questions as follow-ups rather than widening its own diff. This issue tracks that deferred work so it isn't lost.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions