Repository navigation
agentHost: retain complete E2E snapshot failure diagnostics - #340449
Merged
Merged
Conversation
Keep full normalized prompt and AHP snapshot comparisons in uploaded integration logs when CI truncates the reporter diff. Preserve the original assertion and report artifact failures without masking it. Co-authored-by: Copilot <[email protected]>
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Electron IPC drops nested AggregateError details, so diagnostic-write failures conceal both underlying errors in CI output.
0 open findings
What changed in this PR
Retains complete Agent Host E2E snapshot mismatch diagnostics in CI artifacts.
Changes:
- Adds diagnostic retention for AHP and Copilot prompt snapshots.
- Adds regression coverage and troubleshooting documentation.
| File | Description |
|---|---|
e2e/README.md |
Documents retained snapshot diagnostics. |
copilotPromptsE2E.integrationTest.ts |
Wraps prompt comparisons. |
harness/ahpSnapshot.ts |
Wraps AHP comparisons. |
harness/agentHostE2EDiagnostics.ts |
Persists expected and actual output. |
agentHostE2EDiagnostics.test.ts |
Tests retention and failure behavior. |
🧠 Review effort: Balanced
Give feedback about Copilot approvals in this survey to enter a drawing for a $150 gift card.
Co-authored-by: Copilot <[email protected]>
Contributor
roblourens
marked this pull request as ready for review
October 9, 2026 03:12
roblourens
enabled auto-merge (squash)
October 9, 2026 03:12
Osvaldo Ortega (osortega)
approved these changes
Oct 9, 2026
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Follow-up to #340395 from the recurring Agent Host E2E stability audit.
Why
Large prompt and AHP snapshot mismatches frequently produce
[mocha] output truncated to 8192 characters. The existing snapshot helper writes the full.actualnext to the source baseline, outside the uploaded logs artifact. This makes it difficult to distinguish intentional SDK contract changes, bad fixtures, and real ordering/context regressions after CI finishes.For example, Azure 481969 reported 19 prompt snapshot mismatches per failing platform with truncated diffs. These are discovery evidence, not a claim that each mismatch is a flake or test defect.
Changes
.build/logs/integration-tests/agent-host-e2e-snapshots-<pid>/, which existing CI log uploads include.Validation
Current head
49de1a0cb294includes the merged recovery mitigation #340421 and checkpoint correctness fix #340634. Main was merged without rewriting the existing PR history. The net PR remains five diagnostics-only files; no production change is added by this PR.applyIncrementalClientChangeshelper from the previous compiled head to the signed merge. No shared dependency installation or modification.env -u COPILOT_HOME VSCODE_SKIP_PRELAUNCH=1 ./scripts/test.sh --run src/vs/platform/agentHost/test/node/agentHostE2EDiagnostics.test.ts --run src/vs/platform/agentHost/test/node/ahpSnapshot.test.ts --run src/vs/platform/agentHost/test/node/agentHostE2EServerLease.test.ts --reporter dot— 23 passed. Includes a realSnapshotContextmismatch, complete comparisons larger than the reporter threshold, unchanged baselines, success/unrelated-error behavior, retained evidence after a subsequent pass, and diagnostic write failures.env -u COPILOT_HOME VSCODE_SKIP_PRELAUNCH=1 ./scripts/test-integration.sh --run src/vs/platform/agentHost/test/node/e2e/providers/copilotPromptsE2E.integrationTest.ts --run src/vs/platform/agentHost/test/node/e2e/providers/copilotAgentHostE2E.integrationTest.ts --grep 'Agent Host E2E — Copilot prompts|provider errors:|resumes a failed turn in place|client tool reaches ready after start and completes|retains context across consecutive turns' --reporter dot— 28 passed in strict replay, including all four error/recovery scenarios.npm run typecheck-client— passed.npm run eslint -- src/vs/platform/agentHost/test/node/agentHostE2EDiagnostics.test.ts src/vs/platform/agentHost/test/node/e2e/harness/agentHostE2EDiagnostics.ts src/vs/platform/agentHost/test/node/e2e/harness/ahpSnapshot.ts src/vs/platform/agentHost/test/node/e2e/providers/copilotPromptsE2E.integrationTest.ts— passed.git diff --checkand signed commit hygiene — passed.GitHub 37875797631 passed Compile & Hygiene and all three Electron integration jobs at the refreshed head. Its only failed job was Linux Electron-Smoke:
Starts a session in a Dev Containertimed out waiting for the visibleStarting Dev Containerpreparation text. The failure log and full UI diagnostics artifact are preserved; the diagnostics-only E2E wrapper is not used by that UI smoke test. Only that smoke job is being rerun, without code changes, higher timeouts, or assertion changes. The UI failure's root cause remains unclassified.Packaged Windows x64/Linux x64/macOS ARM64 Azure 482581 is running at the same head. Publishing and release are disabled. The PR remains draft pending validation and maintainer review; auto-merge is not enabled.
Earlier CI evidence
Packaged Windows/Linux/macOS Electron integration validation passed in Azure 482095. The overall build failed in the separate Linux Unit Tests job's
Mixin vscode-capipreparation:npm cireportedERR_SSL_DECRYPTION_FAILED_OR_BAD_RECORD_MACbefore those tests ran.GitHub 37739694012 passed the unit jobs and macOS/Windows Electron integration jobs. Two failures are preserved explicitly:
RECOVERED. The host log shows a pending recovery send, stale idle at 06:55:42.103, andTurn changed during preparation; dropping sendat .154. This was a real product race, not a snapshot mismatch or a diagnostic-wrapper failure. Its separately merged fix fix(agentHost): ignore the failed execution's idle in the next Copilot turn #340421 is included in the refreshed head. No assertions, timeouts, or gates were changed to hide it.(Written by Copilot)