Repository navigation
feat: provision cloud worker runtimes without registry access - #188651
Conversation
Preserve explicit npm profiles and their lock/reuse path while carrying qualified target dependencies in bundle archives. Co-authored-by: galiniliev <[email protected]>
Worked on by: - @galiniliev Co-authored-by: galiniliev <[email protected]> OpenClaw-Publication: 65d6807d-2851-4dba-9916-f4bc1496596b
|
🦞👀 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: blocked before merge. What this changesThis PR packages installed runtime dependencies so bundle-mode cloud workers can install without npm registry access or lifecycle scripts. Example: Provision a Linux x64 worker with install set to bundle and registry access unavailable.
Review scores
ProductKind: Feature · Worth it: Yes · Fix scope: Complete Merge readiness⛔ Blocked before merge - 1 item remains Keep open: this maintainer-authored PR provides a distinct offline installation capability, and all three previous findings are repaired; no further definite code defect was found. Priority: P2 Before merge
FindingsNone. Tests
Agent review detailsHow this fits togetherThe Gateway artifact producer combines its built runtime, selected plugins, and installed dependencies; enrollment grants authenticated downloads, and Crabbox installs and launches the resulting worker runtime. flowchart TD
A[Built runtime and installed dependencies] --> B[Canonical artifact producer]
B --> C[Enrollment scoped download]
C --> D[Crabbox installer]
D --> E[Bundle extraction]
D --> F[Explicit npm installation]
E --> G[Worker runtime]
F --> G
Technical reviewBest possible solution: Keep the shared producer and installer, with preassembled bundle dependencies and the explicit npm installation path preserved. Do we have a high-confidence way to reproduce the issue? Current-main source shows destination npm installation, so an empty worker cache still requires dependency assembly; no target code was executed during this read-only review. Is this the best way to solve the issue? The smallest coherent implementation extends the existing artifact producer and installer, preserves installed dependency ownership, and retains npm behavior for explicitly selected npm profiles. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 39b2c9191e6a. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource +456, Tests +356, Docs +8, Other +2. Total +822 across 20 files. Added test files: 1. View PR surface stats
LabelsLabel changes:
Label justifications:
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 30, 2026, 4:34 PM ET / 20:34 UTC (Revision 2). |
Scope Node-only setup to bundle enrollment, fix narrowed bundle fixture metadata, and reuse the validated package manifest owner instead of unsafe assertions. Prove missing npm/Corepack repair and retained npm runtime compatibility. Co-authored-by: galiniliev <[email protected]>
Worked on by: - @galiniliev Co-authored-by: galiniliev <[email protected]> OpenClaw-Publication: 92b05551-9794-42c5-b0ea-0dbd82702c99
Keep fixture loops explicit without changing their behavior, and account for their exact test-line delta. Co-authored-by: galiniliev <[email protected]>
Worked on by: - @galiniliev Co-authored-by: galiniliev <[email protected]> OpenClaw-Publication: 4b152785-ec9c-414f-90c7-2368b3a060b3
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
Merged via squash.
|
…aw#188651) * feat(workers): provision offline node runtime bundles Preserve explicit npm profiles and their lock/reuse path while carrying qualified target dependencies in bundle archives. Co-authored-by: galiniliev <[email protected]> * feat: provision cloud worker runtimes without registry access Worked on by: - @galiniliev Co-authored-by: galiniliev <[email protected]> OpenClaw-Publication: 65d6807d-2851-4dba-9916-f4bc1496596b * fix(workers): retain repository package-manager prerequisites Scope Node-only setup to bundle enrollment, fix narrowed bundle fixture metadata, and reuse the validated package manifest owner instead of unsafe assertions. Prove missing npm/Corepack repair and retained npm runtime compatibility. Co-authored-by: galiniliev <[email protected]> * Publish openclaw/p2c-offline-runtime-split Worked on by: - @galiniliev Co-authored-by: galiniliev <[email protected]> OpenClaw-Publication: 92b05551-9794-42c5-b0ea-0dbd82702c99 * fix(test): satisfy toolchain fixture lint Keep fixture loops explicit without changing their behavior, and account for their exact test-line delta. Co-authored-by: galiniliev <[email protected]> * Publish openclaw/p2c-offline-runtime-split Worked on by: - @galiniliev Co-authored-by: galiniliev <[email protected]> OpenClaw-Publication: 4b152785-ec9c-414f-90c7-2368b3a060b3 --------- The dedicated 356-line regression allocation covers offline execution, qualified target inputs, plugin dependency ownership, retained-cache installer reuse, npm lock isolation, and repository/toolchain prerequisite behavior; the shared test baseline is unchanged. Co-authored-by: galiniliev <[email protected]>
What Problem This Solves
Cloud workers using bundle installation still need registry access to assemble their node runtime on the destination.
User Impact
Bundle profiles install preassembled runtime dependencies without invoking npm or package lifecycle scripts. Explicit npm profiles retain destination-native installation, project locks, fallback, and reuse.
Cross-platform bundle deployments must prepare matching OS/CPU dependency inputs; a missing target fails with a preparation hint instead of silently falling back to npm. Cached-runtime verification pins the manifest and build/platform identity and probes the CLI; it does not hash every installed payload file.
Why This Change Was Made
The canonical producer packages the installed dependency graph and qualified target inputs, keeping selected plugin dependencies at their installation owner. Enrollment verifies and extracts authenticated archives into private staging before publication. Producer caches distinguish execution mode and installation mode. Only bundle runtime enrollment uses Node-only prerequisites: repository seed/setup and npm enrollment retain npm, npx, and Corepack preparation, preserving the original contract from #170796.
This is the first runtime slice of the requested packaging split. Public artifact APIs, read-only cache verification, and Linux composition remain separate dependent changes. Existing npm dependency ownership, locks, credential isolation, and timing behavior are preserved. Package input validation is shared with the dependency collector; no second installer, durable state owner, database schema change, or profile migration was introduced.
Evidence
c0e37f780d9e503fdeb949facc4c01277895bced: 52 tests passed across toolchain, project preparation, offline artifact, and generated installer boundaries (77.30s wrapper). The final 13-test toolchain suite passed in 3.96s, including.nvmrc=24resolution and Corepack/packageManager behavior. Missing npm and missing Corepack cases exercise both generated repository entrypoints; both fail on the prior head because it skips prerequisite repair. The baseline fixture maps the newly named bundle-only export to its former Node-only default export.git diff --checkpassed. The final fixture-lint correction09858ddea16c469992f43a20da52342e6e662e84only adds explicit loop braces; it changes no behavior.538027dc9ff67b99974d7a7973129ece0d654057with the full owning contracts: scoped-clean. The subsequent brace-only correction passed formatting and test lint. Local ClawSweeper was unavailable; the completed hosted re-review of the exact published head found no actionable code findings. Its remaining generic compatibility-proof request is addressed by the source-backed scope and explicit limits below.src/stateschema, config schema, worker-environment row decoder, or persisted environment-record shape.requireInstallretains the existingbundledefault and accepts the same explicitnpmselector; its signature only narrows the required input fields. The new install/build/manifest fields are freshly prepared enrollment-transfer metadata, not migrated fields on stored profiles or worker rows. Old runtime directories remain keyed by their old archive digest; the installer publishes the new runtime beside them. A retained prebuilt archive whose complete manifest differs is a cache miss and is rebuilt by the existing producer. The retained-cache regression above exercises the real installer boundary, including preservation of an old-style npm installation and bundle reuse. This addresses the identified data/cache contracts; it does not establish a full released-binary Gateway/provider upgrade, which remains unrun.fc3490aa24e624f0182ae5e29482611fee5736fbfound no intervening changes in the 20 PR paths. A conflict-free merge-tree retained current main’s runtime-chunk/literal-call scanner pair, package manifest, and lockfile unchanged, including fs-safe 0.26.15. The producer still consumes the same chunk-selection result contract. This is composition/source evidence, not a replay of the test suite on a new merged head; the reviewed PR head remains unchanged.b44eeb2585e317027dc17b5f37246984245ac226; the exact-head combined CI, dependency-review, and security-sensitive-review statuses also passed. No live Azure provisioning or real macOS/Windows/native-ABI qualification is claimed; foreign-target tests validate packaging contracts, not native compatibility.Source contribution: @galiniliev, adapted from
0b084c6aabe75c24c914b7a8f6fec329b83c381fwhile preserving current main's owners and leaving the original source branch unchanged.Worked on by
Work sessions