Skip to content

Show LLM verification reasoning alongside findings - #454

Merged
rng1995 merged 5 commits into
mainfrom
naren/show-finding-verifier-reasoning
Nov 11, 2026
Merged

rng1995 merged 5 commits into
mainfrom
naren/show-finding-verifier-reasoning

Conversation

@rng1995

@rng1995 rng1995 commented Nov 11, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Show a finding's recorded LLM verification verdict, confidence, bounded reasoning, and final severity in HTML, Markdown, and terminal reports. JSON and gate behavior remain unchanged; a recorded downgrade stays visible when a later policy restores HIGH.

Verified occurrences group by decision (verdict, confidence, severity effect), with the first rationale on the grouped card and every rationale retained in validator details and JSON. The producer and reports share one downgrade-policy definition. Plain/forced-color regressions normalize renderer styling while rejecting input-origin SGR, CSI, and OSC controls.

Review and verification

  • Addressed all three inline review comments: decision-only grouping, effective missing-metadata assertions, and shared policy/explanation constants. Added the requested Tier 1 docs note and merged current main normally.
  • 802 focused reporter/escaping/navigation/coverage tests pass under forced color; 93 final installed-wheel verification/coverage tests pass. Existing verifier protections, lint, build, and Fern validation pass.
  • Policy regressions change the shared confidence/target and verify producer/report agreement, preserving existing exemptions and recorded metadata. Grouping tests preserve all occurrence counts, lines, and validator/JSON rationales.
  • The current revision passes all 20 GitHub checks (with two expected skips), including 27,476 full coverage tests.
  • Synthetic fixtures only; no private reports, credentials, datasets, or service endpoints added.

Release impact

Unreleased changelog and Tier 1 documentation updated. Default downgrade threshold, target severity, exemptions, and JSON contract unchanged.

@chrisknvidia chrisknvidia left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work. The sanitizing and the escaping hold up, and I'd like one thing changed before this merges.

What I did: ran the new tests against this head (all 42 pass), rendered verified findings through the HTML, Markdown and terminal reporters, and read the path from _verify_findings_with_llm to each renderer. HTML goes through autoescape, the Markdown cell escapes |, [ and @, control and bidi characters are stripped before any of that, and the metadata survives the JSON round trip. That last part matters because CI re-renders the HTML and Markdown from the redacted JSON, so the hosted reports get the same box. JSON output and the gate are untouched.

The thing to fix is the grouping in the HTML report. _deduplicate_findings now puts the whole verification object in its key, and that includes the reasoning text. The verifier writes a different rationale for every finding, so verified findings almost never merge any more. I tried 30 findings of the same check in one file. Unverified (and on main) that is one card with "30 occurrences" and the line list. On this branch with a per-line rationale it is 30 cards, and the report goes from about 236 KB to 338 KB. That is the pattern the grouping exists for (the macOS user path finding firing on many lines), and --llm-verify is exactly when it shows up. There is a suggested key in the inline comment.

Two small things inline: one test assertion that can't fail, and the downgrade rule being copied from security.py.

Optional: docs/tier1-validation.mdx (around line 100) says downgraded findings carry verification metadata. One sentence there saying the HTML, Markdown and terminal reports now show the verdict, confidence and reasoning would help people find it.

Housekeeping: the branch is one commit behind main, and Tests (Python 3.12) was still running when I looked.

Comment thread src/skillevaluator/reporting/html.py Resolved
@rng1995
rng1995 merged commit 43a6611 into main Nov 11, 2026
22 checks passed
@rng1995
rng1995 deleted the naren/show-finding-verifier-reasoning branch November 11, 2026 17:51
rng1995 added a commit that referenced this pull request Nov 12, 2026
Keeps both Unreleased/Added CHANGELOG entries (NeMo Gym backend and
LLM verification reasoning from #454). No other files conflicted.

Signed-off-by: Narendran Raghavan <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
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.

2 participants