Skip to content

test(temp): compare the default containment result through the native resolver - #7361

Merged
lidge-jun merged 1 commit into
devfrom
fix/test-temp-quarantine-native-expectation
Oct 19, 2026
Merged

lidge-jun merged 1 commit into
devfrom
fix/test-temp-quarantine-native-expectation

Conversation

@lidge-jun

@lidge-jun lidge-jun commented Oct 19, 2026 •

Copy link
Copy Markdown
Owner

Summary

#7359 added final EPERM quarantine > containment resolves TEMP with the 8.3-expanding native resolver by default, which fails on hosted Windows (dev ee3ad33, run 39215956943, windows 9/9, job 117939835484):

Expected: "C:\Users\RUNNER~1\AppData\Local\Temp\opencodex-test-egC04M\tmp\opencodex-test-Aa11Bb\tmp"
Received: "C:\Users\runneradmin\AppData\Local\Temp\opencodex-test-egC04M\tmp\opencodex-test-Aa11Bb\tmp"

The product behaved as intended: the default resolver expanded the 8.3 alias. The test's expectation, fixture.runTmp, comes from containedFixture(), which resolves with JS realpathSync and keeps the RUNNER~1 spelling. The expectation is now realpathSync.native(fixture.runTmp), computed before the spy is installed, so both sides go through the same native resolver. The spy assertion that pins realpathSync.native as the default is unchanged.

I checked the other #7359 case (an 8.3 TEMP alias still contains the long-form locked path) and the shared fixtures. That case runs both sides through its injected resolver and compares against JS-resolved fixture paths consistently, which is why it passed on the same Windows job. No other assertion mixes the two resolvers.

Verification

  • bun test tests/ci-workflows/test-temp-quarantine.test.ts: 10/10 pass (macOS, where the two resolvers agree).
  • The Windows behavior follows from the CI output above: the received value is exactly the native expansion of the expected path. Windows confirmation is left to the next lane=all run.

Checklist

  • Scope stays focused and avoids unrelated cleanup.
  • Docs or release notes were updated when needed. (Test-only.)
  • Security-sensitive changes were reviewed for secrets, auth, and unsafe defaults.

Summary by CodeRabbit

  • Tests
    • Updated the temporary-path containment test to compare paths using the same native resolution behavior as the application, while retaining verification of the TEMP input.

… resolver

The #7359 default-resolver case compared realpathSync.native output with a
fixture path resolved by the JS realpath, which keeps the 8.3 RUNNER~1
spelling on hosted Windows (run 39215956943, windows 9/9).
@lidge-jun
lidge-jun requested a review from Ingwannu as a code owner October 19, 2026 07:32
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 19, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-19T07:34:58.078376Z e218317 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@coderabbitai

coderabbitai Bot commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository: lidge-jun/opencodex/.coderabbit.yaml
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: 84b75e7d-69af-4566-a169-0ce5879846c5
📥 Commits

Reviewing files that changed from the base of the PR and between 955d8c2 and e218317.

📒 Files selected for processing: 1
  • tests/ci-workflows/test-temp-quarantine.test.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 7 remain after this review.

📝 Walkthrough

The TEMP containment test now derives its expected path with realpathSync.native. It retains the assertion that the resolver receives fixture.env.TEMP.

Changes: TEMP Path Test

Layer / File(s) Summary
Native path assertion
tests/ci-workflows/test-temp-quarantine.test.ts
The test compares the returned path with the native-resolved fixture path. It also verifies that the native resolver receives fixture.env.TEMP.

Priority: ⬇️ Low

Estimated code review effort: 1 (Trivial) | ~3 minutes

Change: Other

Merge Risk: ⚪ Minimal · up to e2183

This changes only the containment test’s expected path and does not alter production behavior. The reported macOS run passes; hosted-Windows confirmation remains pending, but no concrete merge-blocking risk is identified.

Pre-merge checks: Passed 5
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly describes the main test change: comparing the default containment result through the native resolver. It is specific, concise, and aligned with the updated expectation in tests/ci-wo…
Docstring Coverage Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 1…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title clearly describes the main test change: comparing the default containment result through the native resolver. It is specific, concise, and aligned with the updated expectation in tests/ci-workflows/test-temp-quarantine.test.ts.

Full details: Docstring Coverage

Explanation

No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 1 files.

✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • 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.

@github-actions

Copy link
Copy Markdown
Contributor

✅ Deterministic PR hygiene checks passed.

@github-actions github-actions Bot added the chore Maintenance, CI, tests, refactors, or build changes (not a user-facing bug or feature). label Oct 19, 2026
@lidge-jun
lidge-jun merged commit c344c6c into dev Oct 19, 2026
28 of 30 checks passed
@lidge-jun
lidge-jun deleted the fix/test-temp-quarantine-native-expectation branch October 19, 2026 07:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

chore Maintenance, CI, tests, refactors, or build changes (not a user-facing bug or feature).

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant