Skip to content

chore(design-system): tighten seven ratchets to their measured values - #1988

Merged
BigSimmo merged 2 commits into
mainfrom
claude/ds-ratchet-tighten
Aug 15, 2026
Merged

chore(design-system): tighten seven ratchets to their measured values#1988
BigSimmo merged 2 commits into
mainfrom
claude/ds-ratchet-tighten

Conversation

@BigSimmo

Copy link
Copy Markdown
Owner

Summary

Every metric below measures under its committed pin on current main. That gap is not cosmetic — it is the failure mode GATES.md §5 names: a file that pays debt down without a baseline refresh silently leaves headroom, and the next regression in that file lands free.

Measured on the exact tree after PRs #1982#1986:

metric pinned measured
edgeOwnershipConflicts 25 (12 files) 19 (10 files)
interactiveTapFloorDeclarations 43 (17 files) 40 (16 files)
legacyShadowAliases 118 114
hardcodedCssMotionDurations 42 41
rawGapLiterals 32 31
rawRadiusLiterals 24 23
statusColouredNumerals 2 1

17 units of headroom across seven metrics, plus six per-path pins for files that no longer contribute at all — including favourites-library-nav.tsx, which no longer exists, and pwa-lifecycle.tsx, whose border + ring-1 card recipe PR #1976 removed. The paydown was other people's merged work; only the bookkeeping lagged.

No metric increased, so nothing here is a relaxation — this only removes slack.

Verification

Mutation-verified against the tightened value rather than assumed. Lowering the shortlist Clear button to min-h-9:

Design-system contract failed:

- interactiveTapFloorDeclarations increased from 40 to 41
- interactiveTapFloorDeclarations at src/components/services/services-navigator-page.tsx increased from 0 to 1

Under the previous pin of 43 that identical regression passed silently. That is the entire point of the PR.

  • npm run verify:pr-local
 Test Files  611 passed (611)
      Tests  6647 passed | 4 skipped (6651)

- completed: check:runtime, check:installed-lock-parity, format:changed, sitemap:check, docs:check-index,
  docs:check-inventory, docs:check-scripts, docs:check-links, check:branch-review-ledger,
  check:outstanding-issues, check:ledger-write-discipline, lint, typecheck, test, check:rag:fixtures,
  check:medication-interactions, check:medication-lexicon-report
- failed: (none)
- not reached: (none)
Design-system contract passed (735 production files; raw colors 2; literal shadows 0; legacy tap classes 0;
sub-floor interactive min-heights 40; edge conflicts 19; 1px shadow spreads 2).

Gate-manifest OK: all 35 verify:cheap gates are enforced in CI (static-pr + mapped jobs),
and the 32 static gates are documented consistently.

GATES.md's quoted figures are updated to match in both the §2 gate rows and the §3 prohibition table — the numbers had drifted in seven places, which matters because those tables are what a reader consults instead of running the checker.

Risk and rollout

  • Risk: low, and one-directional. Tightening a ratchet can only make CI stricter, never permissive, and no product code changes. The realistic cost is that an in-flight branch carrying one of these violations now fails where it previously passed — which is the intended behaviour, and the failure names the exact metric and path.
  • Rollback: revert the two commits to restore the looser pins.
  • Provider or production effects: None.

Notes

  • `RAG impact: no retrieval behaviour change — this PR edits a design-system baseline JSON and its documentation. No retrieval, ranking, selection, chunking, scoring, or eval file is touched.
  • This corroborates a correction another reviewer queued against #265 during PR docs(issues): reconcile 17 queued ledger requests #1987 review, which independently measured 40 and 19 on the same tree. That inbox request is already pending and is deliberately not duplicated here — it will apply on the next issues:reconcile. Two independent measurements agreeing is worth more than one, so I verified rather than took it on trust.
  • Worth flagging for whoever picks up #265: this is now the second time the gate-2 figure has needed correcting in a day (41 → 43 → 40), because the baseline moves whenever unrelated UI merges. The durable fix is probably a scheduled re-measure that opens a tightening PR automatically, rather than relying on someone noticing.

Generated by Claude Code

claude added 2 commits August 15, 2026 14:42
Every metric here measured BELOW its pin on current main, which is the failure
mode GATES.md section 5 names: a file that pays debt down without a baseline
refresh silently leaves headroom, and the next regression in that file lands
free. Measured on the exact tree after PRs #1982-#1986:

  edgeOwnershipConflicts           25 -> 19   (12 -> 10 files)
  interactiveTapFloorDeclarations  43 -> 40   (17 -> 16 files)
  legacyShadowAliases             118 -> 114
  hardcodedCssMotionDurations      42 -> 41
  rawGapLiterals                   32 -> 31
  rawRadiusLiterals                24 -> 23
  statusColouredNumerals            2 -> 1

Seventeen units of headroom across seven metrics, plus six per-path pins for
files that no longer contribute at all — including favourites-library-nav.tsx,
which no longer exists, and pwa-lifecycle.tsx, whose border+ring card recipe
PR #1976 removed. The paydown was other people's merged work; only the
bookkeeping lagged.

Mutation-verified against the tightened value rather than assumed: lowering the
shortlist Clear button to min-h-9 now fails with
`interactiveTapFloorDeclarations increased from 40 to 41` plus the per-path
line. Under the previous pin of 43 that same regression passed silently, which
is the whole point.

No metric increased, so nothing here is a relaxation. GATES.md's quoted figures
are updated to match in both the gate rows and the section 3 prohibition table;
the numbers had drifted in seven places.

Corroborates the correction another reviewer queued against #265 during PR
#1987 review, which independently measured 40 and 19. That request is already
pending in the inbox and is deliberately not duplicated here.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XYphQZmsBBeqnidpSnAtjE
@coderabbitai

coderabbitai Bot commented Aug 15, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

You’ve reached a temporary PR review limit under our Fair Usage Limits Policy.

Your recent review volume is higher than typical usage, so adaptive limits are currently applied.

Next review available in: 7 minutes

Your organization has reached its usage spending cap. Adjust your spending cap in the billing tab.

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 772fd8e1-1dc0-40b9-b1b3-1cfa33c47e5d

📥 Commits

Reviewing files that changed from the base of the PR and between bacea75 and f30d1ee.

📒 Files selected for processing (3)
  • docs/branch-review-records/19d9b5ccfa4a8c3a52744d24cfc3bb7906a309c9f0d6beb92203bdd5717f47b3.record.md
  • docs/design-system/GATES.md
  • scripts/design-system-contract-baseline.json

Comment @coderabbitai help to get the list of available commands.

@supabase

supabase Bot commented Aug 15, 2026

Copy link
Copy Markdown

This pull request has been ignored for the connected project sjrfecxgysukkwxsowpy because there are no changes detected in supabase directory. You can change this behaviour in Project Integrations Settings ↗︎.


Preview Branches by Supabase.
Learn more about Supabase Branching ↗︎.

@BigSimmo
BigSimmo enabled auto-merge (squash) August 15, 2026 14:45
@BigSimmo
BigSimmo merged commit a5fe2e0 into main Aug 15, 2026
24 checks passed
@BigSimmo
BigSimmo deleted the claude/ds-ratchet-tighten branch August 15, 2026 14:50

Copy link
Copy Markdown
Owner Author

Final review summary

  • Final reviewed head: f30d1eecb1d978ae181a6699e1d57032221d2147
  • Base at review/merge: bacea75c7a4e709aeeea0a257e2fd6e255d35348
  • Merge commit: a5fe2e07a736015fdc3c75dcb1a12658cfc2e095
  • Branch state: current with the base before merge; ahead/behind 2/0; clean merge-tree 436a63679bd1171f2c0f8a35ec411f463a3432f1, matching the merged tree.
  • Review outcome: no PR-introduced P0/P1/P2 defect found. The seven ratchets only tighten measured baselines; no metric was relaxed.
  • Adversarial review: CodeRabbit was rate-limited/spending-capped, and its local CLI could not authenticate because this environment mounts /root/.coderabbit read-only. A distinct manual adversarial pass found no material defect. Highest residual risk is deliberate: in-flight UI branches may newly fail against the stricter ratchets.
  • Threads: none.
  • Decisive offline checks: design-system contract (40 sub-floor min-heights, 19 edge conflicts, 114 legacy shadow aliases); gate manifest; branch-review-ledger; ledger write discipline; changed-file Prettier; docs links; git diff --check — all passed. Offline dependency installation was unavailable because one tarball was not cached; a byte-identical-lock existing installation supplied the tooling.
  • Exact-head CI: CI run 11123 succeeded; Static PR checks, Unit coverage, Safety and config checks, and required aggregate PR required all succeeded. SAST and Secret Scan succeeded. Out-of-scope build, browser/Lighthouse, migration, container, ingestion and advisory UI jobs were correctly skipped.
  • Blockers: none. Residual risk: no browser/product behaviour changed, so skipped browser/provider gates add no material PR-specific risk.

GitHub merged the PR through its existing merge workflow during the final recheck. Auto-merge settings were not changed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants