Skip to content

agentHost: Add Copilot runtime regression E2E coverage - #334818

Draft
roblourens wants to merge 5 commits into
mainfrom
roblou/agents/add-e2e-tests-for-copilot-runtime-issues
Draft

agentHost: Add Copilot runtime regression E2E coverage#334818
roblourens wants to merge 5 commits into
mainfrom
roblou/agents/add-e2e-tests-for-copilot-runtime-issues

Conversation

@roblourens

@roblourens roblourens commented Sep 6, 2026

Copy link
Copy Markdown
Member

Summary

  • Update desktop and remote Copilot runtime from 1.0.83-2 to 1.0.84-1, and the SDK from 1.0.13-preview.4 to 1.0.13-preview.6.
  • Add, enable, or strengthen 16 Agent Host E2E scenarios: optional custom-agent fields, selected-agent persistence, child/parent restoration, custom-agent output guidance, empty responses, client tool search, image results, native patches, reasoning defaults, MCP lifecycle, and shell follow-ups.
  • Preserve freeform Responses tool calls and copied-plugin paths in record/replay, with unit coverage. Refresh runtime-owned prompt snapshots and coverage statistics.
  • Accept the SDK's new policyHelper managed-settings diagnostics source.
  • Preserve streaming on SDK resume as well as create; the upgraded runtime otherwise resumes with non-streaming Responses requests. Assert streaming at the E2E request boundary.
  • Pin the product-build runtime default to the same 1.0.84-1 version. Upstream's canary override lacked five fixes and was correctly rejected by the new tests on all three platforms.

Regression evidence

The same 16 scenarios produce 10 failures and 6 passes against the old runtime/SDK pair, and 16 passes against the updated pair.

The six tests that pass both versions are additional contract coverage, not claimed as reproductions of their exact upstream defects. The custom-agent output-guidance baseline is masked by the older optional-field failure. CLI-only, native-runtime-only, platform-dependent, and non-deterministic internal races are not claimed covered by these AHP tests.

Validation

  • Full deterministic E2E coverage: 718 passing, 92 existing pending registrations across conformance, Copilot, Claude, and Codex (AGENT_HOST_E2E_JOBS=2 npm run test-agent-host-e2e-coverage).
  • Copilot prompt snapshots: 22 passing.
  • Codec/proxy unit tests: 9 passing.
  • Repository pre-commit hygiene and targeted ESLint: passed.
  • Type checking passes. Includes the existing upstream two-line duplicate-import fix from sessions: remove duplicate workspace picker imports #334689.
  • Earlier concurrent-run teardown timeouts passed in isolation and in the subsequent complete two-worker run.
  • First CI run exposed a decoded Windows plugin-path normalization bug and missing SDK resume streaming. Both are fixed and reproduced locally before/after; provider idle-release tests, path tests, and all 16 regression scenarios pass.
  • Windows/Linux/macOS packaged Azure validation: all three Electron integration tasks passed in build 471670, with all 16 new scenarios verified in each log.
  • Merged current main to resolve overlapping upstream test gates. Type checking and the 16 new scenarios pass after the merge; all three GitHub Electron jobs also passed.
  • Build 471675 exposed the product-only canary override mismatch and two new upstream lint warnings. Both are corrected; build 471686 succeeded completely, including Compile & Hygiene and Windows/Linux/macOS Electron integration.
  • All 16 new scenarios were verified passing in each platform log in both builds 471670 and 471686.

Remaining CI issue

The latest GitHub Code OSS run passes compile/hygiene and Windows/Linux Electron. Its macOS Electron job still intermittently fails the existing cancelling a turn paused for input allows a replacement turn test; the same test passes locally in isolation and on the packaged Azure runs. The failure recurred on retry. Runtime diagnostics end with Session idle finalization suppressed and queued_lane: true after abort, with no replacement model request. The test remains enabled; no timeout increase or success fallback was added.

The unrelated macOS Browser failure was a GitHub DNS lookup failure during smoke-test setup and passed on retry. The PR stays draft because the remaining macOS cancellation failure is unresolved.

(Written by Copilot)

Exercise optional custom-agent fields and persistence, empty and image responses, client tool search, native patches, and MCP lifecycle through the real Agent Host. Upgrade desktop and remote runtime/SDK dependencies and preserve freeform tool calls in replay.\n\n(Written by Copilot)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings September 6, 2026 17:59

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 restart tests do not currently assert that selected-agent metadata is actually restored.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Review tier: Balanced
Findings: 1 Medium severity

New issues introduced by this change (1)
Severity Finding
Medium severity src/​vs/​platform/​agentHost/​test/​node/​e2e/​suites/​subagentSuite.ts — The restart assertion never checks the persisted message.agent, so both variants still pass if…
What changed in this PR

Updates the bundled Copilot runtime/SDK and adds deterministic Agent Host regression coverage.

Changes:

  • Bumps desktop and remote Copilot dependencies.
  • Adds 16 runtime, MCP, subagent, shell, and persistence scenarios.
  • Extends replay support for freeform tools and copied-plugin paths.
File Description
subagentSuite.ts Adds custom-agent and restoration scenarios.
managementExtensionsSuite.ts Accepts policyHelper diagnostics.
e2eTestContext.ts Exposes recording response injection.
copilotRuntimeToolsSuite.ts Adds runtime tool regressions.
copilotRuntimeMcpSuite.ts Adds MCP lifecycle regressions.
copilotCoverageSuite.ts Adds shell follow-up coverage.
agentHostE2ESuites.ts Registers new suites.
e2e/​README.md Documents replay behavior.
…gpt-5-mini.prompt.md Refreshes GPT prompt snapshot.
…claude-sonnet-4_6.prompt.md Refreshes Claude prompt snapshot.
KNOWN_ISSUES.md Updates resolved/current limitations.
modelRequestProjection.ts Preserves freeform tool format.
capiWireCodec.ts Adds custom-tool-call codec support.
capiReplayProxy.ts Resolves copied-plugin replay paths.
…stopping-an-asynchronous-shell….yaml Records shell-stop scenario.
…shell-output-preserves….yaml Records metadata scenario.
…native-apply-patch….yaml Records patch scenario.
…image-client-tool-results….yaml Records image-result scenario.
…gpt-requests-detailed-reasoning….yaml Records reasoning defaults.
…client-tool-search….yaml Records tool-search scenario.
…accepted-empty-response….yaml Records empty-response scenario.
…server-is-stopped-and-restarted.yaml Records MCP restart scenario.
…plugin-tools-remain-callable….yaml Records subagent/MCP scenario.
…supporting-files-are-readable….yaml Records plugin-file scenario.
…restored-parent-accepts….yaml Refreshes restoration fixture.
…permits-requested-file-output….yaml Records output-guidance scenario.
…without-a-tools-list….yaml Records optional-tools scenario.
…without-a-display-name….yaml Records optional-name scenario.
…selected-on-the-first-turn….yaml Records first-turn selection.
…selected-after-a-default-turn….yaml Records later selection.
capiWireCodec.test.ts Tests custom-tool round trips.
capiReplayProxyPathNormalization.test.ts Tests plugin-path binding.
agent.ts Extends diagnostics contract.
remote/​package.json Bumps remote dependencies.
remote/​package-lock.json Locks remote dependency updates.
package.json Bumps desktop dependencies.
package-lock.json Locks desktop dependency updates.
Files not reviewed (1)
  • remote/package-lock.json: Generated file

💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines +149 to +157
assert.deepStrictEqual({
messages: restored.turns.map(turn => turn.message.text),
response: markdownText({ turns: restored.turns.slice(-1) }).trim(),
states: restored.turns.map(turn => turn.state),
}, {
messages: before.turns.map(turn => turn.message.text),
response: 'CUSTOM_AGENT_CHILD_OK',
states: before.turns.map(() => TurnState.Complete),
});
roblourens and others added 4 commits September 6, 2026 18:34
Remove duplicate UNIFIED_WORKSPACE_PICKER_SETTING imports introduced by overlapping main changes so core compilation succeeds again.\n\n(Written by Copilot)\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

(cherry picked from commit fc0a9e9)
…ugin paths

Apply streaming configuration to both create and resume, assert it through E2E requests and launcher tests, and surface provider errors without waiting for timeouts. Normalize both decoded and JSON-escaped Windows plugin paths with a portable regression test.

(Written by Copilot)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Preserve the now-enabled fixed-runtime subagent tests while incorporating upstream changes and resolving the obsolete known-issue gates.

(Written by Copilot)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The product-build default introduced on main replaced the upgraded runtime with a canary missing five tested fixes. Pin product CI to the same 1.0.84-1 runtime as desktop and remote manifests rather than gating regressions. Follow the new dot-notation lint rule in the added suite.

(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