Skip to content

fix(plugins): stop stale Codex runtimes breaking turns after updates - #170306

Merged
RomneyDa merged 1 commit into
release/2026.10.3from
fix/2026.10.3-plugin-runtime-repair
Oct 12, 2026
Merged

RomneyDa merged 1 commit into
release/2026.10.3from
fix/2026.10.3-plugin-runtime-repair

Conversation

@RomneyDa

@RomneyDa RomneyDa commented Oct 12, 2026 •

Copy link
Copy Markdown
Member

Related: #168748, #168749. Backports #168930 to release/2026.10.3.

What Problem This Solves

Fixes broken Codex turns and hidden plugin-update failure reasons after a partial core update leaves an incompatible runtime installed.

User Impact

Known-incompatible official Codex versions stay unavailable with actionable repair guidance. Compatible older runtimes keep working, and standalone plugin updates select the host cohort while preserving explicit command selectors and existing pin policies.

Why This Change Was Made

This is a semantic backport of main commit 5cb977c8dda53e5b1d23317afcec62ab6d372b78, not a new repair design. The compatibility floor is Codex 2026.9.7; it is not a blanket rejection of plugins older than the host.

The lightweight official-runtime policy moves to the plugin owner. Unlike main, this stable branch still has three callers of the Doctor runtime collector, so that collector is retained without duplicating policy. The donor's floor catalog and loader/cohort regression files are unchanged.

The Doctor fix is already merged in #170218. Deferred-migration recovery from main #166588 is a separate backport; this PR does not claim every #161921 variant is fixed.

Evidence

  • Six expected failures reproduced on unchanged 10.3: incompatible runtime admission, absent failure reasons, and missing cohort selection. All 40 focused tests passed after the backport (57.41s wall).
  • Full affected compatibility/loader/Doctor subsystem: 726 tests passed across 44 files, 563.38s wall.
  • Full changed-file checks passed (560.92s), including production/test types, formatting, lint, dead exports, import cycles, and architecture guards.
  • Full declaration-enabled pnpm build passed (1490.21s); all 16 selected source files remained byte-identical through the build.
  • pnpm test src/plugins/loader.runtime-version.test.ts --maxWorkers=1: 6 passed, 57.74s wall; compiler transformation dominates the invocation.
  • Independent Codex P1 AutoReview: scoped-clean.
  • Published-driver × exact-candidate proof passed: [email protected], C=Q=2e05908aa5bb895664b9fb55f3e8878570077682; existing isolated base/manual-restart Docker lane passed in 567s. Package preparation, integrity, the managed updater, activation Doctor, preserved seeded settings/state, and post-update checks passed. This is scoped upgrade proof, not macOS-supervisor or full release qualification.

Validation host: macOS arm64, Node 24.16.0, pnpm 12.5.1. Standalone changed-test costs: failure output 30.72s (30 tests), cohort selection 17.77s (4 tests), runtime floor 57.74s (6 tests). CI seconds remain pending until the ready-for-review run completes.

Backport main PR #168930 to release/2026.10.3. Preserve the stable runtime
collector while moving official runtime policy to its plugin owner.

Backport-of: 5cb977c
Co-authored-by: Peter Steinberger <[email protected]>
@clawsweeper

clawsweeper Bot commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation cli CLI command changes commands Command implementations size: M labels Oct 12, 2026
@clawsweeper clawsweeper Bot added P1 High-priority user-facing bug, regression, or broken workflow. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. labels Oct 12, 2026
@clawsweeper

clawsweeper Bot commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

This PR backports Codex compatibility admission, host-cohort plugin updates, and actionable plugin-update failure reasons to release/2026.10.3.

Example: OpenClaw 2026.10.3 discovers @openclaw/codex 2026.9.5 after a partial update.

  • Before: The plugin registers, but turns fail when its deferred imports request a retired SDK path.
  • After: Admission reports the plugin unavailable with repair guidance; compatible versions from 2026.9.7 remain loadable.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused, apparently correct backport with meaningful regressions and recorded exact-candidate upgrade proof; no introduced defect remains identified.
Proof confidence 🐚 platinum hermit (4/6) The ordinary contributor proof gate does not apply to this MEMBER-authored PR; its current body records a passed published-2026.10.2 updater run against the exact candidate, preserving seeded settings/state through activation Doctor and post-update checks.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: A partially updated installation accepts an incompatible Codex runtime, fails affected turns, and can hide why recovery commands fail.
Reason: The released incident, merged donor, and maintainer-authored backport establish clear value and accepted direction within the stated scope.

Merge readiness

✅ Ready for maintainer review

Keep open: this maintainer-authored release backport remains necessary, no introduced defect was found, and the completed upgrade evidence clears the previous compatibility blocker.

Priority: P1
Reviewed head: 2e05908aa5bb895664b9fb55f3e8878570077682

Before merge

None.

Findings

None.

Agent review details

How this fits together

Plugin discovery supplies package metadata to runtime admission; CLI updates and Doctor consume the shared official-runtime catalog and existing package-update owners.

flowchart TD
  A[Installed plugin package] --> B[Manifest metadata]
  B --> C[Runtime admission]
  D[Official runtime catalog] --> C
  C --> E[Capability registration]
  D --> F[CLI and Doctor updates]
  F --> A
Loading

Technical review

Best possible solution:

Land the scoped compatibility and recovery backport through the release branch's existing checks while preserving compatible runtimes and operator settings.

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

The released failure trace and release-base admission path establish the incompatible-runtime mechanism; current main already contains the fix, and no target code was executed during this review.

Is this the best way to solve the issue?

The backport reuses admission and convergence owners, preserves explicit selectors, and avoids restoring retired SDK APIs or rejecting every runtime older than the host.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 861eb94f2630.

Provenance checked

  • Runtime catalog and saved plugin policy keeps the original intent (f638cbd: Preserve version-bound runtime allow, deny, and entry policy during temporary companion-package gaps.)
  • Plugin registration and lifecycle keeps the original intent (05a2844: Keep callbacks and cleanup with their managed plugin instances while preserving lazy loading.)
  • Concise CLI failure output keeps the original intent (688f68e: Retain actionable update reasons while keeping nested causes and stacks behind explicit diagnostic intent.)
  • Automatic cohort selection keeps the original intent (fac7754: Separate automatic install targets from saved selectors and preserve explicit update requests.)
  • Admission of older official Codex packages changes intended behavior with a stated reason (5cb977c: The donor establishes a compatibility floor because broad declared API ranges cannot guarantee deferred SDK imports remain usable.)

Testing

Proof path: shipped entry point.

Security

None.

Evidence

What I checked:

Likely related people:

  • Vincent Koc: Raw commit 80da616 adds src/commands/doctor/repair-sequencing.ts:282 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: medium; commits: 80da61668eb6; files: src/commands/doctor/repair-sequencing.ts)

PR surface

Source +30, Tests +208, Docs +13. Total +251 across 16 files. Added test files: 1.

View PR surface stats
Area Files Added Removed Net
Source 11 98 68 +30
Tests 3 223 15 +208
Docs 2 13 0 +13
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 16 334 83 +251

Review metrics

Metric Value Why it matters
Production versus test changes Production +98/-68; tests +223/-15 Production growth combines catalog relocation with focused admission and target wiring; tests protect runtime admission/execution, caller target selection, and sanitized diagnostics.

Root-cause cluster

Relationship: same_root_cause
Canonical: #168930
Summary: This is the release-branch backport of the merged mainline compatibility and recovery-diagnostic fix.

Members:

Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

Labels

Label changes:

  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit. Replaced prior rating: 🦐 gold shrimp.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.
  • remove rating: 🦐 gold shrimp: Current PR rating is rating: 🐚 platinum hermit, so this older rating label is no longer current.

Label justifications:

  • P1: The confirmed released-package mismatch prevents Codex-backed agents from replying after a partial update.
  • merge-risk: 🚨 compatibility: Official Codex packages below 2026.9.7 become unavailable despite their declared API range; the maintainer-authored direction explicitly accepts this narrow compatibility change.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit. Replaced prior rating: 🦐 gold shrimp.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Rating scale

6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

History

Review history (2 earlier review cycles)
  • reviewed 2026-10-12T22:13:27.925Z sha 2e05908 :: blocked before merge. :: none
  • reviewed 2026-10-12T22:23:34.359Z sha 2e05908 :: blocked before merge. :: none

Reviewed October 12, 2026, 6:34 PM ET / 22:34 UTC (Revision 3).

@RomneyDa
RomneyDa marked this pull request as ready for review October 12, 2026 22:28
@RomneyDa
RomneyDa merged commit cc35685 into release/2026.10.3 Oct 12, 2026
210 of 213 checks passed
@RomneyDa
RomneyDa deleted the fix/2026.10.3-plugin-runtime-repair branch October 12, 2026 23:37
RomneyDa added a commit that referenced this pull request Oct 13, 2026
…170306 backport

The backport added a loader floor (2026.9.7) for the official @openclaw/codex
runtime. The copied-session e2e fixture still declared @openclaw/codex 2026.8.1,
so the loader degraded it during validation. Use VERSION as main does.
wheakerd pushed a commit to wheakerd/clawdbot that referenced this pull request Oct 22, 2026
…penclaw#170306 backport

The backport added a loader floor (2026.9.7) for the official @openclaw/codex
runtime. The copied-session e2e fixture still declared @openclaw/codex 2026.8.1,
so the loader degraded it during validation. Use VERSION as main does.

(cherry picked from commit 0ba1eb0)
Co-authored-by: RomneyDa <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cli CLI command changes commands Command implementations docs Improvements or additions to documentation merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. P1 High-priority user-facing bug, regression, or broken workflow. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. size: M

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant