test: make qqbot symlinked media helper test robust on Windows#90223
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 qqbot downloadFile test suite to conditionally skip the symlink-related test based on whether the environment can create file symlinks.
Changes:
- Added a symlink capability probe (
canCreateFileSymlinks) using a temp directory. - Adjusted the symlink test’s skip condition to be more selective on Windows.
|
Codex review: needs maintainer review before merge. Reviewed June 20, 2026, 6:58 AM ET / 10:58 UTC. Summary PR surface: Tests +15. Total +15 across 1 file. Reproducibility: yes. for the test behavior: current main and v2026.6.8 unconditionally skip the symlink rejection case on Windows, while PR head uses a capability probe. I did not run tests because this was a read-only review. 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:
Next step before merge
Security Review detailsBest possible solution: Land the focused test-only capability gate after ordinary maintainer and required-check review, leaving QQ Bot runtime behavior unchanged. Do we have a high-confidence way to reproduce the issue? Yes for the test behavior: current main and v2026.6.8 unconditionally skip the symlink rejection case on Windows, while PR head uses a capability probe. I did not run tests because this was a read-only review. Is this the best way to solve the issue? Yes. A local file-symlink capability gate is the narrow maintainable fix for this test, and it avoids the broad platform skip while keeping runtime code unchanged. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 602bc0baa9c8. Label changesLabel justifications:
Evidence reviewedPR surface: Tests +15. Total +15 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 |
|
🦞👀 Command router queued. I will update this comment with the next step. |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
0a22111 to
1a183e2
Compare
Replaces the hardcoded Windows skip in the QQ Bot file-utils test with a dynamic file-symlink capability check. If file symlinks are supported by the environment, the test executes. Otherwise, it skips gracefully while keeping coverage active on capable hosts.
What Problem This Solves
The symlinked local-media helper test should reject symlinked media paths when the runtime can create file symlinks, but it should not fail the suite on Windows or restricted environments where file symlink creation is unavailable. Gating the test on actual capability avoids false negatives while preserving the security regression coverage where the behavior can be exercised.
Evidence
extensions/qqbot/src/engine/utils/file-utils.test.tscompleted with1 passedtest file,4 passedtests, and1 skippedsymlink test when file symlink creation was unavailable.cb7d5a162e24f7ec5be6985e97b2b74ae45b20f9changes the probe to asyncfs.promisesAPIs and skips solely on!canCreateFileSymlinks, which addresses the stale Copilot comments about non-Windows restricted environments and synchronous import-time filesystem work.