feat(udg): the review artifact checks its own claims #159

Merged
peterswimm merged 1 commit from feat/udg-artifact-geometry-check into main 2026-09-17 14:23:10 +00:00
Owner

The self-check asserted that a mask survived. It could not assert that the artifact was telling the truth — and section 05 once labelled three identical grid columns 360/640/1024, claiming they demonstrated a band scaling with width. They demonstrated nothing. Every mask-and-size check passed. It shipped.

the width row, now rendered at its stated widths

Scope

1 · The check had a blind spot in its most important assertion. It measured the panel, not the pull: getBoundingClientRect cannot reach a pseudo-element, so ::before/::after were measured via their panel's rect. That meant ZERO HEIGHT and ZERO WIDTH — the two checks that exist to catch a collapsed pull — were structurally unable to fire. Now measured on the pull via computed style, which is what my probes used all along.

2 · A panel that states a number now declares it. data-expect-w and data-expect-band hand the caption's claim to the check, which compares it against what rendered. A mismatch reads "the caption is lying".

Testing

just check green · 280 tests · self-check reports every stated claim matches what rendered.

Verified by reintroducing the original bug rather than trusting a pass:

*** 4 FAILURE(S) ***
panel 5 CLAIMS width 640px -> renders 360px   FAIL: the caption is lying
panel 5 ::before  pull 360x10.7 mask ok       FAIL: BAND claims ~19.0px, renders 10.7px
panel 6 CLAIMS width 900px -> renders 360px   FAIL: the caption is lying
panel 6 ::before  pull 360x10.7 mask ok       FAIL: BAND claims ~26.8px, renders 10.7px

Both dimensions caught. The readout also shows the pull's real size (360x10.7) rather than its panel's — the blind-spot fix, visible.

New tests pin: the check measures the pull not the panel; it verifies stated claims; every width-bearing panel declares its width; and the band expectations are derived from the plate's own viewBox ratio, so a caption cannot drift from the drawing by someone hand-editing a number.

Impact Statement

Scoped to the review artifact. No token, generator, or product output changes behaviour. dist/ churn is the artifact and its stills; versions bumped.

This closes the half @property could not. Types stop a wrong value. They cannot stop a value that is right, renders fine, and means something other than what the page says about it. #158 narrowed the gap where a client mis-wires a var; this one narrows the gap where the artifact itself misrepresents what it drew — which is the failure that actually reached a reviewer.

Still open, and honestly not solvable this way: a dropped mask. An unset plate types to none, a valid value meaning "no mask", so the element paints raw pigment. The check reports MASK DROPPED when that happens, which is the right answer — but only for panels the artifact renders. A press used in a product surface and never added to the review page is unchecked by construction.

Reversibility: high. The declarations are attributes; removing them returns the check to mask-and-size only.

The self-check asserted that a mask survived. It could not assert that the artifact was **telling the truth** — and section 05 once labelled three *identical* grid columns 360/640/1024, claiming they demonstrated a band scaling with width. They demonstrated nothing. Every mask-and-size check passed. It shipped. ![the width row, now rendered at its stated widths](https://git.toilville.dev/Toilville/toilville-design/raw/commit/94e87f5/scratchpad/press-review/05-anchor.png) ## Scope **1 · The check had a blind spot in its most important assertion.** It measured the *panel*, not the pull: `getBoundingClientRect` cannot reach a pseudo-element, so `::before`/`::after` were measured via their panel's rect. That meant `ZERO HEIGHT` and `ZERO WIDTH` — the two checks that exist to catch a collapsed pull — were **structurally unable to fire**. Now measured on the pull via computed style, which is what my probes used all along. **2 · A panel that states a number now declares it.** `data-expect-w` and `data-expect-band` hand the caption's claim to the check, which compares it against what rendered. A mismatch reads *"the caption is lying"*. ## Testing `just check` green · **280 tests** · self-check reports *every stated claim matches what rendered*. **Verified by reintroducing the original bug rather than trusting a pass:** ``` *** 4 FAILURE(S) *** panel 5 CLAIMS width 640px -> renders 360px FAIL: the caption is lying panel 5 ::before pull 360x10.7 mask ok FAIL: BAND claims ~19.0px, renders 10.7px panel 6 CLAIMS width 900px -> renders 360px FAIL: the caption is lying panel 6 ::before pull 360x10.7 mask ok FAIL: BAND claims ~26.8px, renders 10.7px ``` Both dimensions caught. The readout also shows the pull's real size (`360x10.7`) rather than its panel's — the blind-spot fix, visible. New tests pin: the check measures the pull not the panel; it verifies stated claims; every width-bearing panel declares its width; and **the band expectations are derived from the plate's own viewBox ratio**, so a caption cannot drift from the drawing by someone hand-editing a number. ## Impact Statement **Scoped to the review artifact.** No token, generator, or product output changes behaviour. `dist/` churn is the artifact and its stills; versions bumped. **This closes the half `@property` could not.** Types stop a *wrong* value. They cannot stop a value that is right, renders fine, and means something other than what the page says about it. #158 narrowed the gap where a client mis-wires a var; this one narrows the gap where the artifact itself misrepresents what it drew — which is the failure that actually reached a reviewer. **Still open, and honestly not solvable this way:** a dropped mask. An unset `plate` types to `none`, a *valid* value meaning "no mask", so the element paints raw pigment. The check reports `MASK DROPPED` when that happens, which is the right answer — but only for panels the artifact renders. A press used in a product surface and never added to the review page is unchecked by construction. **Reversibility:** high. The declarations are attributes; removing them returns the check to mask-and-size only.
feat(udg): the review artifact checks its own claims
All checks were successful
PR policy check / policy-gate (pull_request) Successful in 0s
Security Scans / Gitleaks secret scan (pull_request) Successful in 27s
Security Scans / Trivy filesystem scan (pull_request) Successful in 31s
Test Generator / lint-workflows (pull_request) Successful in 20s
Test Generator / lint-prose (pull_request) Successful in 19s
UDG dist drift gate / dist/ matches dtcg + udg sources (pull_request) Successful in 13s
Block Validation / validate (pull_request) Successful in 56s
Copy coverage / Design copy reaching rendered HTML (pull_request) Successful in 27s
Test Generator / test (pull_request) Successful in 3m32s
94e87f5b8b
The self-check asserted that a mask survived. It could not assert that the
artifact was telling the truth — and section 05 once labelled three IDENTICAL
grid columns 360/640/1024, claiming they demonstrated a band scaling with width.
They demonstrated nothing. Every mask-and-size check passed. It shipped.

Two fixes, one of them a blind spot in the check itself:

1. It measured the PANEL, not the pull. getBoundingClientRect cannot reach a
   pseudo-element, so `::before`/`::after` were measured via their panel's rect —
   which meant ZERO HEIGHT and ZERO WIDTH, the check's most important assertions,
   were structurally unable to fire for a collapsed pull. Now measured on the
   pull via computed style, which is what the probes used all along.

2. A panel whose caption states a number declares it (data-expect-w,
   data-expect-band) and the check compares the claim against what rendered. A
   mismatch reads "the caption is lying".

Verified by reintroducing the original bug rather than trusting a pass:

  panel 5 CLAIMS width 640px -> renders 360px   FAIL: the caption is lying
  panel 5 ::before  pull 360x10.7  FAIL: BAND claims ~19.0px, renders 10.7px

Both dimensions caught. The band expectations are derived from the plate's own
viewBox ratio and a test pins them there, so a caption cannot drift from the
drawing by hand-editing a number.

This closes the half @property could not. Types stop a wrong value; they cannot
stop a value that is right, renders, and means something other than what the page
says about it. That needs the artifact to state its claims and be measured
against them.

Verified: just check green; 280 tests; self-check reports every stated claim
matching what rendered.
peterswimm deleted branch feat/udg-artifact-geometry-check 2026-09-17 14:23:10 +00:00
Sign in to join this conversation.
No description provided.