Skip to content

feat(trg): an eval bundle deserves a report, not a directory of json - #148

Open
yordis wants to merge 1 commit into
mainfrom
yordis/feat-eval-html-report
Open

feat(trg): an eval bundle deserves a report, not a directory of json#148
yordis wants to merge 1 commit into
mainfrom
yordis/feat-eval-html-report

Conversation

@yordis

@yordis yordis commented Sep 13, 2026

Copy link
Copy Markdown
Member
  • A finished eval run leaves behind a directory of JSON. Reading it means opening report.json, cross-referencing grading.json, and then chasing per-run output files by hand. The information to judge a skill is all present and none of it is legible, which is the reason a failing run gets glanced at rather than read.
  • The bundle is the right unit to look at, so the report is generated over the bundle rather than streamed during the run. It stays reproducible from artifacts that already exist, works on a run someone else produced, and does not add a rendering concern to the runner.
  • Everything the page displays comes from an agent under evaluation and has to be treated as hostile input: a skill can emit <script> into its own final text and get it written into a file the author then opens in a browser. Escaping is therefore a single chokepoint with no second way to reach the page, so a field added later cannot quietly skip it, and the escaping tests are checked by mutation rather than assumed.
  • The page references nothing over the network for the same reason a report should not phone home: an eval bundle can contain a skill's unreleased content, and opening a local report is not consent to send anything anywhere. No remote script, stylesheet, font, or image is emitted, so it opens offline from file://.
  • Non-scoring outcomes are shown as themselves rather than folded into a pass or a fail, because an assertion that was excluded or unsupported is not evidence about the skill and should not read like it is.

@cursor

cursor Bot commented Sep 13, 2026

Copy link
Copy Markdown

PR Summary

Low Risk
Additive CLI and read-only rendering over existing artifacts; main concern is HTML injection when opening reports, which the dedicated escaping and link-encoding tests target.

Overview
Adds trg ai skills eval html-report <REPORT_DIR>, a post-hoc renderer that writes report.html next to an existing bundle’s report.json. It reads report.json, per-run grading.json (run dir or workspace), and truncated outputs/final.md, then emits a single offline file with inlined CSS, no JavaScript, and no external URLs—suitable for file:// review.

The HTML surfaces provenance, scenario/run summaries (including budget), and case → scenario arm → run detail with assertion outcomes; unsupported and excluded are labeled separately from pass/fail. Untrusted agent content goes through a single Escaped path for text and Href percent-encoding for bundle-relative artifact links.

Wiring: new agentskills::html_report module, CLI handler with text/JSON output, eval subcommand registration, reference docs for the subcommand and report.html artifact, plus security-focused unit tests.

Reviewed by Cursor Bugbot for commit ea65235. Bugbot is set up for automated code reviews on this repo. Configure here.

@coderabbitai

coderabbitai Bot commented Sep 13, 2026

Copy link
Copy Markdown

Warning

Review limit reached

Next included review available in 32 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: 7140494e-e603-49ab-870f-e3a8af6e9890

📥 Commits

Reviewing files that changed from the base of the PR and between dd3d8d3 and ea65235.

📒 Files selected for processing (5)
  • crates/trg/docs/reference/ai-skills-eval.md
  • crates/trg/src/agentskills/html_report.rs
  • crates/trg/src/agentskills/mod.rs
  • crates/trg/src/commands/ai/skills/eval/html_report.rs
  • crates/trg/src/commands/ai/skills/eval/mod.rs

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@cursor cursor Bot 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.

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 493f9a0. Configure here.

Comment thread crates/trg/src/agentskills/html_report.rs
Reading a graded bundle today means opening report.json, each run's
grading.json, and outputs/final.md by hand, in a terminal, while every
value in them originates from a skill under evaluation and cannot be
trusted. A single local html file lets a reviewer see a bundle at a
glance without piecing it together from raw artifacts or exposing a
terminal to adversarial content, and without ever reaching the network.

Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>
@yordis
yordis force-pushed the yordis/feat-eval-html-report branch from 493f9a0 to ea65235 Compare September 13, 2026 07:06
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.

1 participant