镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

test(browser): compile the conversation fixture before navigating to it - #3017

Closed
baxen wants to merge 1 commit into
mainfrom
mbot/conversation-warmup
Closed

baxen wants to merge 1 commit into
mainfrom
mbot/conversation-warmup

Conversation

@baxen

@baxen baxen commented Nov 8, 2026

Copy link
Copy Markdown
Collaborator

conversation.spec.mjs › "independent packed author consumer…" fails today's advisory Flake check (chromium) lanes on PRs that reach it (jtennant/thomas/history-window-slide, kylez_NEXUS-4311_owner-member-endpoints, joah/link-previews-off, tho/page-record-signing, mbot/community-denied, and others). Every one of those failures is page.goto: Timeout 15000ms exceeded on conversation.html.

Cause

tests/fixtures/conversation.tsx imports bundledPlugins, so its first load makes the fresh dev server transform about 1,650 modules. A failing CI trace (run 42422209266, repeat7) shows no reload and no failed request: the module graph just finishes transforming about 15 s in, while the other worker runs the same test's pnpm builds. prepareFixtureDependencies already keeps dependency bundling out of navigation budgets. Source transforms had no equivalent.

Change

warmUp(server, entry) in vite-server.mjs asks Vite to transform the entry and waits for its static-import crawl: server.warmupRequest + server.waitForRequestsIdle, which are Vite's own APIs. The conversation spec calls it after listen(), before page.goto. The navigation timeout, retries and assertions are unchanged.

Evidence (local, macOS, chromium, --repeat-each=4 --workers=2)

goto → load
before 3.6–3.9 s
after 1.03–1.07 s (warm-up takes ~2.7 s, outside the budget)

The full conversation.spec.mjs passes on chromium and webkit (22 passed). I didn't reproduce the CI timeout itself locally. The before/after split is the evidence that compile work has moved out of the budget.

No browser cases are added or removed.

@baxen
baxen requested a review from a team as a code owner November 8, 2026 01:36
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 8, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-08T01:39:27.754603Z 7ce28d9 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

Signed-off-by: Bradley Axen <baxen@squareup.com>
Co-authored-by: mbot <3754f8729004d95654c46dbab3129e4ab9ef05cc2534e2a3fbfc155983bd637b@buzz.block.builderlab.xyz>
@baxen

baxen commented Nov 8, 2026

Copy link
Copy Markdown
Collaborator Author

🤖 Folded into #3015 so the CI fixes land together.

@baxen baxen closed this Nov 8, 2026
baxen added a commit that referenced this pull request Nov 8, 2026
Fixes today's broken and flaky buzz-app CI in one PR: red main plus two
flakes that hit several PRs. Supersedes #3017 and #3018.

# 1. Red main: `solo-agent-tagging.spec.mjs`

Main is red: `tests/browser/solo-agent-tagging.spec.mjs` (#2941) fails
on main and on every PR CI'd since.

The test waits for a composer `alert` holding a "Retry agents" button.
#2948 removed that standing notice; a failed agent read now offers
"Retry agent list" inside the Choose agent picker. #2941 was written
before #2948 landed and merged without rerunning against it.

The test now opens the Choose agent picker and asserts and clicks "Retry
agent list" there, then checks the retry goes away once the agent is
addressed. The behaviour it covers (tag nobody without complete
inventory, address the lone agent after retry, unchanged once the
background snapshot completes) is the same.

Verified locally: `playwright test solo-agent-tagging` passes on
chromium and webkit.

## Follow-up: trigger shape

The first push failed this PR's webkit Flake check: 8 of 10 repeats
found no "Choose agent" button. The screenshot shows the composer's
"Mention a member" (@) button instead. The chat only shows the agent
pill when every member is a known agent. With the inventory missing,
that depends on whether the agent's profile has loaded, which is a
background read. Both trigger shapes are correct while the inventory is
missing, and both open the same picker with "Retry agent list".

The test now opens the picker from either trigger. To check the @ path
deterministically, I held kind-0 profile reads after the gap until
Retry. The trigger was then "Mention a member", and the updated test
passed on chromium and webkit. Without that hold, it passes
`--repeat-each=15 --workers=6` on both engines (30 passed).

# 2. `conversation.spec.mjs` page-load flake (from #3017)


## Cause

`tests/fixtures/conversation.tsx` imports `bundledPlugins`, so its first
load makes the fresh dev server transform about 1,650 modules. A failing
CI trace (run 42422209266, repeat7) shows no reload and no failed
request: the module graph just finishes transforming about 15 s in,
while the other worker runs the same test's `pnpm build`s.
`prepareFixtureDependencies` already keeps dependency bundling out of
navigation budgets. Source transforms had no equivalent.

## Change

`warmUp(server, entry)` in `vite-server.mjs` asks Vite to transform the
entry and waits for its static-import crawl: `server.warmupRequest` +
`server.waitForRequestsIdle`, which are Vite's own APIs. The
conversation spec calls it after `listen()`, before `page.goto`. The
navigation timeout, retries and assertions are unchanged.

## Evidence (local, macOS, chromium, `--repeat-each=4 --workers=2`)

| | goto → load |
|---|---|
| before | 3.6–3.9 s |
| after | 1.03–1.07 s (warm-up takes ~2.7 s, outside the budget) |

The full `conversation.spec.mjs` passes on chromium and webkit (22
passed). I didn't reproduce the CI timeout itself locally. The
before/after split is the evidence that compile work has moved out of
the budget.

No browser cases are added or removed.

# 3. `huddles.spec.mjs` roster animation flake (from #3018)

`huddles.spec.mjs` › "capsule and companion presentation share mute and
leave" fails intermittently in webkit Flake check lanes on unrelated PRs
today: `locator.evaluate: AbortError: The operation was aborted.` at the
roster settle step (jobs 128522170397 on mbot/bottom-activity and
128560887574 on mbot/community-denied, repeats 9 and 5).

## Cause

The step awaits `Promise.all(getAnimations().map((a) => a.finished))`.
When Motion replaces an animation it cancels the old one, and a
cancelled animation's `finished` promise rejects with `AbortError`. So
any interruption while the roster settles fails the test, even though
the roster ends up correct.

A standalone webkit check shows the same message: cancel a running
animation, and the old wait throws `locator.evaluate: AbortError: The
operation was aborted.` The new wait resolves.

## Change

Wait until no animation in the roster is still `running`, using
`Promise.allSettled` so a cancelled one ends the wait for that animation
rather than failing the test. The geometry assertions after this step
are unchanged.

## Evidence

- The fixed test passes `--repeat-each=10` on chromium and webkit
locally (20 passed).
- I couldn't reproduce the cancellation locally (the old code passed
30/30 on webkit), so the evidence for the fix is the matching error and
the standalone check above.

Two other sites in this file use the same `Promise.all(... finished)`
wait (around lines 698 and 2019). Neither has failed in today's runs, so
I left them alone.

---------

Signed-off-by: Bradley Axen <baxen@squareup.com>
Co-authored-by: mbot <3754f8729004d95654c46dbab3129e4ab9ef05cc2534e2a3fbfc155983bd637b@buzz.block.builderlab.xyz>
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