Repository navigation
Give the VS Code extension's aspire --version probe a 30s budget - #21912
Conversation
tryExecuteCli used a 5s execFile timeout, so a valid CLI whose first write was delayed by a CI runner stall was rejected as an invalid path. Share the named 30s cliVersionProbeTimeoutMs that configInfoProvider already uses for the same command, and add a real-process regression test. Co-authored-by: Copilot <[email protected]>
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 21912Or
iex "& { $(irm https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 21912" |
Tests selector0 / 101 PR test projects · 2 PR jobs, from 3 changed files. Selected PR test projects (0 / 101)none — no PR-gated .NET test projects run for this change. Selected PR jobs (2)
How these were chosen — grouped by what changedJob reasons
Selection computed for commit |
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues are reported for the shared CLI probe timeout change and its regression-test coverage.
No open issues 🎉
What changed in this PR
This PR prevents the VS Code extension from rejecting a valid Aspire CLI when startup takes longer than five seconds. It gives both aspire --version probes a shared 30-second budget while preserving failure handling.
Changes:
- Increase CLI path validation’s timeout from 5 to 30 seconds.
- Share the timeout constant with the version capability check.
- Add a cross-platform, real-process regression test with a six-second startup delay and update the Windows shim assertion.
| File | Description |
|---|---|
extension/src/utils/configInfoProvider.ts |
Import the shared version-probe timeout instead of defining it locally. |
extension/src/utils/cliPath.ts |
Define and apply the 30-second timeout to executable and Windows shim probes. |
extension/src/test/cliPath.test.ts |
Test delayed CLI startup and assert the shared timeout for Windows shims. |
Review effort: Balanced
|
[automated] Inconclusive for flake efficacy; fresh before/after reproduction is blocked by workload support. Reviewed head Original evidence: Windows browser-debugger, attempt 1, at The retained diagnostic artifact also shows Existing fixed-source evidence, not a new comparison campaign:
Both historical and fixed E2E jobs used Windows x64, Node launcher 22.23.4 and VS Code 1.130.0. The hosted image changed from Scope correction: The cited apphost-tree failure was Execution/review: Remaining gap: A faithful Windows x64 full-shard baseline/fixed campaign with preserved lane conditions is still needed for an efficacy claim. |
|
✅ No documentation update needed. docs_optional/false-positive → internal_refactor (proven false positive on a gating signal).
|
) ## Description **What failed:** On `main`, the Windows VS Code extension E2E jobs in [run 41503655043](https://github.com/microsoft/aspire/actions/runs/41503655043) failed: the [browser-debugger](https://github.com/microsoft/aspire/actions/runs/41503655043/job/125489102962) job's Blazor "maps managed Edge debugging" before-all hook timed out waiting for `standalone` to reach Running, and the [apphost-tree](https://github.com/microsoft/aspire/actions/runs/41503655043/job/125489102839) job hit the tree-actions "secondary AppHost" probe flake. The extension log shows `E2E CLI path is invalid` followed by `Configured CLI path is invalid`, about 1.2s after the CLI's first log write, which itself arrived about 5s after launch. ## Failure stats (14d, attempt 1) `CI` workflow on microsoft/aspire, runs created 2026-10-25 06:28 → 2026-11-08 06:28 UTC, **attempt 1 only**. Denominator: attempt-1 jobs that ran (success or failure). Hits: the failed job's log matches the signature. Jobs that lost their runner, which have no log, are excluded. Main runs have no reruns, so their flake check is the next main run of the job. | | | |---|---| | Signature | Blazor `"before all" hook for "maps managed Edge debugging…"` timing out on `standalone` Running **and** the first `aspire-vscode.debugAppHost` invocation `canceled` (the CLI was rejected). The `E2E CLI path is invalid` line is only in the extension-log artifact, not the job log, so the canceled launch is used as a proxy | | Job | VS Code extension E2E (Windows, browser-debugger) | | main pushes: hits / runs | 1 / 153 (0.65%) | | main pushes, 30d: hits / runs | 1 / 265 (0.38%). The 16 days before the 14d window add 0 hits. | | PR runs: hits / runs | 0 / 788 (0.00%); 0 PR-caused excluded | | Combined rate | 1 / 941 = **0.11%** | | Flake check | main: next main run of the job passed 1/1 | | First / last hit | 2026-11-02 / 2026-11-02 | | Still hitting main? | Last main hit: 2026-11-02. 78 main runs since the last hit (2026-11-02), with 0 hits | | Fix evidence | Local: a new real-process test (6s startup stall) fails before and passes after (single runs). This PR's CI: browser-debugger (Windows) passed 1/1. | Failing attempt-1 jobs, most recent first (1 of 1 log-verified hits): | Date (UTC) | Branch | Job | Signature excerpt | |---|---|---|---| | [2026-11-02 18:46](https://github.com/microsoft/aspire/actions/runs/41503655043/job/125489102962) | **main** | VS Code extension E2E (Windows, browser-debugger) | `Timed out after 570124ms waiting for resource 'standalone' state Running` | **Verdict: WEAK.** Only **1 hit** (main, 2026-11-02), matched through a proxy signature. 78 main runs since then were clean. The other 11 before-all timeouts in this window are different: 8 are the `c:\` casing bug fixed by #21623 and 3 show a successful launch. <!-- /failure-stats --> **Why:** `tryExecuteCli` (`extension/src/utils/cliPath.ts`) validates a CLI by running `aspire --version` with a hard-coded **5s** timeout. When a runner stall delays a valid CLI's startup past 5s, the probe rejects it as invalid and the extension falls back or fails. `configInfoProvider` already gives the same `aspire --version` command a 30s budget. **Fix:** Move the named `cliVersionProbeTimeoutMs = 30_000` into `cliPath.ts`, use it in `tryExecuteCli`, and import it in `configInfoProvider` so both `--version` probes share one budget. A probe still has to complete successfully. It does not accept a CLI that hangs or exits with a non-zero code. Of the 11 attempt-1 failures of the Blazor before-all hook in the last 7 days, 8 were the `c:\` casing issue that #21623 already fixed, 1 was a DCP infrastructure timeout and 1 was on a spike branch. The remaining hit is the one this PR fixes. ## Confidence - New test `tryExecuteCli accepts a real CLI whose --version output is delayed by a startup stall` launches a real script that sleeps 6s before printing a version. On a POSIX runner it uses a `sh` script, and on Windows a `.cmd` script. - **Before** (fix reverted, test kept): fails with `false !== true`. - **After**: passes (about 6.0s). - The existing cmd-shim probe test now asserts the shared constant. - `tsc` (`compile-tests`) and `eslint` pass on the changed files. - **Not run:** the full `vscode-test` (Electron) suite and the E2E suites. The sandbox can't resolve `update.code.visualstudio.com`. Instead, I ran the compiled `cliPath` and `configInfoProvider` mocha suites with a stubbed `vscode` module. With the stub, 25 tests that need real VS Code workspace APIs fail on both unmodified `main` and this branch, and the failing set is identical. CI covers the rest. **How we stop this recurring:** Both `aspire --version` probes now share one named budget, so they can't drift apart again. The real-process test fails if the probe budget is cut back below a realistic startup stall. Refs #21600 ## Checklist - Is this feature complete? - [x] Yes. Ready to ship. - [ ] No. Follow-up changes expected. - Are you including unit tests for the changes and scenario tests if relevant? - [x] Yes - [ ] No - Did you add public API? - [ ] Yes - [x] No - Does the change make any security assumptions or guarantees? - [ ] Yes - [x] No **🤖 Posted by AspireAgent (AI Agent)** Co-authored-by: davidfowl <[email protected]> Co-authored-by: Copilot <[email protected]> (cherry picked from commit cd3fec7)
) ## Description **What failed:** On `main`, the Windows VS Code extension E2E jobs in [run 41503655043](https://github.com/microsoft/aspire/actions/runs/41503655043) failed: the [browser-debugger](https://github.com/microsoft/aspire/actions/runs/41503655043/job/125489102962) job's Blazor "maps managed Edge debugging" before-all hook timed out waiting for `standalone` to reach Running, and the [apphost-tree](https://github.com/microsoft/aspire/actions/runs/41503655043/job/125489102839) job hit the tree-actions "secondary AppHost" probe flake. The extension log shows `E2E CLI path is invalid` followed by `Configured CLI path is invalid`, about 1.2s after the CLI's first log write, which itself arrived about 5s after launch. ## Failure stats (14d, attempt 1) `CI` workflow on microsoft/aspire, runs created 2026-10-25 06:28 → 2026-11-08 06:28 UTC, **attempt 1 only**. Denominator: attempt-1 jobs that ran (success or failure). Hits: the failed job's log matches the signature. Jobs that lost their runner, which have no log, are excluded. Main runs have no reruns, so their flake check is the next main run of the job. | | | |---|---| | Signature | Blazor `"before all" hook for "maps managed Edge debugging…"` timing out on `standalone` Running **and** the first `aspire-vscode.debugAppHost` invocation `canceled` (the CLI was rejected). The `E2E CLI path is invalid` line is only in the extension-log artifact, not the job log, so the canceled launch is used as a proxy | | Job | VS Code extension E2E (Windows, browser-debugger) | | main pushes: hits / runs | 1 / 153 (0.65%) | | main pushes, 30d: hits / runs | 1 / 265 (0.38%). The 16 days before the 14d window add 0 hits. | | PR runs: hits / runs | 0 / 788 (0.00%); 0 PR-caused excluded | | Combined rate | 1 / 941 = **0.11%** | | Flake check | main: next main run of the job passed 1/1 | | First / last hit | 2026-11-02 / 2026-11-02 | | Still hitting main? | Last main hit: 2026-11-02. 78 main runs since the last hit (2026-11-02), with 0 hits | | Fix evidence | Local: a new real-process test (6s startup stall) fails before and passes after (single runs). This PR's CI: browser-debugger (Windows) passed 1/1. | Failing attempt-1 jobs, most recent first (1 of 1 log-verified hits): | Date (UTC) | Branch | Job | Signature excerpt | |---|---|---|---| | [2026-11-02 18:46](https://github.com/microsoft/aspire/actions/runs/41503655043/job/125489102962) | **main** | VS Code extension E2E (Windows, browser-debugger) | `Timed out after 570124ms waiting for resource 'standalone' state Running` | **Verdict: WEAK.** Only **1 hit** (main, 2026-11-02), matched through a proxy signature. 78 main runs since then were clean. The other 11 before-all timeouts in this window are different: 8 are the `c:\` casing bug fixed by #21623 and 3 show a successful launch. <!-- /failure-stats --> **Why:** `tryExecuteCli` (`extension/src/utils/cliPath.ts`) validates a CLI by running `aspire --version` with a hard-coded **5s** timeout. When a runner stall delays a valid CLI's startup past 5s, the probe rejects it as invalid and the extension falls back or fails. `configInfoProvider` already gives the same `aspire --version` command a 30s budget. **Fix:** Move the named `cliVersionProbeTimeoutMs = 30_000` into `cliPath.ts`, use it in `tryExecuteCli`, and import it in `configInfoProvider` so both `--version` probes share one budget. A probe still has to complete successfully. It does not accept a CLI that hangs or exits with a non-zero code. Of the 11 attempt-1 failures of the Blazor before-all hook in the last 7 days, 8 were the `c:\` casing issue that #21623 already fixed, 1 was a DCP infrastructure timeout and 1 was on a spike branch. The remaining hit is the one this PR fixes. ## Confidence - New test `tryExecuteCli accepts a real CLI whose --version output is delayed by a startup stall` launches a real script that sleeps 6s before printing a version. On a POSIX runner it uses a `sh` script, and on Windows a `.cmd` script. - **Before** (fix reverted, test kept): fails with `false !== true`. - **After**: passes (about 6.0s). - The existing cmd-shim probe test now asserts the shared constant. - `tsc` (`compile-tests`) and `eslint` pass on the changed files. - **Not run:** the full `vscode-test` (Electron) suite and the E2E suites. The sandbox can't resolve `update.code.visualstudio.com`. Instead, I ran the compiled `cliPath` and `configInfoProvider` mocha suites with a stubbed `vscode` module. With the stub, 25 tests that need real VS Code workspace APIs fail on both unmodified `main` and this branch, and the failing set is identical. CI covers the rest. **How we stop this recurring:** Both `aspire --version` probes now share one named budget, so they can't drift apart again. The real-process test fails if the probe budget is cut back below a realistic startup stall. Refs #21600 ## Checklist - Is this feature complete? - [x] Yes. Ready to ship. - [ ] No. Follow-up changes expected. - Are you including unit tests for the changes and scenario tests if relevant? - [x] Yes - [ ] No - Did you add public API? - [ ] Yes - [x] No - Does the change make any security assumptions or guarantees? - [ ] Yes - [x] No **🤖 Posted by AspireAgent (AI Agent)** Co-authored-by: davidfowl <[email protected]> Co-authored-by: Copilot <[email protected]> (cherry picked from commit cd3fec7)
) ## Description **What failed:** On `main`, the Windows VS Code extension E2E jobs in [run 41503655043](https://github.com/microsoft/aspire/actions/runs/41503655043) failed: the [browser-debugger](https://github.com/microsoft/aspire/actions/runs/41503655043/job/125489102962) job's Blazor "maps managed Edge debugging" before-all hook timed out waiting for `standalone` to reach Running, and the [apphost-tree](https://github.com/microsoft/aspire/actions/runs/41503655043/job/125489102839) job hit the tree-actions "secondary AppHost" probe flake. The extension log shows `E2E CLI path is invalid` followed by `Configured CLI path is invalid`, about 1.2s after the CLI's first log write, which itself arrived about 5s after launch. ## Failure stats (14d, attempt 1) `CI` workflow on microsoft/aspire, runs created 2026-10-25 06:28 → 2026-11-08 06:28 UTC, **attempt 1 only**. Denominator: attempt-1 jobs that ran (success or failure). Hits: the failed job's log matches the signature. Jobs that lost their runner, which have no log, are excluded. Main runs have no reruns, so their flake check is the next main run of the job. | | | |---|---| | Signature | Blazor `"before all" hook for "maps managed Edge debugging…"` timing out on `standalone` Running **and** the first `aspire-vscode.debugAppHost` invocation `canceled` (the CLI was rejected). The `E2E CLI path is invalid` line is only in the extension-log artifact, not the job log, so the canceled launch is used as a proxy | | Job | VS Code extension E2E (Windows, browser-debugger) | | main pushes: hits / runs | 1 / 153 (0.65%) | | main pushes, 30d: hits / runs | 1 / 265 (0.38%). The 16 days before the 14d window add 0 hits. | | PR runs: hits / runs | 0 / 788 (0.00%); 0 PR-caused excluded | | Combined rate | 1 / 941 = **0.11%** | | Flake check | main: next main run of the job passed 1/1 | | First / last hit | 2026-11-02 / 2026-11-02 | | Still hitting main? | Last main hit: 2026-11-02. 78 main runs since the last hit (2026-11-02), with 0 hits | | Fix evidence | Local: a new real-process test (6s startup stall) fails before and passes after (single runs). This PR's CI: browser-debugger (Windows) passed 1/1. | Failing attempt-1 jobs, most recent first (1 of 1 log-verified hits): | Date (UTC) | Branch | Job | Signature excerpt | |---|---|---|---| | [2026-11-02 18:46](https://github.com/microsoft/aspire/actions/runs/41503655043/job/125489102962) | **main** | VS Code extension E2E (Windows, browser-debugger) | `Timed out after 570124ms waiting for resource 'standalone' state Running` | **Verdict: WEAK.** Only **1 hit** (main, 2026-11-02), matched through a proxy signature. 78 main runs since then were clean. The other 11 before-all timeouts in this window are different: 8 are the `c:\` casing bug fixed by #21623 and 3 show a successful launch. <!-- /failure-stats --> **Why:** `tryExecuteCli` (`extension/src/utils/cliPath.ts`) validates a CLI by running `aspire --version` with a hard-coded **5s** timeout. When a runner stall delays a valid CLI's startup past 5s, the probe rejects it as invalid and the extension falls back or fails. `configInfoProvider` already gives the same `aspire --version` command a 30s budget. **Fix:** Move the named `cliVersionProbeTimeoutMs = 30_000` into `cliPath.ts`, use it in `tryExecuteCli`, and import it in `configInfoProvider` so both `--version` probes share one budget. A probe still has to complete successfully. It does not accept a CLI that hangs or exits with a non-zero code. Of the 11 attempt-1 failures of the Blazor before-all hook in the last 7 days, 8 were the `c:\` casing issue that #21623 already fixed, 1 was a DCP infrastructure timeout and 1 was on a spike branch. The remaining hit is the one this PR fixes. ## Confidence - New test `tryExecuteCli accepts a real CLI whose --version output is delayed by a startup stall` launches a real script that sleeps 6s before printing a version. On a POSIX runner it uses a `sh` script, and on Windows a `.cmd` script. - **Before** (fix reverted, test kept): fails with `false !== true`. - **After**: passes (about 6.0s). - The existing cmd-shim probe test now asserts the shared constant. - `tsc` (`compile-tests`) and `eslint` pass on the changed files. - **Not run:** the full `vscode-test` (Electron) suite and the E2E suites. The sandbox can't resolve `update.code.visualstudio.com`. Instead, I ran the compiled `cliPath` and `configInfoProvider` mocha suites with a stubbed `vscode` module. With the stub, 25 tests that need real VS Code workspace APIs fail on both unmodified `main` and this branch, and the failing set is identical. CI covers the rest. **How we stop this recurring:** Both `aspire --version` probes now share one named budget, so they can't drift apart again. The real-process test fails if the probe budget is cut back below a realistic startup stall. Refs #21600 ## Checklist - Is this feature complete? - [x] Yes. Ready to ship. - [ ] No. Follow-up changes expected. - Are you including unit tests for the changes and scenario tests if relevant? - [x] Yes - [ ] No - Did you add public API? - [ ] Yes - [x] No - Does the change make any security assumptions or guarantees? - [ ] Yes - [x] No **🤖 Posted by AspireAgent (AI Agent)** Co-authored-by: davidfowl <[email protected]> Co-authored-by: Copilot <[email protected]> (cherry picked from commit cd3fec7)
#21938) ## Description **What failed:** `[vscode] Aspire Blazor browser debugger E2E > hits a managed breakpoint for hosted-global` in **VS Code extension E2E (Windows, browser-debugger)**, on main in run [42413925421](https://github.com/microsoft/aspire/actions/runs/42413925421) ([job](https://github.com/microsoft/aspire/actions/runs/42413925421/job/128531739772)) and on a PR branch in run [42312596518](https://github.com/microsoft/aspire/actions/runs/42312596518) ([job](https://github.com/microsoft/aspire/actions/runs/42312596518/job/128225566096)). The test reported only the masked bridge error `Failed to apply E2E control revision …: E2E control command failed.` **Why:** `hosted-global` is the only Blazor scenario that uses `closeMode: 'natural'`. The proof continues the breakpoint, asks js-debug for its CDP proxy and sends `Page.close` over that socket. The js-debug traces in both failing runs' diagnostics artifacts (`blazor-debugadapter-*.json`, `proxyActivity`) show the page target detaching before the browser answered. js-debug v1.117.0's `CDPSession._onClose` ([connection.ts#L385-L388](https://github.com/microsoft/vscode-js-debug/blob/v1.117.0/src/cdp/connection.ts#L385-L388)) rejects the pending call with `setCause(0, 'Connection is closed')`, and the proxy (`sendOrDie`) relays it to the client as `{"id":1,"error":{"code":0,"message":"Connection is closed"}}`, keeping the proxy socket open. Passing runs get `{"id":1,"result":{}}`. `closeBrowserPageThroughCdp` already accepted a socket *close* after `Page.close` as "target gone", but treated this equivalent error reply as `Browser CDP Page.close failed`, which fails the proof even though the page, Mono and root sessions then terminate normally (they do in both traces). **Fix:** `closeBrowserPageThroughCdp` now treats the js-debug target-closed reply (`code === 0 && message === 'Connection is closed'`) the same as the socket-close case. This doesn't weaken the proof: the caller still requires every proof session (root, browser, managed) to terminate and `debug-in-browser` to return to `Enabled`. Any other `Page.close` error (e.g. `-32601 Method not found`) still fails. **Regression tests** (`extension/src/test/e2eStateFileBridge.test.ts`, run against the real `executeE2eControlCommand` product path): - `accepts target disconnection (target-closed reply) during Page.close only after all proof sessions terminate`: the CI failure, which fails without the fix with the exact CI error `Browser CDP Page.close failed: {"code":0,"message":"Connection is closed"}`. - `rejects a target-closed Page.close reply while a proof session remains active`: shows the reply is not a bypass, because the proof still fails if the managed session stays alive. - The existing socket-close case is kept, parametrized alongside the new one. Dedupe: no open issue or PR covers `hosted-global`. #21912 covers a different browser-debugger failure (the `maps managed Edge debugging` before-all hook CLI `--version` probe), and none of the AspireAgent PRs #21911–#21932 touch this test. Tracker: #21600. ## Confidence Paired local runs of `e2eStateFileBridge.test.js` under VS Code 1.131.0 (`vscode-test`, xvfb), same machine and commit, toggling only the product change: | | runs green | per-run result | |---|---|---| | before (fix reverted, new tests kept) | **0/10** | 61 passing, 2 failing (the two new tests, with the CI error) | | after | **10/10** | 63 passing, 0 failing | `yarn lint` and `yarn compile-tests` pass. This is a test-harness change only (`extension/src/testing`), so there's no product behavior change and no E2E behavior evidence beyond the CI `browser-debugger` shards on this PR. ## Failure stats (14d, attempt 1) Window 2026-10-25 12:00 → 2026-11-08 12:00 UTC, `ci.yml`, attempt-1 jobs only. The denominator is decided attempt-1 runs (same definition as #21600). Hits are verified from each failed `VS Code extension E2E (Windows, browser-debugger)` job's mocha failure line (48 failed jobs scanned over 30d). - **This signature** (`hits a managed breakpoint for hosted-global` → `Page.close` target-closed reply): **3/1157** decided runs, **2 main / 1 PR** (main 2/160, PR 1/997). - **Any `hosted-global` failure:** 4/1157. The extra one (run 40728167754) is a different cause, `Timed out after 300000ms waiting for browser navigation to 'counter'`, which this PR does **not** claim to fix. - **30d main:** **2** verified hits (both are in the 14d window). Six older or other main browser-debugger failures had expired or unavailable logs and could not be classified. - The two newest failures show only the masked `E2E control command failed.`; the js-debug traces in their diagnostics artifacts show the `{"code":0,"message":"Connection is closed"}` proxy reply. The 10-28 main failure predates the masking and prints the exact error. | Run | Date (UTC) | Branch | Job | Error | |---|---|---|---|---| | [42413925421](https://github.com/microsoft/aspire/actions/runs/42413925421) | 11-07 21:02 | main | [128531739772](https://github.com/microsoft/aspire/actions/runs/42413925421/job/128531739772) | masked; trace shows target-closed reply | | [42312596518](https://github.com/microsoft/aspire/actions/runs/42312596518) | 11-06 23:32 | PR (eerhardt-dashboard-authorize-anonymous-pages) | [128225566096](https://github.com/microsoft/aspire/actions/runs/42312596518/job/128225566096) | masked; trace shows target-closed reply | | [40606196498](https://github.com/microsoft/aspire/actions/runs/40606196498) | 10-28 00:02 | main | [122561450397](https://github.com/microsoft/aspire/actions/runs/40606196498/job/122561450397) | `Browser CDP Page.close failed: {"code":0,"message":"Connection is closed"}` | | [40728167754](https://github.com/microsoft/aspire/actions/runs/40728167754) | 10-28 16:39 | PR (native-bundle-continuation) | [122971965889](https://github.com/microsoft/aspire/actions/runs/40728167754/job/122971965889) | different cause: navigation timeout (not addressed) | ## Verdict **STRONG**: the failure was reproduced deterministically through the product code path, and the before-fix run fails with the exact CI error string (0/10 → 10/10). js-debug traces from both recent failures and the unmasked 10-28 main error point to the same cause. The frequency is low (3/1157), so CI alone will take time to confirm the absence of hits. This PR's own CI (head `bbb5a79f`) was green on both `browser-debugger` shards on attempt 1. The attempt-1 rerun was only for the unrelated `tree-actions` flake (#21796, fix in #21914). **How we stop this recurring:** CDP proxy transport outcomes after `Page.close` (socket close *or* js-debug's target-closed reply) are now classified in one place, `isCdpProxyTargetClosedError`, with unit tests pinning both forms. The proof's real gate stays session termination plus command reset, so future js-debug transport variations can't silently mask a real leak. ## Checklist - Is this feature complete? - [x] Yes. Ready to ship. - [ ] No. Follow-up changes expected. - Are you including unit tests for the changes and scenario tests if relevant? - [x] Yes - [ ] No - Did you add public API? - [ ] Yes - [x] No - Does the change make any security assumptions or guarantees? - [ ] Yes - [x] No **🤖 Posted by AspireAgent (AI Agent)** Co-authored-by: davidfowl <[email protected]> Co-authored-by: Copilot <[email protected]>
Description
What failed: On
main, the Windows VS Code extension E2E jobs in run 41503655043 failed: the browser-debugger job's Blazor "maps managed Edge debugging" before-all hook timed out waiting forstandaloneto reach Running, and the apphost-tree job hit the tree-actions "secondary AppHost" probe flake. The extension log showsE2E CLI path is invalidfollowed byConfigured CLI path is invalid, about 1.2s after the CLI's first log write, which itself arrived about 5s after launch.Failure stats (14d, attempt 1)
CIworkflow on microsoft/aspire, runs created 2026-10-25 06:28 → 2026-11-08 06:28 UTC, attempt 1 only. Denominator: attempt-1 jobs that ran (success or failure). Hits: the failed job's log matches the signature. Jobs that lost their runner, which have no log, are excluded. Main runs have no reruns, so their flake check is the next main run of the job."before all" hook for "maps managed Edge debugging…"timing out onstandaloneRunning and the firstaspire-vscode.debugAppHostinvocationcanceled(the CLI was rejected). TheE2E CLI path is invalidline is only in the extension-log artifact, not the job log, so the canceled launch is used as a proxyFailing attempt-1 jobs, most recent first (1 of 1 log-verified hits):
Timed out after 570124ms waiting for resource 'standalone' state RunningVerdict: WEAK. Only 1 hit (main, 2026-11-02), matched through a proxy signature. 78 main runs since then were clean. The other 11 before-all timeouts in this window are different: 8 are the
c:\casing bug fixed by #21623 and 3 show a successful launch.Why:
tryExecuteCli(extension/src/utils/cliPath.ts) validates a CLI by runningaspire --versionwith a hard-coded 5s timeout. When a runner stall delays a valid CLI's startup past 5s, the probe rejects it as invalid and the extension falls back or fails.configInfoProvideralready gives the sameaspire --versioncommand a 30s budget.Fix: Move the named
cliVersionProbeTimeoutMs = 30_000intocliPath.ts, use it intryExecuteCli, and import it inconfigInfoProviderso both--versionprobes share one budget. A probe still has to complete successfully. It does not accept a CLI that hangs or exits with a non-zero code.Of the 11 attempt-1 failures of the Blazor before-all hook in the last 7 days, 8 were the
c:\casing issue that #21623 already fixed, 1 was a DCP infrastructure timeout and 1 was on a spike branch. The remaining hit is the one this PR fixes.Confidence
tryExecuteCli accepts a real CLI whose --version output is delayed by a startup stalllaunches a real script that sleeps 6s before printing a version. On a POSIX runner it uses ashscript, and on Windows a.cmdscript.false !== true.tsc(compile-tests) andeslintpass on the changed files.vscode-test(Electron) suite and the E2E suites. The sandbox can't resolveupdate.code.visualstudio.com. Instead, I ran the compiledcliPathandconfigInfoProvidermocha suites with a stubbedvscodemodule. With the stub, 25 tests that need real VS Code workspace APIs fail on both unmodifiedmainand this branch, and the failing set is identical. CI covers the rest.How we stop this recurring: Both
aspire --versionprobes now share one named budget, so they can't drift apart again. The real-process test fails if the probe budget is cut back below a realistic startup stall.Refs #21600
Checklist
🤖 Posted by AspireAgent (AI Agent)