Repository navigation
agentHost: stabilize E2E paths and lifecycle barriers - #340395
Merged
Merged
Conversation
Correlate restore, provider initialization, and database queue phases without changing deadlines, assertions, storage, or lifecycle ordering. Retain compact operation timings from successful hosts and sample Linux worker pressure outside the host processes. Add opt-in focused Linux replay and worker controls for measured CI comparisons. Co-authored-by: Copilot <[email protected]>
Run Linux CI replay on a private executable tmpfs while retaining required disk-backed persistence and lifecycle coverage. Keep real SQLite files, durability settings, close/reopen, deletion, and host restarts unchanged. Add same-worker alternating storage experiments, mount diagnostics, and cleanup regression coverage. Co-authored-by: Copilot <[email protected]>
Keep provider test workspaces outside the repository so ancestor instruction discovery cannot inject checkout AGENTS.md into strict replay. Allocate a unique /tmp mount and remove only that owned directory after unmounting. Preserve wrapper failure and cleanup coverage. Co-authored-by: Copilot <[email protected]>
Capture verified test-authoring guidance for instruction-safe temporary roots and separate RAM-backed semantics from required disk-backed lifecycle coverage. Co-authored-by: Copilot <[email protected]>
Keep Agent Host E2E runners, coverage, and Windows launch support under test/integration/agentHost. Share the scoped tmpfs wrapper with built-in Git extension tests, retaining required disk-backed commit, worktree, and symlink coverage and separate test reports. Update integration entrypoints and CI change detection, and cover both-pass failure propagation. Co-authored-by: Copilot <[email protected]>
Remove the Git extension adoption, production timing instrumentation, and experimental flaky-pipeline controls. Keep storage tooling scoped to Agent Host E2E, require detached-worktree archive/restart/deletion coverage on disk, and fail on filesystem probe errors. Remove the out-of-scope review findings rather than carrying unrelated changes. Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]> # Conflicts: # src/vs/platform/agentHost/test/node/e2e/README.md # test/integration/agentHost/runner.ts
Update the Agent Host E2E startup fixture to copy and launch test/integration/agentHost tooling. Select disk mode explicitly so the Electron-preparation regression remains independent of CI tmpfs defaults. Co-authored-by: Copilot <[email protected]>
…shoot-flaky-tests-logs-3e979ea2
Canonicalize temporary filesystem identities at allocation, share exact turn and unread completion barriers, and disable automatic maintenance in E2E Git repositories. Co-authored-by: Copilot <[email protected]>
Contributor
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Some Git repositories remain outside the maintenance protection, and two directory regression tests can pass without exercising their intended paths.
2 open findings
What changed in this PR
Stabilizes Agent Host E2E tests through canonical temporary paths, stricter turn-completion barriers, and reduced Git background activity.
Changes:
- Canonicalizes 125 temporary-directory allocations.
- Shares exact turn-completion/unread synchronization.
- Adds Git maintenance controls, regression tests, documentation, and an updated snapshot.
| File | Description |
|---|---|
suites/workspaceSuite.ts |
Canonicalizes temporary workspaces. |
suites/workspaceConversionSuite.ts |
Canonicalizes conversion workspaces. |
suites/workingDirectoriesSuite.ts |
Canonicalizes multi-root workspaces. |
suites/turnLifecycleSuite.ts |
Canonicalizes lifecycle workspaces. |
suites/terminalResilienceSuite.ts |
Canonicalizes terminal workspaces. |
suites/subagentSuite.ts |
Canonicalizes subagent workspaces. |
suites/stateOperationsSuite.ts |
Canonicalizes state-operation workspaces. |
suites/sessionPersistenceSuite.ts |
Canonicalizes persistence workspaces. |
suites/serverToolsSuite.ts |
Canonicalizes server-tool workspaces. |
suites/providerErrorSuite.ts |
Canonicalizes provider-error workspaces. |
suites/providerCheckpointSuite.ts |
Canonicalizes checkpoint repositories. |
suites/protocolContractsSuite.ts |
Canonicalizes protocol workspaces. |
suites/multiChatSuite.ts |
Canonicalizes multi-chat workspaces. |
suites/mcpSideChannelSuite.ts |
Canonicalizes MCP workspaces. |
suites/mcpPluginSuite.ts |
Canonicalizes plugin directories. |
suites/managementExtensionsSuite.ts |
Canonicalizes management-test directories. |
suites/hostFeaturesSuite.ts |
Canonicalizes host-feature workspaces. |
suites/fileOperationsSuite.ts |
Canonicalizes file-operation workspaces. |
suites/detachedWorktreeSuite.ts |
Canonicalizes worktree repositories. |
suites/customizationDiscoverySuite.ts |
Canonicalizes customization workspaces. |
suites/coreSuite.ts |
Canonicalizes core-test workspaces. |
suites/copilotRuntimeToolsSuite.ts |
Canonicalizes runtime-tool workspaces. |
suites/copilotRuntimeMcpSuite.ts |
Canonicalizes runtime MCP roots. |
suites/copilotCoverageSuite.ts |
Canonicalizes coverage workspaces. |
suites/clientHostedFilesystemSuite.ts |
Canonicalizes hosted-filesystem workspaces. |
suites/clientFilesystemSuite.ts |
Canonicalizes client-filesystem workspaces. |
suites/changesetSuite.ts |
Canonicalizes changeset repositories. |
suites/automationsSuite.ts |
Canonicalizes automation workspaces. |
suites/annotationsSuite.ts |
Canonicalizes annotation workspaces. |
e2e/README.md |
Documents path and lifecycle invariants. |
providers/copilotPromptsE2E.integrationTest.ts |
Canonicalizes prompt-test workspaces. |
providers/copilotOtelAgentHostE2E.integrationTest.ts |
Canonicalizes telemetry directories. |
providers/copilotManagedSettingsAgentHostE2E.integrationTest.ts |
Canonicalizes policy-test directories. |
providers/copilotAgentHostE2E.integrationTest.ts |
Uses shared completion barriers and canonical paths. |
providers/codexAgentHostLive.integrationTest.ts |
Canonicalizes live Codex workspaces. |
providers/codexAgentHostE2E.integrationTest.ts |
Canonicalizes Codex replay workspaces. |
providers/__snapshots__/Agent_Host_E2E___Copilot__Copilot-specific__resumes_a_failed_turn_in_place.traffic.ahp.yaml |
Retains the unread lifecycle action. |
harness/testDirectories.ts |
Adds canonical directory allocation. |
harness/ahpSnapshot.ts |
Adds exact completion/unread synchronization. |
harness/agentHostE2ETestHarness.ts |
Uses canonical paths and disables maintenance. |
ahpSnapshot.test.ts |
Tests resumed-turn barriers. |
agentHostTestDirectories.test.ts |
Tests directory and Git configuration behavior. |
🧠 Review effort: Balanced
Give feedback about Copilot approvals in this survey to enter a drawing for a $150 gift card.
Cover bare remotes, clones, and MCP workspaces with local Git maintenance controls. Exercise canonicalization failure cleanup and preservation of unexpected content. Co-authored-by: Copilot <[email protected]>
Use the native asynchronous realpath as the alias oracle and obtain real 8.3 paths without cmd quoting. Skip only the short-name variant on volumes that do not provide aliases. Co-authored-by: Copilot <[email protected]>
roblourens
marked this pull request as ready for review
October 8, 2026 01:11
roblourens
enabled auto-merge
October 8, 2026 01:11
Contributor
📬 CODENOTIFYThe following users are being notified based on files changed in this PR: Ulugbek Abdullaev (@ulugbekna)Matched files:
Ben Villalobos (@benvillalobos)Matched files:
|
Michael Lively (Yoyokrazy)
approved these changes
Oct 8, 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 #340215, addressing shared Agent Host E2E instability rather than changing individual product contracts.
Changes
No production or pipeline changes, timeout increases, retries, new skips of existing scenarios, weakened assertions, or model-fixture edits. The Windows-only regression is skipped on other platforms and on volumes that do not provide 8.3 aliases.
Validation
npm run build-fast -- --client-only— passed.npm run typecheck-client— passed.(git diff --name-only --diff-filter=ACM -z -- '*.ts'; git ls-files --others --exclude-standard -z -- '*.ts') | xargs -0 npm run eslint --— passed for all 40 changed TypeScript files before commit; corrected helper/test files rechecked after final edits../scripts/test.sh --run src/vs/platform/agentHost/test/node/ahpSnapshot.test.ts --run src/vs/platform/agentHost/test/node/agentHostTestDirectories.test.ts --run src/vs/platform/agentHost/test/node/agentHostE2EServerLease.test.ts --reporter dot— final revision: 21 passed; Windows-only regression pending on macOS../scripts/test-integration.sh --run src/vs/platform/agentHost/test/node/e2e/conformance/agentHostConformance.integrationTest.ts --reporter dot— 368 passed, 15 existing pending../scripts/test-integration.sh --run src/vs/platform/agentHost/test/node/e2e/providers/copilotAgentHostE2E.integrationTest.ts --run src/vs/platform/agentHost/test/node/e2e/providers/claudeAgentHostE2E.integrationTest.ts --reporter dot— 390 passed, 62 existing pending../scripts/test-integration.sh --run src/vs/platform/agentHost/test/node/e2e/providers/copilotAgentHostE2E.integrationTest.ts --run src/vs/platform/agentHost/test/node/e2e/providers/claudeAgentHostE2E.integrationTest.ts --grep 'resumes a failed turn in place|resumes the same turn after repeated failures|client tool reaches ready|workspace conversion:|provider checkpoints: historical|archiving a never-restored' --reporter dot— final focused replay passed, 10 tests../scripts/test-integration.sh --run src/vs/platform/agentHost/test/node/e2e/conformance/agentHostConformance.integrationTest.ts --run src/vs/platform/agentHost/test/node/e2e/providers/copilotAgentHostE2E.integrationTest.ts --grep 'branch completions prioritize the default|archiving a detached worktree removes|remote.*commit|fetch.*remote|pull.*remote|runtime mcp' --reporter dot— final review revision passed, 3 tests../scripts/test-integration.sh --run src/vs/platform/agentHost/test/node/e2e/conformance/agentHostConformance.integrationTest.ts --run src/vs/platform/agentHost/test/node/e2e/providers/copilotAgentHostE2E.integrationTest.ts --grep 'runtime MCP:|sync pulls a non-conflicting remote commit|sync pushes an outgoing commit' --reporter dot— final review revision passed, 6 tests.git diff --checkand commit hygiene — passed.The full local conformance/provider runs preceded the final native-realpath adapter and auto-maintenance addition; focused harness/provider tests and type checks passed after those edits. Packaged cross-platform validation is required before merge.
A selected local Codex checkpoint test was blocked by a macOS
sandbox-execexecution refusal. No sandbox controls were bypassed. Azure will validate the packaged provider path.Two independent definition-111 CI builds validate Windows, Linux, and macOS without publishing or release:
6148019506a5; Windows E2E suite completed in 465.6 seconds.6148019506a5; Windows E2E suite completed in 447.9 seconds.GitHub 37703368889 passed Compile & Hygiene and all three platform Electron integration jobs. Its Windows unit failures were defects in the new regression tests: an expected path used legacy rather than native realpath, and cmd quoting produced an invalid path. Commit
e826c7476a0acorrects only the unit-test file; E2E harness and scenario inputs are unchanged, so their successful validation is retained. On 37707649062, all three platform Electron integration jobs and Windows Electron-Unit passed. The Windows short-path and aliased-parent regressions explicitly passed in both Electron and Node.js test runners, not skipped.The Azure Linux/macOS smoke failures selecting the model context option
1Mreproduce verbatim on unchanged main 481889. They are outside this PR's Agent Host E2E scope; no UI or smoke tests were changed.On
e826c7476a0a, GitHub Compile & Hygiene's native type check completed with zero errors, but the full-repository ESLint process was killed with exit 137 without a reported lint violation. Windows Electron-Smoke failed during WSL preparation becauseapt-get installsegfaulted (exit 139), before smoke tests ran. Attempt 2 retries only these two verified infrastructure-failed jobs without code changes. Required CI checks remain in force.The earlier runs 481904/481905 and GitHub 37701928554 were canceled as superseded before these review corrections. Compile & Hygiene had passed on the earlier GitHub revision; this is not counted as final-revision validation.
(Written by Copilot)