Repository navigation
test(temp): let the final-EPERM quarantine see through Windows 8.3 TEMP aliases - #7359
Merged
Merged
Conversation
Hosted Windows runners export TEMP as C:\Users\RUNNER~1\... while test paths arrive long-form. containedRunTemp used the JS realpath, which keeps 8.3 spellings, so the containment check never matched and the final-EPERM quarantine from #6861 never ran on CI: a 15 s external hold failed the case instead. Resolve both sides through diagnostic.realpath, defaulting to realpathSync.native.
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Contributor
|
✅ Deterministic PR hygiene checks passed. |
Contributor
|
Note Currently processing new changes in this PR. This may take a few minutes, please wait... ⚙️ Run configuration
📒 Files selected for processing: 2
✨ 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.
Summary
The final-EPERM quarantine from #6861 never ran on GitHub's hosted Windows runners, so a temp tree held past the 15 s removal budget failed whichever test owned it.
Hosted runners export
TEMPas the 8.3 aliasC:\Users\RUNNER~1\…, while test paths arrive long-form (C:\Users\runneradmin\…).containedRunTempresolvedTEMPwith the JSrealpathSync, which keeps each spelling. The strict containment check therefore always failed, logging[test-temp] the locked path is not a contained temp subtree; not moving it aside., and the EPERM was rethrown.Seen in:
failed arrival persistence returns retryable HTTP 503 without publishing models(nightly 39154486082, job 117754828530, 16.0 s): the test finished asserting, thenhome.remove()spent the full retry budget on EPERM. The same file failed the same way in job 112953161862.service state home isolation > production preserves the startup-home mirror(job 116901924377) printed the same refusal line.Both sides of the containment check now go through one resolver,
diagnostic.realpath. It defaults torealpathSync.native, which expands 8.3 names. The safety rules are unchanged: strict containment underopencodex-test-*/tmp, refusal while any child process is alive, and no move on a failed child probe. The remove budget is not raised.Limitation: this restores the existing mitigation and its child-process probe. It does not name the external holder. The diagnostic in those logs shows every file under the tree renaming fine after the budget, which fits the indexer/scanner hold documented in
scripts/test-temp-lock.ts. If the holder is a child of the test process, the quarantine still refuses and the next red run names it.Verification
tests/ci-workflows/test-temp-quarantine.test.ts:an 8.3 TEMP alias still contains the long-form locked path(injected alias resolver) andcontainment resolves TEMP with the 8.3-expanding native resolver by default(pinsrealpathSync.nativeas the default). Both fail ondevand pass with the fix; the whole file passes (10/10).bun run typecheck,bun run structure:check: pass.\\?\and UNC prefixes and that case folding still applies. The injected test checks resolver consistency only, so real 8.3 expansion is left to Windows CI.Checklist
Summary by CodeRabbit
Bug Fixes
Tests