test(windows): await proxy teardown before cleanup - #1414
Conversation
|
✅ Deterministic PR hygiene checks passed. |
📝 WalkthroughWalkthroughThe test helpers now retry transient directory-removal errors. Isolated Codex home cleanup and rate-limit end-to-end tests use the helper. End-to-end teardown awaits server shutdown before restoring mocked fetch. ChangesTest cleanup reliability
Estimated code review effort: 2 (Simple) | ~15 minutes Suggested labels: Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
✅ READY
Review readiness checklist
✅ 4/4 boxes ticked. This pull request is already Ready for Review. |
|
@coderabbitai review |
✅ Action performedReview finished.
|
|
Tip For best results, initiate chat on the files or code changes.
You are interacting with an AI system. |
|
Tip For best results, initiate chat on the files or code changes.
You are interacting with an AI system. |
flyingsquirrel0419
left a comment
There was a problem hiding this comment.
Approved on exact head b5466fec4a9b13c4e8a35767177abaf422f45fc7.
The change remains test-harness-only: all six proxy shutdown promises are awaited before the global fetch restoration, and recursive removal retries only EPERM, EBUSY, and ENOTEMPTY with a hard attempt limit while preserving non-transient and final failures.
Validation on this exact head:
bun run typecheck: pass- focused isolate run: 18/18 pass
- full suite: 10,651 pass, 10 skip, 1 fail
The sole full-suite failure was Codex autostart shim > Unix shim exports persisted service API token before running Codex. I reproduced the identical failure independently on the unchanged base dev commit 0de4fd2d7a9d45d95a30d2cb0708070c34fbd6ef; it reads this host's persisted token path instead of the test-local token and is not introduced by this PR.
Summary
EPERM,EBUSY, andENOTEMPTYrelease racesThis is a test-harness-only Windows burn-down slice. It does not change production shutdown, retry, provider, or filesystem behavior.
Refs #1059.
Verification
bun test --isolate tests/remove-tree-helper.test.ts tests/server-rate-limit-retry-e2e.test.ts tests/storage-mutation-race.test.ts— 18 passed, 0 failedbun test --isolate tests/server-rate-limit-retry-e2e.test.ts— 6 passed, 0 failedbun test --isolate tests/remove-tree-helper.test.ts— 5 passed, 0 failedbun x --package typescript@7.0.2 tsc --noEmit— passedbun x --package typescript@7.0.2 tsc --noEmit— passedbun run privacy:scan— passedgit diff HEAD^ --check— passedEBUSYcleanup cascade but remained non-green across other known Windows/setup/runtime families; the full suite was not rerun and this PR does not claim Windows test suite remains dispatch-only until full suite is green #1059 completeChecklist
Review readiness checklist
This PR stays in draft until every box below is ticked. Tick all four boxes once the requirements are met:
Summary by CodeRabbit
Bug Fixes
Tests