test: make install-safe-path symlink tests compatible with Windows#90275
Conversation
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Updates the assertCanonicalPathWithinBase test suite to run symlink-related cases on Windows when directory symlinks (junctions) are supported, instead of unconditionally skipping Windows.
Changes:
- Add a runtime probe (
canCreateDirectorySymlinks) to detect whether directory symlinks/junctions can be created in the current environment. - Replace
it.runIf(process.platform !== "win32")withit.skipIf(!canCreateDirectorySymlinks)to skip only when symlinks are unavailable. - Create directory links using the appropriate
fs.symlinktype (junctionon Windows,direlsewhere).
|
Codex review: needs maintainer review before merge. Reviewed June 15, 2026, 10:59 AM ET / 14:59 UTC. Summary PR surface: Tests +17. Total +17 across 1 file. Reproducibility: yes. Current main source still unconditionally skips the three symlink boundary tests on Review metrics: none identified. Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Risk before merge
Maintainer options:
Next step before merge
Security Review detailsBest possible solution: Land the narrow test portability patch after maintainer review and fresh required checks, keeping production install-path helpers unchanged. Do we have a high-confidence way to reproduce the issue? Yes. Current main source still unconditionally skips the three symlink boundary tests on Is this the best way to solve the issue? Yes. Capability-gating these tests and using Windows junctions is the narrow test-layer fix; production install-path helpers and callers stay unchanged. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against c1219d161d3e. Label changesLabel changes:
Label justifications:
Evidence reviewedPR surface: Tests +17. Total +17 across 1 file. View PR surface stats
What I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
|
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
04f3e2b to
53f987d
Compare
|
Land-ready verification for head
The broad CI matrix has one unrelated failure in |
Summary
dirsymlinks elsewhere.Linked context
No linked issue. This is a test portability improvement for existing install-path boundary coverage.
Real behavior proof
Standard_D4ads_v6) through Crabbox.node scripts/run-vitest.mjs src/infra/install-safe-path.test.tscbx_be4230e2069c, runrun_0fb83e164185:mainusesit.runIf(process.platform !== "win32")for all three cases.Tests and validation
node scripts/run-vitest.mjs src/infra/install-safe-path.test.tsnode scripts/run-oxlint.mjs src/infra/install-safe-path.test.tstbx_01kv72nvfyz4fgpny8cyn48xfr:pnpm check:changed.agents/skills/autoreview/scripts/autoreview --mode branch --base origin/mainRisk checklist
Current review state
skipIfduring test declaration.