Skip to content

test(mcp): cover --sandbox at the config resolution level - #42339

Merged
Yury Semikhatsky (yury-s) merged 1 commit into
microsoft:mainfrom
yury-s:fix-mcp-sandbox-test
Aug 20, 2026
Merged

test(mcp): cover --sandbox at the config resolution level#42339
Yury Semikhatsky (yury-s) merged 1 commit into
microsoft:mainfrom
yury-s:fix-mcp-sandbox-test

Conversation

@yury-s

@yury-s Yury Semikhatsky (yury-s) commented Aug 20, 2026

Copy link
Copy Markdown
Member

Summary

  • --sandbox enables the sandbox has been failing on ubuntu-latest - chrome since it landed: it starts an MCP server with --browser=chromium --sandbox, and the server launches the browser eagerly during initialize. Chrome for Testing cannot start sandboxed on Linux (No usable sandbox!), so browser_get_config returned an error instead of a config.
  • Replaced it with tests in config-resolve.spec.ts that drive real argv through decorateMCPCommand into resolveCLIConfigForMCP, covering --sandbox, --no-sandbox and neither flag without launching a browser.

Failing ubuntu-latest - chrome jobs:

The e2e test launched chrome-for-testing with the sandbox enabled, which
cannot start on Linux, so browser_get_config never returned a config.
@github-actions

Copy link
Copy Markdown
Contributor

Test results for "MCP"

1 failed
❌ [firefox] › mcp/cli-core.spec.ts:70 › dblclick @mcp-windows-latest-firefox

8128 passed, 1361 skipped


Merge workflow run.

@github-actions

Copy link
Copy Markdown
Contributor

Hi, I'm the Playwright bot and I took a first look at the CI failure here.

🟢 The one failure is a pre-existing flake — this PR is clear

[firefox] › mcp/cli-core.spec.ts:70 › dblclick (on mcp-windows-latest-firefox) is unrelated to this PR. This change only touches MCP sandbox config-resolution tests (config-resolve.spec.ts, config.spec.ts), and dblclick exercises none of that. The same test fails intermittently on SHAs this PR can't be responsible for.

Details

Pre-existing flake / infra

  • [firefox] › mcp/cli-core.spec.ts:70 › dblclick — cross-run flake on mcp-windows-latest-firefox: failed 3 of 614 runs (~0.5%), passed the rest. Two of those failures are on unrelated commits — PR feat(trace): add action screenshot and aria snapshot events #42167 (sha e98b16d7, run 31228415523) and a main push (sha c8fc3bf8, run 31559512534) — with the identical signature (expect(received).toContain(expected)Received has value: undefined, sometimes with a 60s timeout). The third is this PR's run (32407839643). Same symptom, unrelated SHAs → this is the test flaking, not your change.
  • This PR edits only sandbox config-resolution tests and launches no browser in them, so it can't reach the cli-core double-click flow.

Recent history on this bot (oldest → newest, this PR's run is the trailing 🟥):

🟩🟩🟩🟩🟥

Triaged by the Playwright bot - agent run

@yury-s
Yury Semikhatsky (yury-s) merged commit 36f4da0 into microsoft:main Aug 20, 2026
16 of 17 checks passed
@yury-s
Yury Semikhatsky (yury-s) deleted the fix-mcp-sandbox-test branch August 20, 2026 20:14
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.

2 participants