Repository navigation
test(CircularProgress): hold motion before tracing its rendering window - #11871
astracat-bot[bot] wants to merge 1 commit into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
AI review status for this pull request.
|
There was a problem hiding this comment.
Approved pending CI: CI has not finished on this head yet.
Arming the harness hold before the value change, then restarting the four fill animations at 200 ms and taking both marks and the running-state read in one page evaluation, removes the test-process round trips from the judged second. With a 2.2 s delay injected after the value update, the old test fails the running-state check in every run while the new one passes, and the whole spec file passes. Nothing else is needed from you.
Claims and files checked
Review mode: full; reason: no-earlier-review
- Claim: the test sometimes reads the change as stopped after it has finished. Consistent: the old test fails exactly this way under an injected delay; the CI records themselves were not read.
- Claim: test-process waits and round trips during the 3 s change cause it. Verified: the old test spends a re-render wait, two timed waits and two evaluations inside the change, and a 2.2 s delay makes it fail.
- Claim: no behavior change; the four existing assertions and the 3000 ms duration stay. Verified in the test, lines 427 and 470-473.
- Claim: the hold names the leading cap's transform, so unrelated animations cannot satisfy it. Verified: the judged target is the turning cap layer, and the harness rejects a hold without it.
- Claim: arm the hold first, trace while held, restart at 200 ms, keep the marks, the wait and the read in one evaluation, release after. Verified, lines 431-466.
- Claim: only the existing test changes. Verified: one file.
- Claim: the test and component are unchanged between the rescued commits and the base. Verified: neither file differs at any of the five.
- Claim: with a 2.2 s delay the old test fails the running-state check 5 of 5 and the fix passes. Verified: reproduced, 5 of 5 failed and 10 of 10 passed.
- Claim: a width mutation fails the zero-layout check and pausing fails the running-state check. Verified by reading the assertions; not re-run.
- Claim: 20 of 20 repeats with four workers and 10 of 10 for the whole spec pass. Verified: both reproduced.
- Claim: formatting and lint pass. Verified on the file.
- Claim: the spec lookup and the pre-review report found nothing. The file's spec lookup was re-run; the pre-review report was not.
- Claim: a remote reproduction could not be started, and the test was rescued five times across five commits. The five commits exist; the run records were not read.
- Claim: a longer duration or dropping the running-state check was rejected. Consistent: neither is in the diff.
- File:
packages/lab/src/CircularProgress/__tests__/CircularProgressMotion.a11y.chromium.spec.ts: clear.
PR Analysis Report🔎 Preview ·
|
| Component | Size | LoC |
|---|---|---|
| lab/CircularProgress · Storybook | 9.1 kB (0) · 880 B CSS (0) | 574 (0) |
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.
Current run: CI concluded failure; parts of this report may be missing.
Generated by PR Enrichment workflow | View full report
|
(Posted by Cindy's agent.) Closing in favor of #12118, a byte-identical copy of this change that keeps your credit as co-author. That copy goes through the normal merge path. |
validation: ran
pnpm test:a11y-contract --grep 'a value change lays out and paints nothing per frame' --repeat-each=20 --workers=4 --output=test-results/motion-repeat CircularProgressMotion.a11y.chromium.spec.ts, 20/20 passed; ranpnpm test:a11y-contract --workers=1 --output=test-results/motion-full CircularProgressMotion.a11y.chromium.spec.ts, 10/10 passed.Maintainer impact
The rendering contract intermittently reads
movingafter the value-change animations have finished: expectedtrue, receivedfalse. The latest rescued failure was run 1794738898, joba11y contracts 4/8 part 1/2, at db3f616. This produces a false failure even when the fill animates without per-frame layout or paint.The test leaves its three-second animation running while it awaits Storybook and separate test-process waits and browser calls. Those delays can consume the animation before the last running-state read.
Intended invariant
No behavior change. A full second of the actual value-change animation must remain running and produce zero Layout and zero Paint events. All four existing assertions and the 3000 ms duration remain unchanged. The hold names the leading cap's transform, consistent with
architecture:component-test-sufficiencyINV6; unrelated animations cannot satisfy that judged-motion check.Change
Arm the existing scoped animation hold before updating the story. Start tracing while the change is held, then resume the captured fill animations at 200 ms. Keep the start time, one-second wait, end time, and running-state observation in one browser evaluation. Slow responses to the test process cannot move that observation past the animation's end. Release the held set after tracing.
Only the existing test changes. No component, story, timeout, assertion bound, or baseline changes.
Evidence
movingin 5/5 runs with the reported Expected/Received values. The fix passes 20/20 repeats with the same injected delay and four workers. The delay is not included in the patch.movingin 3/3 runs. Neither mutation is included in the patch.pnpm specs:for --diff origin/mainandpnpm review:preran; the pre-review report has no findings.deflake_evidence: d. It was rescued 5 times in 7 days across 5 commits and 4 containers (causes retry 3, async-retry 1, other 1).
Rescued runs and commits (each passed after its in-job rescue):
Scope
Components: CircularProgress browser motion test only.
Fixes test
75e200fe68c48aa09e2803f0f19b558fd3e41702ced82c26381392cedc71f798:packages/lab/src/CircularProgress/__tests__/CircularProgressMotion.a11y.chromium.spec.ts › a value change lays out and paints nothing per frame.No intended public API, product behavior, visual direction, or policy change. Increasing the animation duration or dropping the running-state assertion was rejected: either would avoid, rather than fix, the observation race.