Skip to content

fix(reporting): show the evidence that decided the BENCHMARK.md verdict - #524

Merged
rng1995 merged 4 commits into
mainfrom
naren/benchmark-verdict-evidence
Nov 13, 2026
Merged

rng1995 merged 4 commits into
mainfrom
naren/benchmark-verdict-evidence

Conversation

@rng1995

@rng1995 rng1995 commented Nov 13, 2026

Copy link
Copy Markdown
Collaborator

Finishes the last open code item on #192.

The maintainer's triage sorted that issue into four items. Three are done — the 1.6.0 gate fix, the 1.7.1 Excluded — <reason> label, and #507's token-row validation and security false positives. This is the fourth, in the maintainer's words: "The report still needs to show the evidence that actually decided the verdict."

The complaint

The reporter's BENCHMARK.md declared Overall verdict: PASS — Recommended for publication while Claude Code had no dimension scores at all and Codex Security sat at 23.8%, below the documented 40% FAIL boundary. Everything the report offered by way of explanation was the banner itself:

# Skill Benchmark: demo-skill

> ✅ **Overall verdict: PASS — Recommended for publication**

## Publication Recommendation

There was no way to tell whether PASS was right and the reader had misunderstood the rule, or whether the gate was broken.

What the report says now

A ### Why This Verdict block is rendered directly beneath the callout on the full-report path. For the issue's own shape:

### Why This Verdict

- Decision: **PASS** — every publication-required tier passed and the Tier 3 dimension gate passed.
- Tier 3 evidence: **PASS** (publication-complete; required for publication). Dimension gate: an agent
  passes when every dimension is at or above 50% and fails when any dimension is below 40%.

| Agent | Dimension gate | Evidence the gate read |
|---|---|---|
| Claude Code | not counted | no complete dimension set was recorded, so the gate read nothing from this agent |
| Codex | fail | Security 23.8% below the 40% FAIL boundary |
| Gemini Cli | pass | every dimension at or above the 50% PASS boundary (lowest: Security 90.0%) |

A failing agent does not overturn this gate: it asks whether any one supported agent passed every
dimension, and one did.

diff of the card before and after is exactly this inserted block — no number, verdict or other line moved.

FAIL lists its blocking reason and omits the "does not overturn" line; NEUTRAL names the dimension that sits between the boundaries; INCOMPLETE lists every recorded reason; a skipped Tier 3 says so. An agent held out with a recorded reason renders it, e.g. … (baseline unavailable (0 of 24 attempts scored)), which is precisely the information whose absence confused the reporter.

Why the explanation cannot drift from the verdict

A second, parallel explanation of a verdict is a latent lie: it agrees today and diverges the first time the gate changes. This takes the other route.

  • render_all computes _publication_assessment(...) once. The printed status is _assessment_status(assessment) and the explanation reads that same object. There is no second status computation.
  • The per-agent table comes from a new agent_eval_dimension_breakdown(...) — the same call, the same payload, the same require_baseline=True that assess_tier3_evidence uses. The existing agent_eval_dimension_verdict is now a pure fold of that breakdown, so the table cannot show a classification the verdict did not use.
  • test_rendered_explanation_never_contradicts_the_computed_verdict asserts over four payload mutations that the rendered decision equals _overall_status(...) and the callout.

No verdict changes. The refactor was checked differentially against a verbatim copy of the pre-change agent_eval_dimension_verdict over 40,000 randomized payloads — both require_baseline values, malformed agent sets, missing dimensions, broken lifts, never-activated agents, not-applicable baselines — with 0 mismatches.

Publication safety

BENCHMARK.md is signed and published, and agent names are untrusted. Agent names go through _agent_display_label then _md_cell; reporter vocabulary through _trusted_md_cell; assessment and arm reasons through _publication_safe_inline with private-label redaction threaded through. test_untrusted_agent_identity_cannot_inject_markdown_structure proves a |-bearing agent name cannot open a column or a section. The block deliberately avoids the string Overall verdict: so the publication gate's duplicate-verdict-field check still sees exactly one.

Tests

tests/reporting/test_verdict_evidence.py is new (14 tests). Both golden cards are regenerated. The new tests plus the full golden suite: 253 passed. ruff check clean; CHANGELOG under ## Unreleased only with zero deletions from released sections.

Three failures in the wider reporting selection are pre-existing and fail identically on a clean main: two are ModuleNotFoundError: No module named 'harbor.agents.agent_auth_resolution' and one is Harbor environment kwarg contract drift — all three are the shared venv's Harbor version not matching the tree.

One thing worth a reviewer's eye

In the regenerated benchmark_fail golden, both agents render as "not counted". That is accurate: the fixture sets per-dimension baselines and lifts but leaves a stale agent-level lift from the pass fixture, so the gate genuinely reads nothing from either agent and the FAIL comes from the Tier 1 HIGH finding. It is a pre-existing fixture inconsistency that this block makes visible rather than a behaviour change — but it is worth deciding whether to repair the fixture separately.

Scope

This does not close #192. The remaining item is operational and outside this repository: re-running NVSkills CI on a current release and regenerating BENCHMARK.md and skill.oms.sig for the NVFlare skill.

🤖 Generated with Claude Code

rng1995 and others added 2 commits November 13, 2026 12:50
The full report declared `Overall verdict: PASS — Recommended for
publication` with nothing that explained the decision. A reader could see an
agent with no dimension scores and another agent below the documented 40%
FAIL boundary and had no way to tell why the gate still passed (issue #192).

The card now renders a "Why This Verdict" block under the verdict callout:
the rule that fired, the Tier 3 evidence state with its publication policy,
each blocking reason, and a per-agent table of what the dimension gate
actually read — which agent passed every dimension, which dimension fell
below the FAIL or PASS boundary, and which agent the gate did not count,
naming the excluded arm when the run recorded one.

`agent_eval_dimension_verdict` is now a fold of a new
`agent_eval_dimension_breakdown`, and the block is rendered from that
breakdown and from the same `PublicationAssessment` the printed status is
projected from, so the explanation cannot drift from the verdict. Agent
names and recorded reasons go through the existing publication-safety
helpers. No verdict changes.

Signed-off-by: Narendran Raghavan <[email protected]>
Co-Authored-By: Claude Opus 5 <[email protected]>
Signed-off-by: Narendran Raghavan <[email protected]>
Co-Authored-By: Claude Opus 5 <[email protected]>

@rng1995 rng1995 left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Found two correctness issues in the new verdict explanation. I am addressing both and will resolve these threads after regression tests pass.

@rng1995
rng1995 enabled auto-merge (squash) November 13, 2026 22:49
@rng1995
rng1995 merged commit d7459a4 into main Nov 13, 2026
27 checks passed
@rng1995
rng1995 deleted the naren/benchmark-verdict-evidence branch November 13, 2026 22:58
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.

[BUG]: Generated BENCHMARK.md does not faithfully explain a passing gate and splits canonical case IDs

1 participant