Skip to content

fix(cloud): restore node bootstrap with bundled browser runtime - #154654

Merged
steipete merged 2 commits into
mainfrom
codex/cloud-bootstrap-installed-bundles
Sep 21, 2026
Merged

steipete merged 2 commits into
mainfrom
codex/cloud-bootstrap-installed-bundles

Conversation

@steipete

@steipete steipete commented Sep 21, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Fixes cloud sessions failing to start on a successfully built Gateway because node bootstrap rejects the bundled browser runtime.

User Impact

Cloud workers can provision from the current Gateway build again. No configuration or dependency changes are required.

Why This Change Was Made

Installed npm bundles retain their published layout and assets, while linked workspace packages remain restricted to their compiled distribution. The browser bundle uses its existing shared version, patched-byte and required-asset checks because optional browser/UMD imports are not a Node import closure. Ordinary dependencies retain import-closure validation; nested dependencies, hidden files and escaping symlinks stay excluded.

Evidence

Both failures reproduced through real sessions.dispatch on AWS: the initial build/src omission, then the false missing-import error from the browser bundle. With this fix, three cold AWS workers provisioned successfully in 103–112 seconds.

The 48 artifact/prebuilt/package regressions and 18 existing package-verifier cases passed, including archived CLI execution, patch tampering, missing imports and linked-source isolation. The focused artifact file costs 5.41 seconds wall time; the real-package file costs 4.35 seconds wall time, with 1.70 seconds in its test (pnpm test <file> --maxWorkers=1). Full build, changed checks, deslop and independent P2 review passed. Hosted CI cost will be recorded after the run completes.

Initial CI found a direct filesystem-library import bypassing the existing OpenClaw facade; that import now uses the facade, and all 71 boundary/bootstrap cases pass. CI also encountered the skill-library fixture cleanup race fixed on main in 103115f2f0b11844d5cf5766424b6ab8e1e5cf01. This branch now includes that fix; replaying the original 12-file shard in its recorded order passed all 406 tests (145.49 seconds local wall time).

A subsequent real OpenAI turn exposed a separate missing state-worker executable in the cloud execution bundle. That tool-execution defect is being repaired separately; this PR's live claim is successful provisioning.

@clawsweeper

clawsweeper Bot commented Sep 21, 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.

@steipete
steipete marked this pull request as ready for review September 21, 2026 08:42
@openclaw-barnacle openclaw-barnacle Bot added gateway Gateway runtime scripts Repository scripts size: M maintainer Maintainer-authored PR labels Sep 21, 2026
@clawsweeper

clawsweeper Bot commented Sep 21, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 21, 2026, 5:48 AM ET / 09:48 UTC (Revision 2).

ClawSweeper review

What this changes

Preserves installed browser-package files in cloud-node bootstrap archives and shares the existing browser version, patch, and asset validation with the package verifier.

Merge readiness

✅ Ready for maintainer review

The repair remains necessary on current main. The earlier filesystem-facade finding is resolved, and this review found no remaining blocking defect.

Priority: P1
Reviewed head: 21d7032b1199cf20436337a40072bcb96a01e5d6

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused repair with meaningful archive regressions, shared validation, and the prior finding resolved.
Proof confidence 🌊 off-meta tidepool Not applicable: The verified repository-admin author is exempt from the external-contributor proof gate, and this patch introduces no authority-chain change. The body reports AWS sessions.dispatch provisioning through the changed archive builder; raw runtime output was not independently inspected, and full tool execution is explicitly outside that claim.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: The verified repository-admin author is exempt from the external-contributor proof gate, and this patch introduces no authority-chain change. The body reports AWS sessions.dispatch provisioning through the changed archive builder; raw runtime output was not independently inspected, and full tool execution is explicitly outside that claim.
Evidence reviewed 9 items Introduced patch and merge ownership: Reviewed the pinned merge-base-to-head patch. The verified test merge records the pinned base followed by the exact PR head; its delta contains the same six introduced files, without the unrelated endpoint drift.
Current main still needs the repair: Current main still passes every bundled dependency to the dist-only inventory collector. That omits the browser package's build/src layout; the PR distinguishes installed packages from linked workspaces.
Latest release comparison: The supplied latest release also uses the dist-only collector for bundled dependencies; this repair is not present in that release's archive builder.
Findings None None.
Security None None.

How this fits together

The Gateway builds a runtime archive from its installed code and dependencies before provisioning a cloud node. The archive builder validates those files before handing the archive to the existing enrollment and transfer services.

flowchart TD
  A[Cloud session dispatch] --> B[Gateway archive builder]
  C[Installed packages and linked workspaces] --> B
  B --> D[Select runtime files]
  D --> E[Validate imports or browser package contract]
  E --> F[Verified runtime archive]
  F --> G[Cloud node enrollment]
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Source +56, Tests +157, Other +34. Total +247 across 6 files.

View PR surface stats
Area Files Added Removed Net
Source 1 66 10 +56
Tests 3 168 11 +157
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 2 96 62 +34
Total 6 330 83 +247

Review metrics

Metric Value Why it matters
Production and test growth Production +90 lines; tests and support +157 lines net Production growth implements installed-package traversal and extracts the existing validator into a shared owner.

Technical review

Best possible solution:

Keep one shared browser-package validation contract while preserving published runtime layouts and restricting linked workspaces to compiled output.

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

Yes, from source: current main collects only dist files for a mandatory browser package whose executable resides under build/src. No runtime reproduction was executed during this review.

Is this the best way to solve the issue?

Yes. Preserving installed package layouts and reusing the existing browser-specific validator repairs the packaging owner without duplicating configuration or weakening ordinary dependency checks.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 6404f5bde3d4.

Labels

Label justifications:

  • P1: A mandatory bundled dependency prevents cloud-node provisioning from an otherwise successfully built Gateway.
  • 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: The verified repository-admin author is exempt from the external-contributor proof gate, and this patch introduces no authority-chain change. The body reports AWS sessions.dispatch provisioning through the changed archive builder; raw runtime output was not independently inspected, and full tool execution is explicitly outside that claim.

Evidence

What I checked:

  • Introduced patch and merge ownership: Reviewed the pinned merge-base-to-head patch. The verified test merge records the pinned base followed by the exact PR head; its delta contains the same six introduced files, without the unrelated endpoint drift. (21d7032b1199)
  • Current main still needs the repair: Current main still passes every bundled dependency to the dist-only inventory collector. That omits the browser package's build/src layout; the PR distinguishes installed packages from linked workspaces. (src/gateway/worker-environments/node-bootstrap-artifact.ts:379, 6404f5bde3d4)
  • Latest release comparison: The supplied latest release also uses the dist-only collector for bundled dependencies; this repair is not present in that release's archive builder. (src/gateway/worker-environments/node-bootstrap-artifact.ts:374, ec9c1a13db89)
  • Containment and validation preserved: Installed-package collection excludes hidden entries and nested node_modules, rejects symlinks and unreadable or oversized walks, and retains the existing guarded file reads and archive digest comparison. Browser validation reuses the package verifier's existing hashes and required assets; other dependencies retain import-closure validation. (src/gateway/worker-environments/node-bootstrap-artifact.ts:165, 21d7032b1199)
  • Walker dependency contract inspected: The changed collector calls the filesystem facade's walkDirectory export. Inspected published fs-safe 0.17.0 source and declarations: include-mode returns symlinks without following them, descent filtering is separate from inclusion, and failedDirs is always returned. npm metadata verifies this dependency's repository ownership; no dependency commit SHA was available.
  • Prior review disposition: The current owner imports walkDirectory through src/infra/fs-safe.ts, resolving the prior P2 finding. The earlier reviewed SHA was unavailable for comparison, so no claim about unchanged historical code is made. No new late finding is raised. (src/gateway/worker-environments/node-bootstrap-artifact.ts:25, 21d7032b1199)

Likely related people:

  • steipete: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • Patrick-Erichsen: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

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 (1 earlier review cycle)
  • reviewed 2026-09-21T08:50:30.525Z sha ddb6c98c29e79b31d8792d14bcf43054b0af0e93 :: needs real behavior proof before merge. :: [P2] Import the walker through the OpenClaw filesystem facade

@steipete
steipete force-pushed the codex/cloud-bootstrap-installed-bundles branch from ddb6c98 to 21d7032 Compare September 21, 2026 09:39
@clawsweeper clawsweeper Bot added P1 High-priority user-facing bug, regression, or broken workflow. 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 Sep 21, 2026
@steipete
steipete merged commit 4fedaad into main Sep 21, 2026
220 of 221 checks passed
@steipete
steipete deleted the codex/cloud-bootstrap-installed-bundles branch September 21, 2026 11:36
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

vincentkoc added a commit that referenced this pull request Sep 21, 2026
* commit '0883394977d1fb3af657635967f6e447bd7fff9a': (72 commits)
  fix(ui): await scheduled rail layout in focus test
  fix(cron): keep healthy active runs from delaying job lists (#154421)
  fix(plugins): prevent config conflicts during legacy plugin installation (#154539)
  perf(gateway): reduce repeated session-list work (#154551)
  fix(tasks): retain admitted work across list retries (#154338)
  perf(gateway): speed up transcript artifact downloads (#154726)
  chore(ui): refresh control ui locales (#154580)
  fix(release): keep two extended-stable months eligible (#154777)
  fix(tests): avoid avatar descriptor reuse race (#154747)
  perf(plugins): reduce callback scope overhead (#154625)
  fix(ui): include final request time in completed work summaries (#149240)
  fix(ai): avoid retrying conflicting Responses terminal statuses (#149242)
  fix: identify malformed Code Mode JavaScript as input errors (#149222)
  fix(doctor): settle imported JSONL transcript leftovers (#154413)
  fix(cloud): restore node bootstrap with bundled browser runtime (#154654)
  test(ui): await publication state notifications (#154768)
  fix(plugins): keep unchanged plugins running across metadata refreshes (#151281)
  fix: keep chat panel accessibility targets within each pane (#153478)
  fix: forced Gateway restarts cancel healthy subagent work (#154300)
  improve: reduce session delivery reader imports (#154740)
  ...
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 22, 2026
…claw#154654)

* fix(cloud): restore node bootstrap with bundled browser runtime

* fix(cloud): route bootstrap walks through filesystem policy
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gateway Gateway runtime maintainer Maintainer-authored PR P1 High-priority user-facing bug, regression, or broken workflow. 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