Skip to content

test(Lightbox): the busy page-settle pool fails by name when too slow - #10770

Merged
cixzhang merged 2 commits into
meta:mainfrom
vjeux:test/lightbox-paging-pool-deadline
Nov 9, 2026
Merged

cixzhang merged 2 commits into
meta:mainfrom
vjeux:test/lightbox-paging-pool-deadline

Conversation

@vjeux

@vjeux vjeux commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

Maintainer impact

On a loaded runner, Lightbox's busy page-settle test can end in its 60 s timeout, naming no cause. Nothing hangs. The test judges six settles as one pool, and each took 12 to 17 s there. The largest part decoded every cast frame twice, once per color.

Intended invariant

Lightbox's PR1, which this proof checks:

Zoom, page, dismiss, and transition settles keep moving while the main thread is busy (spec:AST-094).

The six settles, three judged runs, every floor and the 60 s timeout stay as they are.

Change

  • One decode per frame. trackMarkers decodes each cast frame once for both the photo's marker and the control.
  • Too slow fails by name. The pool's deadline is the test's timeout less 12 s. When the slowest settle so far would not fit, it fails with "too slow for the pool".
    • This is stricter: a run that main would finish in 48 to 60 s now fails by name. With 1 worker the test takes 21 to 29 s.
    • With no test timeout, as under --debug, the pool has no deadline. Such a run passes, as on main.
  • A harness test shows that trackMarkers with two colors finds, frame by frame, what trackMarker finds for each color.

Evidence

Runs use the CI container with CI=1. "4 workers" runs four copies of this test at once.

  • Failure before the change: the pool as on main (not for landing). At --cpus=2 with 4 workers, 8 of 8 runs end in the test timeout, in Chromium and in WebKit.
  • Success after the change: the same 8 runs fail by name in 39 to 47 s, with no timeout. One reads "too slow for the pool: 2 of 6 settles took 26.5 s, up to 13.5 s each".
  • In WebKit at --cpus=4 with 4 workers, a settle spent 6.7 s decoding. One decode takes 3.5 s.
  • With 1 worker, the test passes 10 of 10 in Chromium (21 s each) and 10 of 10 in WebKit (27 to 29 s).
  • The slowed-settle self-tests pass 10 of 10 in each engine.
  • The harness test passes in both engines. It fails when the bounds are shared across colors, or when every color gets the cast's step.
  • Product/runtime behavior verified unchanged: only test files change.

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

At 315507f on main 16436be, core and harness tsc are clean, and ESLint is clean on both files. With --timeout=0 the test passes in Chromium (25 s) and WebKit (31 s); before the second commit it failed after one settle. The Lightbox interaction specs pass 103 in Chromium (4 skips) and 98 in WebKit (9 skips).

The busy page-settle test judges six settles as one pool. On a loaded
runner each settle took 12 to 17 s, mostly decoding every cast frame
twice: once for the photo's marker and once for the control. Six did
not fit in the test's 60 s, so the run ended in its timeout.

Each frame is now decoded once for both colors. The pool also takes a
deadline. Before a settle that the slowest so far would not fit, it
fails by name: too slow for the pool. It drops no settle, and the proof
still needs six settles and three judged runs.

A harness test shows that one decode for two colors finds what one
decode per color finds.
@vercel

vercel Bot commented Nov 9, 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 9, 2026 10:50am UTC

Request Review

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

astracat-bot Bot commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

AI review status for this pull request.

Review status Updated
🟢 Reviewed (for maintainers only) Nov 9, 2026, 11:13 AM UTC

@cixzhang

cixzhang commented Nov 9, 2026

Copy link
Copy Markdown
Contributor

/approve-spec 22cd59e

@cixzhang cixzhang added the ci:run A maintainer lets this outside contributor's pull request run CI (AST-030 FR17) label Nov 9, 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: one fix is needed before this can land.

  • With no test timeout (--timeout=0, or --debug, which sets it), testInfo.timeout is 0, so the deadline at LightboxPaging.interaction.browser.spec.ts:845 is already 12 s in the past and the page-settle proof fails after its first settle with a false "too slow for the pool" error; build the deadline only when testInfo.timeout > 0, as harness.interaction.browser.spec.ts:1701 does.

The rest checks out: the one-decode read matches the two single-color reads, the new harness test fails when every color gets the cast's step, and the proof passes at the default timeout.

[Automated review]

With no test timeout, as under --debug, testInfo.timeout is 0. The
pool's deadline was then already past, and it failed after its first
settle. It now sets a deadline only for a test with a timeout.
@github-actions

github-actions Bot commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

PR Analysis Report

🔎 Preview · 315507f

Storybook · Sandbox · built from this PR's head

Modified components

Component Size LoC Visual · A11y · RTL
Lightbox · Storybook 122.6 kB (0) · 10.6 kB CSS (0) 3,377 (0) ✓ · ✓ · ✓

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

API changes: none in this pull request

Committed API report behind this build: cli 29 rows, core 36 rows, theme-butter 1 row, theme-y2k 1 row; run pnpm api:report.

Touched components checked; add ci:run-visual, ci:run-a11y or ci:run-rtl to run the full suites.


Generated by PR Enrichment workflow | View full report

@cixzhang

cixzhang commented Nov 9, 2026

Copy link
Copy Markdown
Contributor

/approve-spec 315507f

@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; it runs once the pull request is marked ready for review.

The earlier finding is fixed: with no test timeout (--timeout=0 or --debug) the pool sets no deadline, and the page-settle proof passes as on main, at the default timeout too, while a short timeout now fails by name.

Non-blocking:

  • Miss: the too-slow message says "s of the test's time remain", but left counts down to the pool's deadline, 12 s before the test's timeout, so it understates what the test has left; "… s remain before the pool's deadline" would say what it measures (LightboxPaging.interaction.browser.spec.ts:725).

[Automated review]

@vjeux
vjeux marked this pull request as ready for review November 9, 2026 11:26
@cixzhang
cixzhang merged commit 738919b into meta:main Nov 9, 2026
129 checks passed
@vjeux
vjeux deleted the test/lightbox-paging-pool-deadline branch November 9, 2026 11:57

This branch was successfully deployed

1 active deployment
Preview — 315507f0 Deployed Nov 9, 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