Skip to content

fix: retry transient file locks in release test cleanup#18

Merged
HelloThisWorld merged 1 commit into
mainfrom
codex/retry-release-test-cleanup
Jul 24, 2026
Merged

fix: retry transient file locks in release test cleanup#18
HelloThisWorld merged 1 commit into
mainfrom
codex/retry-release-test-cleanup

Conversation

@HelloThisWorld

Copy link
Copy Markdown
Owner

Summary

  • Release run 30107145962 (first v1.1.2 attempt) failed only in cleanup: test-portable.ps1 hit Access to the path '...\Microsoft.Terminal.Control.dll' is denied while removing its temp extract root, after every functional gate had passed. A just-terminated winTerm process (or an antivirus scan of freshly written binaries) can keep a mapped file locked for a short moment.
  • Adds Remove-DirectoryWithRetry (up to 5 attempts with 250/500/750/1000 ms backoff, early exit when the directory is already gone, rethrow on final failure) to scripts/winterm/test-portable.ps1 and scripts/winterm/test-installer.ps1, and routes their recursive temp-directory cleanup through it.
  • Only the two scripts that launch processes from their temp directories are changed. verify-release-layout.ps1 never launches the payload and has never flaked, so it is left as is. No product code, schemas, or workflows are touched.

Validation

  • Behavior checks against the real function (extracted via AST from each script): permanently locked directory still throws after the attempt budget; unlocked directory is removed immediately; a lock released after ~700 ms is survived without throwing — the exact release-run scenario. All six checks passed.
  • scripts/winterm/test.ps1 -Suite Smoke -Configuration Release -Platform x64 — passed.
  • git diff --check — clean.
  • Compiled suites and the real installer/portable lifecycle run on the PR workflows (winterm-validation.yml, winterm-full-build.yml); no local native toolchain is available.

Notes

  • The temporary-root safety guard (refusing to delete outside %TEMP%) is unchanged and still runs before any removal.
  • A permanent lock still fails the job loudly; only transient locks are absorbed.

@HelloThisWorld
HelloThisWorld merged commit 10719df into main Jul 24, 2026
5 checks passed
@HelloThisWorld
HelloThisWorld deleted the codex/retry-release-test-cleanup branch July 24, 2026 18:49
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.

1 participant