Repository navigation
fix: run fixPath() before provider health check layer construction - #268
JungHoonGhae wants to merge 1 commit into
Conversation
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.
|
@JungHoonGhae is attempting to deploy a commit to the Ping Labs Team on Vercel. A member of the Team first needs to authorize it. |
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
|
Closing in favor of #248 which addresses the same PATH resolution issue more comprehensively (shared shellPath resolver, ANSI stripping, fish support, desktop+server coverage). |
Summary
On macOS, Electron apps inherit a minimal
PATHthat typically excludes directories like/opt/homebrew/bin. The Codex provider health check (ProviderHealthLive) runs during layer construction inLayerLive, which happens before the existingfixPath()call inmakeServerProgram. This means the health check cannot locate thecodexbinary even when it is properly installed via Homebrew or npm global, causing:This PR moves the
fixPath()call to module-level inmain.tsso it executes before any layer construction begins. The existing call insidemakeServerProgramis kept as-is sincefixPath()is idempotent.Reproduction
npm i -g @openai/codex)/opt/homebrew/binin its PATHcodex) is not installed or not on PATH" error in provider statusTest plan
bun lintpasses (0 errors)bun run testpasses (392 tests, 0 failures)ProviderHealth.test.tstests still passNote
Run
apps/serverbootstrapfixPath()before constructing provider health check layers in main.tsInsert 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.