report: per-submission breakdown of measurements and checks (#231)#239
Merged
Conversation
There was a problem hiding this comment.
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. |
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)).
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)).
d59b094 to
0697c57
Compare
Contributor
🚀 PR Preview DeployedPreview 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. |
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.
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'smetrics.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 storedcpu_unitsandmemory_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'sevaluations[]directly frommetrics.json. The positional aggregate CSV that feeds the scenario page can't carry a variable-length evaluation list, so the detail generator readsmetrics.jsondirectly. 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— newgenerate_submission_detail_pages, wired into both the--alland single-benchmark entry points.benchmark.html.tmpl— row label links to the detail page; GitHub source link and footnote wording updated; deadREPO_MAINconstant removed.report.help.tmpl— documents the new output.Drive-by fix
The single-benchmark path (
cape submission report <benchmark>) aborted on bash 5.3 withbad 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 ingenerate_index_reportso it no longer clobbers the caller's benchmark name in the final success messages.Verification
Rendered
report --allandreport 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 forhtlc/Plinth_1.65.0.0_Unisay(21 matchesexcluded_countand the footnote), numbers are right-aligned and thousands-separated, empty sections degrade gracefully, and the two sections are clearly distinguished by badge colour.shfmt(viatreefmt) reports no changes.