Skip to content

test: make workshop symlink tests compatible with Windows#97436

Open
aniruddhaadak80 wants to merge 1 commit into
openclaw:mainfrom
aniruddhaadak80:fix/workshop-symlink-skip-win32-final
Open

test: make workshop symlink tests compatible with Windows#97436
aniruddhaadak80 wants to merge 1 commit into
openclaw:mainfrom
aniruddhaadak80:fix/workshop-symlink-skip-win32-final

Conversation

@aniruddhaadak80

Copy link
Copy Markdown
Contributor

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 (canCreateDirectorySymlinks and canCreateFileSymlinks). If file and directory symlinks are supported by the environment, the tests execute. Otherwise, they skip gracefully while keeping coverage active on capable hosts.

User Impact

No user-visible product impact. This improves test portability and preserves regression coverage on capable Windows environments.

Evidence

  • Tests run on Windows when directory junctions are supported.
  • vitest run src/skills/loading/workspace-load.test.ts passes.
  • Code conforms to existing symlink capability patterns.

@clawsweeper

clawsweeper Bot commented Jun 28, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs real behavior proof before merge. Reviewed June 28, 2026, 3:14 AM ET / 07:14 UTC.

Summary
The PR changes workshop service symlink tests to skip based on runtime directory-symlink capability instead of skipping all Windows runs.

PR surface: Tests +27. Total +27 across 1 file.

Reproducibility: yes. from source inspection: the new probe uses a different Windows link type than the test bodies it gates. I did not run a Windows host reproduction in this read-only pass.

Review metrics: 1 noteworthy metric.

  • Windows Symlink Test Gates: 4 changed. All four workshop symlink tests now depend on the new probe, so probe/body link-type consistency matters before merge.

Merge readiness
Overall: 🧂 unranked krab
Proof: 🧂 unranked krab
Patch quality: 🧂 unranked krab
Result: blocked until real behavior proof is added.

Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch.

Rank-up moves:

  • Align the probe and gated symlink setup to the same directory link type.
  • [P1] Add redacted Windows terminal output or a terminal screenshot for the touched workshop test.
  • Update the PR body so the Evidence section references src/skills/workshop/service.test.ts; a fresh ClawSweeper review should run automatically, or a maintainer can comment @clawsweeper re-review.

Proof guidance:

  • [P1] Needs real behavior proof before merge: The PR body lists claims and a command, but no terminal output, logs, screenshot, or linked artifact showing the changed src/skills/workshop/service.test.ts behavior on Windows; please redact private details before posting proof. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.

Risk before merge

  • [P1] Merging as-is can turn capable Windows test hosts red because the gate can pass on junction support while the test setup still requires dir symlink support.
  • [P1] The PR body gives only claims and a command for a different test file, so the changed workshop test behavior has no visible after-fix Windows proof yet.

Maintainer options:

  1. Use One Link Type (recommended)
    Change the gated symlink setup to use the same helper as the probe, or make the probe test the exact dir symlink type before it enables Windows runs.
  2. Keep Windows Skips
    If maintainers do not want junction-backed coverage here, keep the Windows skip and handle a broader shared symlink-test helper separately.

Next step before merge

  • [P1] The PR needs a small author-side code correction plus contributor-visible Windows proof, so it should stay in normal review rather than a cleanup close or repair marker.

Security
Cleared: The diff only changes a test file and does not alter dependencies, workflows, secrets handling, lockfiles, package metadata, or runtime security boundaries.

Review findings

  • [P2] Use the probed link type in the tests — src/skills/workshop/service.test.ts:7
Review details

Best possible solution:

Use one directory link helper for both the probe and all gated symlink setup, then add redacted Windows terminal proof for the touched workshop test.

Do we have a high-confidence way to reproduce the issue?

Yes from source inspection: the new probe uses a different Windows link type than the test bodies it gates. I did not run a Windows host reproduction in this read-only pass.

Is this the best way to solve the issue?

No. The maintainable fix is to align the capability probe with the exact link type used by the gated tests, or to update the test setup to use the cross-platform link type consistently.

Full review comments:

  • [P2] Use the probed link type in the tests — src/skills/workshop/service.test.ts:7
    The new gate probes Windows by creating a junction, but the tests it enables still call fs.symlink(..., "dir"). Node treats those as distinct Windows link types, so a host that can create junctions but cannot create directory symlinks will pass the probe and then fail during test setup; use the same helper in the test bodies or probe dir instead.
    Confidence: 0.9

Overall correctness: patch is incorrect
Overall confidence: 0.9

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 9c95abd49d45.

Label changes

Label changes:

  • add P3: This is a low-risk test portability cleanup with no product runtime behavior change.
  • add merge-risk: 🚨 automation: The diff can cause Windows test automation to run and fail on hosts where junction creation works but dir symlink creation does not.
  • add rating: 🧂 unranked krab: Overall readiness is 🧂 unranked krab; proof is 🧂 unranked krab and patch quality is 🧂 unranked krab.
  • add status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask. Needs real behavior proof before merge: The PR body lists claims and a command, but no terminal output, logs, screenshot, or linked artifact showing the changed src/skills/workshop/service.test.ts behavior on Windows; please redact private details before posting proof. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.

Label justifications:

  • P3: This is a low-risk test portability cleanup with no product runtime behavior change.
  • merge-risk: 🚨 automation: The diff can cause Windows test automation to run and fail on hosts where junction creation works but dir symlink creation does not.
  • rating: 🧂 unranked krab: Overall readiness is 🧂 unranked krab; proof is 🧂 unranked krab and patch quality is 🧂 unranked krab.
  • status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask. Needs real behavior proof before merge: The PR body lists claims and a command, but no terminal output, logs, screenshot, or linked artifact showing the changed src/skills/workshop/service.test.ts behavior on Windows; please redact private details before posting proof. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
Evidence reviewed

PR surface:

Tests +27. Total +27 across 1 file.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 1 31 4 +27
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 1 31 4 +27

What I checked:

Likely related people:

  • ooiuuii: Blame and history point to the commit that introduced the workshop service test file and symlink-gated cases. (role: introduced behavior; confidence: high; commits: 9d800b71c060; files: src/skills/workshop/service.test.ts, src/skills/workshop/service.ts, src/skills/lifecycle/workspace-skill-write.ts)
  • vincentkoc: Live PR metadata shows this person merged the PR whose merge commit introduced the workshop symlink test surface. (role: merger of introducing PR; confidence: medium; commits: 9d800b71c060; files: src/skills/workshop/service.test.ts, src/skills/workshop/service.ts, src/skills/lifecycle/workspace-skill-write.ts)
What the crustacean ranks mean
  • 🦀 challenger crab: rare, exceptional readiness with strong proof, clean implementation, and convincing validation.
  • 🦞 diamond lobster: very strong readiness with only minor maintainer review expected.
  • 🐚 platinum hermit: good normal PR, likely mergeable with ordinary maintainer review.
  • 🦐 gold shrimp: useful signal, but proof or patch confidence is still limited.
  • 🦪 silver shellfish: thin signal; proof, validation, or implementation needs work.
  • 🧂 unranked krab: not merge-ready because proof is missing/unusable or there are serious correctness or safety concerns.
  • 🌊 off-meta tidepool: rating does not apply to this item.

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 keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

@clawsweeper clawsweeper Bot added rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. merge-risk: 🚨 automation 🚨 May affect CI, automerge, proof capture, label sync, or maintainer automation. labels Jun 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge-risk: 🚨 automation 🚨 May affect CI, automerge, proof capture, label sync, or maintainer automation. P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. size: XS status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant