Repository navigation
fix: wait for each trace capture to commit before reading its caption - #5267
Merged
Merged
Conversation
The trace journey stepped through captures with ArrowRight and read the caption straight after each press. lf-trace only names a frame once its Viewer commits decoded pixels, and the next press cancels a Viewer still decoding, so on a slow runner every frame stop after the populated checkpoint was skipped before it committed. The test now waits for the repaint and for the image host's aria-busy to clear at each stop. No behavior changes; the test still asserts the same frame and disclosure. Delaying HTMLImageElement.decode by 300 ms reproduces the CI assertion on the old loop; the new loop passes under that delay and at --cpu-throttle 10. Closes #5184
This was referenced Nov 4, 2026
max-sixty
added a commit
that referenced
this pull request
Nov 4, 2026
`running-tend` told a session fixing a failure only `test-macos` shows to dispatch `ci` on the fix's branch and read that run's `test-macos` job. A triage session takes that as evidence it must collect before it finishes, so it polls the run for its whole length, four to five hours, while it holds the only triage lane. Two Claude triage sessions did so in their first day: #5174's waited 4 h 10 min and #5184's 4 h 46 min. In both, the PR (#5218, #5267) merged within 20 minutes of the wait starting, so the result changed nothing, and #5184's dispatched run ended red after its PR had merged. Leaf already chose not to have Tend sessions wait on CI (`await_ci: false`, #2455), and Tend tells every triage session so. This instruction, added in #3939, asked for a wait the setting doesn't govern, since the dispatched run is outside the PR's checks. It also supplied the "passes after" evidence the merge rule in **Fixing a CI failure's cause** asks for. Now the merge rule says that for a failure only `test-macos` shows, the checks the Linux runner can run suffice, and the macOS paragraph names the next scheduled run on main, after the merge, as the evidence after the fix. The landing sessions already worked that way: both PRs merged before their dispatched runs ended. If the scheduled run still fails, its CI report brings the failure back to triage. Supersedes #5315, which makes the same merge-rule change but still dispatches the macOS run and leaves the cause issue open until a later session reads it. That costs a macOS run and another triage session per fix to learn what the next scheduled run reports anyway. > _This was written by Claude Code on behalf of max-sixty_
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
test_trace_frames_retain_saved_elements_and_disclosure_stays_closablefailed on macOS in the scheduled runs of Nov 1 and Nov 2 (41432142330) and passed in the other six of the last eight. It was a read-before-ready race in the test: it pressed ArrowRight and read.lf-trace-captionat once. lf-trace only says "Captured frame" after the Viewer commits decoded pixels, and the next press cancels a Viewer that is still decoding. The recording has only two frame stops after the populated checkpoint (2.945 s and 3.296 s), so a slow runner could step past both before either one committed and run out of stops. The loop now waits at each stop forrendered, then for.lf-trace-imagesto droparia-busy, and only then reads the caption. The widget and what the test asserts are unchanged.Verification: with
HTMLImageElement.decodedelayed by 300 ms, the old loop fails with the CI's exactNo captured frame after the populated checkpoint. The new loop passes under that delay, passes three times unthrottled, and passes once at--cpu-throttle 10.Underlying gap, left as is
rendered()can't see the pending Viewer because lf-trace doesn't register it as aholdRenderingpreparation (browser/runtime/rendering.jssays finite asynchronous preparation should). Packages can only reachholdRenderingthrough the widget controller's state-driven preparations, not for local navigation like this. A public hold inwidget-api.jswould letrendered()cover image commits for every test and widget. This PR leaves that change exactly as easy to make as it was.Closes #5184 — automated triage