Skip to content

fix(rtl): baseline pre-existing applicability gaps - #5988

Closed
nynexman4464 wants to merge 6 commits into
mainfrom
fix/rtl-applicability-baseline
Closed

nynexman4464 wants to merge 6 commits into
mainfrom
fix/rtl-applicability-baseline

Conversation

@nynexman4464

@nynexman4464 nynexman4464 commented Sep 3, 2026 •

Copy link
Copy Markdown
Contributor

Problem

#5365 correctly stopped treating unexplained all-N/A RTL results as clean, but the initial registry was empty. Full audits therefore classified inherited applicability debt as new coverage gaps, and filtered PR runs could fail even when a PR introduced no new RTL issue.

Changes

  • Snapshot the remaining 131 pre-existing all-N/A components as explicit coverage debt, separate from verified N/A.
  • Keep known debt visible but non-blocking; fail new gaps, stale debt, stale verified-N/A declarations, malformed registries, invalid removals, and real RTL behavior failures.
  • Make the debt baseline removal-only against the PR or merge-queue base.
  • Evaluate bootstrap and registry transitions with a pinned, trusted policy bundle.
  • Run a full unfiltered semantic audit when debt, verified-N/A, component source, package routing, stories, or curated targets can change applicability.
  • Preserve removed-debt and changed verified-N/A transition rows when source changes also trigger the full sweep.
  • Derive audited package and component routing from the canonical five-package registry (core, lab, charts, richtext, and vega).
  • Reconcile current-main applicability:
    • add measured targets for Collapsible, HStack, ResizeHandle, TourStep, and MobileTokenizer;
    • replace the obsolete unknown/ThreeD declaration with concrete ThreeD component declarations;
    • remove debt that is now measured or verified N/A;
    • classify the Link Navigation fixture as verified N/A;
    • mirror the four directional chevron definitions in the SVG icon registry story.
  • Separate known debt from new findings in PR and weekly summaries.

Test plan

Full unfiltered audit

The blocking registry audit built Storybook and ran:

node apps/storybook/rtl-audit/rtl-audit.mjs \
  --storybook-dir apps/storybook/dist \
  --output rtl-applicability-registry-report.json \
  --removed-components "$REMOVED_COMPONENTS" \
  --check-known-gap-roster \
  --concurrency 4

Exact result from CI run 36465975324:

  • packages: core, lab, charts, richtext, vega
  • filters: none
  • total components: 273
  • measured: 70
  • verified N/A: 72
  • known coverage gaps: 131
  • new coverage gaps: 0
  • stale known gaps: 0
  • stale verified-N/A declarations: 0
  • removed components remaining in the roster: 0
  • component scans: 205 / 205 completed
  • positional and decoration story scans: 1,994 / 1,994 completed
  • exit status: 0

The run also reports 15/15 automatic directional-icon passes, 23/23 positional-mirror passes, and 15/15 directional-decoration passes. lab/svgiconregistry passes D1, and all curated targets—including MobileTokenizer D2—pass.

Focused policy tests

pnpm exec vitest run --project node \
  .github/scripts/rtl-audit-coverage.test.mjs \
  .github/scripts/weekly-rtl-summary.test.mjs \
  .github/scripts/rtl-applicability-policy.test.mjs

Result: 3 files and 54 tests passed. These cover canonical package routing, full-versus-targeted audit selection, deletion-driven stale checks, preserved transition scope, and trusted-policy bypass rejection.

The registry validator recognizes the 131-entry bootstrap digest, emits full_audit=true, and semantically validates the unknown/ThreeD and core/Button removals.

Builds and repository CI

The exact-head root package build, Storybook build, Storybook typecheck, lint, node/UI tests, accessibility audit, all five RTL shards, aggregate pr-rtl, registry contract, visual regression, and the blocking RTL applicability registry check pass in CI.

Fixes #5983.

@vercel

vercel Bot commented Sep 3, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
astryx Ready Ready Preview Oct 1, 2026 11:23pm UTC

Request Review

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Sep 3, 2026
@nynexman4464
nynexman4464 marked this pull request as ready for review September 3, 2026 21:15
github-actions Bot added a commit that referenced this pull request Sep 3, 2026
@github-actions

github-actions Bot commented Sep 3, 2026 •

Copy link
Copy Markdown
Contributor

PR Analysis Report

📚 Storybook Preview

View Storybook for this PR

🧪 Sandbox Preview

View Sandbox for this PR

No new or modified components detected.

Bundle Size Summary

No component packages changed.

Accessibility Audit

Status: No accessibility violations detected.

Visual Regression

15 of 420 shot(s) changed.

A change here is a question, not a failure: check whether the after is the
picture you intended. Record that review on the PR. Baseline maintenance is an
explicit dispatch of CI; this report never rewrites the baseline or adds a release gate.

component story theme mode pixels
Chat Full AI Chat probe light 155,733
Chat Full AI Chat probe dark 155,005
Chat Default neutral dark 33,205
Chat Default neutral light 32,876
Chat Empty State probe light 23,531
Chat Empty State probe dark 22,622
ChatAutoScroll Scroll Behavior Comparison neutral dark 15,378
ChatAutoScroll Scroll Behavior Comparison neutral light 14,107
Chat With Attachments probe light 13,229
Chat With Attachments probe dark 11,065
SideNav Resizable in AppShell probe dark 3,208
Markdown Default probe dark 897
Markdown Default probe light 897
Markdown Default neutral dark 882
Markdown Default neutral light 858

Generated by PR Enrichment workflow | Storybook | Sandbox | View full report

@cixzhang cixzhang left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for separating inherited RTL debt from new failures. Two current-head paths still block the rollout:

  1. The exact full audit reports lab/chart as stale-known-coverage-gap because its curated D2 check passes. The bootstrap path only checks the 190-entry file hash and emits no audit scope, so both RTL jobs skip and CI stays green. Please make bootstrap run semantic validation and refresh the PR’s 204/35/7 evidence. (.github/scripts/check-rtl-applicability-registries.mjs:79)
  2. verified-not-applicable.json accepts unknown/* and contains unknown/ChartTooltip, but --removed-components uses the core/lab-only debt validator. Removing that valid declaration exits before audit. Please cover an unknown/* removal and accept that identifier domain. (apps/storybook/rtl-audit/rtl-audit.mjs:78)

[Reviewed by Robohands]

@cixzhang cixzhang left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maintainers cannot safely land this head against current main: core/Collapsible is now verified N/A there, while this head still baselines it as debt. A synthetic merge creates both entries; the blocking audit reports stale-known-coverage-gap and exits 1.

Please rebase, regenerate the baseline and bootstrap digest, remove Collapsible from debt, and refresh the full-audit counts. This keeps resolved applicability from being relabeled as debt and proves the merge result, not only the stale branch.

[Reviewed by Robohands]

github-actions Bot added a commit that referenced this pull request Sep 4, 2026
@nynexman4464
nynexman4464 force-pushed the fix/rtl-applicability-baseline branch from e456c21 to f0eb19a Compare September 4, 2026 23:02
@github-actions
github-actions Bot requested a review from cixzhang September 4, 2026 23:02

@cixzhang cixzhang left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks—this head reconciles the bootstrap with current main, but the stale-debt ratchet still has two holes:

  1. A component or target can make a baseline row stale without changing either registry. check-scope then emits no audit scope, while filtered coverage disables the full-roster stale check and can retain a removed component as known debt. Please gate all stale-producing source/story/target changes and cover a deletion with an unchanged baseline. (.github/scripts/check-rtl-applicability-registries.mjs:106)
  2. The required check executes the validator and coverage helper from the PR checkout, so one change can relax the removal-only rule and add debt. Please evaluate transitions with trusted base-owned policy, including a fail-closed bootstrap, and add a bypass regression. (.github/workflows/ci.yml:1077)

[Reviewed by Robohands]

@cixzhang cixzhang left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maintainers can still merge an invalid registry transition whenever the same PR also touches component source. In a fixture that removed core/Removed from debt and added core/Changed as verified N/A, this head emitted only audit_components=core/Legacy; the required job therefore filters out both changed entries and reports no finding.

Please preserve the baseline sweep while also auditing every removed debt row and changed verified-N/A row, with a regression that combines those transitions with a source change. (.github/scripts/check-rtl-applicability-registries.mjs:129)

[Reviewed by Robohands]

@nynexman4464
nynexman4464 force-pushed the fix/rtl-applicability-baseline branch from f8c9b17 to 2f97d7f Compare September 24, 2026 21:22
github-actions Bot added a commit that referenced this pull request Sep 24, 2026
github-actions Bot added a commit that referenced this pull request Sep 24, 2026

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for separating inherited RTL debt from new failures — the removal-only baseline, trusted base-owned transition policy, and blocking registry audit are statically consistent (the pinned bootstrap and policy-bundle hashes match the checked-in files, transition scope is preserved alongside source changes, and known debt stays visible rather than clean).

Two corrections are needed before approval, both from the PR's own blocking registry audit at this revision:

  • That job currently reports 18 new coverage gaps and 1 stale verified-N/A alongside the 137 known gaps, and exits 1. Please regenerate the baseline from a clean full run against the current base — resolve or baseline those 18 gaps and remove or replace the stale declaration — and update the bootstrap hash if the baseline file changes. (The pre-existing lab/svgiconregistry D1 failure also contributes to that job's exit and is already disclosed; a clean coverage result is what is being asked for here.)
  • The test plan's full-audit evidence is stale: it reports 204 known gaps, 7 verified N-A, and 246 components, while the checked-in baseline now contains 137 entries and the current full run reports 137 known gaps, 51 verified N-A, and 65 measured. Please update the test plan with the rerun's actual counts and exit status, and confirm the scoped transition controls still pass.

No shipped component, API, or theme behavior changes were found, and no other blocking defect was identified in static review.

[Automated review]

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for separating inherited RTL debt from new failures — the removal-only baseline, trusted base-owned transition policy, and blocking registry audit are statically consistent (the pinned bootstrap and policy-bundle hashes match the checked-in files, transition scope is preserved alongside source changes, and known debt stays visible rather than clean). The package-routing widening and the new declarations and targets also resolve the items listed at the previous revision.

Two corrections are still needed before approval, both from the PR's own blocking registry audit at this revision:

  • That job currently reports 131 known gaps alongside 2 new coverage gaps, 6 stale known gaps, and 1 stale verified-N/A, and exits 1 (with no behavior failures). Please reconcile the registries against the current base: remove core/ChatMessageList, core/ChatMessageMetadata, core/ChatSendButton, core/ChatSystemMessage, core/ChatTokenizedText, and core/ChatToolCalls from the debt baseline (each is now verified N/A), remove the stale verified-N/A declaration for core/Button (it is measured through its curated target), and give core/link-navigation and lab/MobileTokenizer real coverage, a reviewed verified-N/A declaration, or a baseline entry as pre-existing debt. Update the bootstrap hash if the baseline file changes.
  • The test plan's full-audit evidence is stale: it reports 204 known gaps, 7 verified N-A, and 246 components, while the checked-in baseline now contains 137 entries and the current full run reports 131 known gaps, 65 verified N-A, and 273 components. Please update the test plan with the rerun's actual counts and exit status, and confirm the scoped transition controls still pass.

No shipped component, API, or theme behavior changes were found, and no other blocking defect was identified in static review.

[Automated review]

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for separating inherited RTL debt from new failures — this revision reconciles the registries with the current roster, and the evidence now backs approval.

What was verified at this revision:

  • The blocking registry audit ran a full sweep and passed: 70 measured, 72 verified N/A, 131 known gaps, and 0 new gaps, 0 stale known gaps, and 0 stale verified N/A, with no behavior failures. The six chat components, Button, link-navigation, and MobileTokenizer items raised in earlier rounds are resolved.
  • The pinned policy hashes in CI all match the checked-in files (including the validator pin corrected since the last round), the baseline hash matches the validator's bootstrap pin, and the two registries (131 debt entries, 72 verified-N/A declarations) do not overlap. The targeted Node suites for coverage, transition policy, and the weekly summary pass.
  • The SVGIconRegistry story change works as intended: in RTL the directional chevron cells now mirror, while non-directional icons and the LTR rendering are unchanged.

One non-blocking tidy-up: the test plan in the PR description still reports the original snapshot (204 known gaps, 7 verified N/A, 246 components, and the old lab/svgiconregistry exit-1 note). The current CI numbers above supersede it, but updating the description to match would save the next reader the cross-check.

No shipped component, API, or theme behavior changes were found.

[Automated review]

Keep the current all-N/A inventory visible as explicit coverage debt without making unrelated component changes fail. New gaps, stale entries, malformed registries, and unjustified debt removals remain fail-closed in PR and merge-queue CI.

Fixes #5983.
@nynexman4464
nynexman4464 force-pushed the fix/rtl-applicability-baseline branch from a8bc2a2 to 132fcd1 Compare October 1, 2026 23:18
@github-actions
github-actions Bot deleted the fix/rtl-applicability-baseline branch October 14, 2026 06:22

This branch was successfully deployed

1 active deployment
Preview — 132fcd11 Deployed Oct 1, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Meta Open Source bot.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[audit] Baseline pre-existing RTL applicability gaps

2 participants