Skip to content

test(Wheel): the busy-thread coast proof decodes each frame once - #10777

Merged
cixzhang merged 1 commit into
meta:mainfrom
vjeux:test/wheel-coast-one-decode
Nov 9, 2026
Merged

cixzhang merged 1 commit into
meta:mainfrom
vjeux:test/wheel-coast-one-decode

Conversation

@vjeux

@vjeux vjeux commented Nov 9, 2026

Copy link
Copy Markdown
Contributor

Maintainer impact

The Wheel's proof "the coast keeps advancing every frame while the main thread is blocked" can run out of time on a loaded runner. On two contended CPUs it took 21–43 s of its 60 s budget, and some runs timed out.

Intended invariant

The proof judges the same frames with the same tracks, against the same control. Its 60 s timeout is unchanged.

Change

The test tracked three marker colours and the control with four trackMarker calls. Each call decodes every screencast frame again. Under load, those four passes took about 24 of the test's 30 s.

One trackMarkers call now decodes each frame once and searches it for all four colours. The harness documents trackMarkers for this case: a proof that tracks a marker and a control decodes each frame once. trackMarker is trackMarkers with one colour, so each track is the same.

Evidence

The recipe: Chromium in the CI image, --cpus=2 on one pinned pair of CPUs, 4 workers, and busy loops inside the container. No other user process ran on the pair. WebKit skips this proof by design, since it needs scripted touch timestamps.

  • Failure before the change: on main (fa30cff) with 2 busy loops, 4 of 10 runs timed out in the decode step (trackMarkers, frames.ts:516). A timing probe put each of the four passes at 5.6–7.1 s.
  • Success after the change, order-balanced (main, fix, fix, main; ×10 each):
    • With 2 busy loops: main passed 20/20 in 21–43 s, and the fix passed 20/20 in 13–25 s.
    • With 4 busy loops: main passed 19/20 in 32–52 s, and the fix passed 19/20 in 18–30 s.
    • Each arm's one failure there is frame starvation in one judged window, not a timeout. This change leaves the judging alone.
    • The harness names that starvation inconsistently: a FrameStarvationError in one run, a verdict failure in the other. That is a known harness issue, outside this change.
  • Product/runtime behavior verified unchanged: the change is in one test file. No product code changes.
  • CI impact: no workflow changes. The proof's own time drops by about a third to a half under load.

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

  • The order-balanced runs above, with the per-run durations in the evidence lines.
  • pnpm exec prettier --check, ESLint and pnpm -F @astryxdesign/core typecheck pass. node scripts/release/changeset-coverage.mjs pr reports nothing that ships.

The coast's busy-main-thread proof tracked three marker colours and the
control in four passes over the screencast. Each pass decoded every
frame again. Under load the passes took most of the test's 60 s, and
the test timed out inside them. One trackMarkers call now decodes each
frame once and searches it for every colour, as the harness documents.
The tracks are the same, and the timeout is unchanged.
@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 12:18pm 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, 12:42 PM UTC

@github-actions

github-actions Bot commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

PR Analysis Report

🔎 Preview · 718b408

Storybook · Sandbox · built from this PR's head

Modified components

Component Size LoC Visual · A11y · RTL
DateInput · Storybook 187.0 kB (0) · 17.0 kB CSS (0) 5,749 (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

@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 single trackMarkers call returns the same four tracks as the three per-colour trackMarker calls and the control's call it replaces: the same tolerance, the whole frame, and the cast step on the magenta track only. The busy-main-thread proof judges exactly what it judged before, with one decode per frame, and format, lint and typechecks pass on the head.

Next step: the pull request is still a draft, so every CI job skipped; it already carries the ci:run label, so marking it ready for review starts CI.

[Automated review]

@cixzhang cixzhang added the ci:run A maintainer lets this outside contributor's pull request run CI (AST-030 FR17) label Nov 9, 2026
@cixzhang

cixzhang commented Nov 9, 2026

Copy link
Copy Markdown
Contributor

/approve-spec 718b408

@vjeux
vjeux marked this pull request as ready for review November 9, 2026 13:00
@cixzhang
cixzhang merged commit 376a483 into meta:main Nov 9, 2026
127 checks passed
@vjeux
vjeux deleted the test/wheel-coast-one-decode branch November 9, 2026 13:31

This branch was successfully deployed

1 active deployment
Preview — 718b4088 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