Skip to content

Give the VS Code extension's aspire --version probe a 30s budget - #21912

Merged
Ella Hathaway (ellahathaway) merged 1 commit into
mainfrom
aspireagent/cli-version-probe-budget
Nov 9, 2026
Merged

Ella Hathaway (ellahathaway) merged 1 commit into
mainfrom
aspireagent/cli-version-probe-budget

Conversation

@davidfowl

@davidfowl David Fowler (davidfowl) commented Nov 8, 2026 •

Copy link
Copy Markdown
Collaborator

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 for standalone to reach Running, and the apphost-tree 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 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.

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?
    • Yes. Ready to ship.
    • No. Follow-up changes expected.
  • Are you including unit tests for the changes and scenario tests if relevant?
    • Yes
    • No
  • Did you add public API?
    • Yes
    • No
  • Does the change make any security assumptions or guarantees?
    • Yes
    • No

🤖 Posted by AspireAgent (AI Agent)

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]>
@davidfowl David Fowler (davidfowl) added the agent:working An AI agent is actively working on this issue or PR label Nov 8, 2026
@github-actions

github-actions Bot commented Nov 8, 2026

Copy link
Copy Markdown
Contributor

🚀 Dogfood this PR with:

⚠️ WARNING: Do not do this without first carefully reviewing the code of this PR to satisfy yourself it is safe.

curl -fsSL https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 21912

Or

  • Run remotely in PowerShell:
iex "& { $(irm https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 21912"

@github-actions

github-actions Bot commented Nov 8, 2026

Copy link
Copy Markdown
Contributor

Tests selector

0 / 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)

extension-e2e, extension-unit


How these were chosen — grouped by what changed

Job reasons

Job Triggered by
extension-e2e extension/src/test/cliPath.test.ts, extension/src/utils/cliPath.ts, extension/src/utils/configInfoProvider.ts
extension-unit extension/src/test/cliPath.test.ts, extension/src/utils/cliPath.ts, extension/src/utils/configInfoProvider.ts

Selection computed for commit d96cb98.

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.

🟢 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

@radical

Copy link
Copy Markdown
Member

[automated] Inconclusive for flake efficacy; fresh before/after reproduction is blocked by workload support.

Reviewed head d96cb9810f23e3cdf6bbeb74d1bbdbd343995dc3; unfixed parent 2fefac5abe97fbfa878abac3b9f3b5dbbd211cd7. Existing PR CI checked out merge 5aa49b1bbd8ea6d6b1f8d4ba10d564cbb50acd16, whose tree equals the reviewed head.

Original evidence: Windows browser-debugger, attempt 1, at 25935214f31928dd58118449a2fe2f96da09ac70, failed its Blazor before-all hook:

Timed out after 570124ms waiting for resource 'standalone' state Running.

The retained diagnostic artifact also shows E2E CLI path is invalid, Configured CLI path is invalid, and a canceled aspire-vscode.debugAppHost launch. This supports CLI rejection as part of the incident, but does not directly establish the rejected process's timeout/exit reason or prove a runner stall. The next executed Windows browser-debugger job on main passed all 8 cases while the probe still had its 5s budget.

Existing fixed-source evidence, not a new comparison campaign:

Workload, attempt 1 Observed result
Windows extension unit suite 4,154 passing, 9 pending; the added real-process startup-delay test passed in 6,084ms
Windows browser-debugger full shard 8/8 passing; original before-all hook completed
Windows apphost-tree full shard 13/13 passing

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 windows-2025-vs2026 version 20261030.294.1 to 20261103.298.1; observations about 5.4 days apart do not establish a rate reduction.

Scope correction: The cited apphost-tree failure was owns at most one ps follower through view, editor, settings, and reload transitions, timing out on a 10s E2E control revision. It was not the secondary-AppHost tree-actions test. The queue's combined family rate and the PR's historical rate denominators were not verified.

Execution/review: reproduce-flaky-tests.yml at the reviewed head and at main 2f471dc6f8019fc1660e1f1ea153078c99be5e85 only resolves .csproj projects and invokes dotnet test; it cannot run these VS Code/Mocha shards. No fresh jobs, reruns, proxy tests or source changes were made. The 6s regression test checks delayed-process acceptance, not natural Windows flake elimination; its reported before-fix failure was not independently rerun. Scoped source review found no high-confidence introduced correctness defect; hangs/failures remain rejected, but each slow candidate may now occupy 30s instead of 5s. CI-confidence is N/A: no infrastructure diff.

Remaining gap: A faithful Windows x64 full-shard baseline/fixed campaign with preserved lane conditions is still needed for an efficacy claim.

@ellahathaway
Ella Hathaway (ellahathaway) merged commit cd3fec7 into main Nov 9, 2026
104 checks passed
@microsoft-github-policy-service microsoft-github-policy-service Bot added this to the 17.1 milestone Nov 9, 2026
@aspire-repo-bot

Copy link
Copy Markdown
Contributor

✅ No documentation update needed.

docs_optional/false-positive → internal_refactor (proven false positive on a gating signal).

  • Triggered signal: pr_body_has_cli_flag_mention. Evidence: the PR body mentions aspire --version only to describe the VS Code extension's internal CLI-path validation probe, which had a hard-coded 5s timeout and now has 30s. No new flag or option is added.
  • The change is an internal timeout-budget tweak to fix a CI flake, with no new or changed public API, option, string, or documented behavior.

Mitch Denny (mitchdenny) pushed a commit that referenced this pull request Nov 10, 2026
)

## 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)
Mitch Denny (mitchdenny) pushed a commit that referenced this pull request Nov 10, 2026
)

## 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)
Mitch Denny (mitchdenny) pushed a commit that referenced this pull request Nov 10, 2026
)

## 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)
David Fowler (davidfowl) added a commit that referenced this pull request Nov 10, 2026
#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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants