Skip to content

Agent Host: Expand E2E coverage for recent changes - #333922

Draft
roblourens wants to merge 4 commits into
mainfrom
roblou/agents/agent-host-e2e-tests-review-addition
Draft

Agent Host: Expand E2E coverage for recent changes#333922
roblourens wants to merge 4 commits into
mainfrom
roblou/agents/agent-host-e2e-tests-review-addition

Conversation

@roblourens

Copy link
Copy Markdown
Member

Summary

  • audit Agent Host production changes from the last three weeks and add 20 missing E2E declarations
  • cover automation protocol lifecycle, detached worktree management, artifact and rename tools, GitHub operations, enterprise reauthentication, and unloaded-session persistence
  • add deterministic Claude, Codex, and Copilot replay fixtures and refresh line/protocol coverage metrics

Validation

  • npm run test-agent-host-e2e-coverage — 710 passing, 69 expected pending
  • focused provider replay — 21/21 passing
  • focused host-only replay — 13/13 passing
  • npm run typecheck-client
  • npm run valid-layers-check
  • changed-file hygiene and git diff --check
  • fixture scan for credentials and machine-local paths

Coverage increased by 1,343 lines/statements (+0.99pp), 112 functions (+1.99pp), and seven AHP protocol symbols.

(Written by Copilot)

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>
Copilot AI balanced review requested due to automatic review settings September 2, 2026 00:50

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 Medium severity · 1 Low severity

New issues introduced by this change (2)
Severity Finding
Medium severity 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…
Low severity 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.
roblourens and others added 2 commits September 1, 2026 18:23
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants