Skip to content

refactor: make OpenAI Codex legacy doctor-only#88605

Merged
steipete merged 1 commit into
mainfrom
refactor/openai-legacy-doctor-only
May 31, 2026
Merged

refactor: make OpenAI Codex legacy doctor-only#88605
steipete merged 1 commit into
mainfrom
refactor/openai-legacy-doctor-only

Conversation

@steipete

Copy link
Copy Markdown
Contributor

Summary

  • Canonicalizes OpenAI runtime/provider/model/auth handling so openai-codex and openai-codex-responses are no longer accepted runtime identifiers.
  • Keeps legacy OpenAI Codex state only at migration/repair boundaries: doctor config migration, persisted transcript repair, and old OAuth refresh error hints.
  • Moves legacy model provider cleanup into openclaw doctor --fix, including shadowed models.providers.openai-codex removal when canonical openai config already exists.
  • Makes pnpm check:changed delegate through Crabbox/Testbox by default, snapshots staged paths for remote proof, handles empty staged sets, and marks remote changed-gate children to prevent recursive delegation.
  • Updates tests and docs/agent guidance for the new OpenAI and changed-gate behavior.

Verification

  • git diff --check
  • Local narrow edit-loop: node scripts/run-vitest.mjs test/scripts/crabbox-wrapper.test.ts -- --reporter=dot (115 tests passed)
  • AWS Crabbox focused tooling proof: cbx_fb37d03733a8 / amber-crab, run run_7fd2c0d2fa07, corepack pnpm test test/scripts/crabbox-wrapper.test.ts test/scripts/changed-lanes.test.ts -- --reporter=verbose (170 tests passed)
  • AWS Crabbox broad changed gate: cbx_ec3546011dbe / tidal-prawn, run run_f9f39e7737ea, plain remote corepack pnpm check:changed; wrapper executed it as env OPENCLAW_CHECK_CHANGED_REMOTE_CHILD=1 OPENCLAW_CHANGED_LANES_RAW_SYNC=1 corepack pnpm check:changed and the gate passed
  • Autoreview: .agents/skills/autoreview/scripts/autoreview --mode local clean, no accepted/actionable findings

Real behavior proof

Behavior addressed: OpenAI Codex identifiers are retired from runtime configuration and check:changed no longer runs broad gates locally or recursively delegates from remote Crabbox runs.

Real environment tested: AWS Crabbox Linux (provider=aws) with fresh remote syncs for focused tests and broad changed-gate proof.

Exact steps or command run after this patch: node scripts/crabbox-wrapper.mjs run --provider aws --idle-timeout 90m --ttl 240m --timing-json -- corepack pnpm check:changed.

Evidence after fix: Run run_f9f39e7737ea on lease cbx_ec3546011dbe printed the remote command with OPENCLAW_CHECK_CHANGED_REMOTE_CHILD=1 and OPENCLAW_CHANGED_LANES_RAW_SYNC=1, then completed all changed lanes successfully.

Observed result after fix: Legacy OpenAI Codex config now migrates through doctor-only code paths, and changed gates run on Crabbox with remote-child protection instead of recursing or falling back to local broad checks.

What was not tested: Windows-native changed-gate execution in this final pass; Windows still skips the POSIX changed-gate bootstrap as before.

@steipete steipete requested a review from a team as a code owner May 31, 2026 11:56
@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation scripts Repository scripts commands Command implementations agents Agent runtime and tooling extensions: openai plugin: migrate-hermes size: L maintainer Maintainer-authored PR labels May 31, 2026
@steipete steipete merged commit 00d17e9 into main May 31, 2026
195 of 200 checks passed
@steipete steipete deleted the refactor/openai-legacy-doctor-only branch May 31, 2026 11:58

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 12c6c588ee

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +1392 to +1393
if (commandArgs[0] !== "run" || isWindowsRemoteTarget(commandArgs)) {
return commandArgs;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Mark Windows changed gates as remote children

When a changed gate is launched through Crabbox on a Windows target (for example run --target windows -- corepack pnpm check:changed), this early return leaves the remote command without OPENCLAW_CHECK_CHANGED_REMOTE_CHILD=1. Since check-changed.mjs now delegates by default whenever that marker/CI is absent, the command executed on the Windows machine will start another Crabbox/Testbox run instead of running the gate locally; the updated Windows test confirms the args are left completely unmarked.

Useful? React with 👍 / 👎.

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

Labels

agents Agent runtime and tooling commands Command implementations docs Improvements or additions to documentation extensions: openai maintainer Maintainer-authored PR plugin: migrate-hermes scripts Repository scripts size: L

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant