Skip to content

fix(autoreview): diagnose Codex launcher isolation failures - #131002

Merged
vincentkoc merged 1 commit into
mainfrom
chore/sync-autoreview-codex-preflight
Aug 27, 2026
Merged

vincentkoc merged 1 commit into
mainfrom
chore/sync-autoreview-codex-preflight

Conversation

@vincentkoc

@vincentkoc vincentkoc commented Aug 27, 2026 •

Copy link
Copy Markdown
Member

What Problem This Solves

Fixes an issue where autoreview could report that the Codex CLI was missing even though a PATH launcher worked in the caller environment. The launcher could depend on the caller's CODEX_HOME, then fail only after autoreview replaced that environment for the isolated review runtime.

Why This Change Was Made

Syncs the complete canonical autoreview skill from openclaw/agent-skills@1b52afd0954511b8bfdf680361b1f4bed69f1355 (openclaw/agent-skills#194). Codex now gets a local --version preflight under the same isolated HOME, XDG, CODEX_HOME, and PATH shape used by the real review before any provider call or auth staging.

The failure names both the selected and resolved launcher and points to --codex-bin, CODEX_BIN, or PATH correction. No fallback launcher search or auth mutation was added.

User Impact

Developers get an immediate, accurate setup error when a Codex wrapper cannot survive autoreview isolation. Passing an explicit standalone Codex binary continues to work.

Evidence

  • Canonical source: fix(autoreview): validate Codex isolation preflight agent-skills#194
  • Canonical runner and test parity: byte-exact. SKILL.md differs only by OpenClaw-required Markdown table padding; oxfmt --check passes.
  • Current Codex contract checked directly at openai/codex@5f49aba876922d6f2f55caa153bbb0ed1b46feba:
    • scripts/install/install.sh:15-21 installs the public codex command under $HOME/.local/bin while locating standalone packages under ${CODEX_HOME}/packages/standalone.
    • codex-rs/install-context/src/lib.rs:273-306 classifies a standalone install against the canonical CODEX_HOME package tree.
    • codex-rs/arg0/src/lib.rs:157-173 performs CODEX_HOME-sensitive dotenv and PATH alias startup before dispatch.
    • codex-rs/cli/src/main.rs:99-112,1038-1056 declares Clap's local --version path and parses it before entering any provider-backed command flow.
    • Managed CLI proof: codex-cli 0.150.1.
  • uv run --python 3.12 python .agents/skills/autoreview/tests/test_autoreview_hardening.py: 160 passed, 1 skipped.
  • uv run --python 3.12 python .agents/skills/autoreview/scripts/autoreview_test.py: 32 passed.
  • python3 -m py_compile ...: passed.
  • uvx ruff check --select E9,F63,F7,F82 ...: passed.
  • git diff --check origin/main...HEAD: passed.
  • Default PATH launcher manual proof: resolved the installed wrapper, failed locally with exit 127 under isolated CODEX_HOME, and returned actionable --codex-bin / CODEX_BIN guidance before review execution.
  • Explicit standalone manual proof: --codex-bin "$HOME/.local/bin/codex" passed the same isolated dry-run preflight.
  • Canonical autoreview on this exact sync: no findings, patch is correct, 0.98 confidence.

Production/test/docs delta:

  • Tooling: +120/-52
  • Tests: +282/-2
  • Skill documentation: +1/-1

AI-assisted: yes. The change was independently audited, plan-reviewed, implemented in the canonical skill repository, reviewed by ClawSweeper, and then synced here.

@vincentkoc vincentkoc self-assigned this Aug 27, 2026
@vincentkoc
vincentkoc marked this pull request as ready for review August 27, 2026 15:54
@clawsweeper

clawsweeper Bot commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

@openclaw-barnacle openclaw-barnacle Bot added size: M maintainer Maintainer-authored PR labels Aug 27, 2026
@vincentkoc
vincentkoc force-pushed the chore/sync-autoreview-codex-preflight branch from 6666672 to d65ac59 Compare August 27, 2026 16:06
@vincentkoc
vincentkoc merged commit aa0647d into main Aug 27, 2026
174 of 176 checks passed
@vincentkoc
vincentkoc deleted the chore/sync-autoreview-codex-preflight branch August 27, 2026 16:43
@vincentkoc

Copy link
Copy Markdown
Member Author

Merged via squash.

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

Labels

maintainer Maintainer-authored PR size: M

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant