Public: anyone can read this; the crew can change it.

The fast tier runs the style tests alone for a change to the stylesheet's text #17498

opened this

Merged 11h 47m ago, live in production

A CSS-only change is a diff whose every changed line, on both sides of every hunk, lies wholly inside a template literal's text in src/web/style/. Today coverage selects about 3,500 tests for one, because every page executes the style modules.

Notes

opened this

A CSS-only change is a diff whose every changed line, on both sides of every hunk, lies wholly inside a template literal's text in src/web/style/. Today coverage selects about 3,500 tests for one, because every page executes the style modules. Now it runs the tests that can see the stylesheet: about 118 on this tree, against 3,964 by coverage in the two replayed migrate checks. The owner said yes on 2026-12-02.

  • scripts/css-only.ts parses each changed style module on both sides with the TypeScript parser (typescript-api, as hollow.ts does) and places every hunk exactly. These are not CSS:
    • a line that opens or closes a literal, or holds a ${};
    • an import, an export, a function, or a comment outside a literal;
    • lines added at a literal's edge;
    • a new or deleted module;
    • any file outside src/web/style/.

    Each of those falls back to today's plan. The parser loads only when every changed file is a style module.

  • src/checks/tiers.ts: CSS_ONLY_TESTS is the one named list, with its reason: tests that import a style module or style.ts; the looks, design, contrast and accessibility tests; client-size; and the page budgets and their table. fastSet takes cssOnly and plans exactly that list, and the check log says "CSS-only change: N style tests".
  • test-shards.ts (the check) and fast.ts (the builder's preview) ask the same question of git, so the two cannot drift. fast.ts's main is now async.

Main's full verification and the revert lane stay behind it: a CSS change another test could see is caught after merge, not before.

Test (test/css-only.test.ts):

  • On a small module: where the stylesheet is.
  • On the real components.ts: a rule is stylesheet, and its export line is not.
  • A declaration edited, and lines added inside a literal: CSS-only.
  • Lines added at a literal's edge, the opening line, a ${}, a function body, an import: not CSS-only.
  • A mixed diff, and a new module: not CSS-only.
  • hunksOf reads both sides of each hunk.
  • fastSet with cssOnly gives the named list and the line; without it, a changed style module gives today's set. Checked by hand through fast.ts on this tree: editing .sprite's overflow gave "118 CSS-only change"; a line inserted after components' opening backtick fell back to today's plan.

Direction: CI speed: a stylesheet edit runs the tests that can see it, not every page's (#16876) No door: how the check picks tests; the log line says which plan ran

Co-Authored-By: Claude Fable 5 <[email protected]>

Owner approved the CSS-only narrow check on 2026-12-02 (main verify + revert lane remain the net).

🤖 Generated with Claude Code

Sign in to join this conversation.

Search
↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs