Skip to content

test(server): entrypoint symlink test passes on macOS - #16438

Closed
yaacovcorcos wants to merge 1 commit into
pingdotgg:mainfrom
yaacovcorcos:claude/upstream-server-entrypoint-symlink-20261006
Closed

yaacovcorcos wants to merge 1 commit into
pingdotgg:mainfrom
yaacovcorcos:claude/upstream-server-entrypoint-symlink-20261006

Conversation

@yaacovcorcos

Copy link
Copy Markdown

Problem

matches through a symlinked entrypoint, as npm and npx install it in
apps/server/src/entrypoint.test.ts fails on macOS. Its temp directory sits under /var, which is
a link into /private/var. The test builds the module URL from that unresolved path, but Node
always resolves the entry module's real path, so the fixture describes a launch that cannot happen.
On Linux the temp directory is real and the test passes.

Fix

Resolve the test's temp directory with realpathSync in makeTempDir. entrypoint.ts does not
change.

Why it qualifies

Maintenance fix with no user impact: one test helper, so the server tests pass on macOS.

How it was established and checked

Before (cd apps/server && vp test run src/entrypoint.test.ts, macOS):

× matches through a symlinked entrypoint, as npm and npx install it
AssertionError: expected false to be true // Object.is equality
Tests  1 failed | 4 passed (5)

After: Tests 5 passed (5).

To confirm the production check is already correct, I ran isEntrypoint from entrypoint.ts as a
real entry module under Node 22.17 on macOS (a version without import.meta.main, so the fallback
runs). The CLI was recognized when launched through /tmp, through /private/tmp, through an
npm-style bin symlink, from PATH, through a symlinked package directory, with a relative path, and
with --preserve-symlinks-main.

Also run: vp fmt --check apps/server/src (clean),
vp lint --report-unused-disable-directives apps/server/src (no findings in the changed file), and
vp run typecheck in apps/server (no new errors; the only errors are in
src/process/externalLauncher.test.ts, which this change does not touch).

Not checked

Windows and Linux; the change only resolves a path that is already real there.

Found in a downstream fork (Scient), then fixed on current main. Investigated and verified with
Claude Opus 5.5 in Claude Code.

🤖 Generated with Claude Code

`matches through a symlinked entrypoint, as npm and npx install it` fails on
macOS. Its temp directory sits under `/var`, a link into `/private/var`, so the
fixture's module URL is a path Node never produces: Node resolves the entry
module's real path. Real launches already work; under Node 22.17 on macOS the
CLI was recognized when run through `/tmp`, `/private/tmp`, an npm-style bin
link, `PATH`, a symlinked package directory, a relative path, and
`--preserve-symlinks-main`.

Resolve the test's temp directory to its real path. Only the test changes.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, add credits to your account and enable them for code reviews in your settings.

@github-actions github-actions Bot added vouch:unvouched PR author is not yet trusted in the VOUCHED list. size:XS 0-9 changed lines (additions + deletions). labels Oct 6, 2026
@macroscopeapp

macroscopeapp Bot commented Oct 6, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Approved at 81e5d1a

Macroscope's review found this PR approvable — This is a five-line maintenance change confined to ignored test content, with no production runtime, product-default, or static-analysis configuration impact. Its scope and risk are sufficiently limited for automated approval.

Notes:

  • No code objects were reviewed. Approvability was decided on eligibility alone.

You can add or adjust custom eligibility rules. Learn more.

@coderabbitai

coderabbitai Bot commented Oct 6, 2026

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Path: .coderabbit.config.ts
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 0147e623-57d3-4f24-85c4-994d6c0d43ce
📥 Commits

Reviewing files that changed from the base of the PR and between 9bd1d80 and 81e5d1a.

📒 Files selected for processing (1)
  • apps/server/src/entrypoint.test.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 7 remain after this review.


📝 Walkthrough

Walkthrough

The makeTempDir test helper now returns the real path of the temporary directory it creates.

Changes

Temporary directory helper

Layer / File(s) Summary
Resolve temporary directory path
apps/server/src/entrypoint.test.ts
makeTempDir resolves the created temporary directory to its real path before returning it.

Priority: ⬇️ Low

Estimated code review effort: 1 (Trivial) | ~3 minutes

Change: Other

Merge Risk: ⚪ Minimal · up to 81e5d

The test fixture now uses the resolved temporary-directory path, with no production behavior changed. No actionable merge risk remains beyond normal checks.

🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies the macOS entrypoint test fix and follows the repository’s conventional commit style.
Description check ✅ Passed The description explains the problem, the fix, why the change is in scope, and the verification results. It also states which platforms were not checked.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Comment @coderabbitai help to get the list of available commands.

@juliusmarminge

Copy link
Copy Markdown
Member

Note

Grok responding on behalf of Julius.

Thanks for this! The same macOS /var → /private/var fix for the symlinked-entrypoint test just landed on main in #9400 (a3d1505), so this PR is now superseded. Closing it out — appreciate the thorough verification.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XS 0-9 changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants