Repository navigation
test(skills): synchronize Windows rename contention - #31237
Merged
Merged
Conversation
Contributor
✨ Finishing Touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
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.
ELI5
A Windows release test sometimes kept a skill file locked longer than its rename retries allowed. The test now releases the lock when the first real rename fails, so runner scheduling cannot decide whether the test passes.
What Changed
The lock-holding PowerShell process waits for a message instead of sleeping for 300 milliseconds. The test observes a real Windows sharing violation, waits for the process to release the file, and verifies that a later rename succeeds. The exhaustion case keeps the lock until all six rename attempts fail, then verifies the source survived and can still be moved.
Use the existing process launcher and wait for lock holders to exit before deleting temporary files. Register both cases in the existing Windows PR test step, including its opt-in environment variable, so they run before future releases. This adds two PowerShell starts and the existing 750 ms exhaustion delay to that prepared runner; no new job or build is added.
Why
Release run 39503357316, Windows skill-sharing job reported one failure among 712 tests:
real Windows rename contention > retries a transient exclusive file lock, ending withEPERMafter its retries. The test raced a PowerShell sleep against Node's retry delays without observing lock release. Synchronizing the test preserves the real filesystem failure and successful retry checks without extending production waits or suppressing failures. Production code and all release gates are unchanged; this Windows release job was already advisory.Linked Issue
N/A — maintainer release investigation linked above.
Visual Proof
N/A — test synchronization and CI coverage only; no interface or application behavior changes.
Testing
ORCA_BACKGROUND_LAUNCH=1 ORCA_REAL_PROCESS_SKILL_TEST=1 pnpm test:skill-sharing:release: 691 passed, 21 platform-gated cases skipped on macOS (712 total).ORCA_BACKGROUND_LAUNCH=1 pnpm tc:node: passed, 17,152 files checked.package (windows)check; no Windows reproduction is claimed from local testing.Review
Agent skill upstream boundary
Notes
Only test-local temporary files and processes are involved. SSH, folder workspaces, remote protocols, and application retry limits are unchanged. The failed release uses its original pinned commit; this patch does not require cancelling or recutting that release on account of its advisory Windows evidence.
Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (targeted local checks above; remaining checks run in CI)