Repository navigation
test(interaction-harness): every WebKit touch play judges the release its page read - #10383
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
AI review status for this pull request.
|
PR Analysis Report🔎 Preview ·
|
|
/approve-spec b259da5 |
There was a problem hiding this comment.
Approved pending CI: CI has not run on this head yet. This is a draft from a fork, so mark it ready for review and have a maintainer add the ci:run label so CI runs.
The new lift check throws TouchLiftStallError only where the page's own release reading sees a rest. The releaseUnread opt-out and both self-tests behave as the description says.
- Land it in the order the description gives, with or after the SnapPaging, LightboxZoom and SliderTouch fixes. SliderTouch's "a finger lifted outside the tracking bounds coasts back to the lift value" waits two animation frames and a read at its last move, so its lift sits close to the 40 ms bound even on a quiet runner.
[Automated review]
WebKit stamps a touch when it arrives. A touch play waits for its onEvent before it sends the next event, so page work there before a lift delays the lift by a round trip. Past the 40 ms stillness interval the page reads a resting finger and releases at 0, and the play passed anyway, unless it was paced by 'spacing'. Each event reached the page by its answer, and the lift no sooner than it left. When the gap from the lifting finger's last moved answer to the lift's send already reads as a rest where the script throws, the play now fails with TouchLiftStallError. The message names the gap, the script's gap and onEvent's share of it. A play whose proof reads no release from its lift opts out with releaseUnread.
The release judgment ran only for plays paced by 'spacing'. A play on the default pacing whose page read a resting finger, because a loaded runner or page work in onEvent held the lift back, passed, and the proof then asserted on a gesture the page never received. Every real-time play on a driver whose page stamps touches on arrival now reads the release from the page's own stamps. It fails by name when that release is not the script's: TouchLiftStallError when onEvent ran for the lift gap's excess, TouchPageStallError when the page's listeners held an event, else TouchPacingError. This replaces the lower bound the lift check used. releaseUnread opts a play out, and a play whose page lost events is judged only under 'spacing'.
A WebKit play that watched each step (onEvent) went back to its scripted times after a slow step, so it sent the next events back to back. Page work in onEvent could eat a scripted rest before the lift, and the page read a throw where the script rests. Such a play now also waits its interval after each answer, as any other WebKit play does: a gap can stretch, but it never shrinks.
b259da5 to
81520c1
Compare
|
/approve-spec 81520c1 |
There was a problem hiding this comment.
Approved pending CI: CI has not run on this head yet. This is a draft from a fork, so mark it ready for review and have a maintainer add the ci:run label so CI runs.
The three new WebKit self-tests fail on the current driver and pass with this change, and the release judgment, the releaseUnread opt-out and the onEvent gap fix behave as the description says.
Non-blocking:
- The
touch.tsfile header (lines 26-30) still says a'schedule'play withonEventskips the answer wait, while the README row it syncs with now says no gap can shrink. liftStallErrornamesTouchLiftStallErroronly whenonEventtime covers the whole gap excess, which also holds transport; it held by 0.3 to 2.5 ms in 60 runs here, so a slack term like the page-stall check'sHELD_BACK_MSwould keep the name on a slower runner.liftStallErrorrepeatsreadRelease's lifting-finger scan; returning the script's last moved index fromreadReleasewould keep one copy.
[Automated review]
| // A driver gives a probe only where the page stamps touches on arrival. | ||
| // There, a play behind its schedule never shrinks a scripted gap, so page | ||
| // work in `onEvent` cannot eat the rest before a lift. | ||
| const keepsGaps = probe != null; |
There was a problem hiding this comment.
Non-blocking: every WebKit play now waits for the answer, but the file header (lines 26-30) still says a stall stretches the gesture "unless a 'schedule' play watches each step, onEvent". Its SYNC note asks it to match the README row, which now says "even with onEvent, so no gap can shrink". Dropping the "unless…" clause keeps them equal.
| const id = steps[lift].changed[0]?.id; | ||
| let lastMoved = 0; | ||
| let at = ''; | ||
| steps.forEach((step, k) => { | ||
| const finger = | ||
| step.type === 'touchStart' || step.type === 'touchMove' | ||
| ? step.changed.find(f => f.id === id) | ||
| : undefined; | ||
| const key = | ||
| finger == null ? at : `${Math.round(finger.x)},${Math.round(finger.y)}`; | ||
| if (key !== at) { | ||
| lastMoved = k; | ||
| at = key; | ||
| } | ||
| }); |
There was a problem hiding this comment.
Non-blocking: this re-derives the lifting finger and its rounded positions that readRelease already reads (lines 391-406). If either rounding changes, the attribution measures a different gap from the one the judgment read. readRelease could return the script's last moved index (its coreRelease keeps the moved samples with their indexes) so there is one scan.
|
/approve-spec 6631268 |
Maintainer impact
WebKit stamps a touch when it arrives, so a loaded runner, or page work in
onEvent, can make the page read a rest where the script throws, or a throw where it rests. Only'spacing'plays judged that. A default-paced play passed on a gesture the page never received: SnapPaging's "three items per view: a flick moves one view…" failed so 6 times in 120 at four workers.Intended invariant
A touch play reaches the page as scripted, or it fails by name.
Change
TouchLiftStallErrorwhen its ownonEventran for the lift gap's excess;TouchPageStallErrorwhen the page's own listeners held an event;TouchPacingErrorotherwise.onEventnow also waits its interval after each answer. Behind its schedule it sent events back to back, so its page work could eat a scripted rest.releaseUnreadopts a play out. A play whose page lost events is judged only under'spacing'.Evidence
touch.ts, three new WebKit self-tests fail.onEvent, resolves while the page reads a rest. Here it fails asTouchPageStallErrororTouchLiftStallError.onEventon every move: its 150 ms rest reaches the page in 33 ms. Here no gap shrinks.onEvent,releaseUnread, Chromium.'spacing', noonEventattribution, attribute every rest, ignorereleaseUnread) each fail a self-test.Scope
Testing
touch.ts: the three new WebKit self-tests fail.tscand ESLint: 0. Prettier: clean.pnpm review:pre: 0 findings, merge into main clean.