Repository navigation
fix(local-review): use selected Codex CLI - #541
Conversation
|
@clawsweeper review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
Codex review: needs maintainer review before merge. Reviewed July 13, 2026, 5:02 PM ET / 21:02 UTC. Summary Reproducibility: yes. On current behavior, a Windows local-only review with a stale Desktop Codex installation and a working PATH CLI selects the forced Desktop executable; the contributor reports native after-fix preflight and review runs using the PATH launcher. Review metrics: 2 noteworthy metrics.
Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Risk before merge
Maintainer options:
Next step before merge
Maintainer decision needed
Security Review detailsBest possible solution: Adopt one documented launcher contract—explicit Do we have a high-confidence way to reproduce the issue? Yes. On current behavior, a Windows local-only review with a stale Desktop Codex installation and a working PATH CLI selects the forced Desktop executable; the contributor reports native after-fix preflight and review runs using the PATH launcher. Is this the best way to solve the issue? Yes, conditionally. Centralizing spawnable PATH discovery while retaining explicit override and Desktop fallback is maintainable, but the PATH-first default must be intentionally accepted as the upgrade contract. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 7cc5ef46d1b2. Label changesLabel changes:
Label justifications:
Evidence reviewedWhat I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
Review history (1 earlier review cycle)
|
…pair-ops * origin/main: fix(local-review): use selected Codex CLI (#541)
* fix(local-review): use selected Codex CLI * chore: retrigger PR checks * fix(local-review): preserve Windows Codex fallback
…pair-ops * origin/main: fix(local-review): use selected Codex CLI (openclaw#541)
Summary
Use the operator-selected Codex CLI for local-only reviews and matching local preflight, while preserving a Windows Desktop Codex fallback when no runnable PATH launcher exists.
Problem
review --local-onlyinjectedCLAWSWEEPER_PREFER_WINDOWS_CODEX_APP=1, forcing the Windows Desktop app binary at%LOCALAPPDATA%\OpenAI\Codex\bin\codex.exe. On the reported host that binary is stale and rejects the requested model, while the user's normalPATHCodex CLI works. The local preflight selected the same Desktop binary, which could validate a different executable than the review runner.Implementation
CODEX_BINprecedence.CODEX_BIN, the first spawnable PATHcodex, then the installed Desktop binary only if PATH has no runnable launcher.PATHEXTlauncher over npm's co-located extensionless shell shim; skip unsupported shims and continue searching later PATH entries.Production
.github/actions/setup-codexremains separate and pinned at@openai/codex0.139.0; this PR does not modify it.Validation
node --test test/codex-process.test.ts test/command.test.ts test/clawsweeper.test.ts— passed (90 tests).pnpm run build:all— passed.pnpm run lint:scripts— passed for the original local-preflight script change; the follow-up changes no scripts.oxfmt --checkfor all changed source, documentation, and test files — passed.git diff --check— passed.pnpm run codex:local:check— passed. It selectedC:\Windows\System32\cmd.exe ... C:\Users\marti\AppData\Roaming\npm\codex.cmdand completed thegpt-5.6-solsmoke test.pnpm run review -- --local-only --target-repo openclaw/clawsweeper --target-dir <clean detached checkout> --item-number 541 --artifact-dir <temp>— completed successfully in 3m54s with local-only artifacts only; no GitHub comment, label, or branch mutation was performed.pnpm run checkpreviously completed build and lint, then hit unrelated native-Windows prerequisite failures in existing unit tests: unavailable WSL/bin/bashfor Bash-helper tests, Windows symlink permissions, andnpm.cmdEINVALin runtime packaging. This PR does not broaden into test-harness or platform-policy changes.Proof boundary: native Windows local launcher selection only; no workflow or CI-matrix changes.
Codex review closeout
codex review --uncommittedinitially identified three accepted P2 edge cases: an unspawnable extensionless shim, relative PATH entries resolved from the wrong cwd, and a valid later PATH launcher shadowed by an unsupported earlier shim. Each was fixed with regression coverage.codex review --uncommitted: clean — no blocking correctness issues.codex review --base origin/mainafter commita6163ddff2: clean — explicit overrides, runnable PATH selection, and Desktop fallback were all verified.Risks and rollout
Windows local-only review now preserves desktop-only installations while preventing a stale Desktop binary from overriding the user's working PATH CLI. The behavior is limited to local launcher selection and uses no local CLI pin or update. Production setup remains unchanged. This branch is independent of #539.