Repository navigation
fix(plugins): reject known-incompatible Codex runtimes - #168930
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs maintainer review before merge. What this changesRejects known-incompatible official Codex packages before registration, aligns standalone plugin updates with host cohorts, and preserves actionable failure reasons. Example: OpenClaw 2026.10.1 starts with @openclaw/codex 2026.9.5 after a partial update.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep open: this PR addresses a confirmed released-package incompatibility that current main still admits; no concrete introduced defect was found. Priority: P1 Before mergeNone. FindingsNone. Tests
Agent review detailsHow this fits togetherPlugin discovery supplies package metadata to runtime admission; admitted plugins register capabilities, while CLI update and Doctor reuse the official runtime catalog for recovery. 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 convergence]
F --> A
Technical reviewBest possible solution: Keep the verified compatibility floor at the existing admission boundary and recover eligible packages through the established update and Doctor owners. Do we have a high-confidence way to reproduce the issue? Published package inspection confirms the removed import in Codex 2026.9.5 and 2026.9.6, while current main admits their declared ranges; no target code or tests were executed during this read-only review. Is this the best way to solve the issue? The verified floor is a focused solution that preserves lazy loading, compatible registry lag, saved policy, and existing recovery owners without restoring retired SDK APIs. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 948e76d89203. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource +39, Tests +210, Docs +13. Total +262 across 16 files. Added test files: 1. View PR surface stats
Review metrics
LabelsLabel changes: No label changes. Label justifications:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale6/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. WorkflowClawSweeper edits this one comment on every review. Comment HistoryReview history (1 earlier review cycle)
Reviewed October 11, 2026, 2:53 AM ET / 06:53 UTC (Revision 2). |
Use the published Codex 2026.9.7 compatibility floor for admission rather than the host release cohort. Keep older compatible packages loadable while update and repair converge them. Refs #168930.
…tes (#168930) A partial update could leave @openclaw/codex 2026.9.5 installed on a newer host; its open-ended pluginApi range admitted it and every turn failed on the removed agent-harness-task-runtime SDK subpath. Version-bound official runtimes below a published compatibility floor (codex 2026.9.7) are now unavailable at admission with update repair / plugins update guidance; compatible older versions keep loading while update and repair converge them to the host cohort. plugins update now prints failure reasons. Fixes #168748, #168749. Refs #168498. (cherry picked from commit 5cb977c) Backport notes: test-only conflict in src/cli/failure-output.test.ts: the branch's update-reason test also covered non-JSON update; took this commit's table-driven plugins update test and kept a non-JSON update row so the branch coverage is preserved.
…tes (openclaw#168930) A partial update could leave @openclaw/codex 2026.9.5 installed on a newer host; its open-ended pluginApi range admitted it and every turn failed on the removed agent-harness-task-runtime SDK subpath. Version-bound official runtimes below a published compatibility floor (codex 2026.9.7) are now unavailable at admission with update repair / plugins update guidance; compatible older versions keep loading while update and repair converge them to the host cohort. plugins update now prints failure reasons. Fixes openclaw#168748, openclaw#168749. Refs openclaw#168498.
…170306) 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]>
What Problem This Solves
A partial core update can leave Codex 2026.9.5 or 2026.9.6 installed. Their open-ended plugin API range admits them even though their lazy runtime imports require the removed
agent-harness-task-runtimeSDK subpath.Fixes #168748. Related: #168498, #168749, #166588.
User Impact
Admission rejects only official version-bound runtimes below their known compatibility floor. Codex's floor is 2026.9.7. Compatible packages remain loadable when they are older than the host, including Codex 2026.10.1 on OpenClaw 2026.10.2, so registry lag does not itself disable the runtime.
Below-floor packages are unavailable before registration, with update/repair guidance and a linked-source remedy. Saved enablement is preserved. Core update, Doctor, and standalone plugin updates still converge eligible packages to the host cohort; explicit selectors and source ownership retain their existing behavior. Failed
plugins updatecommands display their sanitized reason without requiring debug output.Why This Change Was Made
The plugin owner supplies one minimum-compatible-version literal next to each version-bound runtime entry, with a comment to bump it when an SDK subpath used by that runtime is removed. Admission reads the immutable manifest's package identity and compares it with that floor, independently of the host-version target used by update convergence.
This replaces the overly broad older-than-host rejection. It does not restore the Tasks SDK or add a module-graph scan, config/CLI option, dependency, schema change, or persisted disablement.
Evidence
Current correction head:
aab2fd9f5dc929b04d79a60f33ecf6ca850b9a1f.Published-source verification used
npm view @openclaw/codex versions time --jsonand scanned the published tarball sources:native-subagent-monitor-B1hxzIOy.mjsnative-subagent-monitor-D3filLY2.mjsThe revised regression failed against the older-than-host gate for both the floor release and Codex 2026.10.1 on host 2026.10.2. After the correction, both register and execute the probe; 2026.9.6 is rejected with the floor and repair hint.
check:changedpassed for all four changed files, including core/test typechecks, lint, export and policy guards.Prior evidence retained for unchanged behavior: the 1,654-pass importer sweep (two existing platform skips), prior full build/checks, and isolated live proof with published Codex 2026.9.5. That Gateway remained ready, reported the plugin unavailable, and rejected an agent request at runtime selection with
owner-plugin-degraded.plugins doctorshowed the repair hint.plugins update codex --accept-capabilitiesthen installed host-matching 2026.9.9; after restart the plugin was active and Doctor returnedok: true. No provider credentials were used, and the isolated Gateway/state were cleaned up.Total PR LOC: production +98/-59; tests +214/-4; docs +13/-0.