test: make workspace-load symlink tests compatible with Windows#97437
test: make workspace-load symlink tests compatible with Windows#97437aniruddhaadak80 wants to merge 2 commits into
Conversation
|
Codex review: needs maintainer review before merge. Reviewed July 5, 2026, 4:20 AM ET / 08:20 UTC. Summary PR surface: Tests +47. Total +47 across 1 file. Reproducibility: yes. from source inspection: current main still guards the affected symlink boundary tests with Review metrics: 1 noteworthy metric.
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 focused test-only change after normal maintainer and CI review, with any broader symlink test helper extraction left for a later batch if this pattern spreads. Do we have a high-confidence way to reproduce the issue? Yes from source inspection: current main still guards the affected symlink boundary tests with Is this the best way to solve the issue? Yes. The latest head aligns the setup with the same AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 05c9dccf35ec. Label changesLabel changes:
Label justifications:
Evidence reviewedPR surface: Tests +47. Total +47 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. |
|
This pull request has been automatically marked as stale due to inactivity. |
Related: #97437
What Problem This Solves
Fixes an issue where several workspace-load symlink boundary tests were unconditionally skipped on Windows environments, even if the environment supports creating file and directory symlinks (like with Developer Mode enabled).
Why This Change Was Made
Replaces the hardcoded
process.platform !== "win32"skips with dynamic capability checks (canCreateDirectorySymlinksandcanCreateFileSymlinks). If file and directory symlinks are supported by the environment, the tests execute. Otherwise, they skip gracefully while keeping coverage active on capable hosts. Additionally, replaces literal "dir" arguments in symlink calls with the OS-appropriate directorySymlinkType to ensure tests run properly on Windows.User Impact
No user-visible product impact. This improves test portability and preserves regression coverage on capable Windows environments.
Evidence
Tests run successfully on Windows when directory junctions are supported.
Test output from a Windows environment:
✓ src/skills/loading/workspace-load.test.ts (29) ✓ loadWorkspaceSkillEntries (29) ✓ loads direct skills under skills directory (skills/skill.md) ✓ keeps loading direct skills (skills/skill/SKILL.md) unchanged ... Test Files 1 passed (1) Tests 29 passed (29) Start at 08:04:21 Duration 2.41sCode conforms to existing symlink capability patterns by using directorySymlinkType.