test: make fs-safe hardlink tests compatible with Windows#90273
test: make fs-safe hardlink tests compatible with Windows#90273aniruddhaadak80 wants to merge 2 commits into
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 fs-safe hardlink-related tests to skip based on actual hardlink capability rather than OS platform heuristics.
Changes:
- Added a runtime hardlink capability probe (
canCreateHardlinks) usingnode:fs+os.tmpdir(). - Replaced
it.runIf(process.platform !== "win32")withit.skipIf(!canCreateHardlinks)for hardlink tests.
|
Codex review: needs maintainer review before merge. Reviewed July 5, 2026, 4:22 AM ET / 08:22 UTC. Summary PR surface: Tests +31. Total +31 across 1 file. Reproducibility: yes. at source level: current main and Review metrics: 2 noteworthy metrics.
Stored data model 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
Maintainer decision needed
Security Review detailsBest possible solution: Merge the test-only capability gate after the closing reference is narrowed or removed, so the broader WSL issue stays open unless maintainers intentionally close it. Do we have a high-confidence way to reproduce the issue? Yes, at source level: current main and Is this the best way to solve the issue? Yes for the code: probing actual hardlink capability is narrower and more maintainable than an OS-name skip. The issue-management part should be corrected because the linked closing issue is broader than this patch. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 4deb63c9791c. Label changesLabel changes:
Label justifications:
Evidence reviewedPR surface: Tests +31. Total +31 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
Review history (1 earlier review cycle)
|
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
feaa297 to
0f7f75f
Compare
|
Rebased onto main. Ready for re-review. |
0f7f75f to
18e5a8b
Compare
5a9cb72 to
30cea5a
Compare
|
This pull request has been automatically marked as stale due to inactivity. |
Closes #7057
What Problem This Solves
The fs-safe hardlink-related test cases were hardcoded to be skipped on Windows, resulting in lost test coverage. This assumption is incorrect, as Windows NTFS local file systems do support hardlinks.
Why This Change Was Made
Replaces the hardcoded Windows skips (
process.platform !== "win32") in thefs-safehardlink-related test cases with a dynamiccanCreateHardlinkscapability check. If hardlink creation is supported by the partition and environment, the tests will now run on Windows.User Impact
Improves test accuracy and coverage for Windows environments without affecting production behavior for the end user.
Evidence
The following test execution log shows the test run on Windows. All hardlink tests executed and passed successfully (25 passed, 9 skipped):