Repository navigation
Coded verify diagnostics - #222
Merged
Merged
Conversation
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
4 tasks done
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.
What changed
verifynow returns codeddiagnosticsin the shapevalidatealready has, through the API,results.json,verify --jsonand thefinalizereceipt.Why
Closes #201, finishing what #214 started for
validate. A failing verify used to reportlayout parity failed on 3,6and 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.{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.parity/codes:parity/overflow, with evidence{need, have}and the fixw: <need>;nowrap-lines,line-count,ink-through-text,straddles-container,text-over-text,arrow-in-fill,outside-canvas,occlusion,counter-margin,counter-drift.parity/page-error,parity/crowding(a warning),ae/over-thresholdanddeck/network.PARITY_CODESclassifies the problem strings the browser pass already writes, so the in-page measuring code is unchanged. A static test fails if a newproblems.pushstring has no code.results.jsonis 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:verify.mjsmatches a code;results.jsonandverify --json(exit 1).test/finalize.test.mjsandtest/scope.test.mjsstill pass.npm testwith 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.htmlrebuild: not needed, neither file is built fromverify.mjsorfinalize.mjs.Generated by Claude Code