You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fixes#21621. Part of the flake-zero effort in #21600.
Problem. In #21621 (VS Code Windows browser-debugger E2E), standalone-gateway goes FailedToStart right after the coordinated build __dotnet-project-build-2 exits non-zero. Frequency over 7 days: 3 of 192 browser-debugger jobs, including 1 of 20 main runs. The real build error was not visible anywhere, so this PR first makes it visible and then fixes it.
Root cause. The diagnostics added in this PR captured the real error on this PR's own CI (run 41260248165, artifact extension-e2e-diagnostics-win-x64-browser-debugger-attempt1):
[FAIL] [AppHost/DotnetProjectBuildCoordinator] The coordinated .NET build failed with exit code 1 ... __dotnet-project-build-2
Microsoft.NET.Sdk.WebAssembly.Browser.targets(532,5): error : Source file 'C:\Users\...\HostedPerPage.Client\obj\Debug\net11.0\_framework\HostedPerPage.Client.cr0442jzk4.pdb' does not exist for framework asset materialization. [c:\Users\...\HostedPerPage.Client.csproj]
The error path uses C:\, but the project path uses c:\.
The coordinated build's paths come from the AppHost directory. That directory comes from the AppHostProjectPath metadata, which keeps whatever spelling the AppHost was built with. Under VS Code on Windows, that spelling can be the lowercase drive letter c:\.
In the static web assets SDK, DefineStaticWebAssets.ComputeCandidateIdentity checks candidateFullPath.StartsWith(contentRoot) with case-sensitive (ordinal) comparison. When the casing differs, the SDK builds an identity from the content root plus _framework/<name>.<fingerprint>.pdb. That file doesn't exist, so MaterializeFrameworkAsset fails the Blazor WebAssembly client build.
Correlation. I compared the drive-letter casing of __dotnet-project-build-2 (dotnet build <c|C>:\...\projects.<hash>.proj -mt) against the outcome in Windows browser-debugger E2E runs:
Build 2 drive letter
Runs
FailedToStart
lowercase c:\
4
4
uppercase C:\
13
0
Fix.
Root cause:DotnetProjectBuildResource now resolves the on-disk casing of every path it gives MSBuild: the working directory, build directory, project paths and step working directories. That casing also reaches the launched project's path. Directories that don't exist yet are resolved from their deepest existing ancestor. The fix doesn't resolve symlinks, so the existing symlink-spelling behavior is unchanged. On case-insensitive file systems, case-variant spellings of one project still deduplicate to one entry, but that entry now uses the on-disk spelling instead of the first caller's spelling. CaseVariantProjectPathsFollowFilesystemIdentity was updated to assert this.
Diagnostics: when the coordinated build fails:
The coordinator reads the build output, bounded to 10s and best-effort.
It extracts the MSBuild error lines, or the last 20 output lines if there are none.
It appends them to the dependent's exception and logs them once per build attempt to the AppHost logger, so they reach CLI logs and the E2E artifacts.
It keeps a log subscriber from build start until the build settles, so DCP drains the final output before the terminal state.
Evidence
Regression tests in DotnetProjectBuildCoordinatorTests:
The full DotnetProjectBuildCoordinatorTests class passes on Linux: 128 passed, 1 skipped (the casing test is skipped because Linux file systems are case-sensitive).
Real DCP (playground/DotnetProject AppHost with a compile error injected):
Before, on main: 0 console lines about the build failure.
After: exactly 1fail: Aspire.Hosting.Dotnet.DotnetProjectBuildCoordinator record, containing Greeter.cs(13,78): error CS0103: The name 'NotAType' does not exist in the current context.
E2E: the Windows browser-debugger E2E job on this PR is the functional check; see the CI results.
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
Did you add public API?
No
Does the change make any security assumptions or guarantees?
When the coordinated `dotnet build` fails, dependents fail with
"See resource '__dotnet-project-build' for build output." but the build
output only lives in the hidden build resource's console log. CLI logs,
E2E artifacts and the dependent's error never contain the actual MSBuild
error, which made #21621 undiagnosable.
On failure, read the build resource's console output (best effort,
bounded), include the MSBuild error lines (or the last 20 lines when no
error line is present) in the dependent's DistributedApplicationException
and log the failure once to the AppHost logger.
Contributes to #21621.
Co-authored-by: Copilot <[email protected]>
The reason will be displayed to describe this comment to others. Learn more.
🟡 Changes recommended
Build diagnostics can miss late compiler errors after terminal notification, while shared-build failures redundantly download and parse the full log for every dependent.
Surfaces coordinated .NET build failures in dependent resource exceptions and AppHost logs, helping diagnose #21621 without claiming to fix its underlying cause.
Changes:
Adds bounded, best-effort output collection with timestamp removal, deduplicated errors, and a tail fallback.
Logs failures once per settled build snapshot.
Adds regression tests for error reporting, tail selection, and unavailable logs.
Address review feedback: read the failed build's output once per build attempt
and keep a log subscriber on the build resource from start until it settles so
DCP drains final compiler output before publishing the terminal state.
Co-authored-by: Copilot <[email protected]>
The reason will be displayed to describe this comment to others. Learn more.
🔵 Needs a closer look
A metadata-only update can change the shared-task cache key without a new build, causing dependents to download logs again and emit duplicate AppHost errors for the same failed attempt.
No open issues 🎉
1 previously missed issue
In code that hasn't changed since last review
Key shared build tasks by build-attempt generation
A metadata-only update can replace the settled snapshot without starting a new build: ResourceHealthCheckService.FireResourceReadyEvent publishes such an update after its asynchronous callback completes, even if the build has since finished. Dependents waiting before and after that update use different cache keys, so the same failed attempt can trigger another log download and AppHost error. Key the shared task by resource and build-attempt generation instead, and add a regression test with a metadata-only update between dependent waits.
The AppHost directory can carry a lowercase drive letter (VS Code on Windows).
The static web assets SDK compares content roots ordinally, so mixed casing makes
Blazor WebAssembly builds synthesize nonexistent framework asset paths and fail.
Resolve on-disk casing for all paths handed to the coordinated build.
Fixes#21621
Co-authored-by: Copilot <[email protected]>
David Fowler (davidfowl)
changed the title
Surface coordinated .NET build errors in AppHost logs
Fix coordinated .NET build path casing that breaks Blazor WebAssembly builds
Nov 1, 2026
The reason will be displayed to describe this comment to others. Learn more.
🟡 Changes recommended
The existing CaseVariantProjectPathsFollowFilesystemIdentity theory expects input-path casing and fails on case-insensitive filesystems because normalization now returns the on-disk spelling.
The reason will be displayed to describe this comment to others. Learn more.
🟡 Changes recommended
Path canonicalization breaks coordinator tests with lowercase %TEMP% drive letters, while startup failure reporting, Unicode path consistency, and failure-log retention also have unresolved defects.
- Resolve combined case + Unicode normalization aliases in PathNormalizer.
- Reconcile a file app's metadata path and default working directories when
the source file is created after registration.
- Start the shared failure report when the build resource stops, so
explicit-start projects without dependents still log the AppHost summary.
- Keep the newest build output tail by DCP timestamp instead of delivery order.
- Resolve fixture root casing in tests that compare build working directories.
Co-authored-by: Copilot <[email protected]>
The reason will be displayed to describe this comment to others. Learn more.
🟡 Changes recommended
A restart from an earlier ResourceStoppedEvent handler can cache an old failure under the new attempt, causing a failed retry to report the wrong exit code and suppress its own summary.
An earlier ResourceStoppedEvent handler can restart the build before the
coordinator's handler runs, advancing the attempt. Read the attempt before
the current snapshot and report only when that snapshot is still a settled
failure, so a stale stop never caches the old exit code for the new attempt.
Co-authored-by: Copilot <[email protected]>
Tested at: 2026-11-03, completed at approximately 17:08 UTC
Local environment: macOS arm64, case- and Unicode-normalization-insensitive filesystem, .NET SDK 11.0.100-rc.2.26504.105
Result: the PR-specific scenarios passed on the latest head. The local coordinator suite still has two failures that reproduce identically before this PR; those failures are reported below, not counted as passes.
The earlier, pre-pause results at f18d0cb6 are not being used as validation of the updated implementation. The coordinator suite, affected shared-path tests, supplementary boundary tests, and dogfood scenarios were run again for fbe4088e.
Artifact Version Verification
Item
Observed identity
Result
Isolated source checkout
fbe4088ea48139044e9963197d2f024d42aefd6b
Verified
Installed native CLI
17.0.0-pr.21623.gfbe4088e
Verified with the installed binary's --version
Hosting packages and AppHost SDK in the downloaded PR hive
Result: installation succeeded. The installer reported the actual executable at cli-latest/dogfood/pr-21623/bin/aspire; that executable, rather than a global aspire, was used throughout.
No CLI version, channel, or commit identity override was supplied. The NuGet service-index override was used only to route public packages through the approved proxy.
Hosting build coordination, path spelling, and failure diagnostics.
Shared path normalization used by the CLI and hosting.
Regression tests, including the review fixes for chronological output tails, explicit-start resources, stopped-event/restart races, and file apps created after registration.
No dashboard, template, client integration, extension, or CI infrastructure files changed.
Test Scenarios Executed
1. Latest-head coordinator regression suite
Objective: exercise coordinated builds, on-disk path casing, duplicate project identity, file-app aliases and rebuilds, diagnostic sharing, cancellation, retry generations, and the newly added review-fix regressions.
Status:153 passed, 2 failed, 0 skipped. Every changed/new PR regression case passed. The two failures are the pre-existing cold-restore cases described in the baseline comparison.
From the physical path of the isolated PR checkout:
ResolveToFilesystemPath_ResolvesCombinedCaseAndNormalizationAlias executed and passed. The skips cover Windows-only behavior or filesystem distinctions that cannot be represented on this local filesystem.
3. Supplementary diagnostic boundary and shutdown tests
Objective: verify the exact limits and failure behavior, rather than only testing that some output is present.
Four temporary test cases were added only in the isolated checkout, run against the unchanged latest-head product source, then removed. Their patch is retained as evidence.
Verified exactly 20 reported lines, 1,000 characters per line, timestamp-stripped duplicate error suppression, output-tail fallback, preservation of partial diagnostics after the 10-second read timeout, and cancellation on application shutdown. The timeout case completed in approximately 10.07 seconds.
4. Real Blazor WebAssembly build through case-variant paths
Objective: exercise the actual dogfood hosting package and DCP with a fresh Blazor WebAssembly application, including the static-framework asset materialization affected by the original bug.
The AppHost deliberately used cASEsMOKElATEST as its project-directory spelling and registered one project through hOSTEDcASE/hOSTEDcASE/hOSTEDcASE.CSPROJ. A second resource registered the same project with its normal spelling.
Both launch paths and working directories used the on-disk HostedCase spelling.
The generated traversal contained exactly one ProjectFile entry for the two aliases.
Build output contained Build succeeded.
The materialized client PDB existed under obj/Debug/net11.0/fx/HostedCase.Client/_framework/.
The home page and the fingerprinted Blazor script advertised by that page returned HTTP 200; the script response contained 245,494 bytes.
Fixture correction: disabling launch profiles initially left the generated Blazor service in Production, where development-only static assets returned HTTP 500. Only the temporary fixture was corrected to restore ASPNETCORE_ENVIRONMENT=Development, as a normal Blazor launch profile would. The full HTTP/static-asset check then passed; no product code was changed.
5. Real compiler failure, repeated failure, and recovery
Objective: verify diagnostics reach the AppHost once per failed attempt, both dependent resources fail safely, and cached diagnostics do not prevent later recovery.
A separate fresh PR AppHost and ASP.NET worker were created. Two resources referenced the same worker project. Dashboard and resource-log forwarding were disabled; no live build-output subscription was opened before inspecting the diagnostic result.
Expected unhappy-path result: an injected undefined symbol must prevent startup and produce a nonzero wait result with useful compiler diagnostics.
Observed:wait returned exit code 18 and reported FailedToStart. Both worker-a and worker-b were FailedToStart. The AppHost log contained error CS0103 and the marker Pr21623AttemptOne, with exactly one coordinator failure record.
The source was changed to a different undefined symbol, then the existing build resource was started again:
Status:passed. Both workers became healthy and returned HTTP 200 with the exact body Pr21623Recovered. The coordinator failure-record count remained two, with no stale failure on the successful attempt.
6. Real explicit-start resource with no dependent waiter
Objective: verify the review fix reports a failed coordinated build even when the only project uses WithExplicitStart() and nobody waits for it to launch.
A third fresh PR AppHost used an intentionally broken worker marked WithExplicitStart(). Dashboard and resource-log forwarding were disabled.
Status:passed; commands exited 0. The worker remained NotStarted, the coordinated build finished unsuccessfully, and the AppHost emitted exactly one coordinator failure record containing CS0103 and Pr21623ExplicitStartError. No dependent-start or dependent-wait operation was invoked.
CoordinatedBuildPathsUseOnDiskCasing, chronological output-tail reporting, explicit-start diagnostics, and stopped-event/restart handling all executed and passed.
Windows browser debugger:job 125659705076, artifact extension-e2e-diagnostics-win-x64-browser-debugger-attempt1.
Parsed the actual mocha.json: 8 passed, 0 failures, 0 pending.
Managed breakpoints were hit for standalone, hosted-global, and hosted-per-page Blazor scenarios.
Missing/outdated C# debugger extension error cases also passed.
Status:passed. These results belong to the latest-head CI run, not the pre-pause run.
Baseline result: exit code 2, both cases failed with the same missing-nuspec error. The latest PR suite reproduces those same failures. Their underlying local cause was not investigated further because the behavior predates this PR; they are not reported as new regressions.
Combined case/normalization alias executed and passed
Supplementary boundaries
4 passed
Exact caps, deduplication, timeout, shutdown
Real case-variant Blazor build
Passed
One traversal entry, two healthy resources, materialized PDB and HTTP assets
Real failure/retry/recovery
Passed
One log record per failed attempt; both dependents recover in place
Real explicit-start failure
Passed
Diagnostic emitted with no dependent waiter
Windows hosting
471 passed, 7 skipped
Includes 148 passing coordinator cases
Windows browser debugger
8 passed
Actual Mocha results, including the original hosted-per-page scenario
Environment and Cleanup
All new AppHosts were created with the latest PR CLI in a temporary directory, using the downloaded PR hive and explicit package version.
Generated-app commands were configured to use the PR hive, https://packagefeedproxy.microsoft.io/nuget/v3/index.json, and approved dnceng feeds. Source tests used the repository's existing approved feed configuration. No vanilla NuGet feed was required.
No npm or PyPI dependencies were required. No containers were needed; Podman was selected as the container runtime for AppHost commands.
A machine-proposed configuration source was explicitly declined with --use-config-source false; the tests used standard generated Aspire configuration.
No repository NuGet.config, global.json, package manifests, or product files were modified.
All three test AppHosts were stopped using their exact paths. The isolated SDK build servers were shut down, and no test AppHosts remained in aspire ps.
The temporary source and baseline worktrees, CLI installation, generated applications, and downloaded diagnostic workspaces were removed.
Session evidence is retained. Resource environment credentials were omitted from retained snapshots and dashboard login tokens were redacted.
No product changes were committed or pushed.
Overall Result
PR-specific behavior verified on fbe4088ea48139044e9963197d2f024d42aefd6b; no new PR-specific failure found.
The two unchanged local cold-restore failures remain a separate caveat. This was targeted validation, not a full-repository test run; Windows execution was validated from the latest CI artifacts rather than a local Windows host.
docs_optional → bug_fix_restores_documented_behavior. No signals triggered (signal_count 0). The PR normalizes path casing passed to MSBuild in the coordinated .NET build, fixing intermittent Blazor WebAssembly build failures on Windows. It adds no new public surface, options, or strings, so no docs change is needed.
)
## 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]>
)
## 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)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ci-healthFixes CI flakiness or CI infrastructure (AspireAgent queue)needs-area-labelAn area label is needed to ensure this gets routed to the appropriate area owners
3 participants
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Fixes #21621. Part of the flake-zero effort in #21600.
Problem. In #21621 (VS Code Windows
browser-debuggerE2E),standalone-gatewaygoesFailedToStartright after the coordinated build__dotnet-project-build-2exits non-zero. Frequency over 7 days: 3 of 192browser-debuggerjobs, including 1 of 20 main runs. The real build error was not visible anywhere, so this PR first makes it visible and then fixes it.Root cause. The diagnostics added in this PR captured the real error on this PR's own CI (run 41260248165, artifact
extension-e2e-diagnostics-win-x64-browser-debugger-attempt1):The error path uses
C:\, but the project path usesc:\.AppHostProjectPathmetadata, which keeps whatever spelling the AppHost was built with. Under VS Code on Windows, that spelling can be the lowercase drive letterc:\.DefineStaticWebAssets.ComputeCandidateIdentitycheckscandidateFullPath.StartsWith(contentRoot)with case-sensitive (ordinal) comparison. When the casing differs, the SDK builds an identity from the content root plus_framework/<name>.<fingerprint>.pdb. That file doesn't exist, soMaterializeFrameworkAssetfails the Blazor WebAssembly client build.Correlation. I compared the drive-letter casing of
__dotnet-project-build-2(dotnet build <c|C>:\...\projects.<hash>.proj -mt) against the outcome in Windowsbrowser-debuggerE2E runs:FailedToStartc:\C:\Fix.
DotnetProjectBuildResourcenow resolves the on-disk casing of every path it gives MSBuild: the working directory, build directory, project paths and step working directories. That casing also reaches the launched project's path. Directories that don't exist yet are resolved from their deepest existing ancestor. The fix doesn't resolve symlinks, so the existing symlink-spelling behavior is unchanged. On case-insensitive file systems, case-variant spellings of one project still deduplicate to one entry, but that entry now uses the on-disk spelling instead of the first caller's spelling.CaseVariantProjectPathsFollowFilesystemIdentitywas updated to assert this.errorlines, or the last 20 output lines if there are none.Evidence
Regression tests in
DotnetProjectBuildCoordinatorTests:CoordinatedBuildPathsUseOnDiskCasing(Windows/macOS; casing-insensitive file systems)Expected: "C:\\Users\\runneradmin..." Actual: "c:\\Users\\runneradmin..."(job)FailedCoordinatedBuildReportsBuildErrorsToDependentsAndAppHostLogOnceNot found: "/src/Api/Program.cs(3,1): error CS1002..."FailedCoordinatedBuildWithoutErrorLinesReportsBuildOutputTailNot found: "build output line 05"FailedCoordinatedBuildStillFailsDependentWhenBuildOutputIsUnavailable(guards the fallback)CoordinatedBuildKeepsOutputSubscribedUntilBuildSettles(review feedback)Assert.True() FailureThe full
DotnetProjectBuildCoordinatorTestsclass passes on Linux: 128 passed, 1 skipped (the casing test is skipped because Linux file systems are case-sensitive).Real DCP (
playground/DotnetProjectAppHost with a compile error injected):fail: Aspire.Hosting.Dotnet.DotnetProjectBuildCoordinatorrecord, containingGreeter.cs(13,78): error CS0103: The name 'NotAType' does not exist in the current context.E2E: the Windows
browser-debuggerE2E job on this PR is the functional check; see the CI results.Checklist
🤖 Posted by AspireAgent (AI Agent)