Conversation
… skill paths Cursor skill discovery canonicalizes every skill path with realpath, but the project-precedence fixture builds its expected paths from the raw os.tmpdir() workspace. On macOS the temp dir lives under /var, which is itself a symlink to /private/var, so the expected and received paths never match and the test fails on every run. Linux CI is unaffected. Resolve the workspace directory with realPath before writing the fixture so the expectations line up with what discovery reports. Fixes pingdotgg#9388
ApprovabilityVerdict: Approved at Macroscope's review found this PR approvable — This is a small test-only fix that canonicalizes the temporary workspace path so macOS path comparisons match discovery behavior. It has no production runtime, schema, default, deployment, or static-analysis impact. Notes:
You can add or adjust custom eligibility rules. Learn more. |
Mnigos
left a comment
There was a problem hiding this comment.
Verified on macOS: the Cursor skills test fails deterministically on main and passes with this. Matches how discovery canonicalizes paths, so the test asserting the realpath'd form is correct.
|
Thanks for the PR. We're not taking changes to the orchestration and provider layers right now: that part of the server is being rewritten for V2, and merging into the current code would either conflict with or be thrown away by that work. Closing for now. If this is still an issue once V2 lands, please reopen (or open a fresh PR against the new code) and we'll take a proper look. |
What Changed
apps/server/src/provider/Layers/CursorProvider.test.ts, "discovers recursive project skills with project precedence": the workspace temp directory is resolved withfileSystem.realPathbefore the fixture is written, so the expected skill paths are built from the canonical path. Two lines plus a comment.Why
Fixes #9388.
Cursor skill discovery (from #9180) canonicalizes every skill path with
realpath, but the fixture built its expectations from the rawos.tmpdir()workspace. On macOS the temp dir lives under/var, itself a symlink to/private/var, so expected and received paths never matched and the test failed on every run. Linux CI is unaffected, which is why this only shows up locally on macOS.The product code is correct. Canonicalizing the workspace in the fixture matches what discovery reports, the same approach other server tests already use with
fileSystem.realPath.Before, on macOS:
After:
Server typecheck and lint are clean.
Checklist
Model and harness: Claude Fable 5.1 in Claude Code.
Note
Low Risk
Test-only change with no production code or runtime behavior impact.
Overview
Fixes a macOS-only failure in the Cursor skills discovery test by building expected skill paths from the canonical workspace path instead of the raw temp directory.
The fixture now calls
fileSystem.realPathon the workspace temp dir before writing skills and asserting paths, matching production behavior indiscoverCursorSkills, which canonicalizes directories viarealPath. On macOS,os.tmpdir()often resolves under/varwhilerealPathyields/private/var, so expectations and discovered paths previously diverged; Linux CI was unaffected.Reviewed by Cursor Bugbot for commit 3d778d7. Configure here.
Note
Resolve temp dir via
realPathbefore asserting Cursor skill paths in testThe recursive project-skills discovery test in CursorProvider.test.ts now canonicalizes the temporary workspace path through the filesystem service's
realPathoperation before setting up and asserting project skills. This avoids mismatches caused by the macOS/varto/private/varsymlink, where the raw temp dir path and the discovered path differ.Macroscope summarized 3d778d7.