Skip to content

Coded verify diagnostics - #222

Merged
grunion-ai merged 1 commit into
mainfrom
claude/verify-codes
Nov 8, 2026
Merged

grunion-ai merged 1 commit into
mainfrom
claude/verify-codes

Conversation

@grunion-ai

Copy link
Copy Markdown
Owner

What changed

verify now returns coded diagnostics in the shape validate already has, through the API, results.json, verify --json and the finalize receipt.

Why

Closes #201, finishing what #214 started for validate. A failing verify used to report layout parity failed on 3,6 and leave the agent to dig through per-row problem strings. Coded failures name the row and the fix, and give #208 (the authoring benchmark) failure classes it can count.

  • Each rendered problem becomes {code, severity, engine, message, subject, evidence?, fixes}. The subject is {slide, el, id}, or {slide, master, id} for a master row; the contract's validate codes come first.
  • Eleven parity/ codes:
    • parity/overflow, with evidence {need, have} and the fix w: <need>;
    • nowrap-lines, line-count, ink-through-text, straddles-container, text-over-text, arrow-in-fill, outside-canvas, occlusion, counter-margin, counter-drift.
  • Also parity/page-error, parity/crowding (a warning), ae/over-threshold and deck/network.
  • PARITY_CODES classifies the problem strings the browser pass already writes, so the in-page measuring code is unchanged. A static test fails if a new problems.push string has no code.
  • results.json is now written after the aggregate errors are known, so it carries those and the diagnostics.

How it was verified

  • test/verify-codes.test.mjs, red before the change: 5 pass. It covers:
    • every problem string in verify.mjs matches a code;
    • each code's subject, row id, engine and evidence;
    • crowding as a warning, page errors, AE, the network and the contract's codes;
    • the finalize receipt;
    • a live Chromium overflow read back through the API, results.json and verify --json (exit 1).
  • test/finalize.test.mjs and test/scope.test.mjs still pass.
  • npm test with Chromium only: 634 pass, 19 fail, the same 19 that fail on untouched main in this container (17 WebKit cases with no WebKit installed, two sub-pixel toolbar overlaps from container fonts). CI runs all three engines.
  • deck.html / library.html rebuild: not needed, neither file is built from verify.mjs or finalize.mjs.

Generated by Claude Code

verify returns diagnostics in validate's shape: the contract's codes,
then one per rendered problem with its engine, subject {slide, el, id}
or {slide, master, id}, evidence and fixes. PARITY_CODES reads the
problem strings the browser pass already writes, so the in-page
measuring code is unchanged; a static test pins every problems.push
string to a code. verify --json prints them, results.json carries them
and is now written after the aggregate errors, and the finalize
receipt carries them on the verify stage.

Closes #201

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CiXonXtVxd5FHk4XqMzY8f
@grunion-ai grunion-ai mentioned this pull request Nov 8, 2026
4 tasks done
@grunion-ai
grunion-ai merged commit fd2d42d into main Nov 8, 2026
1 check passed
@grunion-ai grunion-ai mentioned this pull request Nov 8, 2026
3 of 4 tasks
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.

Coded diagnostics with fixes

2 participants