Skip to content

Coordinate project builds when the IDE cannot launch projects (fix VS Code E2E tree-actions flake) - #21624

Merged
Ankit Jain (radical) merged 2 commits into
mainfrom
aspireagent/coordinate-build-without-ide-project-capability
Nov 5, 2026
Merged

Ankit Jain (radical) merged 2 commits into
mainfrom
aspireagent/coordinate-build-without-ide-project-capability

Conversation

@davidfowl

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

Copy link
Copy Markdown
Collaborator

Description

Fixes the VS Code Linux E2E tree-actions flake ("could not find a matching endpoint" and "Timed out waiting for resource 'e2e-terminal' state Running"), tracked in #19282 and #21600.

Root cause

The E2E VS Code has no C# extension, so DEBUG_SESSION_INFO advertises an explicit capability list that contains neither project nor project-with-external-build.v1. SupportsDebugging honours that list strictly, so DCP runs e2e-worker and e2e-terminal as plain processes. However, DotnetProjectBuildCoordinator.ShouldCoordinateBuild coordinated the build in a debug session only when project-with-external-build.v1 was advertised. As a result there was no coordinated build and SuppressBuild stayed false. Both resources, which share AspireE2E.Worker.csproj (a Web SDK project), each ran dotnet run --project … --configuration Debug --no-launch-profile at about the same time, so the cold project was built twice concurrently. One build can fail on a file the other holds open in obj/. That resource then exits right after reaching Running, so the tree has no URL (or the resource never stays Running).

CI evidence (attempt-1 diagnostics artifacts, CLI log aspire-home/logs/cli_*.log):

  • run 41213802267 / job 124578062062: e2e-worker was started via dotnet run at 15:34:42.789 and e2e-terminal via dotnet run at 15:34:42.976, both on the same csproj. e2e-worker went Running → Finished at 15:34:47.117, and the test failed with "could not find a matching endpoint".
  • run 41155112085 / job 124405746992 and run 40970635955 / job 123798396615: the same concurrent dotnet run pattern, but here e2e-terminal went Running → Finished about 4s later, so the test timed out waiting for the e2e-terminal state Running.

Local reproduction: two concurrent dotnet runs of one cold Web csproj, started 190ms apart. In 4 of 6 trials one run exited 1 with IOException: The process cannot access the file '…/obj/Debug/net10.0/rjsmrazor.dswa.cache.json' because it is being used by another process (StaticWebAssets).

Frequency

Window: ci.yml runs created 2026-10-29T00:45Z to 2026-11-01T00:45Z (72h, 489 runs), attempt-1 jobs only.

  • Linux tree-actions: 4/253 failures have this root cause (about 1.6%). That is 0/29 on main and 4/224 on PR branches, spread over 4 distinct branches: 2× "could not find a matching endpoint" and 2× e2e-terminal Running timeout. The other 3 failures in the window had unrelated signatures.

Fix

ShouldCoordinateBuild now also coordinates when the IDE sends an explicit capability list without project. Those resources run as DCP processes exactly as they do outside an IDE, so they get the single coordinated build and launch from the built output with SuppressBuild. Behaviour is unchanged for:

  • no debug session (coordinated);
  • project-with-external-build.v1 (coordinated);
  • Visual Studio / capability-less or unparseable payloads (legacy);
  • IDEs advertising project without external build (legacy; the IDE owns the build).

No sleeps, retries, assertion changes or test disabling.

The Session 2 build-ownership contract in docs/plans/project-v2-csharpprogram-watch.md now lists this rule alongside the existing ones. It keeps the qualifications for older/capability-less launchers and for persistent lifetime. The race explanation above stays here, not in the plan doc.

Tests

  • New DotnetProjectBuildCoordinatorTests.DebugSessionWithoutProjectCapabilityCoordinatesBuildForProcessLaunches (theory: an empty list, and node,browser). Two resources share a project, and the test asserts one DotnetProjectBuildResource, SuppressBuild, and a build-completion annotation per resource. Fails before the fix in both cases (Assert.Single() Failure: The collection was empty) and passes after.
  • All debug-session tests in Aspire.Hosting.Dotnet.Tests and all 30 BlazorHostedExtensionsTests (including the browser-only debug session) pass locally. Some DCP/real-build tests in Aspire.Hosting.Dotnet.Tests timed out locally because of the sandbox environment (no network or DCP). None of them sets a debug session, so this change does not affect them; CI covers them.
  • E2E evidence (real VS Code E2E on this head): Linux tree-actions job 124717829948 passed on attempt 1. Its diagnostics CLI log (cli_20261101T014747_185e943c.log) shows __dotnet-project-build running a single dotnet build …/obj/.aspire/build/projects.41c8f414a9ec.proj (Running → Finished 01:47:50.9 → 01:47:53.35). e2e-worker and e2e-terminal then go Starting → Waiting until that build completes, and launch directly from AspireE2E.Worker/bin/Debug/net10.0/AspireE2E.Worker. There are 0 run --project invocations, versus two concurrent dotnet run --project builds in the failing runs.

Confidence

High for the root cause and the fix. CI logs from the failing runs show two concurrent dotnet run --project builds of the shared csproj. A local repro reproduces the obj/ file-lock failure in 4 of 6 trials. The new unit test fails before the fix and passes after. A real VS Code E2E run on the fix shows a single coordinated build and no dotnet run --project. The main uncertainty: one passing E2E run does not prove the 1.6% flake is gone. Tracking the Linux tree-actions failure rate after merge will confirm it.

How we stop this recurring: the build-coordination decision is now pinned by DebugSessionWithoutProjectCapabilityCoordinatesBuildForProcessLaunches. That test fails if a debug session that launches project resources as DCP processes stops getting the single coordinated build.

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)

When an IDE debug session advertises an explicit capability list without
"project" (VS Code without the C# extension), DCP runs project resources as
plain processes. The build coordinator was skipped, so each resource ran its
own implicit `dotnet run` build. Resources sharing a project built it
concurrently and one could exit on a locked obj/ file
(rjsmrazor.dswa.cache.json), which made the VS Code E2E tree-actions test
flaky ("could not find a matching endpoint").

Co-authored-by: Copilot <[email protected]>
@github-actions

github-actions Bot commented Nov 1, 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 -- 21624

Or

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

@aspire-repo-bot
aspire-repo-bot Bot requested a balanced review from Copilot November 1, 2026 01:20
@github-actions github-actions Bot added the needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners label Nov 1, 2026
@github-actions

This comment has been minimized.

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 blocking approval.

No open issues 🎉

What changed in this PR

This PR updates Aspire’s .NET project build coordination to prevent concurrent builds of a shared project when an IDE cannot launch projects, addressing the VS Code tree-actions flake tracked in #19282 and #21600.

Changes:

  • Coordinates builds when an explicit IDE capability list lacks project, while preserving legacy IDE behavior.
  • Adds regression tests for empty and non-project capability lists, verifying shared build coordination and build suppression.
  • Updates the design documentation to describe the revised capability handling.
File Description
tests/​Aspire.Hosting.Dotnet.Tests/​DotnetProjectBuildCoordinatorTests.cs Adds shared-project regression coverage for process-only launches.
src/​Aspire.Hosting.Dotnet/​DotnetProjectBuildCoordinator.cs Enables coordinated builds when explicit IDE capabilities exclude project launches.
docs/​plans/​project-v2-csharpprogram-watch.md Documents the updated build coordination rules.

Review effort: Balanced

@github-actions

github-actions Bot commented Nov 1, 2026

Copy link
Copy Markdown
Contributor

Retrying the failed CI jobs for this pull request from the CI run attempt. The rerun is being tracked in the rerun attempt.

Copy link
Copy Markdown
Collaborator Author

CI on head 51a7d6c56c6a5f12f56504ccfd3f0f837a3ac761 is green (CI run 41260691208).

  • In attempt 1, one job failed for infrastructure reasons: Windows debug-startup-timeout job 124717829957 failed with "The hosted runner lost communication with the server", and no test result was recorded. The repo's auto-retry reran it in attempt 2, and job 124728244085 passed. No manual reruns were used.
  • The target shard, Linux tree-actions, passed on attempt 1. Its diagnostics show the coordinated __dotnet-project-build, and the worker resources launched from the build output (details are in the PR description).

🤖 Posted by AspireAgent (AI Agent)

@davidfowl David Fowler (davidfowl) added the agent:working An AI agent is actively working on this issue or PR label Nov 5, 2026 — with Copilot SWE Agent
@github-actions

github-actions Bot commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

Tests selector

20 / 101 PR test projects · 4 PR jobs, from 2 changed files.

Selected PR test projects (20 / 101)

Aspire.Cli.EndToEnd.Tests, Aspire.Hosting.Azure.EntraId.Tests, Aspire.Hosting.Azure.Kubernetes.Tests, Aspire.Hosting.Azure.Tests, Aspire.Hosting.Blazor.Tests, Aspire.Hosting.CodeGeneration.TypeScript.Tests, Aspire.Hosting.DevTunnels.Tests, Aspire.Hosting.Docker.Tests, Aspire.Hosting.Dotnet.Tests, Aspire.Hosting.DotnetTool.Tests, Aspire.Hosting.EntityFrameworkCore.Tests, Aspire.Hosting.Foundry.Tests, Aspire.Hosting.Kubernetes.Tests, Aspire.Hosting.Milvus.Tests, Aspire.Hosting.Qdrant.Tests, Aspire.Hosting.Radius.Tests, Aspire.Hosting.Testing.Tests, Aspire.Hosting.Tests, Aspire.Playground.Tests, Aspire.Templates.Tests

Selected PR jobs (4)

cli-starter-validation, extension-e2e, polyglot, typescript-api-compat


How these were chosen — grouped by what changed

⚠️ 20 of the 20 selected test projects come from a single change — src/Aspire.Hosting.Dotnet/DotnetProjectBuildCoordinator.cs.

🔧 src/Aspire.Hosting.Dotnet/DotnetProjectBuildCoordinator.cs (changed source)
→ 3 directly: Aspire.Cli.EndToEnd.Tests, Aspire.Hosting.Dotnet.Tests, Aspire.Templates.Tests
→ 17 via the project graph

show 17

Aspire.Hosting.Azure.EntraId.Tests, Aspire.Hosting.Azure.Kubernetes.Tests (2 hops), Aspire.Hosting.Azure.Tests, Aspire.Hosting.Blazor.Tests (2 hops), Aspire.Hosting.CodeGeneration.TypeScript.Tests, Aspire.Hosting.DevTunnels.Tests, Aspire.Hosting.Docker.Tests, Aspire.Hosting.DotnetTool.Tests (2 hops), Aspire.Hosting.EntityFrameworkCore.Tests, Aspire.Hosting.Foundry.Tests, Aspire.Hosting.Kubernetes.Tests, Aspire.Hosting.Milvus.Tests, Aspire.Hosting.Qdrant.Tests, Aspire.Hosting.Radius.Tests, Aspire.Hosting.Testing.Tests, Aspire.Hosting.Tests (2 hops), Aspire.Playground.Tests (2 hops)

📦 affected project Aspire.Hosting.Dotnet
→ 2 tests: Aspire.Cli.EndToEnd.Tests, Aspire.Templates.Tests

🧪 tests/Aspire.Hosting.Dotnet.Tests/DotnetProjectBuildCoordinatorTests.cs (changed test)
→ 1 directly: Aspire.Hosting.Dotnet.Tests

Job reasons

Job Triggered by
cli-starter-validation • src/Aspire.Hosting.Dotnet/DotnetProjectBuildCoordinator.cs
• affected project Aspire.Hosting.Dotnet
extension-e2e • src/Aspire.Hosting.Dotnet/DotnetProjectBuildCoordinator.cs
• affected project Aspire.Hosting.Dotnet
polyglot affected project Aspire.Hosting.Dotnet
typescript-api-compat affected project Aspire.Hosting.Dotnet

Selection computed for commit f5805bf.

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 recorded for the IDE build-coordination changes.

No open issues 🎉

Review effort: Balanced

@github-actions

github-actions Bot commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

Retrying the failed CI jobs for this pull request from the CI run attempt. The rerun is being tracked in the rerun attempt.

@davidfowl David Fowler (davidfowl) removed the agent:working An AI agent is actively working on this issue or PR label Nov 5, 2026
@radical
Ankit Jain (radical) merged commit 1fd02a2 into main Nov 5, 2026
574 of 578 checks passed
@microsoft-github-policy-service microsoft-github-policy-service Bot added this to the 17.0 milestone Nov 5, 2026
@aspire-repo-bot

Copy link
Copy Markdown
Contributor

✅ No documentation update needed.

docs_optional → internal_refactor (proven false positive of the only triggered signal).

  • Triggered signals: pr_body_has_cli_flag_mention. Evidence: the PR body quotes dotnet run --project ... --configuration Debug --no-launch-profile as part of the root-cause explanation, not a new Aspire CLI flag.
  • Changed files: src/Aspire.Hosting.Dotnet/DotnetProjectBuildCoordinator.cs, tests/Aspire.Hosting.Dotnet.Tests/DotnetProjectBuildCoordinatorTests.cs and docs/plans/project-v2-csharpprogram-watch.md (an internal plan doc).
  • No public API, option, string or documented behavior changed. This is an internal build-coordination fix for a CI flake.

Ankit Jain (radical) pushed a commit that referenced this pull request Nov 9, 2026
…tions E2E (#21914)

## Description

The Linux and Windows `tree-actions` VS Code E2E shard fails with
`AssertionError: Expected e2e-worker to expose an endpoint URL.` in
*routes view, copy, endpoint, log, and resource commands through tree
handlers*. It is the most frequent flake since #21624. Examples: [run
41946839177 / job
126989027692](https://github.com/microsoft/aspire/actions/runs/41946839177/job/126989027692)
(Linux), [run 41967348150 / job
127053704182](https://github.com/microsoft/aspire/actions/runs/41967348150/job/127053704182)
(Windows, main), [run 41980257054 / job
127096573746](https://github.com/microsoft/aspire/actions/runs/41980257054/job/127096573746)
(Windows). #21796 lists more.

## 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 | `Expected e2e-worker to expose an endpoint URL.` |
| Job | VS Code extension E2E (Linux + Windows, tree-actions) |
| main pushes: hits / runs | 8 / 306 (2.61%) |
| main pushes, 30d: hits / runs | 8 / 530 (1.51%). The 16 days before
the 14d window add 0 hits. |
| PR runs: hits / runs | 28 / 1605 (1.74%); 0 PR-caused excluded |
| Combined rate | 36 / 1911 = **1.88%** |
| Flake check | main: next main run of the job passed 8/8; PR: 24/25
rerun hits passed on rerun (3 never rerun) |
| First / last hit | 2026-11-05 / 2026-11-08 |
| Still hitting main? | Yes, still active: last hit 2026-11-08; last
main hit 2026-11-07 |
| Fix evidence | Local real E2E: injected 5s delay 3/3 fail → 3/3 pass;
natural run 1/1 pass. This PR's CI: tree-actions Linux and Windows
passed 1/1 each. |

Failing attempt-1 jobs, most recent first (10 of 34 log-verified hits):

| Date (UTC) | Branch | Job | Signature excerpt |
|---|---|---|---|
| [2026-11-08
06:06](https://github.com/microsoft/aspire/actions/runs/42453400853/job/128650958075)
| `aspireagent/vscode-bridge-scoped-fake-timers` | VS Code extension E2E
(Windows, tree-actions) | `Expected e2e-worker to expose an endpoint
URL.` |
| [2026-11-08
05:17](https://github.com/microsoft/aspire/actions/runs/42450180289/job/128641295561)
| `darc-main-252ee2c2-deac-4980-a34a-b797f49158de` | VS Code extension
E2E (Windows, tree-actions) | `Expected e2e-worker to expose an endpoint
URL.` |
| [2026-11-08
04:40](https://github.com/microsoft/aspire/actions/runs/42447773687/job/128633232882)
| `aspireagent/doctor-cancel-dcp-cleanup` | VS Code extension E2E
(Windows, tree-actions) | `Expected e2e-worker to expose an endpoint
URL.` |
| [2026-11-08
04:32](https://github.com/microsoft/aspire/actions/runs/42447210418/job/128631545572)
| `aspireagent/resource-attach-proof-resume-aborted-inspection` | VS
Code extension E2E (Windows, tree-actions) | `Expected e2e-worker to
expose an endpoint URL.` |
| [2026-11-07
21:02](https://github.com/microsoft/aspire/actions/runs/42413947055/job/128538664400)
| **main** | VS Code extension E2E (Windows, tree-actions) | `Expected
e2e-worker to expose an endpoint URL.` |
| [2026-11-07
03:55](https://github.com/microsoft/aspire/actions/runs/42336149573/job/128297445902)
| `sebros/resources-compact-view-regression-4abee4` | VS Code extension
E2E (Windows, tree-actions) | `Expected e2e-worker to expose an endpoint
URL.` |
| [2026-11-06
23:20](https://github.com/microsoft/aspire/actions/runs/42311290959/job/128230943448)
| **main** | VS Code extension E2E (Windows, tree-actions) | `Expected
e2e-worker to expose an endpoint URL.` |
| [2026-11-06
22:50](https://github.com/microsoft/aspire/actions/runs/42307718588/job/128210216707)
| `ellahathaway-stop-idle-extension-polling` | VS Code extension E2E
(Windows, tree-actions) | `Expected e2e-worker to expose an endpoint
URL.` |
| [2026-11-06
20:25](https://github.com/microsoft/aspire/actions/runs/42288258477/job/128147538335)
| **main** | VS Code extension E2E (Linux, tree-actions) | `Expected
e2e-worker to expose an endpoint URL.` |
| [2026-11-06
20:20](https://github.com/microsoft/aspire/actions/runs/42287581178/job/128143472756)
| `ellahathaway-clarify-agent-init-output` | VS Code extension E2E
(Windows, tree-actions) | `Expected e2e-worker to expose an endpoint
URL.` |

A strict re-scan of the job logs confirmed 34 of the 36 hits counted
above; the table lists only confirmed hits. The rates above use the
original count.

**Verdict: STRONG.** The most frequent signature here: 36 hits since
2026-11-05 (8 on main), still hitting today. 24 of the 25 PR hits that
were rerun passed on rerun, and all 8 main hits passed on the next main
run. The real-E2E before/after repro shows the exact CI assertion. The
PR's own CI is 1 run per OS. That is not statistical proof on its own:
at a 1.9% rate, ~160 clean runs are needed for 95% confidence.

<!-- /failure-stats -->

**Why:** the spec captures `e2e-worker` from the first snapshot where it
is `Running` and later reads its endpoint URL from that same object. DCP
activates the worker's endpoint shortly after the resource reaches
`Running`, and the backchannel omits inactive URLs, so the first
`Running` snapshot can have `urls: []`. The URL-bearing snapshot arrives
a few milliseconds later, but the spec never re-reads it. Since #21624,
the worker reaches `Running` after the extension's `describe --follow`
attaches, so this URL-less snapshot is now visible to the spec.

**Fix:** wait with the existing
`waitForRunningResourceWithUrl('e2e-worker', 'http:', 180000)` helper
(already used by the Azure Functions spec) instead of
`waitForResourceState('e2e-worker', ['Running'])`. This is a test-only
change, and the endpoint assertion is unchanged.

Fixes #21796

## Confidence

- **Real E2E, paired before/after (Linux, xvfb, real VS Code 1.130.0,
CLI/DCP/VSIX/NuGets from main CI run 42413947055):** a local-only CLI
wrapper delays the first URL-bearing `Running` `e2e-worker` line from
`describe --follow` by 5s. The 5s delay is well above the 200ms state
poll interval, so the URL-less snapshot is always observed.
- Before (spec on `origin/main`): **3/3 failed** (6 passing, 1 failing),
each with the exact CI assertion.
  - After (this PR): **3/3 passed** (7/7).
- **Natural (no injection) run with the fix:** 1/1 passed (7/7).
Locally, the URL-bearing `Running` snapshot followed the URL-less one by
2ms.
- **Other checks:** eslint on the spec, `tsc` for both
`tsconfig.e2e.json` and the unit project, and
`e2eResourceReadiness.test.ts` (9/9, run with mocha directly) all pass.
- **Not run locally:** the Windows `tree-actions` shard, other E2E
shards, and `vscode-test`-hosted unit tests (the VS Code download host
is blocked in my environment). CI covers these.

**How we stop this recurring:** E2E specs that read resource URLs should
wait on `waitForRunningResourceWithUrl` instead of a state-only
`Running` gate, because state and URL activation arrive as separate
snapshots.

Related: #21854 made the same change but was closed without being
merged.

## 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 (the change is to an E2E scenario test; the helper it uses
already has unit coverage)
  - [ ] 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]>
Mitch Denny (mitchdenny) pushed a commit that referenced this pull request Nov 10, 2026
…tions E2E (#21914)

## Description

The Linux and Windows `tree-actions` VS Code E2E shard fails with
`AssertionError: Expected e2e-worker to expose an endpoint URL.` in
*routes view, copy, endpoint, log, and resource commands through tree
handlers*. It is the most frequent flake since #21624. Examples: [run
41946839177 / job
126989027692](https://github.com/microsoft/aspire/actions/runs/41946839177/job/126989027692)
(Linux), [run 41967348150 / job
127053704182](https://github.com/microsoft/aspire/actions/runs/41967348150/job/127053704182)
(Windows, main), [run 41980257054 / job
127096573746](https://github.com/microsoft/aspire/actions/runs/41980257054/job/127096573746)
(Windows). #21796 lists more.

## 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 | `Expected e2e-worker to expose an endpoint URL.` |
| Job | VS Code extension E2E (Linux + Windows, tree-actions) |
| main pushes: hits / runs | 8 / 306 (2.61%) |
| main pushes, 30d: hits / runs | 8 / 530 (1.51%). The 16 days before
the 14d window add 0 hits. |
| PR runs: hits / runs | 28 / 1605 (1.74%); 0 PR-caused excluded |
| Combined rate | 36 / 1911 = **1.88%** |
| Flake check | main: next main run of the job passed 8/8; PR: 24/25
rerun hits passed on rerun (3 never rerun) |
| First / last hit | 2026-11-05 / 2026-11-08 |
| Still hitting main? | Yes, still active: last hit 2026-11-08; last
main hit 2026-11-07 |
| Fix evidence | Local real E2E: injected 5s delay 3/3 fail → 3/3 pass;
natural run 1/1 pass. This PR's CI: tree-actions Linux and Windows
passed 1/1 each. |

Failing attempt-1 jobs, most recent first (10 of 34 log-verified hits):

| Date (UTC) | Branch | Job | Signature excerpt |
|---|---|---|---|
| [2026-11-08
06:06](https://github.com/microsoft/aspire/actions/runs/42453400853/job/128650958075)
| `aspireagent/vscode-bridge-scoped-fake-timers` | VS Code extension E2E
(Windows, tree-actions) | `Expected e2e-worker to expose an endpoint
URL.` |
| [2026-11-08
05:17](https://github.com/microsoft/aspire/actions/runs/42450180289/job/128641295561)
| `darc-main-252ee2c2-deac-4980-a34a-b797f49158de` | VS Code extension
E2E (Windows, tree-actions) | `Expected e2e-worker to expose an endpoint
URL.` |
| [2026-11-08
04:40](https://github.com/microsoft/aspire/actions/runs/42447773687/job/128633232882)
| `aspireagent/doctor-cancel-dcp-cleanup` | VS Code extension E2E
(Windows, tree-actions) | `Expected e2e-worker to expose an endpoint
URL.` |
| [2026-11-08
04:32](https://github.com/microsoft/aspire/actions/runs/42447210418/job/128631545572)
| `aspireagent/resource-attach-proof-resume-aborted-inspection` | VS
Code extension E2E (Windows, tree-actions) | `Expected e2e-worker to
expose an endpoint URL.` |
| [2026-11-07
21:02](https://github.com/microsoft/aspire/actions/runs/42413947055/job/128538664400)
| **main** | VS Code extension E2E (Windows, tree-actions) | `Expected
e2e-worker to expose an endpoint URL.` |
| [2026-11-07
03:55](https://github.com/microsoft/aspire/actions/runs/42336149573/job/128297445902)
| `sebros/resources-compact-view-regression-4abee4` | VS Code extension
E2E (Windows, tree-actions) | `Expected e2e-worker to expose an endpoint
URL.` |
| [2026-11-06
23:20](https://github.com/microsoft/aspire/actions/runs/42311290959/job/128230943448)
| **main** | VS Code extension E2E (Windows, tree-actions) | `Expected
e2e-worker to expose an endpoint URL.` |
| [2026-11-06
22:50](https://github.com/microsoft/aspire/actions/runs/42307718588/job/128210216707)
| `ellahathaway-stop-idle-extension-polling` | VS Code extension E2E
(Windows, tree-actions) | `Expected e2e-worker to expose an endpoint
URL.` |
| [2026-11-06
20:25](https://github.com/microsoft/aspire/actions/runs/42288258477/job/128147538335)
| **main** | VS Code extension E2E (Linux, tree-actions) | `Expected
e2e-worker to expose an endpoint URL.` |
| [2026-11-06
20:20](https://github.com/microsoft/aspire/actions/runs/42287581178/job/128143472756)
| `ellahathaway-clarify-agent-init-output` | VS Code extension E2E
(Windows, tree-actions) | `Expected e2e-worker to expose an endpoint
URL.` |

A strict re-scan of the job logs confirmed 34 of the 36 hits counted
above; the table lists only confirmed hits. The rates above use the
original count.

**Verdict: STRONG.** The most frequent signature here: 36 hits since
2026-11-05 (8 on main), still hitting today. 24 of the 25 PR hits that
were rerun passed on rerun, and all 8 main hits passed on the next main
run. The real-E2E before/after repro shows the exact CI assertion. The
PR's own CI is 1 run per OS. That is not statistical proof on its own:
at a 1.9% rate, ~160 clean runs are needed for 95% confidence.

<!-- /failure-stats -->

**Why:** the spec captures `e2e-worker` from the first snapshot where it
is `Running` and later reads its endpoint URL from that same object. DCP
activates the worker's endpoint shortly after the resource reaches
`Running`, and the backchannel omits inactive URLs, so the first
`Running` snapshot can have `urls: []`. The URL-bearing snapshot arrives
a few milliseconds later, but the spec never re-reads it. Since #21624,
the worker reaches `Running` after the extension's `describe --follow`
attaches, so this URL-less snapshot is now visible to the spec.

**Fix:** wait with the existing
`waitForRunningResourceWithUrl('e2e-worker', 'http:', 180000)` helper
(already used by the Azure Functions spec) instead of
`waitForResourceState('e2e-worker', ['Running'])`. This is a test-only
change, and the endpoint assertion is unchanged.

Fixes #21796

## Confidence

- **Real E2E, paired before/after (Linux, xvfb, real VS Code 1.130.0,
CLI/DCP/VSIX/NuGets from main CI run 42413947055):** a local-only CLI
wrapper delays the first URL-bearing `Running` `e2e-worker` line from
`describe --follow` by 5s. The 5s delay is well above the 200ms state
poll interval, so the URL-less snapshot is always observed.
- Before (spec on `origin/main`): **3/3 failed** (6 passing, 1 failing),
each with the exact CI assertion.
  - After (this PR): **3/3 passed** (7/7).
- **Natural (no injection) run with the fix:** 1/1 passed (7/7).
Locally, the URL-bearing `Running` snapshot followed the URL-less one by
2ms.
- **Other checks:** eslint on the spec, `tsc` for both
`tsconfig.e2e.json` and the unit project, and
`e2eResourceReadiness.test.ts` (9/9, run with mocha directly) all pass.
- **Not run locally:** the Windows `tree-actions` shard, other E2E
shards, and `vscode-test`-hosted unit tests (the VS Code download host
is blocked in my environment). CI covers these.

**How we stop this recurring:** E2E specs that read resource URLs should
wait on `waitForRunningResourceWithUrl` instead of a state-only
`Running` gate, because state and URL activation arrive as separate
snapshots.

Related: #21854 made the same change but was closed without being
merged.

## 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 (the change is to an E2E scenario test; the helper it uses
already has unit coverage)
  - [ ] 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 37d2680)
Mitch Denny (mitchdenny) pushed a commit that referenced this pull request Nov 10, 2026
…tions E2E (#21914)

## Description

The Linux and Windows `tree-actions` VS Code E2E shard fails with
`AssertionError: Expected e2e-worker to expose an endpoint URL.` in
*routes view, copy, endpoint, log, and resource commands through tree
handlers*. It is the most frequent flake since #21624. Examples: [run
41946839177 / job
126989027692](https://github.com/microsoft/aspire/actions/runs/41946839177/job/126989027692)
(Linux), [run 41967348150 / job
127053704182](https://github.com/microsoft/aspire/actions/runs/41967348150/job/127053704182)
(Windows, main), [run 41980257054 / job
127096573746](https://github.com/microsoft/aspire/actions/runs/41980257054/job/127096573746)
(Windows). #21796 lists more.

## 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 | `Expected e2e-worker to expose an endpoint URL.` |
| Job | VS Code extension E2E (Linux + Windows, tree-actions) |
| main pushes: hits / runs | 8 / 306 (2.61%) |
| main pushes, 30d: hits / runs | 8 / 530 (1.51%). The 16 days before
the 14d window add 0 hits. |
| PR runs: hits / runs | 28 / 1605 (1.74%); 0 PR-caused excluded |
| Combined rate | 36 / 1911 = **1.88%** |
| Flake check | main: next main run of the job passed 8/8; PR: 24/25
rerun hits passed on rerun (3 never rerun) |
| First / last hit | 2026-11-05 / 2026-11-08 |
| Still hitting main? | Yes, still active: last hit 2026-11-08; last
main hit 2026-11-07 |
| Fix evidence | Local real E2E: injected 5s delay 3/3 fail → 3/3 pass;
natural run 1/1 pass. This PR's CI: tree-actions Linux and Windows
passed 1/1 each. |

Failing attempt-1 jobs, most recent first (10 of 34 log-verified hits):

| Date (UTC) | Branch | Job | Signature excerpt |
|---|---|---|---|
| [2026-11-08
06:06](https://github.com/microsoft/aspire/actions/runs/42453400853/job/128650958075)
| `aspireagent/vscode-bridge-scoped-fake-timers` | VS Code extension E2E
(Windows, tree-actions) | `Expected e2e-worker to expose an endpoint
URL.` |
| [2026-11-08
05:17](https://github.com/microsoft/aspire/actions/runs/42450180289/job/128641295561)
| `darc-main-252ee2c2-deac-4980-a34a-b797f49158de` | VS Code extension
E2E (Windows, tree-actions) | `Expected e2e-worker to expose an endpoint
URL.` |
| [2026-11-08
04:40](https://github.com/microsoft/aspire/actions/runs/42447773687/job/128633232882)
| `aspireagent/doctor-cancel-dcp-cleanup` | VS Code extension E2E
(Windows, tree-actions) | `Expected e2e-worker to expose an endpoint
URL.` |
| [2026-11-08
04:32](https://github.com/microsoft/aspire/actions/runs/42447210418/job/128631545572)
| `aspireagent/resource-attach-proof-resume-aborted-inspection` | VS
Code extension E2E (Windows, tree-actions) | `Expected e2e-worker to
expose an endpoint URL.` |
| [2026-11-07
21:02](https://github.com/microsoft/aspire/actions/runs/42413947055/job/128538664400)
| **main** | VS Code extension E2E (Windows, tree-actions) | `Expected
e2e-worker to expose an endpoint URL.` |
| [2026-11-07
03:55](https://github.com/microsoft/aspire/actions/runs/42336149573/job/128297445902)
| `sebros/resources-compact-view-regression-4abee4` | VS Code extension
E2E (Windows, tree-actions) | `Expected e2e-worker to expose an endpoint
URL.` |
| [2026-11-06
23:20](https://github.com/microsoft/aspire/actions/runs/42311290959/job/128230943448)
| **main** | VS Code extension E2E (Windows, tree-actions) | `Expected
e2e-worker to expose an endpoint URL.` |
| [2026-11-06
22:50](https://github.com/microsoft/aspire/actions/runs/42307718588/job/128210216707)
| `ellahathaway-stop-idle-extension-polling` | VS Code extension E2E
(Windows, tree-actions) | `Expected e2e-worker to expose an endpoint
URL.` |
| [2026-11-06
20:25](https://github.com/microsoft/aspire/actions/runs/42288258477/job/128147538335)
| **main** | VS Code extension E2E (Linux, tree-actions) | `Expected
e2e-worker to expose an endpoint URL.` |
| [2026-11-06
20:20](https://github.com/microsoft/aspire/actions/runs/42287581178/job/128143472756)
| `ellahathaway-clarify-agent-init-output` | VS Code extension E2E
(Windows, tree-actions) | `Expected e2e-worker to expose an endpoint
URL.` |

A strict re-scan of the job logs confirmed 34 of the 36 hits counted
above; the table lists only confirmed hits. The rates above use the
original count.

**Verdict: STRONG.** The most frequent signature here: 36 hits since
2026-11-05 (8 on main), still hitting today. 24 of the 25 PR hits that
were rerun passed on rerun, and all 8 main hits passed on the next main
run. The real-E2E before/after repro shows the exact CI assertion. The
PR's own CI is 1 run per OS. That is not statistical proof on its own:
at a 1.9% rate, ~160 clean runs are needed for 95% confidence.

<!-- /failure-stats -->

**Why:** the spec captures `e2e-worker` from the first snapshot where it
is `Running` and later reads its endpoint URL from that same object. DCP
activates the worker's endpoint shortly after the resource reaches
`Running`, and the backchannel omits inactive URLs, so the first
`Running` snapshot can have `urls: []`. The URL-bearing snapshot arrives
a few milliseconds later, but the spec never re-reads it. Since #21624,
the worker reaches `Running` after the extension's `describe --follow`
attaches, so this URL-less snapshot is now visible to the spec.

**Fix:** wait with the existing
`waitForRunningResourceWithUrl('e2e-worker', 'http:', 180000)` helper
(already used by the Azure Functions spec) instead of
`waitForResourceState('e2e-worker', ['Running'])`. This is a test-only
change, and the endpoint assertion is unchanged.

Fixes #21796

## Confidence

- **Real E2E, paired before/after (Linux, xvfb, real VS Code 1.130.0,
CLI/DCP/VSIX/NuGets from main CI run 42413947055):** a local-only CLI
wrapper delays the first URL-bearing `Running` `e2e-worker` line from
`describe --follow` by 5s. The 5s delay is well above the 200ms state
poll interval, so the URL-less snapshot is always observed.
- Before (spec on `origin/main`): **3/3 failed** (6 passing, 1 failing),
each with the exact CI assertion.
  - After (this PR): **3/3 passed** (7/7).
- **Natural (no injection) run with the fix:** 1/1 passed (7/7).
Locally, the URL-bearing `Running` snapshot followed the URL-less one by
2ms.
- **Other checks:** eslint on the spec, `tsc` for both
`tsconfig.e2e.json` and the unit project, and
`e2eResourceReadiness.test.ts` (9/9, run with mocha directly) all pass.
- **Not run locally:** the Windows `tree-actions` shard, other E2E
shards, and `vscode-test`-hosted unit tests (the VS Code download host
is blocked in my environment). CI covers these.

**How we stop this recurring:** E2E specs that read resource URLs should
wait on `waitForRunningResourceWithUrl` instead of a state-only
`Running` gate, because state and URL activation arrive as separate
snapshots.

Related: #21854 made the same change but was closed without being
merged.

## 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 (the change is to an E2E scenario test; the helper it uses
already has unit coverage)
  - [ ] 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 37d2680)
Mitch Denny (mitchdenny) pushed a commit that referenced this pull request Nov 10, 2026
…tions E2E (#21914)

## Description

The Linux and Windows `tree-actions` VS Code E2E shard fails with
`AssertionError: Expected e2e-worker to expose an endpoint URL.` in
*routes view, copy, endpoint, log, and resource commands through tree
handlers*. It is the most frequent flake since #21624. Examples: [run
41946839177 / job
126989027692](https://github.com/microsoft/aspire/actions/runs/41946839177/job/126989027692)
(Linux), [run 41967348150 / job
127053704182](https://github.com/microsoft/aspire/actions/runs/41967348150/job/127053704182)
(Windows, main), [run 41980257054 / job
127096573746](https://github.com/microsoft/aspire/actions/runs/41980257054/job/127096573746)
(Windows). #21796 lists more.

## 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 | `Expected e2e-worker to expose an endpoint URL.` |
| Job | VS Code extension E2E (Linux + Windows, tree-actions) |
| main pushes: hits / runs | 8 / 306 (2.61%) |
| main pushes, 30d: hits / runs | 8 / 530 (1.51%). The 16 days before
the 14d window add 0 hits. |
| PR runs: hits / runs | 28 / 1605 (1.74%); 0 PR-caused excluded |
| Combined rate | 36 / 1911 = **1.88%** |
| Flake check | main: next main run of the job passed 8/8; PR: 24/25
rerun hits passed on rerun (3 never rerun) |
| First / last hit | 2026-11-05 / 2026-11-08 |
| Still hitting main? | Yes, still active: last hit 2026-11-08; last
main hit 2026-11-07 |
| Fix evidence | Local real E2E: injected 5s delay 3/3 fail → 3/3 pass;
natural run 1/1 pass. This PR's CI: tree-actions Linux and Windows
passed 1/1 each. |

Failing attempt-1 jobs, most recent first (10 of 34 log-verified hits):

| Date (UTC) | Branch | Job | Signature excerpt |
|---|---|---|---|
| [2026-11-08
06:06](https://github.com/microsoft/aspire/actions/runs/42453400853/job/128650958075)
| `aspireagent/vscode-bridge-scoped-fake-timers` | VS Code extension E2E
(Windows, tree-actions) | `Expected e2e-worker to expose an endpoint
URL.` |
| [2026-11-08
05:17](https://github.com/microsoft/aspire/actions/runs/42450180289/job/128641295561)
| `darc-main-252ee2c2-deac-4980-a34a-b797f49158de` | VS Code extension
E2E (Windows, tree-actions) | `Expected e2e-worker to expose an endpoint
URL.` |
| [2026-11-08
04:40](https://github.com/microsoft/aspire/actions/runs/42447773687/job/128633232882)
| `aspireagent/doctor-cancel-dcp-cleanup` | VS Code extension E2E
(Windows, tree-actions) | `Expected e2e-worker to expose an endpoint
URL.` |
| [2026-11-08
04:32](https://github.com/microsoft/aspire/actions/runs/42447210418/job/128631545572)
| `aspireagent/resource-attach-proof-resume-aborted-inspection` | VS
Code extension E2E (Windows, tree-actions) | `Expected e2e-worker to
expose an endpoint URL.` |
| [2026-11-07
21:02](https://github.com/microsoft/aspire/actions/runs/42413947055/job/128538664400)
| **main** | VS Code extension E2E (Windows, tree-actions) | `Expected
e2e-worker to expose an endpoint URL.` |
| [2026-11-07
03:55](https://github.com/microsoft/aspire/actions/runs/42336149573/job/128297445902)
| `sebros/resources-compact-view-regression-4abee4` | VS Code extension
E2E (Windows, tree-actions) | `Expected e2e-worker to expose an endpoint
URL.` |
| [2026-11-06
23:20](https://github.com/microsoft/aspire/actions/runs/42311290959/job/128230943448)
| **main** | VS Code extension E2E (Windows, tree-actions) | `Expected
e2e-worker to expose an endpoint URL.` |
| [2026-11-06
22:50](https://github.com/microsoft/aspire/actions/runs/42307718588/job/128210216707)
| `ellahathaway-stop-idle-extension-polling` | VS Code extension E2E
(Windows, tree-actions) | `Expected e2e-worker to expose an endpoint
URL.` |
| [2026-11-06
20:25](https://github.com/microsoft/aspire/actions/runs/42288258477/job/128147538335)
| **main** | VS Code extension E2E (Linux, tree-actions) | `Expected
e2e-worker to expose an endpoint URL.` |
| [2026-11-06
20:20](https://github.com/microsoft/aspire/actions/runs/42287581178/job/128143472756)
| `ellahathaway-clarify-agent-init-output` | VS Code extension E2E
(Windows, tree-actions) | `Expected e2e-worker to expose an endpoint
URL.` |

A strict re-scan of the job logs confirmed 34 of the 36 hits counted
above; the table lists only confirmed hits. The rates above use the
original count.

**Verdict: STRONG.** The most frequent signature here: 36 hits since
2026-11-05 (8 on main), still hitting today. 24 of the 25 PR hits that
were rerun passed on rerun, and all 8 main hits passed on the next main
run. The real-E2E before/after repro shows the exact CI assertion. The
PR's own CI is 1 run per OS. That is not statistical proof on its own:
at a 1.9% rate, ~160 clean runs are needed for 95% confidence.

<!-- /failure-stats -->

**Why:** the spec captures `e2e-worker` from the first snapshot where it
is `Running` and later reads its endpoint URL from that same object. DCP
activates the worker's endpoint shortly after the resource reaches
`Running`, and the backchannel omits inactive URLs, so the first
`Running` snapshot can have `urls: []`. The URL-bearing snapshot arrives
a few milliseconds later, but the spec never re-reads it. Since #21624,
the worker reaches `Running` after the extension's `describe --follow`
attaches, so this URL-less snapshot is now visible to the spec.

**Fix:** wait with the existing
`waitForRunningResourceWithUrl('e2e-worker', 'http:', 180000)` helper
(already used by the Azure Functions spec) instead of
`waitForResourceState('e2e-worker', ['Running'])`. This is a test-only
change, and the endpoint assertion is unchanged.

Fixes #21796

## Confidence

- **Real E2E, paired before/after (Linux, xvfb, real VS Code 1.130.0,
CLI/DCP/VSIX/NuGets from main CI run 42413947055):** a local-only CLI
wrapper delays the first URL-bearing `Running` `e2e-worker` line from
`describe --follow` by 5s. The 5s delay is well above the 200ms state
poll interval, so the URL-less snapshot is always observed.
- Before (spec on `origin/main`): **3/3 failed** (6 passing, 1 failing),
each with the exact CI assertion.
  - After (this PR): **3/3 passed** (7/7).
- **Natural (no injection) run with the fix:** 1/1 passed (7/7).
Locally, the URL-bearing `Running` snapshot followed the URL-less one by
2ms.
- **Other checks:** eslint on the spec, `tsc` for both
`tsconfig.e2e.json` and the unit project, and
`e2eResourceReadiness.test.ts` (9/9, run with mocha directly) all pass.
- **Not run locally:** the Windows `tree-actions` shard, other E2E
shards, and `vscode-test`-hosted unit tests (the VS Code download host
is blocked in my environment). CI covers these.

**How we stop this recurring:** E2E specs that read resource URLs should
wait on `waitForRunningResourceWithUrl` instead of a state-only
`Running` gate, because state and URL activation arrive as separate
snapshots.

Related: #21854 made the same change but was closed without being
merged.

## 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 (the change is to an E2E scenario test; the helper it uses
already has unit coverage)
  - [ ] 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 37d2680)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci-health Fixes CI flakiness or CI infrastructure (AspireAgent queue) needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants