Add Agent Host E2E coverage and expand protocol scenarios#326493
Merged
Conversation
(Written by Copilot) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Adds Agent Host coverage tooling, broader protocol tests, and recorded cross-provider E2E scenarios while hardening resource writes and snapshot normalization.
Changes:
- Collects native V8 coverage and checks in loaded-file metrics.
- Adds protocol/resource tests and Claude, Codex, and Copilot replay scenarios.
- Improves resource-write concurrency and fixture/path normalization.
Show a summary per file
| File | Description |
|---|---|
.gitignore |
Allows the checked-in coverage baseline. |
package.json |
Adds the coverage command and c8. |
package-lock.json |
Locks the c8 dependency. |
scripts/agent-host-e2e-coverage.ts |
Runs tests and generates coverage reports. |
agentService.ts |
Hardens resource-write behavior. |
agentHostE2ETestHelpers.ts |
Defines shared provider scenarios and lifecycle. |
ahpSnapshot.ts |
Adds code-driven snapshots and path normalization. |
testHelpers.ts |
Adds coverage environment and timeout support. |
resourceOperations.integrationTest.ts |
Expands resource protocol coverage. |
README.md |
Documents test layers and coverage workflow. |
coverage/agentHostE2E.json |
Records aggregate and per-file coverage. |
agentHostServer.integrationTest.ts |
Adapts startup timeout for coverage. |
clientTools.integrationTest.ts |
Adapts startup timeout for coverage. |
handshake.integrationTest.ts |
Adds handshake/error scenarios. |
multiClient.integrationTest.ts |
Adapts startup timeout for coverage. |
networkDiagnostics.integrationTest.ts |
Adapts startup timeout for coverage. |
otlpLogs.integrationTest.ts |
Adapts startup timeout for coverage. |
sessionConfig.integrationTest.ts |
Expands coverage-mode timeouts. |
sessionDiffs.integrationTest.ts |
Adapts startup timeout for coverage. |
sessionFeatures.integrationTest.ts |
Adapts startup timeout for coverage. |
sessionLifecycle.integrationTest.ts |
Adapts startup timeout for coverage. |
toolApproval.integrationTest.ts |
Adapts startup timeout for coverage. |
turnExecution.integrationTest.ts |
Tests missing chats and invalid cursors. |
captures/agentHostE2E/claude-*.yaml |
Adds Claude model replay fixtures. |
captures/agentHostE2E/codex-*.yaml |
Adds Codex model replay fixtures. |
captures/agentHostE2E/copilotcli-*.yaml |
Adds Copilot model replay fixtures. |
__snapshots__/Agent_Host_E2E___Claude_*.yaml |
Adds Claude AHP expectations. |
__snapshots__/Agent_Host_E2E___Codex_*.yaml |
Adds Codex AHP expectations. |
__snapshots__/Agent_Host_E2E___Copilot_*.yaml |
Adds Copilot AHP expectations. |
Review details
Comments suppressed due to low confidence (1)
src/vs/platform/agentHost/test/node/protocol/agentHostE2ETestHelpers.ts:1068
- This explicitly shell-dependent test still runs on Windows, although its fixtures invoke
Bash/bashand this file documents POSIX shell scenarios as unsupported there. Gate it with!isWindows, as the worktree test already does, otherwise Windows replay can select a different shell/tool and time out or miss the fixture.
- Files reviewed: 95/98 changed files
- Comments generated: 3
- Review effort level: Medium
(Written by Copilot) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
(Written by Copilot) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
(Written by Copilot) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
roblourens
marked this pull request as ready for review
July 19, 2026 16:25
roblourens
enabled auto-merge (squash)
July 19, 2026 16:25
benvillalobos
approved these changes
Jul 19, 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.
Summary
createOnlywritesCoverage remains informational; this PR does not add a threshold or commit gate.
Coverage
Final aggregate loaded-file baseline:
The report includes loaded executable files under
src/vs/platform/agentHost/{common,node}and excludes tests, provider dependencies, generated type-only modules, and unloaded files.Expected-behavior skips found while adding E2E scenarios
The tests remain present but only the affected provider variants are skipped:
serverToolsChangedorderingRecord-only, provider capability, and steering skips that predate these scenarios remain unchanged.
Validation
npm run typecheck-clientnpm run test-agent-host-e2e-coveragenpm run valid-layers-checknpm run precommit(Written by Copilot)