Repository navigation
fix(rtl-audit): the full audit adopts orphan stories as a filtered run does - #9391
Conversation
…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.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
AI review status for this pull request.
|
PR Analysis Report🔎 Preview ·
|
| 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
There was a problem hiding this comment.
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]
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:apps/storybook/rtl-audit/rtl-audit.mjs:sourceOwnerOfreads 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:Evidence
pnpm vitest run --project node .github/scripts/: all pass, apart from one known load-sensitive visual-gate case that passes when run alone.Scope