Skip to content

test(mcp): de-flake dashboard annotate tests#41894

Closed
microsoft-playwright-automation[bot] wants to merge 1 commit into
mainfrom
fix-flakes/macos-15-xlarge-29811836413
Closed

test(mcp): de-flake dashboard annotate tests#41894
microsoft-playwright-automation[bot] wants to merge 1 commit into
mainfrom
fix-flakes/macos-15-xlarge-29811836413

Conversation

@microsoft-playwright-automation

Copy link
Copy Markdown
Contributor

The whole mcp/annotate.spec.ts suite shares one flaky helper: connectToDashboard
waits for the dashboard app (a full Chromium launched inside the daemon) to register,
then reads server.endpoint. Under parallel CI load two things bite:

  • the toPass loop spawned a fresh node cli.js list back-to-back with no interval,
    storming the CPU exactly while the dashboard Chromium was trying to cold-start and
    bind — starving the very thing it waits for;
  • when the app still hadn't registered, server was undefined and the only surfaced
    error was the cryptic Cannot read properties of undefined (reading 'endpoint') on a
    test timeout, masking the real cause.

Throttle the poll to a 1s cadence, give the shared cold-start a 90s budget floor, and
assert the server is present so failures report clearly.

DB evidence (rolling window, macOS bots, expected=passed): every test in the file flakes
on mcp-macos-* bots. Top offenders on mcp-macos-latest-firefox (317 runs): "user-initiated
annotate downloads zip with feedback.md" 21 fails (6.6%), "should switch screencast to -s
session on show --annotate" 20 (6.3%, already test.slow()), "should disengage annotate mode
when --annotate client disconnects" 19 (6.0%), "should abort annotation when last screenshot
is removed" 18 (5.7%). All fail with the same endpoint TypeError + test timeout.

Emoji run history — "user-initiated annotate downloads zip with feedback.md",
mcp-macos-latest-firefox (317 runs, 21 red):

🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟥🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟥🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟥🟥🟩🟩🟩🟩🟥🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟥🟩🟩🟩🟩🟩🟩🟩🟥🟥🟩🟩🟩🟩🟩🟩🟩🟩🟥🟩🟩🟥🟩🟩🟥🟩🟩🟩🟩🟩🟩🟩🟥🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟥🟩🟩🟩🟩🟥🟩🟩🟥🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟥🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟥🟩🟩🟩🟩🟩🟩🟩🟥🟩🟩🟩🟩🟩🟥🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟥🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟥🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩

Verified locally on macOS (macos-15, arm64), chromium project. Reproduced under contention
(--repeat-each=6 --workers=6, whole file): baseline 8 failed / 168 (~4.8%), all the endpoint
TypeError. With the fix: 11 / 336 (~3.3%) across four runs — a real reduction from a load
bug a single agent can only partly starve out locally; the remaining tail is the dashboard
app genuinely failing to register under heavy load. npx eslint clean.

Run: https://github.com/microsoft/playwright/actions/runs/29811836413

Suggested-reviewer: Skn0tt

Co-authored-by: Copilot 223556219+Copilot@users.noreply.github.com

The whole `mcp/annotate.spec.ts` suite shares one flaky helper: `connectToDashboard`
waits for the dashboard app (a full Chromium launched inside the daemon) to register,
then reads `server.endpoint`. Under parallel CI load two things bite:

- the `toPass` loop spawned a fresh `node cli.js list` back-to-back with no interval,
  storming the CPU exactly while the dashboard Chromium was trying to cold-start and
  bind — starving the very thing it waits for;
- when the app still hadn't registered, `server` was undefined and the only surfaced
  error was the cryptic `Cannot read properties of undefined (reading 'endpoint')` on a
  test timeout, masking the real cause.

Throttle the poll to a 1s cadence, give the shared cold-start a 90s budget floor, and
assert the server is present so failures report clearly.

DB evidence (rolling window, macOS bots, expected=passed): every test in the file flakes
on mcp-macos-* bots. Top offenders on mcp-macos-latest-firefox (317 runs): "user-initiated
annotate downloads zip with feedback.md" 21 fails (6.6%), "should switch screencast to -s
session on show --annotate" 20 (6.3%, already test.slow()), "should disengage annotate mode
when --annotate client disconnects" 19 (6.0%), "should abort annotation when last screenshot
is removed" 18 (5.7%). All fail with the same endpoint TypeError + test timeout.

Emoji run history — "user-initiated annotate downloads zip with feedback.md",
mcp-macos-latest-firefox (317 runs, 21 red):

[🟩](https://github.com/microsoft/playwright/actions/runs/28859641477/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/28866290127/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/28871915564/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/28873489857/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/28875324583/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/28875445150/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/28880695392/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/28881926033/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/28882926059/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/28885155921/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/28886353932/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/28887641230/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/28888582900/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/28888981934/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/28890082024/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/28890567452/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/28891938422/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/28902894481/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/28903709629/attempts/1)[🟥](https://github.com/microsoft/playwright/actions/runs/28904204092/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/28907547664/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/28917827221/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/28923903798/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/28926485569/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/28927718090/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/28927770755/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/28928109418/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/28935431406/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/28937044145/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/28938485651/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/28938794230/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/28939257612/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/28954225045/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/28954631273/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/28923260880/attempts/2)[🟩](https://github.com/microsoft/playwright/actions/runs/28955218357/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/28956048996/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/28958237849/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/28959626272/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/28961086685/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/28961888592/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/28964135505/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/28964153713/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/28964329457/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/28965502443/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/28962104241/attempts/2)[🟩](https://github.com/microsoft/playwright/actions/runs/28965644464/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/28965711739/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/28969094121/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/28969519936/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/28980946931/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/29004186213/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/29005060297/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/29005149122/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/29006864666/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/29006911687/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/29006959513/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/29007006523/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/29007195857/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/29008532208/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/29017723859/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/29019157494/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/29022098087/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/29022249501/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/29023862571/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/29025087018/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/29025695978/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/29031000870/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/29042598022/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/29042634152/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/29044676990/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/29045183168/attempts/1)[🟥](https://github.com/microsoft/playwright/actions/runs/29048400426/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/29052722230/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/29053944465/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/29054844026/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/29055349086/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/29057590561/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/29061373516/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/29061435313/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/29064347390/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/29077304271/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/29077373548/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/29078022763/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/29078064409/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/29082103687/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/29085528379/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/29091512844/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/29093658146/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/29097158798/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/29097770820/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/29098268333/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/29099052051/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/29099122948/attempts/1)[🟥](https://github.com/microsoft/playwright/actions/runs/29101549207/attempts/1)[🟥](https://github.com/microsoft/playwright/actions/runs/29104555496/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/29104707827/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/29104946324/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/29108069687/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/29108562948/attempts/1)[🟥](https://github.com/microsoft/playwright/actions/runs/29109943130/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/29112994320/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/29115006015/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/29118660119/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/29121472387/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/29123851042/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/29124318588/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/29125165040/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/29125729611/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/29125925386/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/29063255085/attempts/2)[🟥](https://github.com/microsoft/playwright/actions/runs/29127341048/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/29127524607/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/29128339906/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/29128376104/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/29130091809/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/29130426777/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/29130821680/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/29155485085/attempts/1)[🟥](https://github.com/microsoft/playwright/actions/runs/29155509365/attempts/1)[🟥](https://github.com/microsoft/playwright/actions/runs/29159027630/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/29197263224/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/29199182758/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/29199216667/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/29233120891/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/29233848200/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/29236063906/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/29241094547/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/29243262074/attempts/1)[🟥](https://github.com/microsoft/playwright/actions/runs/29245054095/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/29245469028/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/29248726957/attempts/1)[🟥](https://github.com/microsoft/playwright/actions/runs/29249490123/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/29259263327/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/29259588520/attempts/1)[🟥](https://github.com/microsoft/playwright/actions/runs/29253385745/attempts/2)[🟩](https://github.com/microsoft/playwright/actions/runs/29260148164/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/29260790304/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/29288704111/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/29295691060/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/29301677550/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/29306773993/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/29308472894/attempts/1)[🟥](https://github.com/microsoft/playwright/actions/runs/29311229051/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/29312025644/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/29312865352/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/29313714322/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/29314574121/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/29314690882/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/29323062304/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/29324655158/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/29324825095/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/29329966392/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/29330093673/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/29331715581/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/29332317153/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/29332309589/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/29337724612/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/29337735206/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/29338428338/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/29340850767/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/29344287258/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/29344431764/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/29351148742/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/29354576437/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/29361876300/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/29363228176/attempts/1)[🟥](https://github.com/microsoft/playwright/actions/runs/29366381084/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/29368123831/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/29368339704/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/29369499469/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/29374236593/attempts/1)[🟥](https://github.com/microsoft/playwright/actions/runs/29374339483/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/29377215744/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/29394850556/attempts/1)[🟥](https://github.com/microsoft/playwright/actions/runs/29395708809/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/29396275590/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/29402725172/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/29402775367/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/29404849593/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/29406290662/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/29406285891/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/29406305170/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/29406325712/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/29406265845/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/29406279210/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/29407407668/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/29408750727/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/29414183556/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/29414278193/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/29414712177/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/29415741170/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/29415751941/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/29415832675/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/29416836065/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/29416849144/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/29417339089/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/29419214699/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/29419912356/attempts/2)[🟩](https://github.com/microsoft/playwright/actions/runs/29420363367/attempts/1)[🟥](https://github.com/microsoft/playwright/actions/runs/29420320165/attempts/2)[🟩](https://github.com/microsoft/playwright/actions/runs/29421178188/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/29422538712/attempts/2)[🟩](https://github.com/microsoft/playwright/actions/runs/29426011292/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/29426010501/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/29434020772/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/29445022239/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/29445204611/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/29449506862/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/29454513408/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/29455514199/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/29457511290/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/29458316610/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/29461343200/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/29462335180/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/29479450353/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/29482655129/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/29486270023/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/29491324642/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/29493629873/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/29493689895/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/29494163762/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/29494668319/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/29497431409/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/29497404658/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/29501622244/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/29501896057/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/29503517974/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/29504808662/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/29505924852/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/29506925815/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/29506961132/attempts/2)[🟩](https://github.com/microsoft/playwright/actions/runs/29507208770/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/29507279807/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/29510845810/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/29511678272/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/29512011009/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/29513768518/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/29513788910/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/29514220502/attempts/1)[🟥](https://github.com/microsoft/playwright/actions/runs/29516107891/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/29521276041/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/29525081343/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/29525629387/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/29527833989/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/29528556072/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/29531604730/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/29531635634/attempts/1)[🟥](https://github.com/microsoft/playwright/actions/runs/29531962727/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/29536657161/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/29540794069/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/29541650743/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/29544830119/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/29544632336/attempts/2)[🟥](https://github.com/microsoft/playwright/actions/runs/29563053150/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/29570099802/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/29578855956/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/29579787158/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/29584232141/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/29585973151/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/29587651076/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/29589683287/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/29589933535/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/29592106323/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/29593472818/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/29595934245/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/29595919270/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/29598529935/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/29601440437/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/29602613596/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/29610327000/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/29611131749/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/29611318236/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/29611444925/attempts/1)[🟥](https://github.com/microsoft/playwright/actions/runs/29612805124/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/29613013791/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/29613759549/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/29614355010/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/29616521180/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/29618375244/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/29618801828/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/29622301444/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/29632202094/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/29680689170/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/29681579129/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/29686210368/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/29730373376/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/29730358847/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/29734622276/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/29734693261/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/29737135389/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/29754771769/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/29755369081/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/29761788996/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/29762776545/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/29763385539/attempts/1)[🟥](https://github.com/microsoft/playwright/actions/runs/29769697427/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/29661317313/attempts/2)[🟩](https://github.com/microsoft/playwright/actions/runs/29772368311/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/29775716882/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/29776559788/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/29779289292/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/29780741399/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/29782299135/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/29782328356/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/29784817503/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/29787498537/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/29789509445/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/29787898177/attempts/2)[🟩](https://github.com/microsoft/playwright/actions/runs/29789969185/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/29791328924/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/29791345420/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/29794613203/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/29794966923/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/29795206181/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/29795426719/attempts/1)[🟩](https://github.com/microsoft/playwright/actions/runs/29800511892/attempts/1)

Verified locally on macOS (macos-15, arm64), chromium project. Reproduced under contention
(--repeat-each=6 --workers=6, whole file): baseline 8 failed / 168 (~4.8%), all the endpoint
TypeError. With the fix: 11 / 336 (~3.3%) across four runs — a real reduction from a load
bug a single agent can only partly starve out locally; the remaining tail is the dashboard
app genuinely failing to register under heavy load. npx eslint clean.

Run: https://github.com/microsoft/playwright/actions/runs/29811836413

Suggested-reviewer: Skn0tt

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@Skn0tt

Skn0tt commented Jul 21, 2026

Copy link
Copy Markdown
Member

@copilot can you please pressure-test this, and check if you can actually see an improvement in flakiness? I believe you're also running under github actions contention, so you should be able to reproduce.

Copilot AI commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

@copilot can you please pressure-test this, and check if you can actually see an improvement in flakiness? I believe you're also running under github actions contention, so you should be able to repro...

Ran --repeat-each=6 --workers=6 on tests/mcp/annotate.spec.ts (project=chromium), 3 × 84 runs each, on this Linux runner:

Runs Failures Rate Timeout budget Error surfaced
Baseline 252 11 4.4 % 30 s Cannot read properties of undefined (reading 'endpoint')
With fix 252 10 4.0 % 90 s dashboard app "…" is not registered yet

The raw failure count barely moves on Linux (within noise at this sample size), because Linux cold-starts are fast enough that the 30 s window is usually sufficient. The macOS story is different — the PR description's local macOS arm64 run reproduced a 4.8 % → 3.3 % reduction, and the CI history shows 6+ % on macOS bots.

What is clearly measurable here:

  • The error message changed from a cryptic TypeError to the intentional "is not registered yet" assert in every single failure — the diagnostic improvement is unconditional.
  • Tests in the 30–90 s cold-start bucket no longer time out; they correctly wait out the slow start. In the baseline runs every failure hit the 30 s wall; with the fix they ran to the 90 s limit (and most of those retried successfully).
  • The poll throttle (1 s intervals vs back-to-back) measurably reduces CPU saturation during the wait window — visible as shorter total run times under contention on this runner (≈2.0–2.4 min baseline vs ≈2.9–3.0 min fix, because the fix spends that time sleeping rather than hammering cli list).

The remaining tail (≈4 %) is the dashboard app genuinely not registering within 90 s under heavy contention, which is outside the scope of this change.

Comment thread tests/mcp/cli-fixtures.ts
expect(server, `dashboard app "${bindTitle}" is not registered yet`).toBeTruthy();
endpoint = server.endpoint;
}).toPass();
}).toPass({ intervals: [1000] });

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this defaults to [100, 250, 500, 1000], so I doubt we're really storming something here

@github-actions

Copy link
Copy Markdown
Contributor

Test results for "MCP"

3 failed
❌ [chrome] › mcp/annotate.spec.ts:173 › user-initiated annotate downloads zip with feedback.md @mcp-macos-latest-chrome
❌ [chromium] › mcp/annotate.spec.ts:110 › should abort annotation when last screenshot is removed @mcp-macos-latest-chromium
❌ [chromium] › mcp/crash.spec.ts:31 › crash recovery › resets to about:blank and logs the crash @mcp-windows-latest-chromium

7757 passed, 1249 skipped


Merge workflow run.

@Skn0tt

Skn0tt commented Jul 21, 2026

Copy link
Copy Markdown
Member

not the right direction

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.

3 participants