From 3659b296a303d671c6d1497681a4c3e75304e973 Mon Sep 17 00:00:00 2001 From: Raymond Zhao <7199958+rzhao271@users.noreply.github.com> Date: Thu, 20 Aug 2026 10:31:39 -0700 Subject: [PATCH 1/5] chore: add more foundry-local-sdk patches --- .../alpine/product-build-alpine-node-modules.yml | 8 ++++++++ .../darwin/product-build-darwin-node-modules.yml | 12 +++++++----- .../linux/product-build-linux-node-modules.yml | 8 ++++++++ .../web/product-build-web-node-modules.yml | 8 ++++++++ .../win32/product-build-win32-node-modules.yml | 8 ++++++++ 5 files changed, 39 insertions(+), 5 deletions(-) diff --git a/build/azure-pipelines/alpine/product-build-alpine-node-modules.yml b/build/azure-pipelines/alpine/product-build-alpine-node-modules.yml index 2f1423a7d1f82..7aebd18ab5983 100644 --- a/build/azure-pipelines/alpine/product-build-alpine-node-modules.yml +++ b/build/azure-pipelines/alpine/product-build-alpine-node-modules.yml @@ -61,6 +61,10 @@ jobs: condition: and(succeeded(), ne(variables.NODE_MODULES_RESTORED, 'true'), ne(variables['NPM_REGISTRY'], 'none')) displayName: Setup NPM Authentication + - template: ../common/foundry-local.yml@self + parameters: + phase: prepare + - task: Docker@1 inputs: azureSubscriptionEndpoint: vscode @@ -128,6 +132,10 @@ jobs: displayName: Install dependencies condition: and(succeeded(), ne(variables.NODE_MODULES_RESTORED, 'true')) + - template: ../common/foundry-local.yml@self + parameters: + phase: install + - script: node build/azure-pipelines/common/checkNativeOptionalDeps.ts condition: and(succeeded(), ne(variables.NODE_MODULES_RESTORED, 'true')) displayName: Verify native optional dependency binaries diff --git a/build/azure-pipelines/darwin/product-build-darwin-node-modules.yml b/build/azure-pipelines/darwin/product-build-darwin-node-modules.yml index b4cadd1ec8418..9fe2fa5c778c8 100644 --- a/build/azure-pipelines/darwin/product-build-darwin-node-modules.yml +++ b/build/azure-pipelines/darwin/product-build-darwin-node-modules.yml @@ -69,11 +69,9 @@ jobs: condition: and(succeeded(), ne(variables.NODE_MODULES_RESTORED, 'true'), ne(variables['NPM_REGISTRY'], 'none')) displayName: Setup NPM Authentication - - task: PipAuthenticate@1 - inputs: - artifactFeeds: Monaco/vscode - condition: and(succeeded(), ne(variables.NODE_MODULES_RESTORED, 'true')) - displayName: Setup PyPI Authentication + - template: ../common/foundry-local.yml@self + parameters: + phase: prepare - script: | set -e @@ -102,6 +100,10 @@ jobs: displayName: Install dependencies condition: and(succeeded(), ne(variables.NODE_MODULES_RESTORED, 'true')) + - template: ../common/foundry-local.yml@self + parameters: + phase: install + - script: node build/azure-pipelines/common/checkNativeOptionalDeps.ts condition: and(succeeded(), ne(variables.NODE_MODULES_RESTORED, 'true')) displayName: Verify native optional dependency binaries diff --git a/build/azure-pipelines/linux/product-build-linux-node-modules.yml b/build/azure-pipelines/linux/product-build-linux-node-modules.yml index dbcd21676665d..6ca5ce861c9e6 100644 --- a/build/azure-pipelines/linux/product-build-linux-node-modules.yml +++ b/build/azure-pipelines/linux/product-build-linux-node-modules.yml @@ -82,6 +82,10 @@ jobs: condition: and(succeeded(), ne(variables.NODE_MODULES_RESTORED, 'true'), ne(variables['NPM_REGISTRY'], 'none')) displayName: Setup NPM Authentication + - template: ../common/foundry-local.yml@self + parameters: + phase: prepare + - script: | set -e @@ -142,6 +146,10 @@ jobs: displayName: Install dependencies condition: and(succeeded(), ne(variables.NODE_MODULES_RESTORED, 'true')) + - template: ../common/foundry-local.yml@self + parameters: + phase: install + - script: node build/azure-pipelines/common/checkNativeOptionalDeps.ts condition: and(succeeded(), ne(variables.NODE_MODULES_RESTORED, 'true')) displayName: Verify native optional dependency binaries diff --git a/build/azure-pipelines/web/product-build-web-node-modules.yml b/build/azure-pipelines/web/product-build-web-node-modules.yml index cc61a7a015a63..e175c76338f23 100644 --- a/build/azure-pipelines/web/product-build-web-node-modules.yml +++ b/build/azure-pipelines/web/product-build-web-node-modules.yml @@ -54,6 +54,10 @@ jobs: condition: and(succeeded(), ne(variables.NODE_MODULES_RESTORED, 'true'), ne(variables['NPM_REGISTRY'], 'none')) displayName: Setup NPM Authentication + - template: ../common/foundry-local.yml@self + parameters: + phase: prepare + - script: | set -e ./build/azure-pipelines/linux/apt-retry.sh sudo apt-get update @@ -79,6 +83,10 @@ jobs: displayName: Install dependencies condition: and(succeeded(), ne(variables.NODE_MODULES_RESTORED, 'true')) + - template: ../common/foundry-local.yml@self + parameters: + phase: install + - script: node build/azure-pipelines/common/checkNativeOptionalDeps.ts condition: and(succeeded(), ne(variables.NODE_MODULES_RESTORED, 'true')) displayName: Verify native optional dependency binaries diff --git a/build/azure-pipelines/win32/product-build-win32-node-modules.yml b/build/azure-pipelines/win32/product-build-win32-node-modules.yml index eed6ebdd19925..0401ecd206394 100644 --- a/build/azure-pipelines/win32/product-build-win32-node-modules.yml +++ b/build/azure-pipelines/win32/product-build-win32-node-modules.yml @@ -71,6 +71,10 @@ jobs: condition: and(succeeded(), ne(variables.NODE_MODULES_RESTORED, 'true'), ne(variables['NPM_REGISTRY'], 'none')) displayName: Setup NPM Authentication + - template: ../common/foundry-local.yml@self + parameters: + phase: prepare + - powershell: | . build/azure-pipelines/win32/exec.ps1 $ErrorActionPreference = "Stop" @@ -85,6 +89,10 @@ jobs: displayName: Install dependencies condition: and(succeeded(), ne(variables.NODE_MODULES_RESTORED, 'true')) + - template: ../common/foundry-local.yml@self + parameters: + phase: install + - powershell: node build/azure-pipelines/common/checkNativeOptionalDeps.ts condition: and(succeeded(), ne(variables.NODE_MODULES_RESTORED, 'true')) displayName: Verify native optional dependency binaries From 66b81c9411b2f2b4e36eb754a721673f8c951bdd Mon Sep 17 00:00:00 2001 From: Raymond Zhao <7199958+rzhao271@users.noreply.github.com> Date: Thu, 20 Aug 2026 10:32:21 -0700 Subject: [PATCH 2/5] Bump cachesalt --- build/.cachesalt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/.cachesalt b/build/.cachesalt index f5c2b5725ddbc..bd7579fd483e0 100644 --- a/build/.cachesalt +++ b/build/.cachesalt @@ -1 +1 @@ -2026-08-05T23:47:14.698Z \ No newline at end of file +2026-08-20T17:32:07.583Z \ No newline at end of file From 7febeba04638ae744446e2f3157bc04fe287590d Mon Sep 17 00:00:00 2001 From: Raymond Zhao <7199958+rzhao271@users.noreply.github.com> Date: Thu, 20 Aug 2026 10:40:02 -0700 Subject: [PATCH 3/5] Add back pip auth for Darwin --- .../darwin/product-build-darwin-node-modules.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/build/azure-pipelines/darwin/product-build-darwin-node-modules.yml b/build/azure-pipelines/darwin/product-build-darwin-node-modules.yml index 9fe2fa5c778c8..70401faa070c7 100644 --- a/build/azure-pipelines/darwin/product-build-darwin-node-modules.yml +++ b/build/azure-pipelines/darwin/product-build-darwin-node-modules.yml @@ -69,6 +69,12 @@ jobs: condition: and(succeeded(), ne(variables.NODE_MODULES_RESTORED, 'true'), ne(variables['NPM_REGISTRY'], 'none')) displayName: Setup NPM Authentication + - task: PipAuthenticate@1 + inputs: + artifactFeeds: Monaco/vscode + condition: and(succeeded(), ne(variables.NODE_MODULES_RESTORED, 'true')) + displayName: Setup PyPI Authentication + - template: ../common/foundry-local.yml@self parameters: phase: prepare From fe4820a54210b90ca6065d97c0a7c498db89eab2 Mon Sep 17 00:00:00 2001 From: Raymond Zhao <7199958+rzhao271@users.noreply.github.com> Date: Thu, 20 Aug 2026 11:09:04 -0700 Subject: [PATCH 4/5] chore: add param for restored case --- .../alpine/product-build-alpine-node-modules.yml | 2 ++ build/azure-pipelines/common/foundry-local.yml | 9 +++++++++ .../darwin/product-build-darwin-node-modules.yml | 2 ++ .../linux/product-build-linux-node-modules.yml | 2 ++ .../web/product-build-web-node-modules.yml | 2 ++ .../win32/product-build-win32-node-modules.yml | 2 ++ 6 files changed, 19 insertions(+) diff --git a/build/azure-pipelines/alpine/product-build-alpine-node-modules.yml b/build/azure-pipelines/alpine/product-build-alpine-node-modules.yml index 7aebd18ab5983..a7cc0ab6f3d20 100644 --- a/build/azure-pipelines/alpine/product-build-alpine-node-modules.yml +++ b/build/azure-pipelines/alpine/product-build-alpine-node-modules.yml @@ -64,6 +64,7 @@ jobs: - template: ../common/foundry-local.yml@self parameters: phase: prepare + onlyOnNodeModulesCacheMiss: true - task: Docker@1 inputs: @@ -135,6 +136,7 @@ jobs: - template: ../common/foundry-local.yml@self parameters: phase: install + onlyOnNodeModulesCacheMiss: true - script: node build/azure-pipelines/common/checkNativeOptionalDeps.ts condition: and(succeeded(), ne(variables.NODE_MODULES_RESTORED, 'true')) diff --git a/build/azure-pipelines/common/foundry-local.yml b/build/azure-pipelines/common/foundry-local.yml index d40b360b8f33d..fd9d88e890754 100644 --- a/build/azure-pipelines/common/foundry-local.yml +++ b/build/azure-pipelines/common/foundry-local.yml @@ -4,15 +4,24 @@ parameters: values: - prepare - install + - name: onlyOnNodeModulesCacheMiss + type: boolean + default: false steps: - ${{ if eq(parameters.phase, 'prepare') }}: - task: NuGetAuthenticate@1 + ${{ if eq(parameters.onlyOnNodeModulesCacheMiss, true) }}: + condition: and(succeeded(), ne(variables.NODE_MODULES_RESTORED, 'true'), ne(variables['NPM_REGISTRY'], 'none')) displayName: Setup NuGet Authentication - script: node build/azure-pipelines/common/disableFoundryLocalInstall.ts + ${{ if eq(parameters.onlyOnNodeModulesCacheMiss, true) }}: + condition: and(succeeded(), ne(variables.NODE_MODULES_RESTORED, 'true'), ne(variables['NPM_REGISTRY'], 'none')) displayName: Disable Foundry Local Native Install - ${{ if eq(parameters.phase, 'install') }}: - script: node build/azure-pipelines/common/foundryLocalInstall.ts + ${{ if eq(parameters.onlyOnNodeModulesCacheMiss, true) }}: + condition: and(succeeded(), ne(variables.NODE_MODULES_RESTORED, 'true'), ne(variables['NPM_REGISTRY'], 'none')) displayName: Install Foundry Local Native Dependencies diff --git a/build/azure-pipelines/darwin/product-build-darwin-node-modules.yml b/build/azure-pipelines/darwin/product-build-darwin-node-modules.yml index 70401faa070c7..3317e43816e99 100644 --- a/build/azure-pipelines/darwin/product-build-darwin-node-modules.yml +++ b/build/azure-pipelines/darwin/product-build-darwin-node-modules.yml @@ -78,6 +78,7 @@ jobs: - template: ../common/foundry-local.yml@self parameters: phase: prepare + onlyOnNodeModulesCacheMiss: true - script: | set -e @@ -109,6 +110,7 @@ jobs: - template: ../common/foundry-local.yml@self parameters: phase: install + onlyOnNodeModulesCacheMiss: true - script: node build/azure-pipelines/common/checkNativeOptionalDeps.ts condition: and(succeeded(), ne(variables.NODE_MODULES_RESTORED, 'true')) diff --git a/build/azure-pipelines/linux/product-build-linux-node-modules.yml b/build/azure-pipelines/linux/product-build-linux-node-modules.yml index 6ca5ce861c9e6..ea09134e1a863 100644 --- a/build/azure-pipelines/linux/product-build-linux-node-modules.yml +++ b/build/azure-pipelines/linux/product-build-linux-node-modules.yml @@ -85,6 +85,7 @@ jobs: - template: ../common/foundry-local.yml@self parameters: phase: prepare + onlyOnNodeModulesCacheMiss: true - script: | set -e @@ -149,6 +150,7 @@ jobs: - template: ../common/foundry-local.yml@self parameters: phase: install + onlyOnNodeModulesCacheMiss: true - script: node build/azure-pipelines/common/checkNativeOptionalDeps.ts condition: and(succeeded(), ne(variables.NODE_MODULES_RESTORED, 'true')) diff --git a/build/azure-pipelines/web/product-build-web-node-modules.yml b/build/azure-pipelines/web/product-build-web-node-modules.yml index e175c76338f23..4f935de733648 100644 --- a/build/azure-pipelines/web/product-build-web-node-modules.yml +++ b/build/azure-pipelines/web/product-build-web-node-modules.yml @@ -57,6 +57,7 @@ jobs: - template: ../common/foundry-local.yml@self parameters: phase: prepare + onlyOnNodeModulesCacheMiss: true - script: | set -e @@ -86,6 +87,7 @@ jobs: - template: ../common/foundry-local.yml@self parameters: phase: install + onlyOnNodeModulesCacheMiss: true - script: node build/azure-pipelines/common/checkNativeOptionalDeps.ts condition: and(succeeded(), ne(variables.NODE_MODULES_RESTORED, 'true')) diff --git a/build/azure-pipelines/win32/product-build-win32-node-modules.yml b/build/azure-pipelines/win32/product-build-win32-node-modules.yml index 0401ecd206394..528a580afe3e4 100644 --- a/build/azure-pipelines/win32/product-build-win32-node-modules.yml +++ b/build/azure-pipelines/win32/product-build-win32-node-modules.yml @@ -74,6 +74,7 @@ jobs: - template: ../common/foundry-local.yml@self parameters: phase: prepare + onlyOnNodeModulesCacheMiss: true - powershell: | . build/azure-pipelines/win32/exec.ps1 @@ -92,6 +93,7 @@ jobs: - template: ../common/foundry-local.yml@self parameters: phase: install + onlyOnNodeModulesCacheMiss: true - powershell: node build/azure-pipelines/common/checkNativeOptionalDeps.ts condition: and(succeeded(), ne(variables.NODE_MODULES_RESTORED, 'true')) From 2264d197d250c35073ef0387284bbb74bcc85459 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 20 Aug 2026 18:56:07 +0000 Subject: [PATCH 5/5] Fix flaky McpStdioStateHandler 'sigkill after grace' test Co-authored-by: rzhao271 <7199958+rzhao271@users.noreply.github.com> --- .../contrib/mcp/test/node/mcpStdioStateHandler.test.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/vs/workbench/contrib/mcp/test/node/mcpStdioStateHandler.test.ts b/src/vs/workbench/contrib/mcp/test/node/mcpStdioStateHandler.test.ts index 0d25f80008da8..36d3cec8cfa10 100644 --- a/src/vs/workbench/contrib/mcp/test/node/mcpStdioStateHandler.test.ts +++ b/src/vs/workbench/contrib/mcp/test/node/mcpStdioStateHandler.test.ts @@ -9,7 +9,9 @@ import * as assert from 'assert'; import { McpStdioStateHandler } from '../../node/mcpStdioStateHandler.js'; import { isWindows } from '../../../../../base/common/platform.js'; -const GRACE_TIME = 100; +// Must be comfortably larger than the time it takes to spawn the helper shell +// script that signals the process tree, otherwise SIGKILL can race SIGTERM. +const GRACE_TIME = 1000; suite('McpStdioStateHandler', () => { const store = ensureNoDisposablesAreLeakedInTestSuite(); @@ -75,7 +77,9 @@ suite('McpStdioStateHandler', () => { }); } - test('sigkill after grace', async () => { + test('sigkill after grace', async function () { + this.timeout(GRACE_TIME * 10); + const { handler, output } = run(` setInterval(() => {}, 1000); process.stdin.on('end', () => process.stdout.write('stdin ended\\n'));