Skip to content

ci: a changed story runs the interaction specs of the components it imports - #11250

Merged
cixzhang merged 7 commits into
mainfrom
ci/chromium-story-folders
Nov 11, 2026
Merged

cixzhang merged 7 commits into
mainfrom
ci/chromium-story-folders

Conversation

@cixzhang

@cixzhang cixzhang commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

Who this helps

Authors whose pull request changes a Storybook story. The Chromium interaction selector (C3, AST-030 FR31) ran the whole Chromium suite for any changed story, because a story file maps to no component folder. The guardian saw it on #10879, which changes apps/storybook/stories/ChatVirtualizer.stories.tsx.

What changes

  • Story mapping: a changed story now runs every interaction spec that opens one of its story ids (a TextInput story change runs Field's TextFieldFocusTiming), and the interaction specs of the component folders it takes by value:
    • @astryxdesign/<package>/<Folder>;
    • a name from a package root, mapped to the folder holding that component's source within that package (ChatVirtualizer from @astryxdesign/lab is lab/Chat; ChartLegend from @astryxdesign/charts, which no Charts folder holds, fails closed);
    • a relative import into a component folder, including through local story helpers.
  • Story ids: a story's ids come from its default-export meta (title, and an own id), read at the meta's depth, so an inline meta gets its id and a data row's title never counts.
  • Fail closed: the whole suite runs for a story whose imports don't resolve (a name no folder in its package holds, or a whole-package import). It also runs for a removed story, a story whose meta names no id, when a spec has a templated story id whose whole literal prefix (lab-chat-${name}--) could name this story and no quoted name fills it, or when a spec opens a story id no story file makes (a renamed title strands its openers; none today). Today 63 of 313 stories fall back to the full suite.
  • No primitive escalation: the story's components are unchanged, so a shared primitive among them doesn't run the whole suite and adds no dependents. Every other rule is unchanged.
  • One resolver: isStoryFile, storyMeta, storyComponentFolders, storyFiles, storyIdOf, storyIdsOpened, localModules and componentFolderNamed live in a11y-pr-contracts.mjs, which every lane already copies. ci: release-specs (changed) adds tagged specs, visited components and Lab-only pull requests, in shards #11171's release-spec visit reader uses the same helpers from there.
  • Output: the selection reports the story-derived folders as stories, and the step summary counts them.
  • Replay: interaction-selection-replay.mjs passes storyScopeFor and archives the stories, so it replays the lane's own story rule. Regenerating the committed record under it is a separate run.
  • Record: the rule is in AST-030 FR31. A changed story adds its imported folders' specs and the specs that open its ids. Those folders are not touched, so they add no dependents and a listed primitive among them does not run the full suite. The fail-closed cases run the full suite. FR31's verification table names the story-mapping cases.

Tests

playwright-legs.test.mjs:

  • one case per import branch: a component, a package-root name no folder holds, a name only another package holds, a whole-package import, and a shared subpath;
  • on this repository, a TextInput story change selects Field's TextFieldFocusTiming, and a removed story and the charts Legend story run the full suite;
  • a changed story runs its imported folders' specs, and nothing more;
  • a story with unresolved imports runs the full suite;
  • with no resolver given, the old rule holds;
  • on this repository, ChatVirtualizer.stories.tsx maps to packages/lab/src/Chat/, and a change to it selects Chat's interaction specs instead of the full suite. On main this test fails: the resolver doesn't exist and the change runs the full suite.

All planner, interaction-lane, replay, release-spec and contract tests pass (10 files, 264 tests).

CI impact

Fewer full Chromium suites: a story-only change now runs its components' specs instead of every spec.

Writing rubric results

  • R1 narration: none; the FR31 sentences are present tense.
  • R2 research: none in the record; the story counts (63 of 313 fall back to the full suite) live in this description.
  • R3 evidence: the new verification row names test cases, not a pull request.
  • R4 rejected alternatives: none.
  • R5 change references: none.
  • R6 open questions: none.
  • R7 project status: none.

…mports

The Chromium selector ran the full suite for any changed story. It now maps a
story to the component folders it takes by value (storyComponentFolders, the
resolver the release-spec visits use, now in a11y-pr-contracts.mjs), and runs
their specs. A story whose imports do not resolve still runs the full suite.
@vercel

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

Request Review

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

astracat-bot Bot commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

AI review status for this pull request.

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

@github-actions

github-actions Bot commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

PR Analysis Report

🔎 Preview · 6604f97

Storybook · Sandbox · built from this PR's head

Package size: measured; main has no measurement of the merge base to compare yet.

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% · time to green −5.6 min · standard runners · 7 CI action or script files changed (not measured)
Before After Change
Job-minutes per PR update 85.8 85.8 0
Runner pool, runner-minutes a day 41,051 41,051 0 (0%)
Average concurrent jobs 28.5 28.5 0
Time to green (median → this run) 28.5 min 22.9 min −5.6 min
Runs a day 478 478 0

Not measured (the jobs that use these keep their recent minutes above): .github/scripts/a11y-pr-contracts.mjs, .github/scripts/interaction-selection-replay.mjs, .github/scripts/interaction-selection-replay.test.mjs, .github/scripts/playwright-legs.mjs, .github/scripts/playwright-legs.test.mjs, .github/scripts/release-spec-visits.mjs, .github/scripts/release-specs-plan.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

…imports

A name from a package root that no component folder holds, or a whole-package
import, runs the full suite; a shared subpath adds nothing; a story's imported
primitives count as touched only when their own source changed. The verification
row names the selector's story-mapping cases, one per branch.
@cixzhang

Copy link
Copy Markdown
Contributor Author

/approve-spec a49eab5

@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.

Changes requested: mapping a changed story to the folders it imports is a real CI saving, but three problems need fixing first.

  • A changed story no longer runs the interaction specs in other folders that open it by id (66 story–spec pairs across 32 stories; for example a TextInput.stories.tsx change skips packages/core/src/Field/__tests__/TextFieldFocusTiming.interaction.browser.spec.ts, which opens core-textinput--default), so also select every interaction spec that opens one of the changed story's ids and add a test for that case.
  • The new FR12 sentence in docs/specs/AST-030/spec.md says an unresolved story "runs the full suite" right before "Nothing starts a full suite on its own", and because it exempts only primitives from counting as touched, FR31 would require the dependents' specs of every other story folder, which chromiumSelection never adds; move a reworded rule into FR31 that says a story's folders add only their own specs, and re-approve the record at the new head.
  • Miss: storyComponentFolders looks up a package-root name in every package, so ChartLegend from @astryxdesign/charts in apps/storybook/stories/charts/Legend.stories.tsx resolves to packages/lab/src/Chart/ and skips the full suite the FR12 rule requires; pass the import's package to the lookup and add a test for that case.

Smaller: a removed or renamed story makes the selection step throw on the missing path; the workflow still falls back to the full suite, but returning null when the tree lacks the story keeps a clean result and its selection artifact.

Automated review (maintainer link)

Comment thread .github/scripts/playwright-legs.mjs Resolved
Comment thread docs/specs/AST-030/spec.md Resolved
Comment thread .github/scripts/playwright-legs.mjs Resolved
@cixzhang
cixzhang marked this pull request as ready for review November 11, 2026 17:10
…to FR31

A changed story now also selects every interaction spec that opens one of its
story ids (storyIdsOpened, shared with the release-spec visits in
a11y-pr-contracts.mjs), so a TextInput story change still runs Field's
TextFieldFocusTiming spec. A package-root name resolves only within its own
package, so ChartLegend from Charts no longer answers to Lab's Chart folder. A
removed story, or a spec's templated id that could name it and no quoted name
fills, runs the full suite. The rule moves from FR12 to FR31: the story's
folders add their own specs and are not touched, so they add no dependents.
@cixzhang
cixzhang marked this pull request as draft November 11, 2026 17:38
@github-actions github-actions Bot added the needs:spec-owner-review Current knowledge records await owner approval label Nov 11, 2026
@cixzhang

Copy link
Copy Markdown
Contributor Author

/approve-spec bf3e11a

@cixzhang
cixzhang marked this pull request as ready for review November 11, 2026 17:39
@github-actions github-actions Bot removed the needs:spec-owner-review Current knowledge records await owner approval label Nov 11, 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.

Changes requested: a changed story now runs the specs that open it and resolves package-root names within their own package, but two problems remain before the Chromium lane can narrow on story changes safely.

  • A changed story narrows instead of running the full suite when the opener scan cannot read its id, because nine stories with an inline meta title get no id, four take a data row's title: (.github/scripts/a11y-pr-contracts.mjs:1524), and an unfilled template such as lab-chat-${c}-- is compared only by its last segment (.github/scripts/playwright-legs.mjs:360-361); return null for a story with no id, read the title from the default-export meta, match templates by their whole prefix, and add tests that the FR31 verification row lists.
  • Miss: STORY_FILE (.github/scripts/playwright-legs.mjs:374) copies STORY_FILE_PATH (.github/scripts/a11y-pr-contracts.mjs:1523), so export one isStoryFile from a11y-pr-contracts.mjs and use it in both places.

No spec in the repository hits the first case yet, so today's selections are correct. Any new commit needs a fresh engineering-owner /approve-spec for the FR31 change at that head.

Automated review (maintainer link)

Comment thread .github/scripts/playwright-legs.mjs Resolved
Comment thread .github/scripts/a11y-pr-contracts.mjs Resolved
Comment thread .github/scripts/playwright-legs.mjs Resolved
…id runs the full suite

storyMeta reads the title and id at the default-export meta's own depth, so
an inline meta gets its id and a data row's title never counts. A changed story
whose meta names no id runs the full suite. A templated id's whole literal
prefix (lab-chat-${name}--) decides whether it could name the story. One
isStoryFile, exported from a11y-pr-contracts.mjs, picks story files for both
the selector and the story index.
@cixzhang
cixzhang marked this pull request as draft November 11, 2026 18:15
@cixzhang

Copy link
Copy Markdown
Contributor Author

/approve-spec 055217a

@cixzhang
cixzhang marked this pull request as ready for review November 11, 2026 18:16

@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.

Changes requested: mapping a changed story to the specs it reaches is a clear CI saving, and every earlier blocker is fixed, but two selection gaps and one description error remain.

  • Miss: a story title (or meta id) change drops the specs in other folders that still open the old id, though the change breaks them; renaming TextInput.stories.tsx's title drops Field/TextFieldFocusTiming (playwright-legs.mjs:353-360), so have storyScopeFor run the full suite when a spec opens a story id no story file makes, and add that case to the tests.
  • Miss: interaction-selection-replay.mjs calls chromiumSelection without storyScope and archives no apps/storybook, so the replay FR31 relies on still runs every story change as the full suite and cannot show that the new story rule catches what full runs catch; pass storyScopeFor there and add a replay test for a story-only change.
  • The description's rubric line says 62 of 313 stories fall back to the full suite, but the selector gives 63 (as "What changes" says); correct the R2 line.

Smaller points: the doc comment over export {storyFiles, storyIdOf} in release-spec-visits.mjs repeats isReleaseFile's, and nothing imports storyIdOf from there; the step summary counts only touched and dependent folders, so a story-only selection reports zero of both.

Claims and files checked
  • Verified: a TextInput story change selects Field's TextFieldFocusTiming (playwright-legs.test.mjs:286-294, and the selector run on this tree).
  • Verified: ChatVirtualizer from @astryxdesign/lab maps to lab/Chat and selects Chat's specs (:254-284).
  • Verified: ChartLegend from @astryxdesign/charts fails closed (:296-304).
  • Verified: a relative import into a component folder, through a local helper, names that folder (a11y-pr-contracts.mjs:1473-1491, :1635-1636; scratch run).
  • Verified: story ids come from the default-export meta; inline metas get ids and data-row titles never count (:190-219; the six stories with data-row titles resolve to their meta).
  • Verified: unresolved root names, whole-package imports, removed stories, stories with no id and unfilled whole-prefix templates run the full suite (:149-177, :221-252, :296-304).
  • Verified: 63 of 313 stories fall back to the full suite today (the head's selector over every story).
  • False: the rubric's "62 of 313 fall back to the full suite".
  • Verified: no primitive escalation (playwright-legs.mjs:451-463; Button.stories.tsx stays narrow).
  • Verified: the eight helpers live in a11y-pr-contracts.mjs, which the leg planner copies (ci.yml "Keep the leg planner"), and the release-spec visit reader from #11171 uses them with unchanged visits for all 68 release specs.
  • Verified: the selection reports story folders as stories (playwright-legs.mjs:486); FR31's paragraph and verification row say what the description says (docs/specs/AST-030/spec.md:640-647, :767).
  • Verified: the listed tests exist, and the ChatVirtualizer selection test cannot pass on main, which lacks storyScopeFor.
  • Verified in CI: the planner, replay, release-spec and contract test files pass at this head (playwright-legs.test.mjs 79 tests, a11y-pr-contracts.test.mjs 81, interaction-selection-replay.test.mjs 8, release-specs-plan.test.mjs 22); the 10-file tally was not recounted.
  • Not confirmed: #11095 and #11180 change no story file in their current file lists; #10879 changes ChatVirtualizer.stories.tsx.
  • Verified: R1 and R3 to R7.
  • .github/scripts/a11y-pr-contracts.mjs: clear.
  • .github/scripts/playwright-legs.mjs: title-change gap; step-summary count (non-blocking).
  • .github/scripts/playwright-legs.test.mjs: clear apart from the missing title-change case.
  • .github/scripts/release-spec-visits.mjs: repeated doc comment and unused re-export (non-blocking).
  • .github/scripts/release-specs-plan.test.mjs: clear.
  • docs/specs/AST-030/spec.md: clear.

Automated review (maintainer link)

Comment thread .github/scripts/playwright-legs.mjs Resolved
Comment thread .github/scripts/playwright-legs.mjs Resolved
Comment thread .github/scripts/release-spec-visits.mjs Resolved
…ite; the replay uses the story rule

After a story's title changes, the specs that still open its old id are
stranded, so any dangling story id in an interaction spec makes a story change
run the full suite (none today). The selection replay passes storyScopeFor and
archives the stories, so it replays what the lane selects. The step summary
counts changed-story folders. FR31 and its verification row name the case.
@cixzhang
cixzhang marked this pull request as draft November 11, 2026 19:01
@cixzhang

Copy link
Copy Markdown
Contributor Author

/approve-spec 6604f97

@cixzhang
cixzhang marked this pull request as ready for review November 11, 2026 19:02

@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.

Changes requested: mapping a changed story to the specs it reaches is a clear CI saving, every earlier blocker is fixed, and CI is green on this head; one description error remains.

  • Miss: the description says the guardian saw a changed story run the full suite on #11095 and #11180, but #11095 changes only spec records and #11180 only CLI files, so neither changes a story; cite #10879 alone, or pull requests that change a story.

Smaller points: the doc comment over the storyFiles re-export in release-spec-visits.mjs says it is for the plan's tests, though release-specs-plan.mjs uses it directly; the replay test matches source text rather than replaying a story change.

Claims and files checked
  • Verified: on the base a changed story ran the whole suite because it maps to no component (kept when no resolver is given, playwright-legs.test.mjs:1719).
  • False: "The guardian saw it on #11095, #11180": neither changes a story. Verified for #10879, which changes ChatVirtualizer.stories.tsx.
  • Verified: a TextInput story change selects Field's TextFieldFocusTiming (playwright-legs.test.mjs:297-305, and the selector run on this tree).
  • Verified: @astryxdesign/<package>/<Folder> names its folder (a11y-pr-contracts.mjs:1641-1644; test :149-188).
  • Verified: a package-root name maps to the folder holding its source in that package; ChatVirtualizer maps to lab/Chat (:265-295) and ChartLegend from Charts fails closed (:307-316).
  • Verified: a relative import into a component folder, including through local story helpers, names that folder (a11y-pr-contracts.mjs:1473-1497, :1634-1636; DisabledTriggerFocusA11y.stories.tsx resolves core/Selector).
  • Verified: story ids come from the default-export meta, inline metas included and data-row titles ignored (playwright-legs.test.mjs:190-219); every story's ids match this head's Storybook build.
  • Verified: the fail-closed cases (playwright-legs.mjs:347-370; tests :221-263, :307-316), and no spec opens a dangling id today.
  • Verified: 63 of 313 stories fall back to the full suite (the head's selector over every story).
  • Verified: no primitive escalation (playwright-legs.mjs:454-466; Button.stories.tsx stays narrow), and every other rule is unchanged.
  • Verified: the eight helpers live in a11y-pr-contracts.mjs, which the interaction job copies (ci.yml:2702); the release-spec visit reader uses them with identical visits for all 68 release specs.
  • Verified: the selection reports story folders as stories and the step summary counts them (playwright-legs.mjs:489, :824).
  • Verified: the replay passes storyScopeFor and archives the stories (interaction-selection-replay.mjs:195, :251).
  • Verified: FR31's paragraph and verification row say what the description says (docs/specs/AST-030/spec.md:640-648, :768).
  • Verified: the listed tests exist, and the ChatVirtualizer selection test cannot pass on main, which lacks storyScopeFor.
  • Verified in CI: playwright-legs.test.mjs (80 tests), a11y-pr-contracts.test.mjs (81), interaction-selection-replay.test.mjs (9) and release-specs-plan.test.mjs (22) pass at this head; the 10-file tally was not recounted.
  • Verified: CI impact (250 of 313 stories now run a subset) and rubric R1 to R7.
  • .github/scripts/a11y-pr-contracts.mjs: clear.
  • .github/scripts/interaction-selection-replay.mjs: clear.
  • .github/scripts/interaction-selection-replay.test.mjs: source-text test (non-blocking).
  • .github/scripts/playwright-legs.mjs: clear.
  • .github/scripts/playwright-legs.test.mjs: clear.
  • .github/scripts/release-spec-visits.mjs: re-export comment (non-blocking).
  • .github/scripts/release-specs-plan.test.mjs: clear.
  • docs/specs/AST-030/spec.md: clear.

Automated review (maintainer link)

valueImports,
} from './a11y-pr-contracts.mjs';

/** The story index, for the release-spec plan's tests. */

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.

Non-blocking: release-specs-plan.mjs:32 and :112 use this re-export in the plan itself, not only in its tests. Say "for the release-spec plan", or import storyFiles from a11y-pr-contracts.mjs there and drop the re-export.

'utf8',
);

it("passes the lane's story rule, so a story-only change replays its narrow selection", () => {

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.

Non-blocking: the name promises that a story-only change replays its narrow selection, but the test only matches the replay's source text. Either name it for what it checks, or exercise chromiumSelection with storyScopeFor over a small fixture tree the way replay() builds its inputs.

@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.

Approved: a changed story now runs the interaction specs it reaches instead of the whole Chromium suite, the rule is recorded in FR31 with an owner's approval for this head, CI is green, and the description now cites only #10879, which changes a story.

Non-blocking points:

  • Miss: the opener scan cannot see a story id whose whole prefix is a variable, as in TabBar's spec (${title}--${story}), and such a template never falls back to the full suite; nothing escapes today because both stories it opens already run the full suite, but treating ${…}-- with no literal prefix as a template would close the gap.
  • The doc comment over the storyFiles re-export in release-spec-visits.mjs says it is for the plan's tests, though release-specs-plan.mjs uses it directly.
  • The replay test matches source text rather than replaying a story change.
Claims and files checked
  • Verified: on the base a changed story ran the whole suite because it maps to no component (base playwright-legs.mjs:396; kept when no resolver is given, playwright-legs.test.mjs:1719).
  • Verified: #10879 changes ChatVirtualizer.stories.tsx.
  • Verified: a story change runs every interaction spec that opens one of its ids; a TextInput story selects Field's TextFieldFocusTiming (playwright-legs.test.mjs:297-305, and the selector run on this tree), within the variable-prefix limit above.
  • Verified: @astryxdesign/<package>/<Folder> names its folder, a package-root name maps to the folder holding its source in that package, and a name the package does not hold is unresolved (a11y-pr-contracts.mjs:1630-1657; test playwright-legs.test.mjs:149-188).
  • Verified: ChatVirtualizer from Lab maps to lab/Chat (:265-295), and ChartLegend from Charts fails closed (:307-316).
  • Verified: a relative import into a component folder, including through local story helpers, names that folder (a11y-pr-contracts.mjs:1473-1497, :1634-1636).
  • Verified: story ids come from the default-export meta, inline metas included and data-row titles ignored (a11y-pr-contracts.mjs:1533-1568; test playwright-legs.test.mjs:190-219); every story's ids match this head's Storybook build.
  • Verified: the fail-closed cases (playwright-legs.mjs:347-370; tests playwright-legs.test.mjs:221-263, :307-316), and no spec opens a dangling id today.
  • Verified: 63 of 313 stories fall back to the full suite (the head's selector over every story).
  • Verified: no primitive escalation and no dependents for story folders (playwright-legs.mjs:454-476; Button.stories.tsx stays narrow), and every other rule is unchanged.
  • Verified: the eight helpers live in a11y-pr-contracts.mjs, which each interaction lane copies (ci.yml:2702) and the release-spec plan checks out; #11171's visit reader uses them, with identical visits for all 68 release specs.
  • Verified: the selection reports story folders as stories, and the step summary counts them (playwright-legs.mjs:489, :824).
  • Verified: the replay passes storyScopeFor and archives the stories (interaction-selection-replay.mjs:195, :251); the committed replay record is unchanged.
  • Verified: FR31's paragraph and verification row say what the description says (docs/specs/AST-030/spec.md:640-648, :768).
  • Verified: the listed tests exist, and the ChatVirtualizer selection test cannot pass on the base, which lacks storyScopeFor.
  • Verified in CI: the planner, interaction-lane, replay, release-spec and contract test files pass at this head (playwright-legs.test.mjs 80 tests, a11y-pr-contracts.test.mjs 81, interaction-selection-replay.test.mjs 9, release-specs-plan.test.mjs 22).
  • Verified: CI impact (250 of 313 stories now run a subset) and rubric R1 to R7.
  • .github/scripts/a11y-pr-contracts.mjs: variable-prefix story ids (non-blocking).
  • .github/scripts/interaction-selection-replay.mjs: clear.
  • .github/scripts/interaction-selection-replay.test.mjs: source-text test (non-blocking).
  • .github/scripts/playwright-legs.mjs: clear.
  • .github/scripts/playwright-legs.test.mjs: clear.
  • .github/scripts/release-spec-visits.mjs: re-export comment (non-blocking).
  • .github/scripts/release-specs-plan.test.mjs: clear.
  • docs/specs/AST-030/spec.md: clear.

Automated review (maintainer link)

/** A story id prefix in a spec or its helpers: `core-bottomsheet--…`. */
const STORY_ID = /(?:id=|['"`])([a-z0-9][a-z0-9-]*?)--(?:[a-z0-9$]|['"`])/g;
/** A story id whose component part a template fills: `core-${name}--`. */
const TEMPLATED_ID = /([a-z0-9][a-z0-9-]*)-\$\{[^}]+\}--/g;

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.

Non-blocking (miss): this needs a literal prefix before -${, and STORY_ID needs -- inside one quoted literal, so ${title}--${story} in packages/lab/src/TabBar/__tests__/TabBar.interaction.browser.spec.ts:180 (and ${MORE_LIST}--more-tab at :3307) is neither filled nor counted as unfilled. Both stories it opens run the full suite today, but a spec in another folder written this way would not run when its story changes.

Treat ${…}-- with no literal prefix as a template: fill it from the file's quoted names that are story ids, and fail closed when none does.

@cixzhang
cixzhang merged commit a709f9a into main Nov 11, 2026
84 of 130 checks passed
@github-actions
github-actions Bot deleted the ci/chromium-story-folders branch November 12, 2026 06:06
cixzhang added a commit that referenced this pull request Nov 12, 2026
… retries a server error (#11317)

* ci: the selection replay record covers the story rule; a log download retries a server error

The record is regenerated with the Chromium lane's story rule (#11250). Every
verdict matches the earlier record: 144 no failure, 4 caught, 4 reviewed, 1 out
of scope. Three pull requests that change only stories now replay a narrow
selection with no failure (#9672, #10271, #10944). GitHub's job-log endpoint
answers 502 now and then, so failingSpecs tries a server error again, up to
four times, before it calls a log unreadable.

* Merge remote-tracking branch 'origin/main' into ci/replay-story-rule

* ci: a log download waits only between tries, not after the last

failingSpecs no longer waits after its fourth and last try, so a log that keeps
answering 5xx gives up after 30 s of waits, and a test pins four server errors
in a row. This also corrects the earlier commit's wording: the three pull
requests that now replay a narrow selection (#9672, #10271, #10944) are ones
whose story was their only full-suite trigger, not ones that change only
stories. Their stories are Drawer, TableSelection and Avatar; Button's specs run
because those stories import Button.

This branch was successfully deployed

1 active deployment
Preview — 6604f977 Deployed Nov 11, 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