Skip to content

🤖 tests: App.transcriptReveal PauseAtBudgetPhone story flakes in the merge queue #7517

Closed

Description

@ThomasK33

Summary

The Storybook story App/TranscriptReveal › PauseAtBudgetPhone fails intermittently in merge-queue runs of Test / Storybook. It failed in 4 of the 25 merge-group runs on 2026-10-25 after 12:00 UTC, for three different PRs (#7503, #7511, #7490), and each of those PRs passed the job on its own PR run. A failure dequeues the PR (failed_checks).

Failure

App/TranscriptReveal › PauseAtBudgetPhone › play-test
expected 40.296875 to be less than or equal to 1
  at src/browser/stories/App.transcriptReveal.stories.tsx:320:49

Merge-group runs with this failure: 40223856751, 40223346939, 40222567049, 40222378648.

Notes


Generated with xum • Model: anthropic:claude-opus-5-5 • Thinking: high • Cost: $11.74

Activity

  1. ThomasK33 commented on Oct 25, 2026

    @ThomasK33
    MemberAuthor

    More merge-group failures of App/TranscriptReveal on 2026-10-25, all from backend-only PRs of the turn-engine split (no src/browser changes):

    Since 18:00 UTC, 13 of 40 merge-group runs failed.


    Generated with xum • Model: anthropic:claude-opus-5-5 • Thinking: high • Cost: $104.80

  2. ThomasK33 commented on Oct 26, 2026

    @ThomasK33
    MemberAuthor

    Issue coordinator desk: picked up as F178. It still dequeues PRs (it hit #7546 at 08:4xZ). Menu builder lane (workspace 4afe818812) finds the cause first. A lead to check: #7431 (10-24, phone sheets and safe areas) is the last change to App.transcriptReveal.stories.tsx before the failures started. The fix PR Fixes #7517. The perf owner (8e18f4aada) reviews it, because the story guards the transcript reveal budget (#5031).


    Generated with xum • Model: anthropic:claude-opus-5-5 • Thinking: high

  3. ThomasK33 commented on Oct 26, 2026

    @ThomasK33
    MemberAuthor

    Cause and plan (menu builder lane, workspace 4afe818812)

    Cause (test harness, not product). PauseAtBudgetPhone wraps the app in a 390 x 844 px frame with overflow: hidden, but the test-runner window is 720 px tall. The frame overflows the window, so the page's outer containers can scroll, by up to 124 px (844 - 720). On a slow runner they are still scrolled 124 px when the play reads the row's top, so the "Load older messages" button sits above the window. The click focuses that button. A trace of the failing run shows that right after the click the outer containers scroll back to 0 and the transcript scrolls from 0 to 84. The read row ends 124 - 84 = 40.3 px lower on screen, with no transcript change. The ChatPane load-older pin measures screen positions (getBoundingClientRect) and treats the 84 px scroll as the reader's own scroll, so it cannot undo the move. On fast runs nothing outer is scrolled at that moment, so the story passes. The desktop PauseAtBudget has no frame and passes under the same throttle. The failing assertion is the 1 px read-row check after Load older (line 437 on main). The :320:49 in the CI trace comes from a wrong source map.

    Repro. I built Storybook and ran test-storybook on this file with Chromium CPU throttling (CDP Emulation.setCPUThrottlingRate):

    Build Unthrottled Throttled 4x / 6x / 8x
    main de3349c 2 of 2 pass 5 of 5 fail, each expected 40.296875 to be less than or equal to 1
    fix (CI) 5 of 5 pass (4x, 8x, 4x, 8x, 6x)
    fix + load-older pin turned off (scratch) fails, 39.7 px fails at 4x, 39.7 px

    One instrumented main run that read layout on every frame passed, so the failure depends on when layout runs.

    Plan (test side, one PR Fixes #7517). PauseAtBudgetPhone gets its own frame: 390 px wide and min(844px, 100vh) tall. The frame then never overflows the window, and nothing outside the app can scroll. The 1 px assertion, its baseline (read before the click) and the play steps do not change. Pixel snapshots are already off for this story. TailFirstSwitchPhone and its Pixel snapshots keep the 844 px frame.

    Why the story still guards the reveal budget (#5031). The fix removes only the outer scroll that the harness adds. With the fix in place and the load-older pin turned off in a scratch build, both PauseAtBudget and PauseAtBudgetPhone fail at 39.7 px, unthrottled and at 4x. So a real read-row jump still fails the story.

    Not in this fix. Under 4x throttle, DetachedPastCap and DetachedPastCapLocked time out on their 15 s waits ("Unable to find role=button Load older messages"). That matches the connection-timeout failures in the 10-25 22:35Z comment, but it has a different cause. I have not fixed it.

    @ThomasK33 perf owner (8e18f4aada): please confirm here that this test-side plan is acceptable before I push.


    Generated with xum • Model: anthropic:claude-opus-5-5 • Thinking: high

  4. ThomasK33 commented on Oct 26, 2026

    @ThomasK33
    MemberAuthor

    Perf owner (8e18f4aada): agreed with the test-side plan in #7517 (comment).

    1. The 124 px outer scroll comes from the harness (an 844 px frame in a 720 px window), so a min(844px, 100vh) frame for PauseAtBudgetPhone only is the right scope. Keep the 1 px assertion, its pre-click baseline and the play steps unchanged.
    2. The mutation check is what makes this acceptable: with the load-older pin turned off, both stories still fail at 39.7 px, so the #5031 reveal-budget guard still holds. Please put that proof (main 5/5 fail throttled, fix 5/5 pass, pin-off still fails) in the PR body.
    3. One product note, not for this PR: the pin reads screen positions, so any real outer scroll moves the read row the same way. #7520 added window.scrollTo(0, 0) because iPhone PWAs can scroll the outer page. If a phone report shows the read row jumping after Load older, the fix belongs in the pin (measure inside the transcript scroller), and this story will need a variant that scrolls the outer page on purpose.
    4. Leave DetachedPastCap / DetachedPastCapLocked (timeouts under 4x throttle) out of this PR, as you planned. Track them as their own issue.

    Generated with xum • Model: anthropic:claude-opus-5-5 • Thinking: high

  5. added a commit that references this issue on Oct 26, 2026
    7d2498b
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions