Skip to content

agentHost: isolate persisted state after E2E failures - #337201

Merged
Dmitriy Vasyura (dmitrivMS) merged 1 commit into
mainfrom
agents/vscode-copilot-e2e-root-cause-analysis
Sep 22, 2026
Merged

Dmitriy Vasyura (dmitrivMS) merged 1 commit into
mainfrom
agents/vscode-copilot-e2e-root-cause-analysis

Conversation

@dmitrivMS

@dmitrivMS Dmitriy Vasyura (dmitrivMS) commented Sep 22, 2026 •

Copy link
Copy Markdown
Collaborator

Related microsoft/vscode-engineering#3886

  • Give the next Agent Host E2E test fresh home, user-data, and Codex directories after a failed test or cleanup/replay-verification error.
  • Retain the old directories for diagnostics until suite teardown removes them all.
  • Preserve healthy shared-server reuse and persistence across intentional within-test restart/crash operations.

Restarting only the process leaves sessions on disk when disposal fails. Those sessions can then appear in an unrelated later list_sessions unread assertion. This fixes that cascading test contamination; it does not claim to fix the original intermittent runtime restore timeout.

Give the next test fresh provider and host state after a failed test or cleanup, preventing undisposed sessions from contaminating later session-list assertions. Preserve normal shared-server reuse and intentional restart persistence, and remove retired homes at suite teardown.

Co-authored-by: Copilot <[email protected]>
Copilot AI balanced review requested due to automatic review settings September 22, 2026 03:43
@dmitrivMS Dmitriy Vasyura (dmitrivMS) added vscode-build VS Code build process issues engineering VS Code - Build / issue tracking / etc. agent-host Issues for the agent-host implementation (not the protocol) labels Sep 22, 2026
@dmitrivMS Dmitriy Vasyura (dmitrivMS) added this to the 1.140.0 milestone Sep 22, 2026

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

🟢 Approval recommended

The lifecycle changes consistently isolate failed-test state without affecting intentional restart persistence.

Review effort: Balanced
Findings: None

What changed in this PR

Isolates Agent Host E2E persisted state after failures while preserving normal shared-server persistence.

Changes:

  • Rotates home, user-data, and Codex directories after test or cleanup failures.
  • Retains retired directories until suite teardown.
  • Documents the updated lifecycle behavior.
File Description
README.md Documents failure isolation and directory retention.
agentHostE2ETestHarness.ts Implements directory rotation and cleanup.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@dmitrivMS
Dmitriy Vasyura (dmitrivMS) marked this pull request as ready for review September 22, 2026 04:27
@dmitrivMS
Dmitriy Vasyura (dmitrivMS) merged commit b10961b into main Sep 22, 2026
34 of 35 checks passed
@dmitrivMS
Dmitriy Vasyura (dmitrivMS) deleted the agents/vscode-copilot-e2e-root-cause-analysis branch September 22, 2026 07:00
@vs-code-engineering vs-code-engineering Bot locked and limited conversation to collaborators Nov 6, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

agent-host Issues for the agent-host implementation (not the protocol) engineering VS Code - Build / issue tracking / etc. vscode-build VS Code build process issues

Projects

No open projects
Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants