Repository navigation
ra 0.1.3: the rollout's false positives, faster tall pages, notes on passing states - #4
Merged
Merged
Conversation
With javascript: false, Chromium refuses every script request, module and script preloads among them, and labels the refusal csp although no policy is involved (crbug.com/600795). ra reported each as a failed request. A look with scripts off now skips a script request refused as csp; a stylesheet a real policy refuses is still reported, and so is any csp refusal with scripts on. tricky gains a scripts-off state with both preloads, which stays clean; refused is a scripts-off page whose own policy refuses its stylesheet. Co-Authored-By: Claude Opus 5.5 <[email protected]>
….1.3) - Overlap counts only what a line's boxes show (ellipsis, scrolled out of sight). - Cut-off marks each scrollable edge on its own; a control pushed past a side that does not scroll is cut off however little of it shows. - Covered leaves alone a control scrolled out of its box's sight, and, in a look that is not scrolled, one a scroller could bring clear of a cover that stays put. - Tap targets: the inline exception walks inline spans, a control takes in what it holds, and a fixed control moved off the screen is not a target. - Contrast skips off-screen text under a fixed layer in a stepped look. - busy forgets requests a new document cancelled (seen on playwright-core 1.62). - The text-free picture turns transitions off, which kept it from stalling on pages that ease every color; the first scroll pass waits one frame per place. - check prints notes under every state and counts them, adds a note when covered stops after 40 screens, and lists a failing state's accepted findings. - Docs: scroll with steps, the upgrade recipe for Bun and npm, notes. Co-Authored-By: Claude Opus 5.5 <[email protected]>
- Measure a tap target without text kept for screen readers far off the screen, the part of a picture a box inside crops, or what floats clear of the control, such as a tooltip. - A fixed control escapes the boxes around it unless one holds fixed layers, so they no longer hide it from `covered`; a control pushed past the top of a box that clips is reported as cut off. - In a look its steps left in place, a control that stays put, a page that hides its overflow, and a cover fixed inside a transformed box are never cleared by scrolling. - Overlap compares two lines in the same scroller wherever they are. - A scroller on a fixed layer, such as a full-screen menu, can bring a control onto the screen, so its tap targets are checked. - A planted case for each in broken.html and three new pages, a look-alike in tricky.html, and docs/findings.md to match. Co-Authored-By: Claude Opus 5.5 <[email protected]>
0thernet
added a commit
to hraness/stripe-history
that referenced
this pull request
Nov 18, 2026
ra now looks at Stripe History the way hraness.com/stripe serves it. CI
runs it against `next start` in two `Build and browser layouts` jobs,
and the Production browser workflow runs it against hraness.com after
each deployment. It replaces `scripts/verify-site-browser.mjs`.
It uses ra 0.1.3, which fixed the four false positives that held this
pull request. On this head, ra finds nothing locally or in CI, and every
check passes.
## What ra looks at
- **15 states** in `ra.config.ts`:
- **Pages:** `timeline`, `data`, `about`, `valuation`, `payment-volume`,
`net-revenue`, `appearances`, `acquisitions`, `event`, `contact`,
`privacy` and `not-found` (a 404).
- **Flows:**
- `year-jump`: a year link followed, at 1440, 880, 848, phone and 320px
widths.
- `measures`: the phone scale chart, stepped through each measure.
- `appearance`: the other mode, kept over a reload, then Gruvbox, then
the Data link.
- **Views:** desktop (1440×900) and phone (390×844, touch) in light and
dark, and narrow (320×640, touch).
- **Serving.** After `bun run build`, ra starts `next start`, which
sends the site's own security headers.
- **World.**
- Blocked: the analytics paths on hraness.com, and the shared footer's
telemetry and mailing calls.
- Answered: the consent region call, as an opt-in region, so no look
counts as a visit.
- **Every page** keeps the old script's own checks, in `sitewide()`:
- an h1;
- `data-theme` following the system;
- Paper's palette and canvas;
- the footer in normal flow;
- the Ask AI label;
- no table wider than its column;
- 44px phone header targets;
- drawn category glyphs.
`about` keeps the publication-link check, and `timeline` keeps the 2 MB
HTML budget.
- **Timing:** the 72 looks take 128 s locally. In CI, the pages part's
62 looks take 68–110 s, and the timeline part's 10 looks take 48–51 s.
## Fixed
1. **Valuation badges at 320px ran off the page.** ra reported: `cut-off
12 pieces of text are cut off on the right by the edge of the page,
starting with "financing / tender" (9px hidden).` Below 22.5rem the
badge now moves under the value, as in the scale chart's valuation card.
2. **The event page's closing links were too close on touch.** ra
reported: `small-target 2 tap targets … smaller than 24px with other
controls close by, starting with link "All 15 origins and early company
events" (304×19).` The links keep their running line. On a coarse
pointer each line is now 48px tall, and the links get 0.75rem of block
padding.
3. **The 404 page's links to `llms.txt` and the sitemap went through the
router.** Production answers the router's prefetch of them with 500 and
404. Local `next start` doesn't fail them, so only the production check
saw it. They are plain links now, and `app/runtime-surfaces.test.tsx`
expects their public paths.
Production has all three today. ra 0.1.3 against hraness.com finds
exactly these, 5 findings in 3 of the 15 states. The Production browser
run after this deploys should be clean.
## What replaced what
| `scripts/verify-site-browser.mjs` (221 lines) | ra |
|---|---|
| 11 routes at 360, 390 and 1440px, in light and dark, 3 contexts at a
time | 11 page states plus `not-found`, at desktop, desktop.dark, phone,
phone.dark and narrow (320px), 4 looks at a time |
| Status 200 | ra's `load` finding. `not-found` expects 404. |
| HTML under 2 MB on `/stripe` | `timeline`'s expect |
| Horizontal overflow; a capture as wide as the viewport |
`page-scroll`, `spill` and `cut-off` |
| h1, theme, palette, canvas, footer, Ask AI, wide tables, phone header
targets, glyphs | `sitewide()`, in every page state's expect |
| Every image made eager, then required to be complete, with a natural
width, and decoded | `request` and `image` findings. The only images are
`/about`'s topic icons, and ra's scroll-through loads all of them. |
| Console errors and page errors, listing responses ≥ 400 | `console`
and `request` findings |
| Publication links on `/about` | `about`'s expect, still through
`scripts/verify-publication-links.mjs` |
| The year link clears the sticky header and filters at 848, 880, 1440
and phone widths | `year-jump` |
| The phone scale chart's measures snap to the rail and draw their
glyphs | `measures` |
| Appearance: the mode kept over a reload, the storage keys shared with
hraness.com, Gruvbox painting the page and surviving navigation |
`appearance` |
| Viewport and bottom screenshots, `results.json` | Viewport and
full-page pictures in `.ra/check` |
| `--production` | `ra check --url https://hraness.com`. All 15 states
run there. The three flows are `live: true`, since they only click and
change this browser's own storage. |
| Chromium pinned through `scripts/pinned-browser.ts` | The same
Chromium build through `playwright-core` 1.62.0, ra's peer dependency.
ra prints the `browser:` line. `pinned-browser.ts` and its test stay for
the compiled-preview canary. |
| — | New checks: contrast, tap targets, covered controls, accessible
names, overlap, and the 404 page |
The old 360px width becomes 320px, which is stricter. 360 dark has no
view of its own; desktop and phone cover dark.
## CI
- **`Build and browser layouts (pages)` and `(timeline)`**
(ubuntu-latest) are one matrix job, and `Required` needs both parts.
- The timeline's two states take as long as the other 13 together, so
they get a job of their own. The pages part takes every other state from
`ra states --json`, so a new state is checked without a change to
`ci.yml`. If no state names are left, the step fails rather than
checking every state.
- The Chromium cache key follows the installed `playwright-core`
version, in both workflows. Pull requests only restore it. The pages
part saves it on `main` once the install has succeeded. No such cache
exists yet; the first `main` run after this merge creates it. Until
then, each part downloads Chromium while Next builds, and the download
finishes before the build does.
- Pictures are uploaded as `site-browser-pages` and
`site-browser-timeline` and kept 7 days.
- The timeout stays at 20 minutes.
- **`Production site browser`** (ubuntu-24.04):
- `bun run ra check --url https://hraness.com`;
- pictures uploaded as `production-site-browser`;
- timeout raised from 10 to 20 minutes.
- **The weekly delivery** accepts a CI run only when exactly its jobs
succeeded, on the first attempt. `scripts/deliver-weekly-history.ts` now
names them in `CI_JOBS`. A test keeps `CI_JOBS` equal to the jobs
`ci.yml` defines. It also refuses a job-level `if` that could leave a
job out of a dispatched run.
- The review of the split found that the four-job fixture had moved two
of the delivery's rejection tests onto other checks. Each rejection test
now names the message of the check it reaches, and a new one drops a
browser part. With the job comparison deleted, both missing-job tests
now fail.
- `scripts/verify-publication-links.d.mts` declares the `required` field
that the script already reads.
- **Overlaps.**
- No existing `uses:` line changes, since #74 bumps them. The new cache
steps pin the `actions/cache` v6.1.0 that the production workflow
already uses.
- `package.json` and `bun.lock` also change in #98, which can't be
avoided for the new dependency.
## CI time
The rule compares median wall time for the slowest workflow, CI:
| CI on pull requests | Runs | Median wall time |
|---|---|---|
| Before, on other branches | last 21 / last 10 | 210 s / 176.5 s |
| ra in one browser job (9e89f71) | 1 | 250 s |
| ra in two parts (9eaf547 and 7bd7051) | 4 | 227.5 s (167, 193, 262,
266) |
- **Before:** the browser job took 119–142 s, of which the old check was
29–34 s.
- **One job on 0.1.3:** 238 s, with build 86 s and ra 125 s.
- **Two parts:** +17.5 s against the last 21 runs and +51 s against the
last 10, both inside the one-minute rule.
- The two slow runs had slow runners. Their pages part took 112–113 s to
build and 109–110 s for ra, against 65–67 s and 68–72 s in the fast
runs.
- The pages part takes 149–247 s, including ra 68–110 s.
- The timeline part takes 155–183 s, including ra 48–51 s.
- **Cost:** the repository is public, so the second job costs no billed
minutes.
## The weekly delivery
- **Deadlines stay as they are:** 25 minutes from the start, extended to
at most 42 for evidence already queued, inside the workflow's 45.
- Its two CI runs take about 3–4.5 minutes each.
- The production browser run should take about 4–5 minutes: ra took 187
s against production from a Mac, and the run downloads Chromium every
time (see Known limits).
- That puts the deliver step at about 11–14 minutes. The first
Production browser run after this merge measures it.
- **More installs to fail:** each CI run now installs Chromium's system
packages twice. The delivery's two CI runs make four installs where they
made two, and the delivery allows no reruns. A mirror failure in any of
them fails that week's delivery. `scripts/ci-ubuntu-mirror.py` and the
20 s apt timeouts bound each attempt.
- **Next run:** Thursday 2026-11-19 at 13:17 UTC. It is the first
protected delivery with these jobs.
## ra 0.1.3
The four false positives that held this pull request are fixed in
hraness/ra#4, which reproduces each one:
| False positive here | hraness/ra#4 repro | 0.1.2 | 0.1.3 |
|---|---|---|---|
| Links under the sticky header after `year-jump`'s steps | A sticky
header after a jump, steps | `covered header "Home" covers 2 controls` |
clean |
| Controls clipped by a scrolling box: the phone scale chart's rail, the
desktop valuation list | A scroller whose clipped last links sit over
the next block | `covered footer … covers 2 controls` | clean |
| The skip link held off screen, in `measures` at 320px | A fixed skip
link moved off the screen | `small-target`, and `contrast` 1:1 | clean |
| `appearance`'s reload, in production only | A reload in steps with an
open request | `busy … still loading after 5s` | clean |
On this branch, all 15 states pass locally and in CI, and production's
`appearance` passes too.
## Known limits
- **Very tall pages.** The timeline pages are 85,000–138,000px tall.
- ra scrolls through their first 40 screens, and its pictures and
contrast cover their first 12,000px. They have no images, so nothing
below that goes unloaded.
- In two of their looks, a picture times out after 10 s. ra keeps those
looks' layout findings but loses their contrast check, and says so in a
note. This is on ra's list for 0.1.4.
- **The production run downloads Chromium every time.** `actions/cache`
refuses `deployment_status` events ("Event Validation Error"), so only a
dispatched run uses the cache. `main` already worked this way.
## Follow-up
Production answers a router prefetch of `/stripe/llms.txt` (`RSC: 1`,
`Next-Router-Prefetch: 1`) with 500, and of `/stripe/sitemap.xml` with
404. A plain GET of either gets 200. This pull request stops the 404
page from prefetching them, but anything that sends those headers still
gets the 500, and its cause isn't known yet.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
---------
Co-authored-by: Claude Opus 5.5 <[email protected]>
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.
ra 0.1.3 fixes the false alarms and gaps that the 0.1.2 rollout found. A text-free picture no longer stalls on pages that ease their colors. Notes now show under passing states. Each fix below names its planted case, and every plant fails without its fix.
Fixes
javascript: falseare no longer reported asrequest … failed (csp).csp, although no policy is involved (crbug.com/600795). That includes<link rel="modulepreload">and<link rel="preload" as="script">. A worldblockcould not help, because the refusal comes before routing.csp. These are still reported:csprefusal with scripts on.tricky-without-scriptspreloads a module and a script, with scripts off. It is clean.refusedis a page whose own policy refuses its stylesheet. It is still reported.tricky.html: a row with a name and a date, and a second box that scrolls.tricky.html(clean), and#pushedinbroken.html:cut-off: "Switch the theme" is cut off on the right by section#pushed.pushed "Home" (14px hidden).dockedis a list under a docked search bar, with steps.tricky-after-a-jumpjumps to an anchor under the sticky header.tricky.html, whose last links sit over a table.tricky.html: the prose links, the day picker, and.skip-moved.tricky.html, attricky-after-a-jump.busyforgets requests that a new document cancelled.ra checkprints each state's notes under it, passing or not, and counts them in its last line:All 3 states look right, with 2 notes.scrollworks both ways: a state with steps is scrolled when it saysscroll: true. The docs and types no longer say such a state is never scrolled.bun add -d <new address>stops withDependencyLoopwhile the lockfile names the old address. Runbun remove @hraness/ra, thenbun add -d <new address>, or change the address inpackage.jsonand runbun install.npm install -D <new address>.Speed
Each look was timed by phase with temporary marks, which are not in this PR. The marks covered settle, the page checks, the scroll passes, the whole-page picture, the text-free picture, the touch pin and contrast. The runs were on a Mac with one job.
The text-free picture hides the text with a stylesheet, and each color it changed started a transition. On a page that eases its links' colors, Playwright then had to finish thousands of transitions before it could take the picture. The sheet now also sets
transition: none.On a real public page, 84,936px tall at desktop with about 2,500 texts sampled (playwright-core 1.65.0):
At desktop, the 0.1.2 picture also failed with
page.screenshot: Timeout 10000ms exceeded, so contrast was lost there. Contrast now runs. In CI, three of that site's 72 looks hit the same timeout. Six looks of three of its pages took 99.7s before and 34.0s after.The first scroll pass, which brings lazy content into view, waited two animation frames at each place. One is enough: each scroll happens inside a frame, so that same frame lays the page out there and tells lazy images and observers. For a 40-screen page, that saves about 44 frames. Scroll passes on a synthetic page, 50,526px tall at desktop:
Synthetic tall and heavy pages, four looks:
The 1.65.0 sum is within noise. In the after run, one look's contrast step took 1.9s, against 0.7s at most elsewhere, and this PR does not change that step.
Other phases per look on these pages:
Nothing else was worth its risk. Settle could run its two waits together and save about 0.12s a look, but it would then look sooner after a late script. Lowering the 12,000px picture cap would lose contrast coverage.
broken.htmlgives the same findings, plus the new#pushedplant. The browser suite asserts them.Judged to be the page's fault
The phone mock-up repro still gets three findings, and all three are true:
cut-offfor "ok": it is cut by the screen box, which hides its overflow and is moved only by keyboard scrolling.coveredfor the day button: it sits under the header.small-target: that button really is 76×13 with a neighbor close by.Repros, rerun with the built CLI (0.1.2 against this PR)
request GET /fp-1.js failed (csp).blockfor itfailed (csp)in both statesrequest GET /app.js failed (csp).request GET /fp-6-chunk.js failed (csp).overlapbetween the clipped name and"11/17/25"small-target button "Pick the day" is 30×13small-target link "a walk at noon" is 104×18cut-off "Message" … at the bottom by the edge of the screen (12px hidden)covered button "Row 10" is covered by div.dockcovered header "Home" covers 2 controlscovered footer … covers 2 controls: link "2024", link "2025"small-targetfor the link beside it, andcontrast1:1 (#000000 on #000000)busy The page was still loading after 5s: GET /slow?reload.cut-off "Appearance: light" is cut off on the right by div.page … (14px hidden).In the same set, these were clean on both builds:
scroll: true;Independent review
An independent review of 57e0b3b found five ways the new exemptions could hide real defects. b716358 fixes each, with a planted case that 57e0b3b misses and the fix reports:
#iconsand#avatarsinbroken.html(2 tap targets in section#icons.icons are smaller than 24px …), and a lone small link with a far icon intricky.html, which stays clean.covered. A control pushed past the top of a box that clips is nowcut-offat the top, as one past the other edges already was. Plants: the Help button inpinned.html, and#noticeinbroken.html("Close the card" is cut off at the top by div.notice … (30px hidden)).pinned-after-stepsandlocked-after-steps.#sidewaysand#downwardsinbroken.html.menu.The product false-positive repros all give the same results on both commits: 8 sets, 36 looks. That includes the 3 true findings on the phone mock-up and the icon cut off past the page's right edge.
Left for 0.1.4:
translate,rotateandscaleproperties,will-changeorbackdrop-filter;Checks
bun run checkpasses, with 42 unit tests.Required,Check, the fourBrowserlegs (playwright-core 1.58.2, 1.62.1, and 1.65.0 on Linux and macOS), CodeQL and Analyze. b716358 runs the same set.🤖 Generated with Claude Code