Skip to content

test(skills): synchronize Windows rename contention - #31237

Merged
nwparker merged 2 commits into
mainfrom
nwparker/release-windows-gate-fix
Oct 20, 2026
Merged

nwparker merged 2 commits into
mainfrom
nwparker/release-windows-gate-fix

Conversation

@nwparker

@nwparker nwparker commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor
Files Added Deleted Net
Test 2 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​79 $\color{#cf222e}{\Huge{\mathbf{−}}}$​43 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​36
Prod 2 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​6 $\color{#cf222e}{\Huge{\mathbf{−}}}$​1 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​5

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 with EPERM after 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

  • I manually tested these changes locally: macOS targeted lane-registration, path-classification, and packaging contracts (78 tests passed); changed-code quality, lint, and formatting passed.
  • Automated tests updated: real Windows contention cases now assert an actual retry and all six exhausted attempts; CI contract checks the enabling environment variables.
  • 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.
  • The real Windows cases skip on macOS. Windows execution remains pending in this PR's existing package (windows) check; no Windows reproduction is claimed from local testing.

Review

Agent skill upstream boundary

  • Not applicable, or this change copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.

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

  • This PR is small and focused
  • I explained what changed and why (ELI5, the user-facing before/after, the mechanism, and why over the alternatives)
  • Before/after screenshots or videos attached for UI changes, or N/A with reason
  • Self-reviewed for correctness, security, and performance
  • Cross-platform, SSH/remote, and path/shortcut impact considered (or N/A)
  • pnpm lint, pnpm typecheck, pnpm test, and pnpm build pass (targeted local checks above; remaining checks run in CI)

@coderabbitai

coderabbitai Bot commented Oct 20, 2026

Copy link
Copy Markdown
Contributor

Review in Change Stack →

✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@nwparker
nwparker merged commit 32343cc into main Oct 20, 2026
17 checks passed
@nwparker
nwparker deleted the nwparker/release-windows-gate-fix branch October 20, 2026 22:16
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