Skip to content

fix(rtl-audit): the full audit adopts orphan stories as a filtered run does - #9391

Merged
cixzhang merged 1 commit into
mainfrom
fix/rtl-audit-full-run-adopts-orphan-stories
Nov 1, 2026
Merged

cixzhang merged 1 commit into
mainfrom
fix/rtl-audit-full-run-adopts-orphan-stories

Conversation

@cixzhang

@cixzhang cixzhang commented Nov 1, 2026

Copy link
Copy Markdown
Contributor

Maintainer impact

The release check's full RTL audit and a pull request's filtered audit scored some components differently. Since #9319, a filtered run lets a component whose stories carry its folder's non-component title adopt those stories, for example CheckIndicator, CheckboxIndicator and RadioIndicator under Core/Indicator. The full audit, which runs with no filter, didn't, so those components read as coverage gaps on the release scorecard while a pull request touching them audited them. Now both runs use the same rule and one code path.

ResizeHandle, the case that surfaced this, already has its own curated target from #9292. The release check at 177eed6 (run 41345564746) shows it measured.

CI impact: none (no workflow, job or runner change). The full audit reads each package barrel once, and the three adopted components render stories the audit already renders.

Intended invariant

architecture:rtl-audit-evidence: a component's RTL coverage is the same whether the audit runs filtered (a pull request) or unfiltered (the release check). A component with no applicable story stays a coverage gap unless verified N/A (INV5).

Change

  • apps/storybook/rtl-audit/rtl-audit-coverage.mjs, resolveFilterRoutes:
    • With no filters, it keeps every route and applies the existing orphan adoption to every known component no route names.
    • The adoption is one inner function shared by both paths. A filtered run is unchanged.
  • apps/storybook/rtl-audit/rtl-audit.mjs: sourceOwnerOf reads each package barrel once, because a full run asks for every storyless component. The comment says the rule holds in both runs.
  • .github/scripts/rtl-audit-coverage.test.mjs:
    • A full run keeps every route and adopts the same orphan stories.
    • A full run and a filtered run agree on ResizeHandle's stories.
    • ChatLayoutScrollButton adopts nothing in either, so it keeps its verified N/A.

Evidence

  • On a real Storybook index, the full core run adopts exactly CheckIndicator, CheckboxIndicator and RadioIndicator. Lab, Charts, Rich Text and Vega adopt none. None of the three is verified N/A, so there's no stale-N/A risk. If their dimensions all read N/A they stay coverage gaps in both runs; their verified-N/A entries are in test(rtl): verified-N/A RTL coverage for CheckboxIndicator, CheckIndicator and RadioIndicator #9304, pending an owner decision.
  • pnpm vitest run --project node .github/scripts/: all pass, apart from one known load-sensitive visual-gate case that passes when run alone.

Scope

  • No intended public API, product behavior, visual direction, or policy change.
  • Product changes discovered during the work were removed or split.
  • Public text and artifacts contain no internal Meta context.

…n does

A component whose stories carry its folder's non-component title (a
sub-component such as CheckIndicator under Core/Indicator) adopted those
stories in a filtered pull-request run (#9319) but not in the release
check's unfiltered audit, so the two scored it differently. resolveFilterRoutes
now applies the same adoption, through one code path, to every known
component no route names when no filter is given, and keeps every existing
route. Each package barrel is read once. Tests check that a full run and a
filtered run agree on ResizeHandle and ChatLayoutScrollButton.
@vercel

vercel Bot commented Nov 1, 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 Nov 1, 2026 8:35pm UTC

Request Review

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Nov 1, 2026
@astracat-bot

astracat-bot Bot commented Nov 1, 2026 •

Copy link
Copy Markdown

AI review status for this pull request.

Review status Updated
🟢 Reviewed (for maintainers only) Nov 1, 2026, 8:43 PM UTC

@github-actions

github-actions Bot commented Nov 1, 2026 •

Copy link
Copy Markdown
Contributor

PR Analysis Report

🔎 Preview · 57a1df5

Storybook · Sandbox · built from this PR's head

Package size: no published package changed; no new dependencies.

API changes: none in this pull request

Committed API report behind this build: core 1 row; run pnpm api:report.

Not run on this PR: add ci:run-visual, ci:run-a11y or ci:run-rtl to run them.

CI impact: 0 job-min per update · pool 0% · standard runners · 1 CI action or script file changed (not measured)
Before After Change
Job-minutes per PR update 78.7 78.7 0
Runner pool, runner-minutes a day 36,690 36,690 0 (0%)
Average concurrent jobs 25.5 25.5 0
Time to green (median → this run) — 17.8 min —
Runs a day 466 466 0

Not measured (the jobs that use these keep their recent minutes above): .github/scripts/rtl-audit-coverage.test.mjs.

Assumptions: before is each job's average over the last 20 pull-request runs; after keeps that for unchanged jobs and uses this run's minutes for added or changed ones, weighted by how often each changed job ran in those runs; runs a day averages the seven whole days before today; time to green compares this run with the median of those runs that ran the same jobs.


Generated by PR Enrichment workflow | View full report

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This looks ready to approve once it leaves draft. The full audit now runs the same orphan-story adoption as a filtered run, which matches the RTL audit evidence architecture (INV5, INV7). On the current Storybook index the full run adopts exactly CheckIndicator, CheckboxIndicator and RadioIndicator, the other packages adopt nothing, and no verified-N/A entry turns stale. The two new tests fail against the previous resolver and pass here.

[Automated review]

@cixzhang
cixzhang merged commit 0b0cc52 into main Nov 1, 2026
178 checks passed
@github-actions
github-actions Bot deleted the fix/rtl-audit-full-run-adopts-orphan-stories branch November 2, 2026 06:04

This branch was successfully deployed

1 active deployment
Preview — 57a1df52 Deployed Nov 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.

1 participant