Uh oh!
There was an error while loading. Please reload this page.
test(server): resolve the temp dir before asserting discovered Cursor skill paths - #9401
Open
ylcn91 wants to merge 1 commit into
Open
test(server): resolve the temp dir before asserting discovered Cursor skill paths#9401ylcn91 wants to merge 1 commit into
ylcn91 wants to merge 1 commit into
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. Fixespingdotgg#9388
Contributor
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
approved these changes
Sep 3, 2026
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.