GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||||||||||||||||||||||||||||||||||||||||
GeezerVison is showing github.com — Fix desktop/server PATH resolution and startup check for codex by baggiiiie · Pull Request #248 · pingdotgg/t3code Conversation
|
|
@baggiiiie is attempting to deploy a commit to the Ping Labs Team on Vercel. A member of the Team first needs to authorize it. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
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)
Tip Try Coding Plans. Let us write the prompt for your AI agent so you can ship faster (with fewer bugs). 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 |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
hey @maria-rcks , i took the liberty to attempt a fix on the MacOS/Linux issue with codex probe: it might be narrowly targeted at my case (macOS, fish shell, codex installed with homebrew). lmk if any other related code change is needed! thanks! |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Bug (related to pingdotgg#234): - codex availability checks can fail at startup because the app/server process gets an incorrect or incomplete PATH, causing startup spawn failures and false “codex not installed/on PATH” errors. - Server health probes could run before PATH repair during layer initialization. - crash loop observed: ``` @t3tools/desktop:start: [10:59:35.373] INFO (pingdotgg#10): Migrations ran successfully @t3tools/desktop:start: [10:59:35.375] ERROR (pingdotgg#10): RangeError: The value of "err" is out of range. It must be a negative integer. Received 1 @t3tools/desktop:start: at Object.getSystemErrorName (node:util:331:11) @t3tools/desktop:start: at new ErrnoException (node:internal/errors:733:23) @t3tools/desktop:start: at ChildProcess.spawn (node:internal/child_process:421:11) @t3tools/desktop:start: at Module.spawn (node:child_process:810:9) @t3tools/desktop:start: at MixedScheduler.<anonymous> (file://personal/t3code/node_modules/.bun/@effect+platform-node-shared@https+++pkg.pr.new+Effect-TS+effect-smol+@effect+platform-node-shared@8881a9b606d84a6f5eb6615279138322984f5368+eecd35a1726d7096/node_modules/@effect/platform-node-shared/dist/NodeChildProcessSpawner.js:228:37) @t3tools/desktop:start: [desktop] backend exited unexpectedly (code=1 signal=null); restarting in 500ms ``` - Error `RangeError ... getSystemErrorName ... Received 1` came from a failed `spawn()` during startup health checks, and in my case it was triggered by the broken PATH state (caused by shell/PATH normalization behavior). Cause: - PATH normalization assumed shell output shape and did not robustly sanitize interactive shell artifacts. - Non-Windows handling was inconsistent across desktop/server startup paths. - Provider health check (`codex --version`) executed before PATH was reliably normalized. Fix: - Add shared shell PATH resolver (`@t3tools/shared/shellPath`) with: - fish-aware probing - ANSI/control-sequence stripping - delimiter normalization - Use shared resolver in desktop and server `fixPath` logic. - Expand PATH repair to non-Windows startup paths (macOS + Linux). - Ensure server `fixPath` executes before provider layer startup/health probing. - Add focused tests for shell PATH normalization behavior.
54b548a to
eaf9336
Compare
|
|
||
| try { | ||
| const shell = process.env.SHELL ?? "/bin/zsh"; | ||
| const result = ChildProcess.execFileSync(shell, ["-ilc", "echo -n $PATH"], { |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
this was what broke in my local machine:
fish -ilc 'echo -n $PATH' gives space separated list of paths
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| function getShellProbe(shellPath: string): ReadonlyArray<string> { | ||
| const shellName = basename(shellPath).toLowerCase(); | ||
| if (shellName === "fish") { | ||
| return ["-ilc", "string join : $PATH"]; |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
fish -ilc 'string join ":" "$PATH"' gives colon separated list of paths, like bash/zsh
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| if (shellName === "fish") { | ||
| return ["-ilc", "string join : $PATH"]; | ||
| } | ||
| return ["-ilc", 'printf "%s" "$PATH"']; |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
echo behaves differently depending on the shell
updated to use printf for consistency, as it's part of the POSIX standard
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| }); | ||
|
|
||
| const makeServerProgram = (input: CliInput) => | ||
| const makeServerProgram = () => |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
makeServerProgram no longer needs CLI args directly, as
fixPath() first.ProviderHealthLive now starts after PATH is normalized.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Merged another fix that should handle this, if it doesn't pls make new pr |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
## Summary This merges `pingdotgg/t3code` at `5c5dcbc60b` into the fork. It branches from `main` at `59369391d6`, and no other merge PR was open to stack on. - Upstream range: 3247 files changed upstream and 3247 landed. The fork delta is 818 files (`git diff --stat HEAD^2 HEAD`). - 32 conflicts, each resolved by the verdict `preflight.mjs` printed. `docs/fork/upstream-merge-log.md` (entry 2026-10-17) records the details. - Fork-deleted files that upstream modified stay deleted: `apps/server/src/cli/pair.ts`, `pair.test.ts`, `components/preview/useDiscoveredLocalServers.ts`. - `ChatView.tsx`: took upstream's hook extraction. The fork deltas moved with upstream's code: - `scriptsEditable` → `chat/useProjectScriptEditing.ts` - `sandbox` panel surface and `onRetargetFile` → `chat/RightPanelSurfaceContent.tsx`, which also drops upstream's `configuredPreviewUrls` - The inventory entries now point at both files. - `Sidebar.tsx`: upstream moved partitioning into `useSidebarThreads`/`partitionSidebarThreads`. The browse filter, `showsClosed`/`hidesSubtasks`/`isBrowsing`, and the rule that pinned threads are never settled are restated there. - Upstream adopted React Compiler and removed `useCallback`/`useMemo`. Fork lines in `useThreadActions.ts`, `useProjectScriptSettings.ts`, `MessagesTimeline.tsx`, `PreviewView.tsx`, `DiffPanel.tsx` and `BranchToolbar.tsx` are restated as plain functions. - Upstream's new `reactCompiledFiles.test.ts` rejects `try/finally`. Two fork blocks used it: `startSandboxForScript` in ChatView and the frame pick handler in PreviewView. Both now call `.finally()` on the promise. - `pnpm-lock.yaml`: took upstream's copy, stripped `tsc-rs`, and re-derived it. ## New fork deltas - Root `vite.config.ts`: upstream's new `t3code/no-low-value-comments` rule is off for `packages/moatless-api/src/generated/**`, because orval regenerates those comments. The new `root-vite-config` path policy covers this, and "Root Vite Lint Delta" in `upstream-merge-inventory.md` explains it. - Upstream restored the mobile-app store row in Settings. It is now gated on `FEATURES.connections`, and `features.ts` maps the `mobile-app` settings search ID to `connections`. - Four `// ---- X ----` dividers removed from fork settings panels, which upstream's comment rule rejects. ## Verification `verify.mjs`: - Green: duplicate-adds, tripwires, resolution-check, unsupported-methods (ADD 0, DROP 0, KEEP 2), lockfile, fmt, lint, typecheck and build. - The React Compiler fix came after that run. Since then, web typecheck, lint and format on the two changed files, the web build, and the full `@t3tools/web` suite (544/544 files) all pass. - Each of these test files fails when run alone, and all of them failed on the 2026-10-16 merge too: `@t3tools/shared` `AgentScope.test.ts`; `t3` `ServerBrowserPage.test.ts`, `AcpAdapterV2.test.ts`, `OrchestratorReplayFixtures.integration.test.ts`; `provider-opencode` `OpenCodeServerLedger.test.ts`; `ssh` `tunnel.test.ts`. This merge didn't touch any of them. - The sandbox restarted three times during verification. After the React Compiler fix, the repo-wide `pnpm typecheck` was not re-run to completion; only `apps/web` changed, and its typecheck passes. ## Feature classification ### Usable as-is - React Compiler adoption and the related perf work across `apps/web`, plus upstream's ChatView hook extraction - Sidebar crash fix (pingdotgg#20522) - Reconnect grace period (pingdotgg#20441); fixes for drafts when switching machines (pingdotgg#20442, pingdotgg#20519) - Running-status banners on one line (pingdotgg#20194) - Project icons load as one chunk (pingdotgg#20147) - PR stacks grouped under their parent PR (pingdotgg#20160); typed search qualifiers in PR search (pingdotgg#19934) - Provider status pushes leave unchanged providers identical (pingdotgg#20392) - Tooltip updates (pingdotgg#20448) - The `t3code/no-low-value-comments` lint rule and upstream's comment pruning - Mobile/Expo updates (not a fork target) ### Unsupported in Moatless / needs implementation - pingdotgg#20432: pairing grants access, and T3 Connect management is on by default. Pairing and Connect stay decided out, and the tripwires still pass. - pingdotgg#20422: mobile-app store row in Settings. The T3 mobile app pairs with a T3 server, so the row is gated behind `FEATURES.connections`. ### Backend behavior to consider reproducing in Moatless - pingdotgg#20184: follow-up messages sent during `/compact` or `/logout` are queued. When `canSteer` is false the client now sends `queue`, so the Moatless backend should accept a queued follow-up while compaction runs. - pingdotgg#19750: after a restart, threads whose background subagent work was cut off are woken. - pingdotgg#19751: background subagents keep T3 tools after the parent turn ends. Pending subagent work carries `providerInstanceId`. - pingdotgg#15945: a slow but healthy Codex is no longer reported Unavailable. `docs/fork/gaps.md` → "Runtime fixes upstream made to its own server" now lists all four. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- Moatless task: https://moatless.soaplabstest.com/tasks/38d3e8f3-9a5a-4aa3-af58-4b8a67b97a86
…e machine cache' (pingdotgg#248) from test/worldfs-blobless-mirrors-main into main
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.