From 1c01992a88cd2dd7d8067f702b0b05cfbee73266 Mon Sep 17 00:00:00 2001 From: doxa-maps-88655c70 <88627970+doxa-maps-88655c70@users.noreply.github.com> Date: Wed, 23 Sep 2026 01:08:10 +0000 Subject: [PATCH] Gate the tab radius so a superseded rationale cannot quietly restore the pill The 999px stadium was a real instruction that shipped, and its rationale is still in the layout file as history. A superseded rationale that still reads as current is how a reversed decision gets undone -- a reader trusting it would restore the pill believing they were fixing a regression. The comment now says not to; this makes that enforceable. It asserts the TOKEN rather than the value, because the requirement is that the tabs, the collapse button and the filter toggles agree. A shared knob guarantees that; three matching literals only coincidentally satisfy it. The expected fallback is READ FROM .vtl-collapse rather than hard-coded, so a gate asserting 8px cannot pass while the collapse button moves to 10px and the two surfaces silently diverge. Both synced copies are checked, so a fix applied to one host fails here rather than shipping correct in one and wrong in the other. .vtl-cap keeps its pill and is deliberately not asserted: the complaint was the ratio of radius to size, and a gate banning 999px everywhere would over-apply the correction. check:tab-radius:self-test poisons the source in memory and requires both regressions to be caught -- the pill restored, and a bare literal beside the token. Both caught, tree untouched. Wired into build:unlocked beside the other source-level checks so it fails in a second rather than after the vite loop. Noted while wiring: check:synced-css is NOT in the build chain, which is how two files have stayed in conflict. Left alone here -- turning it on is its own change with its own failures to fix first. --- internal/check-tab-radius-token.mjs | 176 ++++++++++++++++++++++++++++ package.json | 6 +- 2 files changed, 180 insertions(+), 2 deletions(-) create mode 100644 internal/check-tab-radius-token.mjs diff --git a/internal/check-tab-radius-token.mjs b/internal/check-tab-radius-token.mjs new file mode 100644 index 000000000..db5c2b924 --- /dev/null +++ b/internal/check-tab-radius-token.mjs @@ -0,0 +1,176 @@ +#!/usr/bin/env node +/** + * check-tab-radius-token.mjs — the vertical tab rows must read the shared radius token, not a + * hard-coded pill. + * + * THE DEFECT THIS EXISTS FOR. The tabs shipped at border-radius:999px — a full stadium on a 48px + * row — under a real instruction to imitate the YouTube active row. Measured against the rest of + * the product that is the only thing shaped that way: .vtl-collapse is 8px, the filter toggles in + * library/components/search are 8px, and 8px is already the most common radius in the layout file. + * The Driver reversed it: "there is nowhere else in the app that has that same roundedness." + * + * ★ WHY A GATE AND NOT JUST THE FIX. The 999px rationale is still in the file, kept deliberately as + * history. A superseded rationale that still reads as current is exactly how a reversed decision + * gets quietly undone — the same trap another agent hit today with a stale "navy pin >= 7:1 PASS" + * acceptance line that no longer described anything that ships. A future reader who trusts that + * comment would restore the pill and believe they were fixing a regression. + * + * WHAT IT ASSERTS, and why each assertion is here rather than the obvious one: + * A. .vtl-tab declares its radius through var(--vtl-radius,…), not a literal. Asserting the + * TOKEN rather than the value "8px" is the point: the Driver's requirement is that the tabs, + * the collapse button and the filter toggles agree, which a shared knob guarantees and three + * matching literals only coincidentally satisfy. + * B. The token's fallback equals .vtl-collapse's literal radius, READ FROM THE FILE. A hard-coded + * expectation of 8px here would pass while the collapse button moved to 10px and the two + * surfaces silently diverged — the gate would be asserting a number instead of the rule. + * C. Neither .vtl-tab copy carries a pill radius (anything >= 100px). This is the actual + * regression: a literal reintroduced beside the token would leave A passing. + * + * NOT ASSERTED, deliberately: .vtl-cap keeps border-radius:999px and should. The complaint was + * about the ratio of radius to size — a 16px badge at 999px is a chip, a 48px row at 999px is a + * stadium. A gate that banned 999px everywhere would over-apply the correction. + * + * ★ BOTH COPIES. VerticalTabsLayout.vue carries this CSS TWICE (VTL_SHADOW_CSS and the scoped + *