Skip to content

test(core): the adopters' edge proofs read the module's clock - #10150

Merged
cixzhang merged 1 commit into
meta:mainfrom
vjeux:uikit/f1-adopters-edge-clock
Nov 5, 2026
Merged

cixzhang merged 1 commit into
meta:mainfrom
vjeux:uikit/f1-adopters-edge-clock

Conversation

@vjeux

@vjeux vjeux commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

The Collapsible and TreeList edge proofs in animatedLayoutAdopters.interaction.browser.spec.ts now read the animated-layout module's own clock, so they no longer fail under load with nothing wrong. This is a test-only change on main.

Maintainer impact

CI's WebKit leg failed "a TreeList row's revealed group keeps its block-end edge on the rows after it on every frame, and a collapse while it expands conceals from what it shows (FR9)" with 21.09 against a strict < 21. The module was right: the proof read the close at an unknown time. Every such failure costs a CI re-run and a triage.

Intended invariant

The proofs keep checking the same behavior with the same bounds: the revealed content's block-end edge stays on the content after it on every frame, and a close while it opens conceals from what it shows. No bound is widened.

Change

  • The close starts from what shows. The proof compared what showed as the close came with the first frame the page read after it. That read comes after the close commits and one more frame, so a slow frame let the conceal move on. It now reads where the conceal starts, its first keyframe, and requires it to equal what showed, plus at most the container gap the content after it travels (beyond: 4 px for the Collapsible, 0 for the TreeList). That is far tighter than the old quarter of the content's height (21 and 22 px).
  • Boxes on the module's clock. The edge ride's per-frame gap and the single-open group proof read boxes with getBoundingClientRect, which WebKit evaluates a little ahead of the frame, against clips read from their keyframes. They now read layout offsets plus each glide's keyframes at its current time, as the module's own proofs do.

Evidence

  • Failure before the change, under load: a WebKit A/B in the Playwright container pinned to 2 CPUs with 2 workers, 6 rounds of 18 tests per arm, the arms alternating, every failure recorded by file, case, error and duration. On main the close check failed 10 times (22.1 to 28.7 against 21 or 22, the CI failure's shape), the single-open group gap once (1.53 against 2.5) and the edge ride's gap once (1.75 against 1.5).
  • Deterministic failure: one 200 ms busy frame right after the close, on a not-for-landing arm over main (vjeux@74112e3b50). main's proof fails 2 of 4 in Chromium (23.15) and 4 of 4 in WebKit (25.98, 28.58). The same frame over this change (vjeux@926ee3e34c) passes 4 of 4 in both.
  • Success after the change: in the same 2-worker A/B, none of those three failures (0 of 108). Both arms also starved at 2 workers on 2 CPUs: 8 or fewer frames presented during the motion, so the proof's frame-count check failed (main 2, this change 5); that load is past the repository's one-worker default, and no bound was changed. At one worker on the same 2-CPU pin, 3 rounds of 18 tests per arm, main failed once (the group gap, 2.44 against 2.5) and this change 0 of 54, with no starvation.
  • These runs are on vjeux@a5b438c8d8, which this head extends only by one comment sentence in two places.
  • Product/runtime behavior verified unchanged: test-only. The proofs keep every other check; the whole file passes in Chromium and WebKit.

Scope

  • No intended public API, product behavior, visual direction, or policy change.
  • Product changes discovered during the work were removed or split.
  • Public text and artifacts contain no internal Meta context.

Testing

  • animatedLayoutAdopters.interaction.browser.spec.ts, 3 repeats: Chromium 18 of 18, WebKit 18 of 18.
  • The WebKit pressure A/B and the slow-frame arms above.
  • CI=true pnpm lint and Prettier on the changed file.

A close's edge ride compared what showed as the close came with the
first frame the page read after it, an unknown time later. Under load a
slow frame let the conceal move past a quarter of the content's height
by then, so the proof failed with nothing wrong (21.09 against 21 in
WebKit). It now reads where the conceal starts, its first keyframe:
what showed, plus at most the container gap that the content after it
travels.

The edge ride and the single-open group proofs read boxes with
getBoundingClientRect, which WebKit evaluates a little ahead of the
frame, against clips read from their keyframes. Under load that
difference now and then passed the 1.5 px bound. They now read layout
offsets plus each glide's keyframes at its current time, as the
module's own proofs do.
@vercel

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

Request Review

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

astracat-bot Bot commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

AI review status for this pull request.

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

@github-actions

github-actions Bot commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

PR Analysis Report

🔎 Preview · 2e71191

Storybook · Sandbox · built from this PR's head

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

API changes: none in this pull request

Committed API report behind this build: cli 19 rows, core 23 rows; run pnpm api:report.

Not run on this PR: add ci:run-visual, ci:run-a11y or ci:run-rtl to run them.


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.

Approved pending CI: CI has not run on this head yet. The pull request is a draft and its branch is in a fork, so CI runs once a maintainer adds the ci:run label and the pull request is marked ready for review.

The close check now reads where the conceal starts instead of a later frame, and the gap checks read layout offsets plus glide keyframes. No bound is widened. In WebKit, one 200 ms busy frame after the close fails the current TreeList check (22.9 px against < 21), while the new check reads 0.05 px with or without it. The file passes in Chromium and WebKit.

[Automated review]

@vjeux
vjeux marked this pull request as ready for review November 5, 2026 20:03
@cixzhang cixzhang added the ci:run A maintainer lets this outside contributor's pull request run CI (AST-030 FR17) label Nov 5, 2026
@cixzhang
cixzhang marked this pull request as draft November 5, 2026 20:08
@cixzhang
cixzhang marked this pull request as ready for review November 5, 2026 20:08
@cixzhang
cixzhang merged commit 6180af6 into meta:main Nov 5, 2026
161 of 166 checks passed
@vjeux
vjeux deleted the uikit/f1-adopters-edge-clock branch November 5, 2026 20:50

This branch was successfully deployed

1 active deployment
Preview — 2e71191f Deployed Nov 5, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci:run A maintainer lets this outside contributor's pull request run CI (AST-030 FR17) 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.

2 participants