Make the checks and tests mean something (#270)
Delete the theme tests that could not fail. validateContrast already
hard-gates text against every surface at 4.5:1 and border.control against
canvas and recessed at 3:1, throwing before any assertion recomputing
those ratios from the emitted CSS could run. Replace each with the honest
statement of the same property: that building the theme does not throw.
The neutral half of the dark subtle-hover test was dead for the same
reason, so keep only the accent pair, which is genuinely ungated.
Drop the loading-skeleton tautology, which asserted a contrast ratio
above 1 immediately after asserting the two colours differ. The real
gate is in loading-skeleton.browser.test.ts, samples the animated pulse
and requires 1.4:1, so it both subsumes and beats the static check.
Drop the migration-era assertions: the hand-written list of 25 removed
tokens, and the hardcoded 128 leaf count, which contract.test.ts already
asserts properly. Derive the count from the contract instead. Drop the
theme test that read the combobox stylesheet source as text and grepped
it for a string.
Make the local and CI checks agree. `pnpm run check` ran check:barrels
but not root formatting; CI ran root formatting but not check:barrels, so
a barrel violation could merge and a docs-only change could pass locally
and fail CI. Adding //#check:format-root to the check task and having CI
run that same task leaves both sides on an identical 28-task graph, with
--affected only ever an additive PR filter. knip stays a separate
unscoped invocation because it is repo-wide.
Run the docs app tests in CI, which nothing did. Four of them failed on
main because the harness rendered ThemeControls as a sibling of the
StoryWrapper that owns the only IconSpritesheetProvider; wrapping
DocsThemeRoot mirrors what __root.tsx actually does. Ignore the docs
failure screenshots, which were written into a tracked path.
Give the token board the coverage check its own comment claims. The
swatch count and the tree builder now both derive from the contract.
Verified by dropping a leaf: 3 unit tests fail and the story fails with
"expected 46 to be 47".