Agent Host: Expand E2E coverage for recent changes - #333922
Draft
roblourens wants to merge 4 commits into
Draft
Conversation
Cover automation, detached worktree, server-tool, session persistence, authentication, and changeset behavior added in recent Agent Host changes. (Written by Copilot) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
The Codex rename fixture exercises automatic: true despite the test requiring the manual automatic: false path.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Review tier: Balanced
Findings: 1
New issues introduced by this change (2)
| Severity | Finding |
|---|---|
src/vs/platform/agentHost/test/node/e2e/captures/codex-server-tool-rename-chat-renames-the-chat-it-runs-in.yaml — This capture contradicts the test prompt and the other provider fixtures: Codex invokes… |
|
src/vs/platform/agentHost/test/node/e2e/suites/detachedWorktreeSuite.ts — This two-paragraph narration obscures the reconciliation steps; the only non-obvious constraint… |
What changed in this PR
Expands Agent Host E2E coverage across host lifecycle, automation, worktrees, tools, persistence, and GitHub behavior.
Changes:
- Adds automation and detached-worktree conformance suites.
- Extends provider parity tests for tools, changesets, and persistence.
- Adds replay fixtures and updates protocol coverage metrics.
| File | Description |
|---|---|
suites/sessionPersistenceSuite.ts |
Tests archived-session persistence across restarts. |
suites/serverToolsSuite.ts |
Covers rename, artifact, and child isolation tools. |
suites/hostFeaturesSuite.ts |
Tests GitHub Enterprise reauthentication. |
suites/detachedWorktreeSuite.ts |
Adds detached-worktree lifecycle coverage. |
suites/changesetSuite.ts |
Tests pull-request and Agent Merge operations. |
suites/automationsSuite.ts |
Adds automation catalogue lifecycle coverage. |
suites/agentHostE2ESuites.ts |
Registers the new conformance suites. |
coverage/protocol-surface.json |
Refreshes protocol coverage totals. |
captures/copilotcli-server-tool-rename-chat-renames-the-chat-it-runs-in.yaml |
Copilot rename replay. |
captures/copilotcli-server-tool-list-and-remove-round-trip-a-recorded-reference.yaml |
Copilot artifact lifecycle replay. |
captures/copilotcli-server-tool-add-artifact-or-reference-rejects-a-session-management-link.yaml |
Copilot artifact rejection replay. |
captures/copilotcli-server-tool-add-artifact-or-reference-records-a-reference-in-session-state.yaml |
Copilot artifact creation replay. |
captures/copilotcli-enabling-agent-merge-adds-and-removes-its-pull-request-operation.yaml |
Copilot Agent Merge replay. |
captures/copilotcli-archiving-a-never-restored-session-survives-a-host-restart.yaml |
Copilot persistence replay. |
captures/copilotcli-a-github-remote-with-changes-advertises-pull-request-creation.yaml |
Copilot pull-request replay. |
captures/codex-server-tool-rename-chat-renames-the-chat-it-runs-in.yaml |
Codex rename replay. |
captures/codex-server-tool-list-and-remove-round-trip-a-recorded-reference.yaml |
Codex artifact lifecycle replay. |
captures/codex-server-tool-add-artifact-or-reference-rejects-a-session-management-link.yaml |
Codex artifact rejection replay. |
captures/codex-server-tool-add-artifact-or-reference-records-a-reference-in-session-state.yaml |
Codex artifact creation replay. |
captures/codex-enabling-agent-merge-adds-and-removes-its-pull-request-operation.yaml |
Codex Agent Merge replay. |
captures/codex-archiving-a-never-restored-session-survives-a-host-restart.yaml |
Codex persistence replay. |
captures/codex-a-github-remote-with-changes-advertises-pull-request-creation.yaml |
Codex pull-request replay. |
captures/claude-server-tool-rename-chat-renames-the-chat-it-runs-in.yaml |
Claude rename replay. |
captures/claude-server-tool-list-and-remove-round-trip-a-recorded-reference.yaml |
Claude artifact lifecycle replay. |
captures/claude-server-tool-add-artifact-or-reference-rejects-a-session-management-link.yaml |
Claude artifact rejection replay. |
captures/claude-server-tool-add-artifact-or-reference-records-a-reference-in-session-state.yaml |
Claude artifact creation replay. |
captures/claude-enabling-agent-merge-adds-and-removes-its-pull-request-operation.yaml |
Claude Agent Merge replay. |
captures/claude-archiving-a-never-restored-session-survives-a-host-restart.yaml |
Claude persistence replay. |
captures/claude-a-github-remote-with-changes-advertises-pull-request-creation.yaml |
Claude pull-request replay. |
💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| id: toolcall_0 | ||
| name: rename_chat | ||
| input: | ||
| automatic: true |
Comment on lines
+208
to
+217
| // Reconciliation is the client telling the host which handles it still | ||
| // knows about after a reconnect. It is deliberately NOT a synchronous | ||
| // garbage collector: a worktree is only ever reclaimed once it has aged | ||
| // past the host's retention window, because the alternative is deleting a | ||
| // checkout a user is about to be handed — or is already working in — just | ||
| // because a client raced a restart. | ||
| // | ||
| // This scenario therefore pins the data-loss guard: a handle the client no | ||
| // longer lists survives, and its record stays usable. Reclamation itself | ||
| // is not asserted here because it cannot happen within a test run. |
Compare worktree paths through URI comparison keys so Windows slash and path-case normalization do not cause false failures. (Written by Copilot) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Use the shared repository worktree-location predicate instead of assuming the checkout is an immediate child of the worktree root. (Written by Copilot) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Assert observable detached-worktree lifecycle behavior without pinning a platform-specific checkout layout. (Written by Copilot) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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
Validation
npm run test-agent-host-e2e-coverage— 710 passing, 69 expected pendingnpm run typecheck-clientnpm run valid-layers-checkgit diff --checkCoverage increased by 1,343 lines/statements (+0.99pp), 112 functions (+1.99pp), and seven AHP protocol symbols.
(Written by Copilot)