Skip to content

feat: show the per-finding "Why the gate failed" explanation in the diff index.html

Choose a tag to compare

@noteflowai noteflowai released this 02 Nov 18:55
· 12 commits to main since this release
b15bdb6

When a diff has at least one blocking change, evalarc diff BASELINE CURRENT --output DIR now writes a 'Why the gate failed' section into DIR/index.html. This is the report the CLI prints as 'Report:'. The section comes after the Changed checks table and before the remaining sections.

The section contains:

  • The numeric threshold sentence, worded as in summary.md.
  • A table with the columns Finding, Case / check, Baseline, Current and Failing attempt.
  • A metadata line with each input's file name and a 12-character sha256 prefix.

Table cells:

  • Finding shows the kind, plus '(within noise)' when flagged. It is rendered as a ✗ tone label, so it does not rely on color.
  • Failing attempt shows the first failing current attempt's value and evidence, each clipped to 120 characters.
  • Removed checks show the baseline attempt, labelled 'not recorded in the current run; baseline:'.
  • Rows without detail show 'no attempt detail recorded'.

Every value is HTML-escaped. The HTML table lists every blocking row with no limit. summary.md and index.html are both built from the shared helper _blocking_rows. When nothing blocks, the section is not written. The gate logic, exit codes and the diff.json schema are unchanged.

Use it

Prerequisites: a checkout of this repository at commit 7f29db9, with the evalarc command installed from it. The two input files below are bundled example files that ship in the checkout, so you do not need to create any input.

Blocking diff. Expected exit 1.

evalarc diff examples/results-diff/inspect/baseline.json examples/results-diff/inspect/current.json --output inspect-diff; echo exit=$?
grep -c 'Why the gate failed' inspect-diff/index.html # nonzero

Open inspect-diff/index.html in a browser and scroll below Changed checks.

Expected row (from the acceptance criteria):

✗ less reliable (within noise) | cancel-pending / match | 2/2 | 1/2 | value I · evidence cancel:1006:queued

Self-comparison. Expected exit 0, and the section is absent.

evalarc diff examples/results-diff/inspect/current.json examples/results-diff/inspect/current.json --output self-diff; echo exit=$?
grep -c 'Why the gate failed' self-diff/index.html # prints 0

Feature tests. The escaping test appends labelled synthetic rows.

python -m pytest -q tests/test_feature_e5db40f1ad73.py

Scope and upgrade

I ran no commands. The controller ran all checks on commit 7f29db9 (base 5ac4e64).

Pre-change run: in the run logged as acceptance-before, the feature test file exited 1, with 3 failed and 2 passed. The three failures were the HTML section, escaping and region tests, which is consistent with the gap before the change.

Final run, all exit 0:

  • the feature tests
  • the full pytest suite
  • ruff check
  • ruff format --check (this fixes the earlier format finding)
  • build_site.py
  • check_site.cjs

The test counts for the final full-suite run are not in the supplied receipts.

Browser evidence: check_site.cjs ran the existing showcase browser regression checks at widths of 1440, 390 and 320 px, plus offline checks. The log excerpt does not show a diff index.html with the new section, and no screenshot was reviewed. The new section's visual quality, narrow-width scrolling and keyboard behavior in a browser are therefore unverified. The feature tests check generated HTML strings, markup and escaping on the bundled example and on synthetic rows. They do not prove accuracy on other inputs.

The threshold and the within-noise flag come from the existing logic and were not recalibrated. No byte-for-byte comparison of summary.md against the base commit's output was recorded. Very large diffs produce a long HTML table. The EA-03 reviewer-timing target was not measured.

Upgrade the package and rerun evalarc diff to regenerate index.html. Input formats, diff.json and exit codes are unchanged. summary.md is built by the same rules as before. Existing report folders are not rewritten.

To roll back, install the previous version and regenerate the reports. You can regenerate from the input copies kept in each report folder, so no data is lost. Pipelines that parse index.html should allow for the new section, which appears only when the gate has blocking findings.

Verification

  • Source: #96
  • Version: 0.23.0
  • Verified source commit: b15bdb6b68075d0d8740b0d16033e84f9283a851
  • Behavioral acceptance and the repository's release checks passed.

Authored and reviewed with agent assistance; no human review is claimed.