Repository navigation
Ignore inspection requests aborted by the resource attach proof's own continue - #21911
Conversation
… continue VS Code's Variables view inspects the stopped frame while the attach proof resumes the debuggee with a custom continue request. vsdbg then fails the in-flight request with 'Evaluation aborted.', which the proof reported as an adapter failure. Track stackTrace/scopes/variables/evaluate requests that were pending when the adapter received the proof's continue (or sent before the next stop) and keep their failures out of debugAdapterResponses; they are still returned as resumeInterruptedInspectionResponses for diagnostics. Fixes #21777 Refs #21411 Co-authored-by: Copilot <[email protected]>
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 21911Or
iex "& { $(irm https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 21911" |
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
🟡 Changes recommended
The wildcard tracker can hide unrelated sessions’ inspection failures, so classification must be scoped to the attached session’s proof-triggered continue and covered by a cross-session regression test.
1 open issue
What changed in this PR
This PR addresses #21777 by separating inspection failures associated with debugger resume from other adapter failures in the VS Code resource-attach E2E proof.
Changes:
- Adds per-session tracking of inspection requests pending at resume or sent before the next stop.
- Records classified failures in separate diagnostics while preserving the existing failure assertion.
- Adds six unit tests covering request ordering, subsequent stops, non-inspection failures, and session isolation.
| File | Description |
|---|---|
| extension/src/testing/resumeInterruptedInspectionRequests.ts | Tracks inspection requests and classifies resume-interrupted failures. |
| extension/src/testing/e2eStateFileBridge.ts | Integrates tracking and records separate diagnostics. |
| extension/src/test/resumeInterruptedInspectionRequests.test.ts | Tests classification and failures that must remain reported. |
Review effort: Balanced
|
Retrying the failed CI jobs for this pull request from the CI run attempt. The rerun is being tracked in the rerun attempt. |
|
Retrying the failed CI jobs for this pull request from the CI run attempt. The rerun is being tracked in the rerun attempt. |
Arm the tracker for the attached session immediately before the proof sends continue, so a continue from any other session or caller cannot hide failures. Co-authored-by: Copilot <[email protected]>
This comment has been minimized.
This comment has been minimized.
|
Retrying the failed CI jobs for this pull request from the CI run attempt. The rerun is being tracked in the rerun attempt. |
Ella Hathaway (ellahathaway)
left a comment
There was a problem hiding this comment.
I reviewed the attach proof's detach sequence, the new interrupted-inspection classifier and its wiring in the E2E bridge, the unit tests, and the four failed runs behind #21777. Every failure is the same Variables request on the custom-output worker failing with 'Evaluation aborted.' after the proof's own continue. I don't think this hides a product failure: the proof still checks attach, breakpoint binding, the continue, both resource responses, detach, and termination, and the exemption only covers inspection requests in the proof's resume window. I left 2 nonblocking notes, one on a cited failure mode the runs don't show and one on making the exemption visible so the inferred ordering can be confirmed.
|
AspireAgent stopped: both review threads are answered and CI is green; waiting on re-review. 🤖 Posted by AspireAgent (AI Agent) |
The resume classifier now returns why it ignored a failed inspection response (pending at the proof's continue, or sent after it) and that continue's request seq. The bridge stores this on each entry in resumeInterruptedInspectionResponses, and the resource-debug E2E logs the array when it is nonempty, so a passing run shows when the exemption fired. The post-continue case is described as defensive: every observed failure (#21777) is a pending variables request failing with 'Evaluation aborted.'. Co-authored-by: Copilot <[email protected]>
Tests selector0 / 101 PR test projects · 2 PR jobs, from 4 changed files. Selected PR test projects (0 / 101)none — no PR-gated .NET test projects run for this change. Selected PR jobs (2)
How these were chosen — grouped by what changedJob reasons
Selection computed for commit |
There was a problem hiding this comment.
Warning
Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.
Copilot review overview
4 open issues
This logsJSON.stringify(proof.resumeInterruptedInspectionResponses)on passing runs. Those… · New Session state is never cleared fromthis.sessions, andpendingInspectionRequests/… · New Session state is never cleared fromthis.sessions, andpendingInspectionRequests/… · New Session state is never cleared fromthis.sessions, andpendingInspectionRequests/… · New
Review effort: Lite
|
Retrying the failed CI jobs for this pull request from the CI run attempt. The rerun is being tracked in the rerun attempt. |
#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]>
|
AspireAgent stopped: it answered and resolved all four review threads without code changes, and Final Results is green. 🤖 Posted by AspireAgent (AI Agent) |

Description
What failed:
Aspire resource debug language model tool E2E attaches packaged .NET and Go debuggers, hits breakpoints, detaches, and tears down(VS Code extension E2E, Windowsresource-debug-tools) failed on main in run 41932442823 with a failedvariablesresponse,'Evaluation aborted.'(request_seq 13), inproof.debugAdapterResponses. All four failing jobs (listed below) show the same signature: VS Code'svariablesrequest one2e-custom-output-workerfailing with'Evaluation aborted.'. Every rerun passed.Why: when the attach proof stops at its breakpoint, VS Code's Variables/Call Stack views inspect the stopped frame. The proof then resumes with its own
customRequest('continue'), which bypasses VS Code's thread model. vsdbg aborts the inspection requests still in flight. The failing job's diagnostics had no DAP request trace, so this ordering is inferred fromrequest_seq, not traced. The harness counted these as adapter failures, so the test failed even though attach, the breakpoint, detach and teardown all worked.Fix: a small tracker (
extension/src/testing/resumeInterruptedInspectionRequests.ts) watches the attach proof's DAP stream. The proof arms it immediately before sending its owncontinueto the attached session. A failedstackTrace/scopes/variables/evaluateresponse is classified as resume-interrupted only if its request was still pending when the adapter received thatcontinue(the observed #21777 case), or was sent after it and before the nextstoppedevent (defensive; no CI run has shown this yet). Those responses move to a separateresumeInterruptedInspectionResponsesarray. Each entry records why it was classified (pendingAtProofContinueorsentAfterProofContinue) and the proofcontinue's request seq. The proof returns this array on success, and the resource-debug E2E logs it when it is nonempty, so a passing run shows when the exemption fired. Every other failure stays indebugAdapterResponses, and the test'sdeepStrictEqual(..., [])assertion is unchanged. This includes inspection failures while the thread is still stopped, failures after a later stop, non-inspection failures such ascontinue/setBreakpoints, failures in other sessions, and failures after anycontinuethe proof did not send.Fixes #21777
Refs #21411 (the original resource-debug-tools issue; it has since been retitled to track a different Java failure)
Confidence
resumeInterruptedInspectionRequests.test.tsreplays the DAP sequence from the failing job, asserts the recorded classification for each ignored response, and covers the edge cases that must still be reported.onResponsealways returnsfalse), 2/7 tests fail: the CIvariables"Evaluation aborted." sequence and the defensive post-continuescopessequence. With the fix, 7/7 pass. With the proof-continue gating removed, the "continue the proof did not send" case fails. The existingattachedResourceDetachSequencesuite (5 tests) also passes.tsc -p .andtsc -p tsconfig.e2e.jsoncompile; eslint on the changed files is clean.vscode-testunit run. CI covers both. The failing job's diagnostics had no DAP request trace, so the exact request ordering comes from the response (request_seq 13/15, before the proof's continue), not from a trace. The new classification logging will show the ordering directly if the exemption fires in CI.How we stop this recurring: the proof now distinguishes between failures its own resume causes and real adapter failures, so new VS Code view requests at a stop can't make the proof fail again.
Failure stats (14d, attempt 1)
CIworkflow on microsoft/aspire, runs created 2026-10-25 06:28 → 2026-11-08 06:28 UTC, attempt 1 only. Denominator: attempt-1 jobs that ran (success or failure). Hits: the failed job's log matches the signature. Jobs that lost their runner, which have no log, are excluded. Main runs have no reruns, so their flake check is the next main run of the job.attaches packaged .NET and Go debuggers…failingdebugAdapterResponseswithvariables→Evaluation aborted.ea0992e2: CI green (Final Results pass); the Windows resource-debug-tools job passed 2/2 attempts there (plus 3/3 on an earlier commit). Current head: see checksFailing runs (all 4 hits, same excerpt in each log:
AssertionError: Expected values to be strictly deep-equal→{ command: 'variables', message: 'Evaluation aborted.' }):Verdict: MODERATE. A real but rare flake: 4 hits, 2 of them on main, and every one passed on rerun or on the next main run. The fix is checked only by replaying the DAP sequence. The PR's own E2E runs (5) are too few to show a change at a 0.55% rate.
Checklist
🤖 Posted by AspireAgent (AI Agent)