Skip to content

test(interaction-harness): a lift stall comes before a pacing error - #10530

Merged
cixzhang merged 3 commits into
meta:mainfrom
vjeux:test/harness-lift-stall-precedence
Nov 8, 2026
Merged

cixzhang merged 3 commits into
meta:mainfrom
vjeux:test/harness-lift-stall-precedence

Conversation

@vjeux

@vjeux vjeux commented Nov 7, 2026 •

Copy link
Copy Markdown
Contributor

Maintainer impact

A play whose own onEvent holds its lift back past the 40 ms stillness interval fails by name with TouchLiftStallError. The check needed onEvent to account for the whole of the gap's excess. On a loaded runner, which stretched the same gap further, it fell through to TouchPacingError, which blames the runner for the play's own work. Its harness self-test fails that way in CI's WebKit shards at times, costing a re-run. It is not a break: on main it passes at one worker, alone and after the tests before it.

Intended invariant

When the scripted gap plus onEvent's own run passes the stillness interval, the lift stall is named before any pacing error, however much the page or the runner added. A quick onEvent leaves it to the pacing errors.

Change

  • liftStallError: the lift stall when the scripted gap plus onEvent's run passes TOUCH_STILLNESS_MS. Every gap the old check named still qualifies, since the page read a rest.
  • touchPlayError holds the order the play throws in: the lift stall, then the page's stall, then the runner's. Both are exported for unit cases.
  • The self-test's page logs each move at its pointer event, where Core's gesture host reads it. On a loaded runner its touch events can be stamped later: the page's gap read 58 ms off the error's.
  • JSDoc and README: the precedence.

Evidence

  • Unit cases pin each error by its injected condition: a quick onEvent names TouchPacingError, a listener that held the lift TouchPageStallError, and 70 ms of onEvent TouchLiftStallError, held or not. 24 ms (16 + 24 = 40) is not a lift stall; 25 ms is.
  • A new WebKit self-test injects both: the page holds the last move 100 ms, and onEvent waits 60 ms on the runner's timer. Main names it TouchPacingError 5 of 5; this change names the lift stall. A quick onEvent names the page's stall.
  • Control, NOT FOR LANDING: the old check (0b3e710) fails three lift-stall units and the new self-test 3 of 3.
  • The harness self-test in WebKit on two CPUs at four workers: main 6 of 10 (four TouchPacingError); this change 20 of 20 in two rounds.
  • Product/runtime behavior verified unchanged: test harness only.
  • CI impact (for a change to workflows, actions or CI scripts): none.

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

  • Harness unit tests: 195 of 195.
  • The harness self-test and the new one, five rounds at one worker: 10 of 10.
  • Harness spec: Chromium 143 passed, WebKit 124 passed at one worker.
  • Prettier, ESLint 0, pnpm review:pre: 0 findings, merge into main clean.

@vercel

vercel Bot commented Nov 7, 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 8, 2026 2:55am UTC

Request Review

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

astracat-bot Bot commented Nov 7, 2026 •

Copy link
Copy Markdown
Contributor

AI review status for this pull request.

Review status Updated
🟢 Reviewed (for maintainers only) Nov 8, 2026, 3:05 AM UTC

@github-actions

github-actions Bot commented Nov 7, 2026 •

Copy link
Copy Markdown
Contributor

PR Analysis Report

🔎 Preview · b0e2163

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 29 rows, core 39 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.

This branch also carries #10501's commit, so landing it lands that change too. Next: because the branch lives in a fork, a maintainer adds the ci:run label so CI runs, then mark the pull request ready for review, which starts the run.

Non-blocking suggestion:

  • The TouchLiftStallError JSDoc ("carry the gap past that interval by itself") and the README ("onEvent alone carries the scripted gap past the stillness interval") overstate onEvent's share, because onEvent runs inside the scripted wait: a 30 ms onEvent before a 16 ms lift leaves about a 32 ms gap on an idle runner, so stating the rule as coded (the scripted gap plus onEvent's run passes the stillness interval) would be accurate.

[Automated review]

* for that excess: page work there holds the next event back by a round trip.
* On a page that stamps touches on arrival (WebKit), the page then reads a
* resting finger and releases at 0.
* long enough to carry the gap past that interval by itself. Page work there

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: onEvent runs inside the scripted wait (the next send is timed from the answer taken before onEvent starts, lines 874-878), so it does not carry the gap past the interval by itself: a 30 ms onEvent before a 16 ms lift leaves about 32 ms on an idle runner, and this error fires only once a runner adds the rest. Suggest stating the rule as coded, for example: "The scripted gap plus onEvent's run passes the stillness interval, so the play's own work explains the rest, however much a loaded runner added." The README sentence at line 532 says the same.

A play's lift stall needed onEvent to account for the whole of the lift
gap's excess. On a loaded runner, which stretched the gap further, the
same play failed as the runner's TouchPacingError instead. The lift
stall is the more specific cause: it is now named when the scripted gap
plus onEvent's own run passes the stillness interval, however much more
the runner added. touchPlayError holds the order: the lift stall, then
the page's stall, then the runner's. The lift-stall self-test's page
logs each move where Core's gesture host reads it, at its pointer event.

@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 branch now carries only this change, and the new WebKit self-test fails on the old check and passes here. Next: because the branch lives in a fork, a maintainer adds the ci:run label so CI runs, then the pull request is marked ready for review, which starts the run.

Non-blocking suggestion, still open from the earlier review:

  • The TouchLiftStallError JSDoc and the README say onEvent alone carried the gap past the stillness interval, but onEvent runs inside the scripted wait, so stating the rule as coded (the scripted gap plus onEvent's run passes the interval) would be accurate.

[Automated review]

@cixzhang cixzhang added the ci:run A maintainer lets this outside contributor's pull request run CI (AST-030 FR17) label Nov 7, 2026
@vjeux
vjeux marked this pull request as ready for review November 7, 2026 21:45
@cixzhang

cixzhang commented Nov 7, 2026

Copy link
Copy Markdown
Contributor

/approve-spec 9bea902

@cixzhang

cixzhang commented Nov 8, 2026

Copy link
Copy Markdown
Contributor

/approve-spec b2b30b0

@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 finished on this head yet. Its one failure so far, test-node (1/4) in packages/cli/api/build/tree.test.mjs (the single sign-on login form's block picks), fails the same way on main and does not come from this change.

The merge from main leaves this change's own patch as it was, and the new WebKit self-test still fails on the old check and passes here.

Non-blocking suggestions:

  • Regression: since #10583 reached main, Core's gesture host reads a pointer-fed finger's lift at its pointerup, so the new liftStallPage comment ("the lift at its touch event, where Core's gesture host reads them") should say the touchend is where the harness's probe reads the lift.
  • Still open from the earlier review: the TouchLiftStallError JSDoc and the README say onEvent alone carries the gap past the stillness interval, but onEvent runs inside the scripted wait, so stating the rule as coded (the scripted gap plus onEvent's run passes the interval) would be accurate.

[Automated review]

Comment on lines +405 to +406
* move. The page logs each move at its pointer event and the lift at its
* touch event, where Core's gesture host reads them.

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 (regression from the merge of main): since #10583, GestureHost reads a pointer-fed finger's lift at its pointerup's place and time (packages/core/src/gestures/GestureHost.ts:3831-3840), so the touchend is where the harness's probe reads the lift, not Core. Suggest: "The page logs each move at its pointer event, where Core's gesture host reads it, and the lift at its touch event, where the harness's probe reads it."

@cixzhang

cixzhang commented Nov 8, 2026

Copy link
Copy Markdown
Contributor

/approve-spec b0e2163

@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. CI passes on this head, and the merge from main leaves this change's own patch as it was: the new WebKit self-test still fails on the old check and passes here.

Non-blocking suggestions, still open from the earlier reviews:

  • The new liftStallPage comment says Core's gesture host reads the lift at its touch event, but since #10583 Core takes a pointer-fed finger's lift from its pointerup; the touchend is where the harness's probe reads the lift.
  • The TouchLiftStallError JSDoc and the README say onEvent alone carries the gap past the stillness interval, but onEvent runs inside the scripted wait, so stating the rule as coded (the scripted gap plus onEvent's run passes the interval) would be accurate.

[Automated review]

@cixzhang
cixzhang merged commit 7a1c0d6 into meta:main Nov 8, 2026
76 checks passed
@vjeux
vjeux deleted the test/harness-lift-stall-precedence branch November 8, 2026 04:00

This branch was successfully deployed

1 active deployment
Preview — b0e21639 Deployed Nov 8, 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