pingdotgg / pingdotgg/t3code

test(server): skills discovery asserts unrealpath'd TMPDIR paths — deterministic failure on macOS (/var → /private/var)

Open Beginner friendly
#9,388 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
23k
Forks
5.9k
Avg merge
11h 14m
Merged PRs (30d)
357

Description

apps/server/src/provider/Layers/CursorProvider.test.ts"Cursor skills > discovers recursive project skills with project precedence" fails deterministically on macOS.

Introduced by #9180 (workspace-skill discovery): discovery canonicalizes every skill path with fs.realpathSync, but the fixture builds its expectations from os.tmpdir() without canonicalizing. On macOS $TMPDIR sits under /var, which is a symlink to /private/var, so the expected strings can never equal the received ones:

expected: /var/folders/…/T/cursor-skills-workspace-…/.cursor/skills/internal/SKILL.md
received: /private/var/folders/…/T/cursor-skills-workspace-…/.cursor/skills/internal/SKILL.md

(3 of 3 project-scope entries differ exactly this way; the test is 1 failure / 24 passes in the file, reproducible on every run.)

Product code looks correct — canonicalizing is deliberate (it matches Node's own import.meta.url behavior for ESM) and keeps discovery results stable across symlinked install locations. Linux CI is unaffected (/tmp is not a symlink there), which is why this only shows up running the suite locally on macOS.

Suggested fix: build the fixture's expected paths from fs.realpathSync(workspaceRoot) (same class as the entrypoint.test.ts symlink case, which has the same macOS-only failure mode).

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Open apps/server/src/provider/Layers/CursorProvider.test.ts and locate “Cursor skills > discovers recursive project skills with project precedence.” Compare the fixture’s expected paths with the discovery output, then run the test file on macOS; done means the project-scope expectations use canonical paths and the test passes.

Written by the indexing model from the issue text.

Assessment

Tech stack
macos, nodejs, typescript
Domain
testing-qa
Issue type
Bug
Difficulty
1/5
Estimated time
Under an hour
Activity status
Active
Clarity
Clearly specified
Newbie friendliness
90/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.