Skip to content

test: hold the deck's timers and motion until the page reads the wheel - #7421

Merged
leaf-agent merged 1 commit into
mainfrom
fix/issue-7412-deck-wheel
Nov 27, 2026
Merged

leaf-agent merged 1 commit into
mainfrom
fix/issue-7412-deck-wheel

Conversation

@leaf-agent

@leaf-agent leaf-agent commented Nov 27, 2026 •

Copy link
Copy Markdown
Collaborator

test_a_scroll_as_the_card_moves_on_keeps_the_page answers a deck card by key, then turns the wheel, and asserts that the wheel supersedes the arrival the answer schedules. Nothing in the test ordered those two. On a starved CPU the wheel reached the page after the card's 250 ms settle timer had fired. The arrival then focused #tall-ask (the scheduled macOS failure), or the landing scrolled the page back (the scrollY 287 / 272 failures in the macOS probe). The deck does both by design when no newer input has arrived. An instrumented run showed each failing copy's arrival running at the answer's input count, before the wheel's.

The test now pauses the page's clock (clocked) and holds the deck's motion (HOLD_MOTION) before the answer. It waits until the page has read the wheel, then lets both run. The protected behavior is unchanged: a wheel turned while the card comes up leaves the page where the wheel took it, and focus doesn't move to the card. Only the test file changes.

before (main) after
Linux, --cpu-throttle 8 3 of 6 failed 12 of 12 passed
macOS dispatch 2 of 6 failed (46042055447) 18 of 18 passed (46044994955)

As a negative control, I removed the moves() check from the deck's delayed arrival, and the test failed 3 of 3.

#7412 names four other macOS failures. Each passed all 6 copies in the same macOS probe, so they wait on a recurrence and this PR doesn't touch them.

Closes #7412 — automated triage

test_a_scroll_as_the_card_moves_on_keeps_the_page answers a card by key and
then turns the wheel, asserting the wheel supersedes the arrival the answer
schedules. Nothing ordered the two: on a starved CPU the wheel reached the
page after the card's settle timer had fired, so the arrival focused the
card, and once the flight had landed and scrolled, as the deck is designed
to when no newer input has come. A trace showed the arrival running at the
answer's input count, before the wheel's.

The test now pauses the page's clock and holds the deck's motion before the
answer, waits for the page to read the wheel, then lets both run. The
behavior it protects is unchanged: a wheel while the card comes up keeps the
page where the wheel took it and takes no focus.

Before, at --cpu-throttle 8 on Linux: 3 of 6 copies failed; the macOS
dispatch 46042055447 failed 2 of 6. After: 12 of 12 pass at --cpu-throttle 8.
With the arrival's intent check removed, the test fails 3 of 3.

Closes #7412
@leaf-agent
leaf-agent merged commit ec3317c into main Nov 27, 2026
11 checks passed
@leaf-agent
leaf-agent deleted the fix/issue-7412-deck-wheel branch November 27, 2026 18:10
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.

Five tests fail only on macOS in the Nov 27 scheduled run: options addition, Markdown preview scroll, deck focus, send placement, motion

1 participant