Skip to content

ci: a failing a11y contract leg keeps its Playwright results and audit frames as an artifact - #12624

Merged
cixzhang merged 2 commits into
mainfrom
ci/a11y-contracts-results
Nov 18, 2026
Merged

cixzhang merged 2 commits into
mainfrom
ci/a11y-contracts-results

Conversation

@cixzhang

@cixzhang cixzhang commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

Who this helps

Whoever fixes a failing release-check accessibility contract. Today MoreMenuAudit.a11y.chromium.spec.ts:746 › sheet failed in leg 5/6 of two release-checks (runs 44271373410 and 44288781471), and neither run kept anything but the log: no frame of what the sheet rendered.

What changes

  • .github/workflows/ci.yml, a11y-contracts-shard: the contracts step gets id: contracts, and a new step, only when that step failed, uploads test-results/ and every <name>-audit-evidence/ folder as a11y-contracts-results-<storybook hash>-<shard>-<attempt> (14 days, nothing uploaded when empty).
    • test-results/ holds each failing test's error-context.md: the error and its source, plus a page snapshot only when the test's page is still open at the failure.
    • A component audit such as MoreMenuAudit … › sheet closes its own page in finally, so its error-context.md has no snapshot; it writes the screenshot and receipt of every state it checked to more-menu-audit-evidence/, which this keeps.
  • Traces stay off: recording every test's trace on these legs would slow the Table timing proofs that run in them.

Tests

  • release-check-workflow.test.mjs: the step uploads test-results/ and the audit evidence folders only after the contracts step failed, named per shard and attempt. Red-first: it fails against main's ci.yml; with this change the release-check and CI workflow tests pass (265 of 265 across 9 files). Prettier clean.

CI impact

None on a passing leg (the step is skipped). A failing release-check contract leg uploads one artifact of its failing tests' results.

Overlap checked: #12606, #12432, #12320, #12285, #12243, #12129 (each touches ci.yml elsewhere; this adds one step to the release-check a11y-contracts leg and a test for it, no shared lines)

Owning session: noopbot (a61f66c2), under CI & Release (ca77f950). Land path: the shipper, through merge-guard, on green, CodeBunny approval and Specs' exact-head /approve-spec.

@vercel

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

Request Review

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

astracat-bot Bot commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

AI review status for this pull request.

Review status Updated
🟢 Reviewed (for maintainers only) Nov 18, 2026, 12:19 PM UTC

@cixzhang

Copy link
Copy Markdown
Contributor Author

/approve-spec 11232d5

@github-actions

github-actions Bot commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

PR Analysis Report

🔎 Preview · 0a6a224

Storybook · Sandbox · built from this PR's head

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

Not run on this PR: add ci:run-visual for Visual, ci:run-a11y for Accessibility, ci:run-rtl for RTL.

CI impact: 0 job-min per update · pool 0% · time to green −41.2 min · some runners chosen by event or unknown · 1 CI action or script file changed (not measured)
Before After Change
Job-minutes per PR update 219 219 0
Runner pool, runner-minutes a day 71,349 71,349 0 (0%)
Average concurrent jobs 49.5 49.5 0
Time to green (median → this run) 64.5 min 23.3 min −41.2 min
Runs a day 326 326 0

Changed jobs: Accessibility spec-test contracts changed: standard or non-standard by event (4-core-ubuntu)

Not measured (the jobs that use these keep their recent minutes above): .github/scripts/release-check-workflow.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
Contributor

Choose a reason for hiding this comment

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

Changes requested: the new step keeps a failing contract leg's Playwright output, but it does not deliver the page snapshots the pull request promises for the failure it cites.

  • The title, description and new comments promise each failing test's page snapshot, but Playwright 1.61.1 writes one into error-context.md only when the test's page is still open at the failure, so the cited MoreMenuAudit sheet test (which closes its own context in finally) would keep only its error text and source: reword those claims to what the step keeps, or also upload *-audit-evidence/ so that test's own frames come along.

The rest conforms to the CI spec: the upload runs only on release-check legs whose contracts step failed, the artifact name is unique per shard and attempt, and the new test fails against the base workflow and passes on this head.

Claims and files checked

Review mode: full; reason: no-earlier-review

  • Claim: the contracts step gets an id — verified (.github/workflows/ci.yml:3822).
  • Claim: a new step uploads test-results/ only when that step failed, per Storybook hash, shard and attempt, for 14 days, nothing when empty — verified (.github/workflows/ci.yml:3867-3874).
  • Claim: Playwright 1.61 writes each failing test's error-context.md with the page's accessibility snapshot — partly false: the file is written for every failing test, but the snapshot only when the page is still open; the cited sheet test gets none.
  • Claim (title): a failing leg keeps page snapshots — false for specs that close their own context before failing, including the cited one.
  • Claim: traces stay off — verified (playwright.config.ts sets no trace setting and is unchanged).
  • Claim: the test checks the step uploads only after the contracts failed, per shard and attempt — verified (.github/scripts/release-check-workflow.test.mjs:790-810).
  • Claim: the test fails against the base workflow — verified (it fails on the missing step id; the other 92 tests pass).
  • Claim: the release-check and CI workflow tests pass, 265 of 265 across nine files — not verifiable as counted, since the nine files are not named; release-check-workflow.test.mjs (93) and workflow-artifact-names.test.mjs (26) pass on this head.
  • Claim: Prettier clean — verified.
  • Claim: no CI impact on a passing leg — verified (the step needs failure()).
  • Claim: a failing leg uploads one artifact of its failing tests' results — verified; the artifact also holds every other file under test-results/.
  • Claim: no shared lines with the six overlapping pull requests it names — verified (their workflow hunks sit far from this job, and none touches the test file).
  • File .github/workflows/ci.yml: finding (the comment at line 3865 overclaims); the step itself is clear.
  • File .github/scripts/release-check-workflow.test.mjs: finding (the comment at lines 800-801 overclaims); the assertions are clear and match the workflow.

Automated review (maintainer link)

Comment thread .github/workflows/ci.yml Resolved
…t.md has a page snapshot only while the page is open
@cixzhang cixzhang changed the title ci: a failing a11y contract leg keeps its Playwright results (page snapshots) as an artifact ci: a failing a11y contract leg keeps its Playwright results and audit frames as an artifact Nov 18, 2026
@cixzhang

Copy link
Copy Markdown
Contributor Author

/approve-spec 0a6a224

@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 pending CI: CI has not run on this head yet because the pull request is a draft; marking it ready for review starts it.

The earlier request is addressed: the title, description and comments now describe what error-context.md holds, and the upload also keeps the component audits' <name>-audit-evidence/ folders, so the cited MoreMenu sheet failure keeps its frames and receipts. Two optional wording fixes remain: the test comment at .github/scripts/release-check-workflow.test.mjs:801-802 says an audit writes its frames after it closes its page (it writes them before), and the description's overlap note says all six listed pull requests touch ci.yml, but #12320 does not.

Claims and files checked

Review mode: incremental; reason: none

  • Claim: the MoreMenu audit's sheet test failed in leg 5 of 6 in two release-checks, and neither kept a frame of it — verified (both runs' leg 5 annotations name that one test; their artifacts hold no MoreMenu frames).
  • Claim: the contracts step gets an id — verified (.github/workflows/ci.yml:3822).
  • Claim: a new step uploads test-results/ and every audit-evidence folder only when that step failed, per Storybook hash, shard and attempt, for 14 days, nothing when empty — verified (.github/workflows/ci.yml:3870-3879; root folders through the glob, nested ones through test-results/).
  • Claim: error-context.md holds the error and source, plus a page snapshot only when the page is still open — verified (Playwright 1.61.1 takes the snapshot from a still-open page after the failure is recorded).
  • Claim: the sheet audit closes its own page in finally and writes each checked state's screenshot and receipt to more-menu-audit-evidence/ — verified (MoreMenuAudit.a11y.chromium.spec.ts:24, :693-741, :745-757).
  • Claim: traces stay off — verified (playwright.config.ts sets no trace and is unchanged).
  • Claim: the test checks the upload's condition, name and paths — verified (.github/scripts/release-check-workflow.test.mjs:790-811).
  • Claim: the test fails against main's ci.yml — verified (it fails on the missing step id; the other 92 tests pass).
  • Claim: the release-check and CI workflow tests pass, 265 of 265 across nine files — not verifiable as counted, since the nine files are not named; all eleven workflow and release-check test files pass on this head.
  • Claim: Prettier clean — verified.
  • Claim: no CI impact on a passing leg — verified (the step needs the contracts step to fail).
  • Claim: a failing leg uploads one artifact of its failing tests' results — verified; it also holds the frames of audits that passed in that leg.
  • Claim: six named pull requests each touch ci.yml elsewhere, with no shared lines — partly false: no shared lines holds for all six, but #12320 does not touch ci.yml.
  • Claim: ownership and land-path notes — process statements, not code claims.
  • File .github/workflows/ci.yml: clear.
  • File .github/scripts/release-check-workflow.test.mjs: non-blocking wording note on lines 801-802; the assertions are clear.

Automated review (maintainer link)

Comment on lines +801 to +802
// error-context.md, and the frames and receipts a component audit writes
// after it closes its own page.

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 audit writes each frame and receipt while its page is open (MoreMenuAudit.a11y.chromium.spec.ts:693-741) and closes its context last, in finally (:755-756), so "after it closes its own page" reads backwards. Suggested:

    // Only after the contracts themselves failed: each failing test's
    // error-context.md, and the frames and receipts a component audit writes
    // before it closes its own page.

@cixzhang
cixzhang marked this pull request as ready for review November 18, 2026 12:27
@cixzhang
cixzhang merged commit 3029ac5 into main Nov 18, 2026
143 checks passed
@github-actions
github-actions Bot deleted the ci/a11y-contracts-results branch November 19, 2026 06:04

This branch was successfully deployed

1 active deployment
Preview — 0a6a2240 Deployed Nov 18, 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