Skip to content

Retry session-state test cleanup on Windows - #14756

Merged
Sean McManus (sean-mcmanus) merged 2 commits into
mainfrom
seanmcm/devbox2-wsl/agent150/retry-session-state-test-cleanup
Sep 9, 2026
Merged

Retry session-state test cleanup on Windows#14756
Sean McManus (sean-mcmanus) merged 2 commits into
mainfrom
seanmcm/devbox2-wsl/agent150/retry-session-state-test-cleanup

Conversation

@sean-mcmanus

Copy link
Copy Markdown
Contributor

Summary

Retry removal of the temporary directory used by the active-document language-change session-state test when Windows briefly reports a filesystem lock after the editor closes.

  • Set maxRetries: 10 and retryDelay: 100 on the existing recursive fs.promises.rm call. Linear backoff allows up to 5.5 seconds of retry delays, with no added delay when deletion succeeds immediately.
  • Keep the session-state assertions unchanged and continue to report persistent cleanup failures.
  • Addresses the cleanup failure in this Windows CI job, following Add Run and Debug session state regression tests #14736.

This PR was investigated and created by GitHub Copilot (in VS Code). Any message starting with ✨Copilot: was sent by Copilot.

Validation

  • Native Windows Node reproduction: a child process holding the temporary directory as its working directory causes the original cleanup to fail with EBUSY; the edited cleanup succeeds after the lock is released.
  • Focused probes using the test's actual cleanup options cover immediate success, transient EBUSY, retry exhaustion for persistent EBUSY, and propagation of unrelated EACCES errors, with the original cleanup as a negative control.
  • TypeScript formatting and syntax/transpilation checks passed. The one-line diff preserves the existing CRLF line endings and passes the corresponding whitespace check.
  • The full VS Code integration suite was not rerun locally; Windows, Linux, and macOS CI will provide that validation.

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.

🟢 Approval recommended

The focused retry configuration directly addresses the confirmed transient Windows EBUSY cleanup failure.

Pull request overview

Adds resilient Windows cleanup for the session-state integration test.

Changes:

  • Retries transient filesystem-lock failures for up to 5.5 seconds.
  • Preserves immediate cleanup and persistent-error reporting.
File summaries
File Description
Extension/test/scenarios/SingleRootProject/tests/buildAndDebug.test.ts Adds retry options to temporary-directory removal.
Review details
  • Files reviewed: 1/1 changed files
  • Comments generated: 0
  • Review effort level: Balanced

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

@sean-mcmanus
Sean McManus (sean-mcmanus) marked this pull request as ready for review September 9, 2026 14:22
@sean-mcmanus
Sean McManus (sean-mcmanus) requested a review from a team as a code owner September 9, 2026 14:22
@sean-mcmanus
Sean McManus (sean-mcmanus) merged commit 945b05b into main Sep 9, 2026
5 checks passed
@sean-mcmanus
Sean McManus (sean-mcmanus) deleted the seanmcm/devbox2-wsl/agent150/retry-session-state-test-cleanup branch September 9, 2026 19:01
@github-project-automation github-project-automation Bot moved this from Pull Request to Done in cpptools Sep 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants