Skip to content

report: per-submission breakdown of measurements and checks (#231)#239

Merged
Unisay merged 2 commits into
mainfrom
yura/report-submission-breakdown
Jul 9, 2026
Merged

report: per-submission breakdown of measurements and checks (#231)#239
Unisay merged 2 commits into
mainfrom
yura/report-submission-breakdown

Conversation

@Unisay

@Unisay Unisay commented Jul 9, 2026

Copy link
Copy Markdown
Collaborator

Closes #231.

What

Each submission now has its own detail page at report/benchmarks/<scenario>/<submission_dir>.html, reachable from its row on the scenario page. The page lists every evaluation from that submission's metrics.json, split into two visually distinct sections — Measurements (included_in_aggregates: true) and Checks (excluded) — each row showing the evaluation name, description, execution result, and its stored cpu_units and memory_units. The number of excluded rows reconciles with the scenario page's footnote count.

The scenario (aggregate) page stays a light comparison view: it embeds no per-evaluation data and only links out to the detail pages, so its weight does not grow with the number of evaluations. The submission-row label — previously linking to the GitHub source — now opens the detail page; the "View source on GitHub" link moves onto the detail page, and the footnote now points readers at the breakdown ("click its label") instead of the raw metrics.json.

Detail pages are rendered server-side with gomplate, reading each submission's evaluations[] directly from metrics.json. The positional aggregate CSV that feeds the scenario page can't carry a variable-length evaluation list, so the detail generator reads metrics.json directly. No re-measuring and no new metric fields.

Files

  • submission-detail.html.tmpl — new per-submission detail template (server-rendered table, two sections).
  • report.sh — new generate_submission_detail_pages, wired into both the --all and single-benchmark entry points.
  • benchmark.html.tmpl — row label links to the detail page; GitHub source link and footnote wording updated; dead REPO_MAIN constant removed.
  • report.help.tmpl — documents the new output.

Drive-by fix

The single-benchmark path (cape submission report <benchmark>) aborted on bash 5.3 with bad array subscript: the unfiltered aggregate cache used an empty associative-array key, which bash 5.3 rejects outright. It is now folded to a non-empty sentinel key. Also localized the loop variable in generate_index_report so it no longer clobbers the caller's benchmark name in the final success messages.

Verification

Rendered report --all and report htlc; opened the pages over a local HTTP server and confirmed: submission-row labels navigate to the detail pages, the detail page shows 4 measurements + 21 checks for htlc/Plinth_1.65.0.0_Unisay (21 matches excluded_count and the footnote), numbers are right-aligned and thousands-separated, empty sections degrade gracefully, and the two sections are clearly distinguished by badge colour. shfmt (via treefmt) reports no changes.

Note: report/ is gitignored and regenerated by CI, so this PR contains only pipeline and template changes.

@Unisay Unisay requested a review from Copilot July 9, 2026 10:57
@Unisay Unisay self-assigned this Jul 9, 2026

Copilot AI 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.

Pull request overview

This PR extends the HTML report pipeline to add a per-submission detail page that shows the full per-evaluation breakdown (measurements vs checks) sourced directly from each submission’s metrics.json, while keeping the scenario (aggregate) page lightweight and link-based.

Changes:

  • Add a new per-submission detail page template and generator, emitting report/benchmarks/<scenario>/<submission_dir>.html.
  • Update the scenario report page to link each submission label to its new breakdown page and move the GitHub source link to the detail page.
  • Fix bash 5.3 incompatibility with empty associative-array keys and avoid variable clobbering in generate_index_report.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.

File Description
scripts/cape-subcommands/submission/submission-detail.html.tmpl New server-rendered detail page listing evaluations split into included measurements vs excluded checks.
scripts/cape-subcommands/submission/report.sh Generates per-submission detail pages; fixes aggregate CSV caching keying and loop variable scoping.
scripts/cape-subcommands/submission/report.help.tmpl Documents the new per-submission breakdown output paths.
scripts/cape-subcommands/submission/benchmark.html.tmpl Links submission labels to the new detail pages and updates footnote/source-link wording accordingly.

Comment thread scripts/cape-subcommands/submission/submission-detail.html.tmpl
Comment thread scripts/cape-subcommands/submission/submission-detail.html.tmpl
Comment thread scripts/cape-subcommands/submission/submission-detail.html.tmpl
Unisay added a commit that referenced this pull request Jul 9, 2026
- scripts/cape-subcommands/submission/report.sh — HTML-escape every interpolated string in the detail-page gomplate context (gomplate renders *.html.tmpl with Go text/template, which does not auto-escape). Free-form fields like an evaluation description can contain < > & and would otherwise break the page or allow injection. Covers the threads on submission-detail.html.tmpl lines 161 (#239 (comment)), 187 (#239 (comment)), and 219 (#239 (comment)).
Unisay added 2 commits July 9, 2026 15:37
Each submission now gets its own detail page at
report/benchmarks/<scenario>/<submission_dir>.html, linked from its row on
the scenario page. The page lists every evaluation from that submission's
metrics.json split into two visually distinct sections — Measurements
(included in aggregates) and Checks (excluded) — each showing the
evaluation name, description, result, and its stored CPU and memory units.
The excluded count reconciles with the scenario page's footnote.

The scenario page stays a light comparison view: it embeds no per-evaluation
data and only links out to the detail pages, so its weight does not grow with
the number of evaluations. The submission-row label, previously linking to the
GitHub source, now opens the detail page; the GitHub source link moves onto the
detail page, and the footnote points readers at the breakdown instead of the
raw metrics.json.

Detail pages are rendered server-side with gomplate, reading each submission's
evaluations[] directly from metrics.json (the positional aggregate CSV can't
carry a variable-length list). No re-measuring and no new metric fields.

Also fix the single-benchmark report path, which aborted on bash 5.3 with
"bad array subscript": the unfiltered aggregate cache used an empty
associative-array key, which 5.3 rejects, so it is folded to a non-empty
sentinel. Localize the benchmark loop variable in generate_index_report so it
no longer clobbers the caller's benchmark name in the success messages.
- scripts/cape-subcommands/submission/report.sh — HTML-escape every interpolated string in the detail-page gomplate context (gomplate renders *.html.tmpl with Go text/template, which does not auto-escape). Free-form fields like an evaluation description can contain < > & and would otherwise break the page or allow injection. Covers the threads on submission-detail.html.tmpl lines 161 (#239 (comment)), 187 (#239 (comment)), and 219 (#239 (comment)).
@Unisay Unisay force-pushed the yura/report-submission-breakdown branch from d59b094 to 0697c57 Compare July 9, 2026 13:37
@github-actions

github-actions Bot commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

🚀 PR Preview Deployed

Preview URL: https://intersectmbo.github.io/UPLC-CAPE/pr-239/

The preview site is automatically updated on every push to this PR and will be removed when the PR is closed.

@Unisay Unisay merged commit 217152d into main Jul 9, 2026
6 checks passed
@Unisay Unisay deleted the yura/report-submission-breakdown branch July 9, 2026 14:36
github-actions Bot added a commit that referenced this pull request Jul 9, 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.

Report: per-submission breakdown of measurements and checks

2 participants