Skip to content

Replay: record text readiness so a slow runner cannot delay a held panel (fixture 12) - #340

Merged
GLinnik21 merged 1 commit into
mainfrom
replay-12-fix
Oct 1, 2026
Merged

GLinnik21 merged 1 commit into
mainfrom
replay-12-fix

Conversation

@GLinnik21

Copy link
Copy Markdown
Collaborator

On main, the macOS replay gate fails on 12-filmography-detail-return with diverged=2 and every named diff counter at 0. It failed on #330, #333 and PR #336, and passed on dev Macs.

Root cause

  • A "diverged" frame with every counter at 0 is a state-hash mismatch (app/recorder.rs). The CI evidence shows the same signature in all three runs: frames 76 and 77, with the replay reaching the frame-76 state 2 frames late.
  • The term that moves is the Filmography modal's surface phase going Opening→Open. That waits for its appear spring to settle (ui/containers/modal.rs), and the spring is held while text::prewarm_pending() is true (added in Navigation frame drops: invisible walks stop doing visible-walk work #312).
  • The pre-warm queue drains under a wall-clock budget, so a slower runner holds the panel for more frames. That readiness was never recorded.

Fix

  • Text readiness becomes a recorded replay input, alongside the existing capture readiness.
  • Recplay::capture_readiness(Readiness { snapshot, text }) records it, or supplies the recorded value during replay. The value is latched per frame in text::latch_surface_text_pending, and PopoverMotion::tick reads the latch.
  • Outside a replay, behaviour is identical.
  • The capture row gains text (CaptureReadinessV2). All three anchors are re-recorded (1, 6, 12), and tests/fixtures/replay/README.md documents the new input.

Red → green

  • Old tree: fixture 12 pinned to the efficiency cores (taskpolicy -c background) diverged in 3 of 4 runs, at exactly the CI hashes.
  • New test against the old read: a_held_surface_waits_on_the_latched_text_readiness failed (left: 8 right: 2).
  • Fixed tree: 12 of 12 replays came back SAME on the efficiency cores, one pass running under concurrent make check load. controlled_replay_supplies_recorded_text_readiness is added too.

Gates (on the committed tree)

  • make check: test result: ok. 5276 passed; 0 failed, ok. 5350 passed; 0 failed, ok. 102 passed; 0 failed
  • --no-default-features check is clean; ARM make is clean.
  • make check-replay, three runs: 3 fixtures, 6 replays, 0 failures each time.

🤖 Generated with Claude Code

…e recorded frame

Fixture 12 diverged on frames 76-77 on the macOS CI runner (diverged=2, every named
counter zero). The only changed term was the Filmography modal's surface phase:
Opening -> Open two frames later than recorded. A presented surface stays held at
appear 0 while text::prewarm_pending() (#312), and that queue drains under a
wall-clock budget (text::drain_prewarm), so a slower CPU held the panel for more
frames. Reproduced locally on efficiency cores (taskpolicy -c background): 3/4
replays DIVERGED at f=76/77 with the CI hashes.

The observation is now an environmental input like the page capture's GPU
readiness: the product loop samples the queue once before dispatch, the recorder
records it (capture row gains "text", CaptureReadinessV2) or supplies the recorded
one, and PopoverMotion::tick reads the latched value (text::surface_text_pending).
The shape bump refuses the old recordings; all three anchors re-recorded with
tools/plxnative-rec rerecord.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@GLinnik21
GLinnik21 merged commit ff6e3c8 into main Oct 1, 2026
5 of 7 checks passed
@GLinnik21
GLinnik21 deleted the replay-12-fix branch October 1, 2026 01:11
GLinnik21 added a commit that referenced this pull request Oct 1, 2026
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.

1 participant