The design language that makes your AI harness better at design.
JavaScript
Merge corpus/overlays into corpus/integration
Paul Bakaus199b875d6df8
diff --cc crates/browser/src/lib.rsindex dc84c3972,b385cc01b..2507aedd3--- a/crates/browser/src/lib.rs+++ b/crates/browser/src/lib.rs@@@ -524,9 -526,18 +533,20 @@@ fn detect_url_impl};let mut consent = ConsentReport::default();+ let mut capture_notes = Vec::new();+ let mut overlays = OverlayReport::default();let scanned = scan_on_browser(- browser, url, credentials, options, wait_until, settle_ms, profile, None, &mut consent, &mut capture_notes,+ browser,+ url,+ credentials,+ options,+ wait_until,+ settle_ms,+ profile,+ None,+ &mut consent,++ &mut capture_notes,+ &mut overlays,);// finally: close page (inside scan_page) and the browser when owned.if owns_browser {@@@ -543,7 -554,13 +563,14 @@@}notes.push(consent_note(url, &consent.hidden));}+ if !overlays.hidden.is_empty() {+ let hidden = overlays.hidden_value();+ for f in findings.iter_mut() {+ f.extras.insert("overlaysHidden".into(), hidden.clone());+ }+ notes.push(overlay_note(url, &overlays));+ }+ notes.extend(capture_notes);Ok(UrlScan { findings, notes })}@@@ -573,7 -609,7 +619,8 @@@ pub fn detect_url_evidencelet (url, credentials) = split_scan_url(url);let mut evidence = Evidence::default();let mut consent = ConsentReport::default();+ let mut capture_notes = Vec::new();+ let mut overlays = OverlayReport::default();let results = scan_on_browser(browser,&url,@@@ -584,9 -620,8 +631,10 @@@options.profile.as_deref(),Some((&mut evidence, request)),&mut consent,+ &mut capture_notes,+ &mut overlays,);+ evidence.capture_notes = capture_notes;let blocked = evidence.validity.as_ref().is_some_and(PageValidity::is_blocked);if !options.keep_consent_banners && !blocked {evidence.consent = Some(consent);@@@ -845,7 -828,7 +896,8 @@@ fn scan_on_browserprofile: Option<&DetectorProfile>,evidence: Option<(&mut Evidence, &EvidenceRequest)>,consent: &mut ConsentReport,+ notes: &mut Vec<String>,+ overlays: &mut OverlayReport,) -> Result<Vec<RawResult>, EngineError> {let (vw, vh) = options.viewport.unwrap_or((1280, 800));let viewport = Viewport {@@@ -855,7 -838,7 +907,8 @@@let page = step(profile, "load", "new-page", url, || browser.new_page()).map_err(cdp_err);match page {Ok(page) => scan_page(- page, url, credentials, options, wait_until, settle_ms, viewport, profile, evidence, consent, overlays,+ page, url, credentials, options, wait_until, settle_ms, viewport, profile, evidence, consent, notes,++ overlays,),Err(e) => Err(e),}@@@ -874,7 -857,7 +927,8 @@@ fn scan_pageprofile: Option<&DetectorProfile>,evidence: Option<(&mut Evidence, &EvidenceRequest)>,consent: &mut ConsentReport,+ notes: &mut Vec<String>,+ overlays: &mut OverlayReport,) -> Result<Vec<RawResult>, EngineError> {let outcome = scan_page_inner(&mut page,@@@ -887,7 -870,7 +941,8 @@@profile,evidence,consent,+ notes,+ overlays,);step(profile, "load", "close-page", url, || page.close());outcome@@@ -928,7 -911,7 +983,8 @@@ fn scan_page_innerprofile: Option<&DetectorProfile>,mut evidence: Option<(&mut Evidence, &EvidenceRequest)>,consent: &mut ConsentReport,+ notes: &mut Vec<String>,+ overlays: &mut OverlayReport,) -> Result<Vec<RawResult>, EngineError> {step(profile, "load", "set-viewport", url, || {page.set_viewport(viewport)diff --cc docs/CLI-CONTRACT.mdindex 83e9c9463,e7801d1db..564d59333--- a/docs/CLI-CONTRACT.md+++ b/docs/CLI-CONTRACT.md@@@ -210,7 -214,7 +214,7 @@@ reports no findings and prints `stderr- text: `stderr> formatFindings(all,false) + '\n'`.- `exit(hadOperationalFailure ? 1 : (primary.length > 0 ? 2 : 0))`.- no findings: json → `stdout> []\n`; text/quiet → nothing. `exit(hadOperationalFailure ? 1 : 0)`.- - Text mode (not `--json`, not `--quiet`) prints scan notes after the findings, or alone when there are none, one line each in first-seen order: the DESIGN.md purple note, for a URL scan that hid consent banners `Hid the <names> consent banner(s) on <url> before scanning. Pass --no-consent-hiding to scan it.` (`<names>` joined `A, B and C`), and for a URL scan whose capture held sliders that never started, the capture note under `content-hidden-at-rest` below.-- Text mode (not `--json`, not `--quiet`) prints scan notes after the findings, or alone when there are none, one line each in first-seen order: the DESIGN.md purple note, and for a URL scan that hid consent banners `Hid the <names> consent banner(s) on <url> before scanning. Pass --no-consent-hiding to scan it.` (`<names>` joined `A, B and C`), and for one that hid tours or preloaders `Hid <items> on <url> before scanning. Pass --no-overlay-hiding to scan it.`, each item `the <library> tour` or `the preloader <name>`, joined the same way.++- Text mode (not `--json`, not `--quiet`) prints scan notes after the findings, or alone when there are none, one line each in first-seen order: the DESIGN.md purple note; for a URL scan that hid consent banners `Hid the <names> consent banner(s) on <url> before scanning. Pass --no-consent-hiding to scan it.` (`<names>` joined `A, B and C`); for one that hid tours or preloaders `Hid <items> on <url> before scanning. Pass --no-overlay-hiding to scan it.`, each item `the <library> tour` or `the preloader <name>`, joined the same way; and for a URL scan whose capture held sliders that never started, the capture note under `content-hidden-at-rest` below.- Exit 1 takes precedence over exit 2: findings from the targets that did scando not turn a partial scan into a complete one (#711).- Any other exit: `1` for arg errors above; uncaught exceptions propagate to `cli.js` catch (`exit 1`).diff --cc tests/oracle/DELTAS.mdindex 4cb95a928,1d327e379..aa9fba638--- a/tests/oracle/DELTAS.md+++ b/tests/oracle/DELTAS.md@@@ -6640,103 -6640,32 +6640,132 @@@ finding by finding against its predeces`url()` background still reports from the stylesheet scan, as before.+## Recorded 2026-10-03: near-black ink is not gray (corpus/premise5-hues, r6-t8)++Corpus decision `r6-t8-gray-on-color-near-black` (narrow). `is_gray_ink`+counted any low-saturation ink over lightness 0.2 as gray, so `#393939` on a+yellow card and `#413c38` on a green button (6 to 8:1, harmless to both judges)+reported as gray on colour. The floor is now `GRAY_INK_MIN_LIGHTNESS` = 0.3:+every Tailwind neutral at `-700` and darker sits under it, every `-600` and+lighter over it. The Tailwind class path skips `text-{gray,slate,zinc,neutral,stone}-{700..}`+the same way.++- `detect-fixture-json-gray-on-color-html`, `detect-fixture-text-gray-on-color-html`: the fixture's two new should-flag rows (`#4b5563` on `#fcd34d`, `text-gray-600 on bg-amber-400`) report; its three new should-pass rows (`#393939` on `#ffc224`, `#413c38` on `#38e07b`, `text-gray-800` on `bg-yellow-400`) do not.+- `detect-fixture-json-own-box-surface-and-ink-contrast-html`, `detect-fixture-text-own-box-surface-and-ink-contrast-html`: `gray-on-color` on `#363637` (lightness 0.21) on `#066bed` is gone; the `low-contrast` 2.5:1 finding on the same pair stays.+- `detect-dir-json-all-fixtures`, `detect-dir-text-all-fixtures`, `detect-dir-quiet-all-fixtures`, `detect-no-advisory-json`, `detect-no-advisory-text`: the same three moves (875 to 876 counted). Nothing else moved.++### Known limits++1. **Near-black ink that is genuinely too dark for its fill** (`#363637` on+ a mid blue) now reports only as `low-contrast`, which is the rule that owns+ that failure.+2. **The class path reads the shade number, not the colour,** so a project+ that redefines `gray-700` lighter than 0.3 is still skipped.++## Recorded 2026-10-03: the cyan band is 170 to 197 with a saturation floor (corpus/premise5-hues, r6-t7)++Corpus decision `r6-t7-cyan-band` (narrow). `TellHue::of` read any hue from+160 to 200 as cyan, so emerald buttons and icon tiles (`#059669` at 161,+`#047857` at 163, harmless to both judges on leilonozap.vercel.app) reported+as "Cyan gradient background". The band is now 170 to 197, and a cyan also+needs an HSL saturation of at least 0.4. The decision said "about 170 to+195"; the top edge is 197 so Tailwind's `cyan-900` (196) and `cyan-950`+(197) stay in, while sky (198 to 200) and hue-200 glows drop. The violet band is unchanged. The+band is defined once (`AI_PALETTE_CYAN_HUES` in `element_checks.rs`); the+category-colour test (r5-p28) reads it by hue alone through `TellHue::of_hue`.++- No golden moved. The element-level gradient and neon-ink forms are URL+ engine only, and the static engine's output for `ai-color-palette.html`+ and `ai-color-palette-category-colours.html` is unchanged by their new rows.+ The URL engine rows are pinned by `crates/browser/tests/brand_and_vendors.rs`.++### Known limits++1. **The category-colour test counts hues, not colours,** so a grayed teal+ under the saturation floor still counts as inside the cyan band there.+ That only makes the exemption harder to reach.+2. **Sky blue at 198 to 200 is no longer cyan,** so the category fixture's+ sky swatch stops reporting; the set it belongs to is still the palette.+3. **A hue-200 glow drops with sky.** arbiproseller-app.vercel.app's+ section-wide hsl(200) radial glow on dark navy (findings 138945, 139054,+ harmful to both judges) no longer reports; the band's top edge is a hue,+ and 200 is where sky sits.+## Recorded 2026-10-03: verdicts the pixels could not read, scroll-linked reveals and sliders that never started++Corpus decisions r6-t5-unread-pixel-verdicts (advisory) and+r6-t6-hidden-scroll-linked (narrow). Both change the URL engine only: a+`low-contrast` verdict the element pass hands to the pixel pass that the+pixels do not read now reports as advisory, and `content-hidden-at-rest`+leaves out reveals that show once the page is scrolled to them (a live+scroll probe, recorded in the capture's facts) and sliders whose every slide+is hidden (a capture note instead of a finding). The static engine, which+every oracle case runs, has no pixel pass and no hidden-share measure, so no+existing case moved. Three fixtures were added for the browser tests+(`content-hidden-scroll-linked.html`, `content-hidden-unstarted-slider.html`,+`low-contrast-unread-pixels.html`); their own cases are new goldens and the+directory cases changed only by their findings.++- `detect-fixture-json-content-hidden-scroll-linked-html`,+ `detect-fixture-text-content-hidden-scroll-linked-html`,+ `detect-fixture-json-content-hidden-unstarted-slider-html`,+ `detect-fixture-text-content-hidden-unstarted-slider-html`: new, no+ findings, exit 0 (both rules they exercise are browser-only).+- `detect-fixture-json-low-contrast-unread-pixels-html`,+ `detect-fixture-text-low-contrast-unread-pixels-html`: new, two+ `low-contrast` findings at full severity (`2.9:1 (need 4.5:1) — text+ #ffffff on #979797`, once per column). The static engine has no pixel pass+ to hand either verdict to, so it reports both as before; the URL engine+ drops the one the pixels read and makes the other advisory.+- `detect-dir-json-all-fixtures`, `detect-dir-text-all-fixtures`,+ `detect-dir-quiet-all-fixtures`, `detect-no-advisory-json`,+ `detect-no-advisory-text`: those two findings only (875 to 877 counted).+ No existing finding moved and no snippet changed.++Known limits:+1. **A recording made before the scroll probe answers none of its+ questions,** so a replay counts every scroll-linked box as hidden: every+ capture up to run 38 reports antropi.world as before. Only a capture made+ with this engine records `shownOnScroll`.+2. **The probe reads the box's own computed opacity and visibility.** A box+ that a script reveals by moving a child out from under a mask, or that+ needs a hover or a click, is not shown to it and counts as hidden.+3. **A reveal that runs once and failed during the sweep but runs on the+ probe's longer dwell** counts as shown: a visitor who scrolls there sees+ it. A reveal that only fires on the probe's viewport position but not a+ visitor's is not distinguished.+4. **A slider is known by its class words only.** An unclassed slider whose+ slides are all hidden still counts, as before (the base fixture's+ 0px-high slider case), and a box classed `slider` that is not one (a+ range input's track) is read as one.+5. **The static engine and the extension are unchanged:** they have no page+ to scroll and no pixels, so both decisions fail safe to base behaviour+ there.+ ## Recorded 2026-10-03: URL scans hide tours, stuck preloaders and two more consent layers (corpus/overlays)++ From the corpus round 8 harness items (site-made consent boxes, preloaders,+ tours). One golden changes, `detect-help`: the usage text gains+ `--no-overlay-hiding` after `--no-consent-hiding`. No fixture case changes:+ the oracle scans files. The URL behavior is pinned by+ `crates/browser/tests/overlay_hiding.rs` over `tests/fixtures/overlays/` and+ two new cases in `consent_hiding.rs`.++ - **consentmanager** (letour.fr): `#cmpwrapper` (the open shadow root host+ its `#cmpbox` renders in) and `#cmpbox`.+ - **Borlabs Cookie** (fischundfang.de) was already hidden by+ `#BorlabsCookieBox`; it now also hides `#BorlabsCookieWidget`, counts+ `#BorlabsDialogBackdrop` as a backdrop (so its inline body+ `overflow: hidden` is undone), and removes the `aria-hidden="true"` Borlabs+ marked with `data-borlabs-cookie-aria-hidden` (the page wrapper).+ - **Tours:** driver.js 1.x only, by its own classes; no other tour library+ appears in the corpus. **Preloaders:** structural (see the contract); wait+ up to 5s, then hide. Findings carry `overlaysHidden: [{ kind, name }]`;+ `consentHidden` is unchanged.++ Measured live, runs 39 and 40 against run 38 (same pages):+ fischundfang.de 2,928 to 5,729 findings, all but 12 of the rise+ `undersized-ui-text` on the 10px category tags of every post card, which the+ Borlabs aria-hidden had kept out of the rule; letour.fr 104 to 102 with+ consentmanager hidden on every capture; gamer.com.tw 374 to 372 with the+ tour hidden on all four; epcco.com.sa's `div#preloader` hidden on two of six+ captures; bankofamerica.com unchanged (no state picker showed in either run,+ and nothing of the site's was hidden).