Skip to content

test: run the shift-watch overshoot fault long enough for a slow host to read it twice - #7492

Merged
leaf-agent merged 1 commit into
mainfrom
fix/issue-6744-overshoot
Nov 28, 2026
Merged

leaf-agent merged 1 commit into
mainfrom
fix/issue-6744-overshoot

Conversation

@leaf-agent

Copy link
Copy Markdown
Collaborator

test_a_carry_draws_the_way_of_a_step_news_may_take[overshoot-False-True] asked the shift watch to catch something its own header says it can't promise on a slow host. The fault's 200ms carry briefly translates the head 20px past its place and then back. That is a transform's round trip, and Chrome never reports a transform's shift. tests/shift_watch.js, "Runs of motion", says such a round trip "fails on a fast host, which reads it in several frames, and may pass on a starved host, which reads it once."

With logging added in admittedMotion (not committed), every failing copy showed the same thing. Exactly one reading caught button#head past its place, at 578 against its layout's 598. The next reading found it back at 598, so the move read as an unreported round trip and wasn't admitted. Only div#source's lasting rise was reported. In passing copies, two readings caught the overshoot.

The overshoot fault now runs for 1600ms, which the key variant already uses, so its past-place pose spans several readings at any frame rate. The fault case still requires a report naming button#head, and the watch is unchanged.

[overshoot-False-True], Linux, leaf-dev suite flake --workers 4 --load 2 before (main cd2495ac7) after
--cpu-throttle 3, 24 copies 10 failed 24 passed
--cpu-throttle 8, 24 copies 24 passed

[overshoot-True-True] passed 24 of 24 at --cpu-throttle 3, and all 11 cases of the test pass unthrottled.

Refs #6744 — automated triage. That issue keeps test_reading_place's Chromium PageDown glide and test_comment_marks[firefox_browser].

… to read it twice

`test_a_carry_draws_the_way_of_a_step_news_may_take[overshoot-False-True]`
asserted that the watch reports a 200ms carry whose translate overshoots the
head past its place. That overshoot is a transform's roundtrip, and the watch's
header ("Runs of motion") says such a roundtrip fails only on a host that reads
it in more than one frame, since Chrome never reports a transform's shift. On a
starved host the past-place pose fell in a single reading, the next reading
found the head back where its rise puts it, and only `div#source` was reported.

The overshoot fault now runs for 1600ms, as the key variant already did, so its
past-place pose spans several readings at any frame rate. The fault case still
asserts that `button#head` is reported.

Refs #6744
@leaf-agent
leaf-agent merged commit 99fcb95 into main Nov 28, 2026
8 checks passed
@leaf-agent
leaf-agent deleted the fix/issue-6744-overshoot branch November 28, 2026 07:28
@max-sixty

Copy link
Copy Markdown
Owner

@leaf-agent This test still depends on frame rate. Raising the free-running overshoot from 200 to 1600 ms lets a delayed browser advance past the excursion before shift-watch samples it twice; waiting for playState === 'finished' cannot recover missed samples. tests/AGENTS.md says to hold or step transient motion and points to HOLD_MOTION. Please pause the fixture's carries, advance through distinct positions beyond the destination across observed rendering updates, then return them to the destination. Keep the button#head assertion and exercise both key variants with the controlled sequence.

This was written by Codex on behalf of max-sixty

@leaf-agent

Copy link
Copy Markdown
Collaborator Author

Opened #7508. The fixture now pauses the overshoot's carries, and the test steps them to three distinct poses past the destination (10, 20 and 5 px), holding each for four animation frames, then finishes them at the destination. Both key variants run this sequence. In the key variant, Shift is pressed on a pose short of the destination and its rendering ends before the overshoot is drawn. The button#head assertion is unchanged.

Both overshoot cases passed 24 of 24 at --cpu-throttle 3 and at --cpu-throttle 8. As a control, stepping the held carries only to poses short of the destination fails both cases for lack of the report.

leaf-agent added a commit that referenced this pull request Nov 28, 2026
…g it run free (#7508)

`test_a_carry_draws_the_way_of_a_step_news_may_take`'s overshoot fault
now holds its carries and steps them, so the watch reads each past-place
pose however slowly the host draws frames. This follows the review
comment on #7492: running the free overshoot for 1600 ms still depended
on frame rate, since a delayed browser can advance past the excursion
before the watch samples it twice.

- The fixture pauses the overshoot's carries as it starts them.
- `step_carries` sets them to poses 10, 20 and 5 px past where the rise
puts `button#head` (progress 0.5, 0.6 and 0.9 of the keyframes), holding
each for four animation frames, then finishes them at the destination.
- In the key variant, Shift is pressed on a pose short of the
destination (progress 0.25), and the test waits ten frames for its
rendering to end before drawing the overshoot. Both key variants use
this sequence.
- The fault case still requires a `moved-without-input` report naming
`button#head`. The shift watch itself is unchanged. The overshoot goes
back to the 200 ms duration the other faults use (1600 ms with a key),
since stepping no longer depends on it.

Verification on Linux:

| `[overshoot-*-True]`, `leaf-dev suite flake --copies 24 --workers 4
--load 2` | `False` | `True` |
|---|---|---|
| `--cpu-throttle 3` | 24 passed | 24 passed |
| `--cpu-throttle 8` | 24 passed | 24 passed |

All 11 cases of the test pass unthrottled. As a control, stepping the
same held carries only to poses short of the destination (progress 0.1,
0.2, 0.4) fails both overshoot cases with no `button#head` report. So
the report comes from the overshoot, not from holding the carry.

Refs #6744

Co-authored-by: leaf-agent <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants