#6635·astryx

[Infra] pr-a11y fails every PR that touches packages/lab/src/Chat

Author: yyq1025Created Sep 25, 2026Updated Sep 25, 2026

Problem

pr-a11y fails for any PR that touches packages/lab/src/Chat/, before a single audit runs. The scope step (.github/scripts/a11y-pr-scope.mjs, resolvePrA11yComponents) treats lab/Chat as a multi-component folder, expands it to every documented component in it, and throws unless each one has a Storybook route under its own name (lab/<Name>) or under the umbrella lab/Chat. Four lab components that are already on main have neither — ChatEmojiPicker, ChatReactionBar, ChatTypingIndicator, ChatUnreadDivider — because their stories live under Lab/ChatAdditions, which maps to no component owner. The check came in with #6504 / #6562, so the folder was unreachable to PRs from then on.

Evidence

  • Run 36093100475, job pr-a11y, step "Run accessibility audit": Error: No scoped Storybook route for lab/ChatEmojiPicker or lab/Chat (PR #5461, whose only change in that folder is a new ChatVirtualizer).

  • Reproduces locally on main without that PR's component: build Storybook (pnpm -F @astryxdesign/storybook build), then run the resolver with lab/Chat as the changed folder:

    bash
    echo '{"diffMode":"three-dot","newComponentOwners":[],"modifiedComponentOwners":[],"unresolvedComponentSources":["lab/Chat"]}' > analysis.json
    node .github/scripts/a11y-pr-scope.mjs analysis.json
    # Error: No scoped Storybook route for lab/ChatEmojiPicker or lab/Chat
  • With the throw replaced by a log, the full list of unmatched owners is the four above (plus any new component in the folder whose story title is not its name). The lab Chat story titles in the built index are Lab/ChatAdditions, Lab/ChatReasoning and, on #5461, Lab/ChatVirtualizer.

Scope Check

Any other multi-component folder whose members are demonstrated only in a combined story would fail the same way; lab/Chat is the one I hit. I did not sweep the other packages.

Proposed Direction

  • Map the combined story to its owners, e.g. an owner entry for Lab/ChatAdditions in .github/scripts/lib/a11y-story-identity.js, or split it into per-component stories so each owner has its own route.
  • Or let the umbrella fallback accept a story that exercises the folder (Lab/ChatAdditions for lab/Chat) rather than requiring an exact lab/Chat title.
  • Either way, a folder's pre-existing gaps probably should not fail a PR that only adds a sibling; reporting them as a warning outside the changed owner would keep the gate on what the PR changed.

Pre-submission Checklist

  • I have read the Contributing guide
  • This is a problem in the repository's tooling, not a defect in a shipped component
  • I have linked the failing run or included the measurements behind this report