feat(atomic-a11y): add merge-shards for parallel a11y report aggregation#7137
Open
y-lakhdar wants to merge 11 commits intofeat/a11y-reporterfrom
Open
feat(atomic-a11y): add merge-shards for parallel a11y report aggregation#7137y-lakhdar wants to merge 11 commits intofeat/a11y-reporterfrom
y-lakhdar wants to merge 11 commits intofeat/a11y-reporterfrom
Conversation
5cb5fe5 to
61496ce
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
TL;DR
Merge shard JSON reports from parallel CI runs into a single consolidated a11y report.
Context
When Storybook tests run with
--shard=N/M, each shard writes its owna11y-report.shard-N.json. This PR adds the merge step that combines them.How the shard merge works
When Storybook tests run with --shard, each shard writes its own
a11y-report.shard-N.json. The merge step recombines them into a singlea11y-report.json.mergeA11yShardReports()— entry pointa11y-report.shard-{N}.jsonPromise.allSettled— invalid shards are skipped with a warning)mergeComponents()→mergeCriteria()→createSummary()merged a11y-report.jsonmergeComponents()— deduplicate by component namecriteriaCoveredsets andincompleteDetailsarraysexample
Shard 1 tested
atomic-search-boxwith commerce stories, shard 2 tested it with search stories:mergeCriteria()— deduplicate by criterion ID, two passesaffectedComponentsacross shards for each criterion IDexample
Pass 1 — merge from shard criteria lists:
Pass 2 — infer from merged components. Suppose
atomic-result-listcovers criterion "4.1.2" (from itscriteriaCoveredarray), but no shard had a "4.1.2" criteria entry:PR Chain (4 of 7)
KIT-5469