Skip to content

test: remove external network dependency from browser tools - #336988

Merged
Christof Marti (chrmarti) merged 1 commit into
mainfrom
chrmarti/fix-insider-browser-test-network
Sep 21, 2026
Merged

Christof Marti (chrmarti) merged 1 commit into
mainfrom
chrmarti/fix-insider-browser-test-network

Conversation

@chrmarti

@chrmarti Christof Marti (chrmarti) commented Sep 21, 2026

Copy link
Copy Markdown
Collaborator

Summary

Investigated the failed original attempts in Insider run 20260921.4 / 475409.

  • macOS arm64 / Remote integration tests: chat - browser tools > Open a page from the web timed out navigating to https://google.com/ after 30 seconds (log 2192). Replace this external dependency with a loopback HTTP server in the extension host, verify that the tool returns both a page ID and the served content, and close the server/connections in finally. The test stays enabled in remote workspaces and exercises the remote browser proxy there. No retries, timeout increases, or test skips.
  • Linux x64 / Electron integration tests: peer chat catalog and transcript survive a host restart failed with Resource not found (log 1951). Fix peer chat catalog migration racing with chat creation #336975 fixes the matching catalog-migration race, passed its own cross-platform Azure validation, and has now merged. That fix is not duplicated here.
  • Publish: the original job exhausted its 180-minute deadline after upstream reruns delayed the last artifacts. ESRP accepted the final archive at 07:41:17 UTC; the deadline canceled polling at 08:01:42. The retry restored 47 checkpoints, found the final archive already released/provisioned, and completed all 48 at 08:07:50. No separate publishing defect established. Incoming Engineering - Implement checkpoint reuse for test tasks in pipelines #334926 reduces repeated work on stage reruns but is not an ESRP fix.
  • Sanity Tests: no failed tests in the previous attempt; downstream of Publish.

Also checked #331912 (remote browser proxy readiness); it does not remove this test's dependency on an external website.

Validation

  • API-test extension TypeScript check passed.
  • Targeted ESLint, hygiene, and commit hooks passed.
  • All 6 chat - browser tools integration tests passed against installed Windows Insiders, including the new HTTP test (231 ms). Five additional isolated HTTP-test runs also passed (639-758 ms).
  • Source-host local run was blocked at startup by a pre-existing missing @vscode/policy-watcher native binding; used installed Insiders rather than modifying shared native dependencies.
  • Azure validation 475465 succeeded on ddfc38a8a2a (finished 2026-09-21 09:52 UTC). All seven stages passed, including Windows x64, Linux x64, and macOS arm64, with publishing/release disabled and tests enabled. The originally failing macOS arm64 Remote integration step passed; the replacement HTTP test completed in 118 ms (log 1230).

Serve a loopback HTTP fixture from the extension host instead of navigating to Google. Verify the returned page content and close all server connections after the test, retaining remote-proxy coverage.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings September 21, 2026 09:10

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

🟢 Approval recommended

The focused test change is deterministic, correctly exercises remote proxying, and cleans up its resources.

Review effort: Balanced
Findings: None

What changed in this PR

Removes an external network dependency from the browser-tools integration test while preserving remote-proxy coverage.

Changes:

  • Replaces Google navigation with a loopback HTTP fixture.
  • Verifies both page ID and served content.
  • Ensures server connections are closed in cleanup.
File Description
extensions/​vscode-api-tests/​src/​singlefolder-tests/​browser.tools.test.ts Uses a local HTTP server for deterministic browser-tool testing.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@vs-code-engineering

Copy link
Copy Markdown
Contributor

📬 CODENOTIFY

The following users are being notified based on files changed in this PR:

Kyle Cutler (@kycutler)

Matched files:

  • extensions/vscode-api-tests/src/singlefolder-tests/browser.tools.test.ts

Joaquín Ruales (@jruales)

Matched files:

  • extensions/vscode-api-tests/src/singlefolder-tests/browser.tools.test.ts

Christof Marti (chrmarti) added a commit that referenced this pull request Sep 21, 2026
Narrow this PR to test resolver tunnel port allocation and bind-error handling.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@chrmarti
Christof Marti (chrmarti) merged commit 5cdc86e into main Sep 21, 2026
57 checks passed
@chrmarti
Christof Marti (chrmarti) deleted the chrmarti/fix-insider-browser-test-network branch September 21, 2026 13:37
@vs-code-engineering vs-code-engineering Bot added this to the 1.140.0 milestone Sep 21, 2026
Christof Marti (chrmarti) added a commit that referenced this pull request Sep 21, 2026
* test: make browser HTTP navigation independent of the internet

Use a loopback HTTP fixture with remote forwarding and verify rendered content. Let the test resolver allocate a free tunnel port instead of assuming the adjacent port is available, and reject bind errors rather than hanging.

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

* test: leave browser HTTP fixture to #336988

Narrow this PR to test resolver tunnel port allocation and bind-error handling.

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

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@chrmarti Christof Marti (chrmarti) added the ~release-cherry-pick Trigger: cherry-pick this PR to the latest release branch label Sep 21, 2026
@vs-code-engineering vs-code-engineering Bot added release-cherry-pick Automated cherry-pick between release and main branches and removed ~release-cherry-pick Trigger: cherry-pick this PR to the latest release branch labels Sep 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release-cherry-pick Automated cherry-pick between release and main branches

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants