Skip to content

fix(release): stage Codex for npm onboarding candidates - #130360

Merged
RomneyDa merged 4 commits into
mainfrom
fix/npm-onboard-candidate-codex-registry
Aug 26, 2026
Merged

RomneyDa merged 4 commits into
mainfrom
fix/npm-onboard-candidate-codex-registry

Conversation

@RomneyDa

@RomneyDa RomneyDa commented Aug 26, 2026 •

Copy link
Copy Markdown
Member

What Problem This Solves

Plugin prerelease npm onboarding lanes validate an unpublished [email protected] candidate. After #129855 made required runtime installation fail closed, those lanes attempted to install the matching @openclaw/[email protected] from public npm, where only beta and older stable versions exist.

Observed failures:

Both stopped during non-interactive onboarding with Package not found on npm: @openclaw/[email protected].

Root Cause

The Docker scenario catalog did not declare @openclaw/codex as a candidate companion for the five npm onboarding lanes. Consequently test-docker-all did not build its verified prerelease plugin registry artifact. The onboarding harness also lacked the shared mount/start path needed to expose that artifact inside the container.

Canonical Fix

  • declare the matching Codex candidate package once for every npm onboarding channel lane
  • centralize immutable artifact-to-Docker argument construction and mounted-registry startup in prepublish-plugin-registry.sh
  • reuse that lifecycle from both Codex-on-demand and npm-onboarding instead of duplicating lane-specific Bash
  • keep public npm as upstream for every package except the exact staged candidate
  • stop the bounded registry during the existing scenario cleanup

This changes validation tooling only. It does not publish a package, add a runtime fallback, or alter the version-cohort selection established by #129195.

Evidence

  • Registry state: npm view @openclaw/codex version dist-tags --json reports stable 2026.7.1-1, beta 2026.8.1-beta.3, and no 2026.8.1.
  • Regression: without the catalog repair, the five lanes request no candidate Codex package; after it they request exactly @openclaw/codex.
  • Shared owner proof: the shell-helper test derives the immutable Docker tuple from the artifact, starts the real bounded registry through the mounted wrapper, and fetches staged plus upstream-backed packages.
  • Consumer proof: both Docker runners are checked for shared mount/start wiring and startup-before-install ordering.
  • Focused Vitest: 266 passed (docker-build-helper, docker-e2e-plan, prepublish-plugin-registry-shell).
  • Bash syntax, formatting, git diff --check, and autoreview passed; autoreview reported no actionable findings (0.98).
  • check:changed passed all gates through script typecheck, which stopped on the local shared checkout's unrelated missing @types/pako; exact-head hosted CI uses a clean dependency install.
  • Real Docker is unavailable on this host; exact-head hosted candidate-lane proof remains required before merge.

Scope and LOC

  • production runtime: +0/-0
  • release tooling: +79/-44 (net +35)
  • tests: +72/-7 (net +65)

The release-tooling delta is net smaller than the first patch while adding one canonical lifecycle owner shared by both consumers.

@clawsweeper

clawsweeper Bot commented Aug 26, 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 docker Docker and sandbox tooling size: S maintainer Maintainer-authored PR labels Aug 26, 2026
@clawsweeper clawsweeper Bot added merge-risk: 🚨 automation 🚨 May affect CI, automerge, proof capture, label sync, or maintainer automation. P2 Normal backlog priority with limited blast radius. 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. labels Aug 26, 2026
@clawsweeper

clawsweeper Bot commented Aug 26, 2026 •

Copy link
Copy Markdown
Contributor

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

ClawSweeper review

What this changes

Stages the candidate @openclaw/codex package in the local registry used by five Docker npm-onboarding validation lanes.

Regression provenance

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

Merge readiness

⚠️ Ready for maintainer review - 2 items remain

Keep open: no patch defect was found, but this maintainer-owned release-validation change should await successful exact-head hosted Docker candidate lanes before merge.

Priority: P2
Reviewed head: d0c0b534208923e034cc98a991f488edfa84a637

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) The patch is focused and source-backed, with hosted Docker completion remaining the operational merge gate.
Proof confidence 🌊 off-meta tidepool Not applicable: This maintainer-authored release-validation PR is exempt from the external-contributor proof gate; exact-head hosted Docker validation remains required before merge.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: This maintainer-authored release-validation PR is exempt from the external-contributor proof gate; exact-head hosted Docker validation remains required before merge.
Evidence reviewed 7 items Candidate-lane selection: The shared lane options add @openclaw/codex to all five npm onboarding lanes, so the planner requests the companion candidate once per selected lane set.
Runner lifecycle: The npm onboarding runner derives read-only Docker mount arguments from the artifact, starts the verified mounted registry before installation, and stops it in its exit cleanup.
Artifact boundary: The existing Docker planner validates the registry artifact against the selected SHA, candidate version, manifest hash, and required package set before scenarios use it.
Findings None None.
Security None None.

Live Verification

Command: node scripts/test-docker-all.mjs --plan-json

Result: FAIL (failed) — step 1 run node scripts/test-docker-all.mjs --plan-json: previous terminal command was still running after 30 seconds: "node scripts/test-docker-all.mjs --plan-json"

OT:-$PWD}\" bash \"$harness/scripts/test-live-codex-harness-docker.sh\"'",
      "live": true,
      "name": "live-codex-bind",
      "resources": [
        "docker",
        "live",
        "live:openai",
        "npm"
      ],
      "timeoutMs": 1200000,
      "weight": 3
    },
    {
      "command": "OPENCLAW_SKIP_DOCKER_BUILD=1 bash -c 'harness=\"${OPENCLAW_DOCKER_E2E_TRUSTED_HARNESS_DIR:-.}\"; OPENCLAW_LIVE_DOCKER_REPO_ROOT=\"${OPENCLAW_D
OCKER_E2E_REPO_ROOT:-$PWD}\" bash \"$harness/scripts/e2e/codex-npm-plugin-live-docker.sh\"'",
      "imageKind": "bare",
      "live": true,
      "name": "live-codex-npm-plugin",
      "resources": [
        "docker",
        "live",
        "live:openai",
        "npm"
      ],
      "stateScenario": "empty",
      "timeoutMs": 1800000,
      "weight": 3
    },
    {
      "command": "OPENCLAW_SKIP_DOCKER_BUILD=1 pnpm test:docker:live-mcp-code-mode-gateway",
      "imageKind": "functional",
      "live": true,
      "name": "live-mcp-code-mode-gateway",
      "resources": [
        "docker",
        "live",
        "live:openai",
        "npm",
        "service"
      ],
      "stateScenario": "empty",
      "timeoutMs": 1200000,
      "weight": 3
    },
    {
      "command": "OPENCLAW_LIVE_PLUGIN_TOOL_TIMEOUT_SECONDS=300 OPENCLAW_SKIP_DOCKER_BUILD=1 pnpm test:docker:live-plugin-tool",
      "imageKind": "bare",
      "live": true,
      "name": "live-plugin-tool",
      "resources": [
        "docker",
        "live",
        "live:openai",
        "npm"
      ],
      "stateScenario": "empty",
      "timeoutMs": 1200000,
      "weight": 3
    },
    {
      "command": "OPENCLAW_LIVE_ACP_BIND_AGENT=claude OPENCLAW_SKIP_DOCKER_BUILD=1 bash -c 'harness=\"${OPENCLAW_DOCKER_E2E_TRUSTED_HARNESS_DIR:-.}\"; OPENCLAW_
LIVE_DOCKER_REPO_ROOT=\"${OPENCLAW_DOCKER_E2E_REPO_ROOT:-$PWD}\" bash \"$harness/scripts/test-live-acp-bind-docker.sh\"'",
      "live": true,
      "name": "live-acp-bind-claude",
      "resources": [
        "docker",
        "live",
        "live:claude",
        "npm"
      ],
      "timeoutMs": 1200000,
      "weight": 3
    },
    {
      "command": "OPENCLAW_LIVE_ACP_BIND_AGENT=codex OPENCLAW_SKIP_DOCKER_BUILD=1 bash -c 'harness=\"${OPENCLAW_DOCKER_E2E_TRUSTED_HARNESS_DIR:-.}\"; OPENCLAW_L
IVE_DOCKER_REPO_ROOT=\"${OPENCLAW_DOCKER_E2E_REPO_ROOT:-$PWD}\" bash \"$harness/scripts/test-live-acp-bind-docker.sh\"'",
      "live": true,
      "name": "live-acp-bind-codex",
      "resources": [
        "docker",
        "live",
        "live:codex",
        "live:openai",
        "npm"
      ],
      "timeoutMs": 1200000,
      "weight": 3
    },
    {
      "command": "OPENCLAW_LIVE_ACP_BIND_AGENT=droid OPENCLAW_LIVE_ACP_BIND_REQUIRE_TRANSCRIPT=1 OPENCLAW_SKIP_DOCKER_BUILD=1 bash -c 'harness=\"${OPENCLAW_DOCK
ER_E2E_TRUSTED_HARNESS_DIR:-.}\"; OPENCLAW_LIVE_DOCKER_REPO_ROOT=\"${OPENCLAW_DOCKER_E2E_REPO_ROOT:-$PWD}\" bash \"$harness/scripts/test-live-acp-bind-docker.sh
\"'",
      "live": true,
      "name": "live-acp-bind-droid",
      "resources": [
        "docker",
        "live",
        "live:droid",
        "npm"
      ],
      "timeoutMs": 1200000,
      "weight": 3
    },
    {
      "command": "OPENCLAW_LIVE_ACP_BIND_AGENT=gemini OPENCLAW_SKIP_DOCKER_BUILD=1 bash -c 'harness=\"${OPENCLAW_DOCKER_E2E_TRUSTED_HARNESS_DIR:-.}\"; OPENCLAW_
LIVE_DOCKER_REPO_ROOT=\"${OPENCLAW_DOCKER_E2E_REPO_ROOT:-$PWD}\" bash \"$harness/scripts/test-live-acp-bind-docker.sh\"'",
      "live": true,
      "name": "live-acp-bind-gemini",
      "resources": [
        "docker",
        "live",
        "live:gemini",
        "npm"
      ],
      "timeoutMs": 1200000,
      "weight": 3
    },
    {
      "command": "OPENCLAW_LIVE_ACP_BIND_AGENT=opencode OPENCLAW_LIVE_ACP_BIND_REQUIRE_TRANSCRIPT=1 OPENCLAW_SKIP_DOCKER_BUILD=1 bash -c 'harness=\"${OPENCLAW_D
OCKER_E2E_TRUSTED_HARNESS_DIR:-.}\"; OPENCLAW_LIVE_DOCKER_REPO_ROOT=\"${OPENCLAW_DOCKER_E2E_REPO_ROOT:-$PWD}\" bash \"$ha
… output truncated …

Assertions:

  • FAIL expect_output: @openclaw/codex

How this fits together

Release validation packages candidate plugins into an immutable registry artifact, mounts it into Docker onboarding scenarios, and starts a local registry before npm installation. The scenarios then verify candidate package resolution and onboarding behavior.

flowchart LR
  A[Docker lane plan] --> B[Candidate registry artifact]
  B --> C[Artifact identity check]
  C --> D[Mounted local registry]
  D --> E[Onboarding npm install]
  E --> F[Docker scenario result]
Loading

Before merge

  • Resolve merge risk (P1) - The exact-head hosted Docker candidate lanes have not yet completed, leaving the real container mount, local-registry startup, and package-resolution path unproven on this head.
  • Complete next step (P2) - No repair lane is appropriate: there is no discrete patch defect, and this protected maintainer PR needs normal exact-head CI and maintainer handling.
Agent review details

Security

None.

PR surface

Tests +65, Other +35. Total +100 across 7 files.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 3 72 7 +65
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 4 79 44 +35
Total 7 151 51 +100

Review metrics

Metric Value Why it matters
Production vs test delta release tooling +35 net; tests +65 net The positive tooling delta centralizes previously duplicated registry mount/start logic and is covered by focused planner and registry tests.

Stored data model

Persistent data-model change detected: serialized state: test/scripts/prepublish-plugin-registry-shell.test.ts. Confirm migration or upgrade compatibility proof before merge.

Merge-risk options

Maintainer options:

  1. Complete candidate-lane proof (recommended)
    Wait for exact-head hosted Docker lanes to validate artifact mounting, registry startup, package resolution, and cleanup before merging.

Technical review

Best possible solution:

Keep the shared artifact-to-container lifecycle and merge after exact-head hosted candidate lanes demonstrate successful resolution and cleanup.

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

Yes, from source and the reported hosted failure: these lanes previously omitted the candidate package, while the planner and runner now select, mount, and start it before npm installation.

Is this the best way to solve the issue?

Yes: one shared helper owns the immutable artifact-to-Docker tuple and mounted-registry startup, avoiding separate lane-specific implementations.

AGENTS.md: found and applied where relevant.

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

Labels

Label changes:

  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: This maintainer-authored release-validation PR is exempt from the external-contributor proof gate; exact-head hosted Docker validation remains required before merge.
  • remove rating: 🦐 gold shrimp: Current PR rating is rating: 🐚 platinum hermit, so this older rating label is no longer current.
  • remove status: ⏳ waiting on author: Current PR status label is status: 👀 ready for maintainer look.

Label justifications:

  • P2: This repairs bounded candidate-release validation rather than an end-user runtime path.
  • merge-risk: 🚨 automation: The patch changes Docker release planning, registry mounting, and npm-install setup.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: This maintainer-authored release-validation PR is exempt from the external-contributor proof gate; exact-head hosted Docker validation remains required before merge.

Evidence

What I checked:

Likely related people:

  • steipete: Authored the related merged onboarding-cohort change and is identified by current-main blame on the pre-existing npm onboarding lane catalog. (role: prior feature owner; confidence: medium; commits: 85d5df1d87d1, e0a4915bcf16; files: scripts/lib/docker-e2e-scenarios.mts, extensions/codex/package.json)

Rank-up moves

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

  • Complete the exact-head hosted Docker candidate-lane run and retain its package-resolution result.

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 (3 earlier review cycles)
  • reviewed 2026-08-26T20:18:26.694Z sha 757d4ec :: needs maintainer review before merge. :: none
  • reviewed 2026-08-26T20:31:19.383Z sha a235a89 :: found issues before merge. :: [P1] Keep the stable latest tag resolvable
  • reviewed 2026-08-26T20:44:26.355Z sha b9816da :: needs maintainer review before merge. :: none

@RomneyDa

Copy link
Copy Markdown
Member Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Aug 26, 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.

@clawsweeper clawsweeper Bot added 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. and removed 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. labels Aug 26, 2026
@RomneyDa

Copy link
Copy Markdown
Member Author

Resolved the exact-head P1 by refreshing onto current main, which restores the canonical prerelease-only sentinel: latest=0.0.0 is emitted only for alpha/beta candidates, while stable candidate metadata keeps its staged version resolvable from an unversioned npm spec. Main's existing stable-resolution regression is retained.

Exact head: b9816da5af411ccd54ef21702512de64411f34fb

Direct Codex contract inspected at upstream checkout bf2aee99c58362d3f588d98432dcbc7adc371c73:

  • codex-cli/package.json:2-7 defines the installable @openai/codex CLI package.
  • codex-cli/bin/codex.js:98-106 directs recovery through @openai/codex@latest.
  • codex-cli/scripts/build_npm_package.py:289-303 stamps the selected release version and binds exact matching platform-package versions.
  • README.md:38-43 documents unversioned npm installation.

Proof:

  • registry/docker helper suites: 269/269
  • test audit: stable unversioned resolution is exercised at the registry boundary; no test-only production seam
  • autoreview: clean, 0.99
  • current-main delta: tooling +35 net; tests +65 net

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Aug 26, 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:

@RomneyDa

Copy link
Copy Markdown
Member Author

Expanded release-mode audit for exact head b9816da5af411ccd54ef21702512de64411f34fb:

Mode Installer selection Local registry behavior Proof
dev dev preserves the caller spec; normal git/dev workflows do not enable this candidate registry Outside this registry in current workflows. A hypothetical explicit-dev prerelease lane would need a named dev dist-tag contract; none is silently assumed here. src/plugins/install-channel-specs.ts; current Docker lane catalog
beta Default npm spec becomes @openclaw/codex@beta beta points to the staged beta candidate; latest=0.0.0 intentionally prevents accidental public-latest success registry shell test plus channel resolver test
stable Version-bound Codex becomes an exact candidate/cohort spec; other unpinned staged packages use latest Stable candidates do not override latest, so it resolves to an actually served staged version executable unversioned npm view coverage for final and correction candidates
extended-stable Version-bound Codex uses its exact release cohort; other official defaults use the exact core version Exact served versions bypass dist-tag ambiguity table-driven resolver coverage for stable + extended-stable correction cohorts

Red/green reproduction: changing the helper back to unconditional latest=0.0.0 makes both stable cases fail with E404 No match found for version 0.0.0; exact head passes. Focused suites: 269/269 registry/Docker tests plus 14/14 update-channel resolver tests. Autoreview is clean (0.98). No shipped runtime code changes.

A fresh hosted exact-head Plugin Prerelease run is now active: https://github.com/openclaw/openclaw/actions/runs/33011747715. This supersedes the earlier run, which started before b9816da5af4 existed. ClawSweeper re-review is already queued for this exact head.

@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 26, 2026
@RomneyDa
RomneyDa merged commit cb1d892 into main Aug 26, 2026
125 checks passed
@RomneyDa
RomneyDa deleted the fix/npm-onboard-candidate-codex-registry branch August 26, 2026 23:58
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 27, 2026
)

* fix(release): stage Codex for npm onboarding candidates

* refactor(release): share candidate registry lifecycle
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docker Docker and sandbox tooling maintainer Maintainer-authored PR merge-risk: 🚨 automation 🚨 May affect CI, automerge, proof capture, label sync, or maintainer automation. P2 Normal backlog priority with limited blast radius. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. 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.

1 participant