← 01 THINKHow does he reason?
A check that never fails is not a check
Every guard gets deliberately broken. A guard confirmed only by passing guarantees nothing.
I built the contrast guard and it passed immediately. Green light.
But one green light cannot tell two things apart.
# Threshold violation
sed -i '' "s/--muted: #70706e;/--muted: #b0b0ae;/" styles/tokens.css
node scripts/check-contrast.mjs # must exit 1
# Drift from the published figures
sed -i '' "s/--muted: #70706e;/--muted: #5f5f5d;/" styles/tokens.css
node scripts/check-contrast.mjs # valid value, disagrees with the docs -> exit 1
The point is that the two failure modes are different. The first is accessibility broken; the second is accessibility fine, documentation lying. A design system that shows visitors its numbers has to know the moment those numbers stop being true.
The cascade-layer guard was verified the same way. Putting a module back inside a layer and building caught it exactly.
testingtooling