Skip to content

fix: run fixPath() before provider health check layer construction - #268

Closed
JungHoonGhae wants to merge 1 commit into
pingdotgg:mainfrom
JungHoonGhae:fix/run-fixpath-before-provider-health-check
Closed

JungHoonGhae wants to merge 1 commit into
pingdotgg:mainfrom
JungHoonGhae:fix/run-fixpath-before-provider-health-check

Conversation

@JungHoonGhae

@JungHoonGhae JungHoonGhae commented Mar 7, 2026 •

Copy link
Copy Markdown

Summary

On macOS, Electron apps inherit a minimal PATH that typically excludes directories like /opt/homebrew/bin. The Codex provider health check (ProviderHealthLive) runs during layer construction in LayerLive, which happens before the existing fixPath() call in makeServerProgram. This means the health check cannot locate the codex binary even when it is properly installed via Homebrew or npm global, causing:

Codex CLI (codex) is not installed or not on PATH.

This PR moves the fixPath() call to module-level in main.ts so it executes before any layer construction begins. The existing call inside makeServerProgram is kept as-is since fixPath() is idempotent.

Reproduction

  1. Install Codex CLI via npm global (npm i -g @openai/codex)
  2. Open T3 Code (Alpha) on macOS — the Electron app does not include /opt/homebrew/bin in its PATH
  3. Observe "Codex CLI (codex) is not installed or not on PATH" error in provider status

Test plan

  • bun lint passes (0 errors)
  • bun run test passes (392 tests, 0 failures)
  • Existing ProviderHealth.test.ts tests still pass

Note

Run apps/server bootstrap fixPath() before constructing provider health check layers in main.ts

Insert an early call to fixPath() during module bootstrap in main.ts before building layers and executing provider health checks.

📍Where to Start

Begin at the module bootstrap in main.ts, focusing on the early fixPath() invocation and the subsequent health check layer construction.

Macroscope summarized 15a383b.

On macOS, Electron apps inherit a minimal PATH that typically excludes
directories like /opt/homebrew/bin. The Codex provider health check
(ProviderHealthLive) runs during layer construction, which happens
before the existing fixPath() call in makeServerProgram. This means
the health check cannot locate the `codex` binary even when it is
properly installed via Homebrew or npm global.

Move fixPath() to module-level so it executes before any layer
construction begins. The existing call inside makeServerProgram is
kept as-is since fixPath() is idempotent.
@vercel

vercel Bot commented Mar 7, 2026

Copy link
Copy Markdown

@JungHoonGhae is attempting to deploy a commit to the Ping Labs Team on Vercel.

A member of the Team first needs to authorize it.

@coderabbitai

coderabbitai Bot commented Mar 7, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 6a2678e3-e496-4756-b462-24ac5012efbe

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@JungHoonGhae

Copy link
Copy Markdown
Author

Closing in favor of #248 which addresses the same PATH resolution issue more comprehensively (shared shellPath resolver, ANSI stripping, fish support, desktop+server coverage).

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant