Repository navigation
fix(macos): allow cold ChatGPT Codex probes - #128819
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: needs maintainer review before merge. Reviewed August 26, 2026, 10:13 PM ET / August 27, 2026, 02:13 UTC. ClawSweeper reviewWhat this changesThe PR gives known macOS ChatGPT/Codex application-bundle executables a three-second version-probe timeout during onboarding discovery and adds regression coverage. Merge readinessKeep open: current main still uses the generic 1.5-second app-bundle probe, while this focused PR addresses that gap. It is maintainer-authored and protected, and direct sibling Codex-source inspection was unavailable, so this review cannot mark it merge-ready. Priority: P2 Review scores
Verification
How this fits togetherOnboarding probes local AI tools and then classifies an available Codex executable’s login state to offer a reusable provider route. The change adjusts only the macOS app-bundle version probe before the existing login classifier runs. flowchart LR
A[macOS onboarding] --> B[Generic command discovery]
B --> C[Known app-bundle paths]
C --> D[Version probe timeout]
D --> E[Codex login classification]
E --> F[Detected provider route]
Decision needed
Why: This is an intentional availability tradeoff in first-run onboarding, and the reviewer could not independently inspect the required sibling Codex source contract. Before merge
Agent review detailsSecurityNone. PR surfaceSource +6, Tests +35. Total +41 across 2 files. View PR surface stats
Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Land only after direct Codex command-contract inspection and targeted cold-start validation on the current merge head confirm that the path-scoped three-second budget remains acceptable. Do we have a high-confidence way to reproduce the issue? Yes, at source level: current main calls the known macOS app-bundle executable with the 1,500 ms default, while the branch’s focused test models a cold binary that succeeds only at 3,000 ms. Independent execution was unavailable because Corepack attempted to create a cache on the read-only filesystem. Is this the best way to solve the issue? Unclear: a path-scoped timeout at the local-probe owner is the narrowest implementation and leaves generic, non-macOS, Claude, and Gemini probes unchanged, but direct Codex-contract inspection and current-merge-head validation remain incomplete. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against bdc0c924ce04. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (6 earlier review cycles)
|
|
Completed the required direct sibling Codex source inspection locally at
Conclusion: this PR changes only the macOS app-bundle discovery timeout. It does not change Codex arguments, parsing, auth semantics, or generic PATH probes. Focused exact-head coverage remains 33/33 passing. Exact-head Base VM cold-start proofCompleted on the live immutable
This closes the remaining macOS cold-start evidence gap: exact-head discovery found the authenticated ChatGPT-bundled Codex route on the first attempt and completed within the app-bundle probe's three-second bound. |
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
Maintainer verification complete for exact head
Known follow-up: topology cleanup for #130541/#130542 remains pending outside this landing task. |
|
Merged via squash.
|
What Problem This Solves
On macOS, onboarding can miss an authenticated ChatGPT/Codex installation on its first pass. The signed Codex binary inside
ChatGPT.appcan spend most of the generic 1.5-second command-probe budget in cold-start validation, so the initial probe times out even though an immediate retry succeeds.Why This Change Was Made
Known ChatGPT/Codex application-bundle binaries now receive a 3-second
--versionprobe budget. Generic PATH discovery, Claude, Gemini, and non-macOS probes keep the existing timeout. The discovered executable continues through the existingcodex login statusclassifier.User Impact
macOS onboarding detects an already-installed ChatGPT/Codex subscription more reliably on the first pass. Only known application-bundle paths can wait longer; ordinary CLI discovery and other platforms are unchanged.
Evidence
src/commands/onboard-inference.test.tsfailed 2 tests and passed 31 against currentmain; after the fix it passes all 33 tests.node scripts/check-changed.mjs -- src/commands/onboard-inference.ts src/commands/onboard-inference.test.tscompleted all runnable guards. Core/test typechecking was unavailable because this RooClaw sparse checkout excludes trackedpackagesanduiinputs.openai/codex@4d7e3e90d9781514f9b3b99c95169a2386868ad9:codex-rs/cli/src/main.rs:95-105confirms Clap owns--version;main.rs:510-514,1394-1407defines and routeslogin status;codex-rs/cli/src/login.rs:439-485confirms the ChatGPT/logged-out/error status outputs and exit behavior consumed here.703aca2086a596f324a04f4de32152b996401f42and the matching self-contained CLI package, with standalonecodexexcluded fromPATH. The first productiondetectSetupInference()call completed in 2,313 ms and returned authenticatedcodex-cli/ ChatGPT subscription on the first pass. The powered-ongui/501session was neither restarted nor logged out. Full proof: fix(macos): allow cold ChatGPT Codex probes #128819 (comment)Maintainer Decision
Accept the app-specific 3,000 ms
--versionprobe budget. It applies only after generic PATH discovery fails and only to the enumerated macOS ChatGPT/Codex app-bundle executables; generic CLI and non-macOS probes remain at 1,500 ms. A matching cold or hung app binary may therefore hold this discovery step for up to 1.5 seconds longer than before. That bounded availability cost is intentional. Exact-head packaged detection completed in 2,313 ms.Direct inspection of
openai/codex@a6e63f9f32525d171676ac49c4e87ab00d76f0ceconfirms:codex-rs/arg0/src/lib.rs:157-173performs dotenv and PATH-alias setup before CLI parsing.codex-rs/cli/src/main.rs:99-106,1050-1056makes--versiona Clap-owned parser exit before subcommand config or authentication work.codex-rs/cli/src/main.rs:1515-1528routeslogin statusseparately torun_login_status.codex-rs/cli/src/login.rs:443-464loads configuration and authentication only on that login-status path.codex-rs/login/src/auth/storage.rs:265-299,431-440shows auth storage can load from the keyring with file fallback.codex-rs/keyring-store/src/lib.rs:41-68shows the default keyring load reaches the OS credential store.The existing
login statusauth and keyring semantics are unchanged.