Skip to content

fix(onboarding): OpenAI setup installs mismatched Codex plugin - #129195

Merged
steipete merged 11 commits into
mainfrom
fix/codex-onboarding-version-alignment
Aug 26, 2026
Merged

steipete merged 11 commits into
mainfrom
fix/codex-onboarding-version-alignment

Conversation

@steipete

@steipete steipete commented Aug 25, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Fixes an issue where users selecting OpenAI during first-run setup could receive a Codex plugin from a different OpenClaw release cohort when npm's latest plugin did not match the installed core package. The mismatched plugin could carry an incompatible Codex runtime and fail package acceptance immediately after otherwise successful onboarding.

Why This Change Was Made

The runtime-plugin descriptor now carries the same core-version binding already enforced by update and doctor into the existing onboarding install-channel resolver. Stable setup installs the matching @openclaw/codex release cohort while preserving the durable unpinned package intent; beta setup keeps using the beta channel.

Stable correction releases such as [email protected] share their base release cohort with @openclaw/[email protected]; the correction-suffixed plugin version is not published. One canonical release-cohort resolver now owns that distinction for both stable plugin installation and existing plugin-drift detection. Extended-stable setup retains its separate documented exact-core-version contract.

The packaged codex-on-demand lane also declares and serves an immutable matching Codex candidate through the existing test npm registry, so unpublished release candidates exercise the real managed npm installation path instead of public npm latest.

User Impact

OpenAI onboarding now installs a Codex plugin compatible with the user's OpenClaw core release cohort, including published stable correction releases. Release candidates can validate that behavior before publication.

AI-assisted: yes.

Evidence

Before, Package Acceptance run https://github.com/openclaw/openclaw/actions/runs/32820360602 tested candidate source 9d5d881a576aab57c7329d2a514296918447adf8 ([email protected]). codex-on-demand installed @openclaw/[email protected] with @openai/[email protected] and failed because the candidate required 0.149.1.

Correction-release follow-up validation:

  • A new owner-boundary regression failed on the previous PR head: the stable installer incorrectly selected the unpublished @openclaw/[email protected] for [email protected]. It now selects the published @openclaw/[email protected] from the same release cohort.
  • Live npm registry proof: npm view @openclaw/[email protected] version --json returns E404, while npm view @openclaw/[email protected] openclaw.compat.pluginApi --json returns >=2026.7.1.
  • Real package proof: npm pack @openclaw/[email protected] --dry-run --json --ignore-scripts --loglevel=error succeeds against the public registry; the immutable package has 40 entries and integrity sha512-OCEVg4R3yb5vXZiwchJp02o+XmWklnF9EdcXgQUGfvVELwIwJvvvQYJ0tp0M2zJLuA4zDSYPtFVDGviKRrKd2w==.
  • Direct release-channel proof: stable selects @openclaw/[email protected], extended-stable preserves the exact @openclaw/[email protected] contract, and beta keeps @openclaw/codex@beta.
  • 224 focused tests passed across the release parser, install-channel owner, plugin-drift owner, onboarding installer, doctor installer, and skill-authoring integration. Scoped formatting, lint, and diff validation passed; fresh independent autoreview reported no actionable findings.
  • The current main branch also carried a failing /learn integration test that asserted two obsolete copies of skill-authoring guidance. The bounded CI repair now checks the complete canonical SKILL_AUTHORING_STANDARDS_PROMPT instead, preserving the behavior contract without changing production code.

Original PR validation:

  • 309 focused tests passed across the onboarding, install-channel, Docker planner, and Docker script-owner suites.
  • node scripts/check-changed.mjs -- <10 changed paths> passed formatting, typecheck, lint, dead-code, boundary, database-first, import-cycle, and guard lanes.
  • pnpm build passed.
  • Immutable prepublish registry preparation packed @openclaw/[email protected]; manifest SHA-256: 24f507752078b9790d1e46e1da399b778ec893d48fe4bf8c7b6b5b638ab6af72.
  • Fresh structured review with Pi openai/gpt-5.6-sol at high thinking: TruffleHog clean; no accepted/actionable findings (correctness 0.98).
  • bash -n scripts/e2e/codex-on-demand-docker.sh and git diff --check passed.

The current orb has no usable Docker, Blacksmith Testbox, or Crabbox executable, so the final patched Docker product lane is left to exact-head hosted PR proof rather than being reported as locally passed.

@clawsweeper

clawsweeper Bot commented Aug 25, 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 scripts Repository scripts commands Command implementations docker Docker and sandbox tooling labels Aug 25, 2026
@steipete
steipete marked this pull request as ready for review August 25, 2026 09:26
@openclaw-barnacle openclaw-barnacle Bot added size: S maintainer Maintainer-authored PR labels Aug 25, 2026
@clawsweeper clawsweeper Bot added merge-risk: 🚨 automation 🚨 May affect CI, automerge, proof capture, label sync, or maintainer automation. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. P2 Normal backlog priority with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Aug 25, 2026
@clawsweeper

clawsweeper Bot commented Aug 25, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed August 25, 2026, 7:28 PM ET / 23:28 UTC.

ClawSweeper review

What this changes

The PR pins managed Codex installation during OpenAI onboarding to the matching OpenClaw release cohort and adds a Docker registry fixture for candidate-package acceptance.

Regression provenance

Possible regression — probable (reviewed change; failure trace). No predecessor PR is attributed.

Merge readiness

⚠️ Ready for maintainer review - 5 items remain

Keep open. Current main still installs the floating Codex package during stable OpenAI onboarding; this PR adds the missing release-cohort binding, but its own correction-release evidence conflicts with the retained extended-stable exact-version path and needs a maintainer decision plus hosted package acceptance.

Priority: P2
Reviewed head: 024c181f93c55e84cb923d8c250033d901645025
Owner decision: Required. See Decision needed.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) The stable owner-boundary repair is focused, but the unresolved extended-stable correction policy and pending hosted acceptance prevent higher confidence.
Proof confidence 🌊 off-meta tidepool Not applicable: This maintainer-authored PR is exempt from the contributor proof gate; exact-head hosted Docker package acceptance is nevertheless needed for the changed candidate-install path.
Patch quality 🦐 gold shrimp (3/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: This maintainer-authored PR is exempt from the contributor proof gate; exact-head hosted Docker package acceptance is nevertheless needed for the changed candidate-install path.
Evidence reviewed 6 items Current-main gap: Current main's Codex descriptor has no release-cohort binding, and its onboarding call therefore does not pass one to the channel resolver.
Owner-boundary repair: The PR marks only the Codex runtime descriptor as version-bound and forwards that fact into the existing onboarding install-channel resolver.
Candidate acceptance path: The changed Docker lane mounts an immutable prepublish registry, serves the candidate Codex package locally, then runs non-interactive OpenAI onboarding before inspecting the installed runtime.
Findings None None.
Security None None.

How this fits together

OpenAI setup selects a model, then the runtime-plugin installer obtains and records the Codex plugin. The Docker acceptance lane packages the candidate core and serves a matching candidate plugin so onboarding can exercise the managed npm path.

flowchart LR
  Model[OpenAI model selection] --> Runtime[Runtime plugin installer]
  Core[Installed OpenClaw version] --> Resolver[Release-cohort resolver]
  Runtime --> Resolver
  Resolver --> Npm[Managed npm install]
  Npm --> Record[Plugin install record]
  Candidate[Candidate package registry] --> Npm
Loading

Decision needed

Question Recommendation
For an extended-stable OpenClaw correction release whose exact Codex plugin package is unpublished, should onboarding select the published base cohort or should release engineering publish the exact plugin correction? Use the published cohort for Codex corrections: Resolve version-bound Codex correction releases to the base cohort on extended-stable and update the documented contract and acceptance coverage.

Why: The documented extended-stable exact-version rule and the PR's stated E404 evidence cannot both yield a working Codex onboarding path.

Before merge

  • Resolve merge risk (P1) - Extended-stable correction releases still resolve Codex to the exact correction suffix even though the PR's stated registry evidence says that package is unpublished, leaving first-run setup unable to install it.
  • Resolve merge risk (P1) - The bug fix adds production +122 lines, chiefly the package-acceptance registry fixture; this is justified by the candidate-install boundary but needs exact-head hosted acceptance.
  • Resolve merge risk (P1) - The Codex dependency checkout required by repository policy is unavailable, so app-server compatibility remains unverified here.
  • Complete next step (P2) - A maintainer must settle the extended-stable correction-package contract before the remaining hosted acceptance proof can be judged.
Agent review details

Security

None.

PR surface

Source +16, Tests +91, Other +104. Total +211 across 17 files.

View PR surface stats
Area Files Added Removed Net
Source 8 38 22 +16
Tests 6 91 0 +91
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 3 104 0 +104
Total 17 233 22 +211

Review metrics

Metric Value Why it matters
Production vs test LOC production +137/-15; tests +96/-7 Most production growth is the isolated Docker registry fixture required to test unpublished candidate-plugin installation; the core resolver change is small.

Merge-risk options

Maintainer options:

  1. Resolve the correction-release policy before merge (recommended)
    Choose a working extended-stable Codex package policy, implement it in the canonical resolver, and add candidate-package proof for the selected behavior.
  2. Retain exact extended-stable pins
    Accept the current exact-version contract only if release engineering guarantees the corresponding Codex correction package is published before users can onboard.

Technical review

Best possible solution:

Adopt one explicit correction-release policy for Codex across stable and extended-stable—either publish exact correction plugins or install the published cohort package—then prove the selected policy through exact-head candidate-package acceptance.

Do we have a high-confidence way to reproduce the issue?

Yes—source reproducible. On current main, an OpenAI model selection reaches the Codex runtime descriptor without a stable version binding, leaving the managed npm spec floating; the proposed path makes the binding explicit.

Is this the best way to solve the issue?

No—not completely. The stable repair uses the right shared resolver, but extended-stable still selects the correction-suffixed package that the PR states is unavailable.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 0a15fb1c0200.

Labels

Label justifications:

  • P2: This repairs a bounded but user-visible first-run provider/plugin compatibility path.
  • merge-risk: 🚨 compatibility: The selected npm package version changes for stable release cohorts and remains unresolved for extended-stable corrections.
  • merge-risk: 🚨 automation: The PR changes candidate-package registry preparation and the Docker acceptance lane.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🌊 off-meta tidepool and patch quality is 🦐 gold shrimp.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: This maintainer-authored PR is exempt from the contributor proof gate; exact-head hosted Docker package acceptance is nevertheless needed for the changed candidate-install path.

Evidence

What I checked:

Likely related people:

  • Josh Lehman: Commit 3e11695 introduced the prior Codex stable-upgrade alignment in this resolver area. (role: introduced stable-upgrade alignment; confidence: high; commits: 3e116952e4b1; files: src/plugins/install-channel-specs.ts, src/commands/codex-runtime-plugin-install.ts)
  • steipete: Feature-history shortlog shows repeated contributions in the resolver, runtime-installer, and Codex Docker-lane paths; this PR also carries the correction-cohort update. (role: recent area contributor; confidence: medium; commits: a64449a568eb; files: src/infra/npm-registry-spec.ts, src/plugins/install-channel-specs.ts, scripts/e2e/codex-on-demand-docker.sh)

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Choose and implement the extended-stable correction-package policy.
  • Attach or link the exact-head Codex-on-demand package-acceptance result with private endpoints redacted.

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
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.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (5 earlier review cycles)
  • reviewed 2026-08-25T09:35:08.803Z sha 97f9936 :: needs changes before merge. :: [P2] Make the registry reject the unpinned latest selector
  • reviewed 2026-08-25T09:55:43.124Z sha 96e3970 :: needs maintainer review before merge. :: none
  • reviewed 2026-08-25T18:17:31.823Z sha 54498b94351bbb582b2c40005496792a05c451c0 :: needs maintainer review before merge. :: none
  • reviewed 2026-08-25T18:30:37.937Z sha b0e5839 :: needs maintainer review before merge. :: none
  • reviewed 2026-08-25T22:44:36.564Z sha 0ed3e15 :: needs maintainer review before merge. :: none

@clawsweeper clawsweeper Bot added rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Aug 25, 2026
@clawsweeper clawsweeper Bot added rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. and removed rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. labels Aug 25, 2026
@steipete
steipete force-pushed the fix/codex-onboarding-version-alignment branch from 54498b9 to b0e5839 Compare August 25, 2026 18:24
@steipete
steipete force-pushed the fix/codex-onboarding-version-alignment branch from ff47dea to 7dd75db Compare August 25, 2026 20:38
@openclaw-barnacle openclaw-barnacle Bot added the gateway Gateway runtime label Aug 25, 2026
@openclaw-barnacle openclaw-barnacle Bot removed the gateway Gateway runtime label Aug 25, 2026
@openclaw-barnacle openclaw-barnacle Bot added the gateway Gateway runtime label Aug 25, 2026
@openclaw-barnacle openclaw-barnacle Bot added the docs Improvements or additions to documentation label Aug 25, 2026
@RomneyDa

Copy link
Copy Markdown
Member

Addressed the latest ClawSweeper review on exact head 2196edbdf2f.

  • Extended-stable correction policy: version-bound runtime plugins now resolve YYYY.M.P-N to the published YYYY.M.P release cohort on both stable tracks. Ordinary official extended-stable plugins remain exact-core. Tests and operator docs cover the distinction.
  • Exact-head CI: run 32911048590 passed, including the repaired gateway shared-state shard.
  • Exact-head hosted package acceptance: run 32911093032 passed; the targeted codex-on-demand job installed and exercised the candidate package.
  • Direct Codex dependency inspection at openai/codex@bf2aee99c58362d3f588d98432dcbc7adc371c73: codex-cli/bin/codex.js:16-23 selects the platform package, :79-96 resolves its native executable, and :195-198 forwards CLI arguments to it. codex-rs/cli/src/main.rs:100-160 defines the same CLI and its app-server subcommand; :547-595 owns the app-server command transport/auth inputs. This matches the pinned @openai/codex package execution path used by extensions/codex/package.json:10-15.

Production/test accounting against current main: source +16 net, tests +89 net, docs +5 net, Docker acceptance/support +104 net. The source growth is the release-cohort owner seam; the Docker growth is the exact candidate-install proof requested here.

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Aug 25, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@steipete
steipete merged commit 85d5df1 into main Aug 26, 2026
250 checks passed
@steipete
steipete deleted the fix/codex-onboarding-version-alignment branch August 26, 2026 00:03
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 26, 2026
…law#129195)

* fix(onboarding): align Codex plugin with core release

Amp-Thread-ID: https://ampcode.com/threads/T-01a037b4-f621-7144-bfdf-a68df795dd57

* test(onboarding): reject unpinned Codex candidates

Amp-Thread-ID: https://ampcode.com/threads/T-01a037b4-f621-7144-bfdf-a68df795dd57

* fix(onboarding): match stable correction release plugin cohorts

Co-authored-by: 許元豪 <[email protected]>

* test: isolate plugin metadata and register startup retry coverage

* test: adopt upstream startup retry ownership pattern

* test: keep plugin metadata readers process-stable

* test: isolate terminal session recovery cases

* test: drop speculative gateway isolation change

* test(gateway): mock terminal transcript lifecycle decision

* fix(plugins): align correction cohorts across stable tracks

---------

Co-authored-by: Amp <[email protected]>
Co-authored-by: 許元豪 <[email protected]>
Co-authored-by: Dallin Romney <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

commands Command implementations docker Docker and sandbox tooling docs Improvements or additions to documentation gateway Gateway runtime maintainer Maintainer-authored PR merge-risk: 🚨 automation 🚨 May affect CI, automerge, proof capture, label sync, or maintainer automation. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. P2 Normal backlog priority with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. scripts Repository scripts size: M status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants