test: make refresh symlink tests compatible with Windows#97438
test: make refresh symlink tests compatible with Windows#97438aniruddhaadak80 wants to merge 2 commits into
Conversation
|
Codex review: needs real behavior proof before merge. Reviewed July 5, 2026, 4:15 AM ET / 08:15 UTC. Summary PR surface: Tests +27. Total +27 across 1 file. Reproducibility: yes. for the source-level test-portability path: current main skips these symlink watcher tests on Windows, while PR head enables them through a directory-link capability probe. I did not reproduce the after-fix Windows run on a real host. 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:
Proof guidance:
Risk before merge
Maintainer options:
Next step before merge
Security Review detailsBest possible solution: Keep the test-only direction and merge after redacted Windows terminal output or an artifact shows the refresh test passing on a junction-capable Windows host and required checks are green. Do we have a high-confidence way to reproduce the issue? Yes for the source-level test-portability path: current main skips these symlink watcher tests on Windows, while PR head enables them through a directory-link capability probe. I did not reproduce the after-fix Windows run on a real host. Is this the best way to solve the issue? Yes, the implementation shape is the narrowest maintainable solution: it stays in the colocated tests and reuses the established Windows junction pattern. The missing piece is contributor-supplied real behavior proof, not another code change. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 07bf384a8b3f. Label changesLabel changes:
Label justifications:
Evidence reviewedPR surface: Tests +27. Total +27 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. |
What Problem This Solves
The automated tests for the refresh symlink feature were failing on Windows. The test capability probe canCreateDirectorySymlink() correctly uses directorySymlinkType (which uses junction on Windows and dir on POSIX systems), but the actual test cases were hardcoded to use the dir type. Windows requires administrator privileges for dir symlinks, which means that while the capability probe passed using junction, the tests still attempted to create dir symlinks and crashed.
Why This Change Was Made
This change ensures that the tests themselves use the same symlink type (directorySymlinkType) that the capability probe checked. This makes the tests behave consistently with the probe and allows them to execute successfully on Windows runners that support junction but not dir.
User Impact
Improves cross-platform development and test reliability on Windows without impacting actual production behaviour.
Evidence
Modified src/skills/runtime/refresh.test.ts to replace hardcoded dir with directorySymlinkType in the s.symlink calls. Tests now pass on Windows platforms.
Related: #97438