Repository navigation
feat: show the per-finding "Why the gate failed" explanation in the diff index.html - #96
Merged
noteflowai merged 1 commit intoNov 2, 2026
Conversation
noteflowai
deleted the
automation/feature-2026-11-02-evalarc-134438647132
branch
November 2, 2026 14:12
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.
EA-03 (Now) requires reviewers to see the smallest reproducible example, source provenance, threshold and uncertainty for each blocking finding. evalarc diff already writes this into summary.md, but index.html does not show it.
Read status of the planning inputs:
Measured gap: render_html writes a Changed checks table. Its 'Current evidence' cell joins every evidence string from current_detail, or from baseline_detail when current_detail is absent, and cuts the result to 400 characters. The page shows no numeric threshold. It does not pick out the first failing attempt, and it does not label removed-row evidence as coming from the baseline. docs/ci-gate.md says the summary.md section 'never changes ... index.html'. A reviewer who opens the 'Report:' file that the CLI prints therefore cannot see which attempt failed or which threshold applied.
The issue list is empty, and none of the research items bears on this. The choice rests on the code gap and the EA-03 milestone.
Entry point (unchanged): evalarc diff BASELINE CURRENT --output DIR writes diff.json, summary.md, index.html and copies of both inputs.
New behavior: when result['changes'] contains at least one dict row whose kind is in BLOCKING, index.html gets an h2 'Why the gate failed'. The section goes directly after the Changed checks table and before the generalization, usage, suites, case-attributes and Inputs sections.
Shared data keeps the two renderers from drifting. A new private helper _blocking_rows(result) returns the rows that _blocking_markdown selects today, with the same filter and order. For each row it returns structured, unescaped parts:
_clip is applied once to the raw value and once to the raw evidence. The attempt record follows today's rules:
A second helper returns the threshold display string (_value, or '—', exactly as now). A third returns the provenance parts, (label, name, digest[:12]) for each input, or None under the same conditions as _provenance_line.
Markdown: _attempt_text, _failing_attempt, _provenance_line and _blocking_markdown are rebuilt from these parts. Each value, evidence and name goes through _cell. The parts are joined with the same literal 'value ', 'evidence ', ' · ' and prefix strings, outside the code spans, as today. summary.md stays byte-identical, and the row limit argument and overflow line stay.
HTML: every part goes through report._esc. The threshold sentence is a p with the same wording as in summary.md (html.escape turns the apostrophe into '). The table is built with report._table('Why the gate failed', headers, rows), which render_html adds to its import from evalarc.report. In the source read, _table emits a div.scroll with tabindex="0", role="region" and aria-label="Why the gate failed", plus th scope="col". The _page regex only matches a div whose class attribute is followed directly by '>', and th replacement only touches a bare '', so _page does not duplicate these attributes.
The headers are Finding, Case / check, Baseline, Current and Failing attempt. Each cell is built as follows:
case/check.V· evidenceE, or the escaped text.The HTML lists every blocking row with no row limit, as the Changed checks table already does. When the provenance parts exist, a p.metadata reads 'Inputs: baseline
namesha256prefix, current …'. The full Inputs section stays.Absent state: if no row blocks, the section is not written and index.html is otherwise byte-identical. This covers a passing gate, an incomplete run with no changes, regression-suite-only failures and f2p-only failures.
Errors: input problems still exit 2 before any report is written. Inside the new helpers, a missing or malformed current_detail or baseline_detail produces the fallback text and never raises. The existing Changed checks loop is unchanged and still expects rows with case_id, check, baseline and current, which compare always produces.
No new CSS, JS or dependency is added. The verdict, cards, Changed checks and Inputs sections are unchanged.
Acceptance:
refund-duplicate/includes' and 'refund-duplicate/match', each with a regressed finding. One row contains 'cancel-pending/match', '✗ less reliable (within noise)' and 'valueI· evidencecancel:1006:queued'.cancel-pending/match| 2/2 | 1/2 | valueI· evidencecancel:1006:queued|' and the unchanged threshold sentence. diff.json has gate_passed false and blocking_changes 3. The existing pytest suite passes unmodified.One specialist feature. Behavioral acceptance fails on the base and passes on the implementation; project checks and independent model review passed. GPU results are included only when actually executed. Automatically developed and reviewed; no human review is claimed.