Repository navigation
chore: migrate tooling and source installs to pnpm 12 - #131043
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
Dependency GuardThis PR changes dependency-related files. Maintainers should confirm these changes are intentional. Changed files:
Maintainer follow-up:
|
Dependency graph changes notedThis PR includes dependency graph changes. The dependency guard is informational because the PR author is a repository admin, a member of
Security review is still recommended before merge when the dependency graph change is intentional. |
|
Codex review: needs maintainer review before merge. Reviewed August 28, 2026, 8:22 PM ET / August 29, 2026, 00:22 UTC. ClawSweeper reviewWhat this changesMigrates repository tooling and source-install/update flows from pnpm 11 to pnpm 12, including bootstrap, lockfile, Docker, and package-budget support. Merge readinessKeep this maintainer-owned migration open: current main still pins pnpm 11, while this branch supplies the pnpm 12 migration and its installer, updater, Docker, and package-capacity compatibility work. No introduced correctness or security defect was confirmed, but exact-head package acceptance and approval of the larger package ceiling remain merge-critical. Priority: P2 Review scores
Verification
How this fits togetherOpenClaw’s build and install tooling turns the repository dependency graph into release packages and source-checkout updates. This PR changes the package-manager version and the paths that prepare, validate, and distribute those outputs. flowchart LR
A[Repository dependency inputs] --> B[pnpm 12 install and lockfile]
B --> C[Docker and release build]
B --> D[Source checkout updater]
C --> E[Packaged OpenClaw artifact]
D --> F[Validated installed runtime]
E --> G[Package size enforcement]
Decision needed
Why: This is an operator-facing release-artifact capacity policy, so author evidence cannot substitute for maintainer acceptance. Before merge
Agent review detailsSecurityNone. Review metrics
Stored data modelPersistent data-model change detected: Merge-risk optionsMaintainer options:
Copy recommended automerge instructionTechnical reviewBest possible solution: Retain one canonical pnpm 12 bootstrap, update, and Docker path only after exact-head package acceptance confirms source-link updates, non-root runtime use, and the 235 MiB boundary while preserving failure-closed size enforcement. Do we have a high-confidence way to reproduce the issue? Unclear: the candidate and maintainer request provide detailed local before/after evidence, but this read-only review did not execute an independent current-main reproduction. Is this the best way to solve the issue? Yes, based on the inspected owners: exact-version bootstrap and checkout-identity validation keep pnpm migration behavior at the updater and installer boundaries rather than adding downstream fallbacks. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against d53f57c3d250. LabelsLabel changes:
Label justifications:
EvidenceAcceptance criteria:
What I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (30 earlier review cycles; latest 8 shown)
|
Qualify local source and archive specs, carry verified global ownership through pnpm configuration, and verify intentional checkout links with shared runtime-readiness checks. Preserve strict packaged-install verification and manager ownership safeguards. Verified the production updater with pnpm 11.22 and 12 using default and custom roots, source links, and tarball updates.
Promote incomplete exit-zero runs before failure capture and exercise the sealed-service manager fixture without inventing successful child exits.
Carry the verified root and bin through both pnpm and npm configuration dialects after original-environment probes. Real pnpm 10 custom-root updates and pnpm 11/12 source and tarball matrices pass without redirecting the caller or weakening ownership checks.
Use the prepared checkout and fresh-process finalization boundary introduced by the updater repair. Preserve explicit consent forwarding before and after the wizard subcommand without assuming plugin callbacks run in the old process.
Use the canonical record coercer instead of carrying an unchecked assertion into the shared runtime verifier. Remove the now-unused grandfathered assertion entry; no allowance is added.
Align installer and release size budgets at 235 MiB for the required native payload added on main. Keep both loader layouts, upstream binaries, explicit overrides, and missing-data rejection intact. Exercise actual defaults and the one-byte boundary. Retain bounded stderr diagnostics for the intermittent Bun signal test without claiming a production signal fix.
Record the successful force-kill once across the timer and post-close drain. Native Darwin traces reproduced both duplicate-signal orders; genuine permission failures and uncleared groups still fail without extending deadlines.
|
@clawsweeper re-review The conflict-resolved candidate is now Exact-head local proof passed 150 updater/manager/source-activation tests, the CI-artifact build in 2m46s, the complete conflict-file changed gate in 13m18s, and fresh full-branch isolated P0 autoreview. Startup JS is 345,167 B gzip, below main's tightened 345,947 B enforcement limit; no UI baseline change is authored here. Before this narrow refresh, the complete original-order installer/updater batch passed 587 tests, with 25 existing local PowerShell skips, alongside the broader five-file changed gate and build. The Bun failure is no longer an unexplained rerun: native traces captured both timer/drain orders sending a second SIGKILL to the same already-exiting process. One shared successful force-kill operation fixes that owner race. Deterministic regressions failed before; 50/50 native repetitions then returned 143 with cleanup and exactly one SIGKILL, plus SIGINT/SIGHUP coverage. Real permission denial and uncleared groups still fail, and deadlines are unchanged. This is separate from the earlier Linux compiler-group incident, which passed unchanged on exact-merge native Linux proof but remains unexplained; that guard was not weakened. Capacity decision and rank-up disposition: retain both required native fs-safe layouts and accept 235 MiB as the unpacked-package ceiling. The approximately 31 MiB increase is required artifact/disk payload, not a new memory or startup budget. The prior real 231.8 MiB candidate passed root/non-root installer/runtime and actual updater acceptance; this is not a universal low-memory-host certification. Strict one-byte-over-limit, lower-override, and missing-size rejection remain. The PR body records direct upstream contract inspection and the executed Docker evidence that refutes the redundant final-lockfile COPY request. Matrix downloader review disposition: I inspected the installed 0.6.6 manifest/downloader and verified its downloader blob matches immutable upstream commit The upstream normal postinstall is exactly Current hosted status:
Both manual run heads were verified against the full candidate SHA. The package source and harness are pinned to it, installer update uses Exact local commands for the latest refresh: node scripts/run-vitest.mjs src/infra/update-runner.test.ts src/infra/update-package-manager.test.ts src/infra/package-update-steps.pnpm11-guard.test.ts src/infra/package-update-steps.source-checkout.test.tsnode --import ./scripts/tsx.mjs scripts/build-all.mts ciArtifactsnode scripts/check-changed.mjs -- src/infra/update-runner.test.ts |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
Merged via squash.
|
What Problem This Solves
Migrates OpenClaw source development, Git-based installs and updates, CI, Docker, and package tooling from pnpm 11.22.0 to stable pnpm 12.0.0. A pin-only upgrade breaks multi-document lockfile readers, native/Corepack launchers, some install arguments, and pnpm-owned global updates. npm 12 can also report a successful bootstrap while leaving pnpm's native executable unprovisioned.
Context: pnpm 12 release and migration differences. Maintainer-requested, AI-assisted implementation reviewed by ClawSweeper and independent Codex autoreview. Findings and their evidence-backed dispositions are recorded below.
Why This Change Was Made
Pins the verified pnpm artifact and required toolchain lock document without changing the application dependency graph relative to the selected main baseline. One dependency-free framing helper serves existing lockfile consumers: packaging reads the application document, while full dependency/security enumeration also includes toolchain packages. The approved
minimumReleaseAgeStrict: truepreserves the existing 48-hour policy rather than silently adopting pnpm 12's weaker default. Main's exemptions, build approvals, patches, and Node support are retained.Source bootstrap selects the target checkout's exact pnpm version, including rollback, and scopes npm lifecycle approval to that package. Root and Canvas launchers distinguish native executables, Node scripts, and shell scripts. Global ownership follows the active installation and reported root/bin, not an assumed relationship between CLI major and storage layout: pnpm 12 still uses
global/v11.The global updater qualifies source directories as named
link:specs and archives as namedfile:specs before changing cwd. Native pnpm rejects the old global-directory flags, so the mutation owner carries verified paths through both existing configuration dialects, after original-environment preflight. This preserves pnpm 10's numeric-layout custom roots; pnpm 11 retains its independently verified config and cwd. Registry targets, explicit protocols, npm/Bun behavior, grouped/duplicate/orphan checks, and caller environment remain protected.Intentional package-to-Git activation carries the exact successfully prepared checkout and SHA into verification. It reuses rollback's build-stamp, entry, and Control UI checks rather than demanding a published-package inventory from source. Ordinary package installs still reject accidental source links and enforce inventory/version checks. The shared JSON reader uses canonical record coercion; its obsolete grandfathered assertion entry is removed, with no new allowance.
Docker installs production dependencies afresh from the same frozen inputs instead of pruning inherited OverlayFS directories, which fails with
EXDEV. Runtime assembly preserves compiled workspace packages and native addons, warms the native toolchain, and checks pnpm offline as the final non-root user. Cleanup removes duplicate installer activation, floating pnpm-11 bootstrap selection, the CLI-major/layout-major probe, and the unused production-store seeder.Bounded upgrade-test diagnostics capture private evidence before cleanup and publish only a trusted-host-redacted projection. They retain actual exits, completed post-core results, and installed artifact identity without granting consent or changing application state. The integration preserves main's sealed-service lifecycle and filtered Windows clone behavior. Main owns the equivalent Raw-navigation diagnostics, so duplicate UI instrumentation was dropped from this PR.
The final validation repair gives the Bun smoke helper one shared successful force-kill operation. Native traces demonstrated that its timer and post-close drain could both signal an already-exiting group, turning a successful cancellation into
EPERM. Genuine permission failures and uncleared groups still fail; grace periods and deadlines are unchanged. Refreshed installer fixtures now supply current checkout state, and the two newly inherited prefer-offline tables use the existing pnpm-12 fixture instead of an arbitrary pnpm-8 pin.User Impact
Contributors and operators using source/Git installs use the pinned pnpm 12 toolchain. Ordinary npm registry installs remain npm-owned and do not require pnpm. Checking out this branch does not replace a global package manager; landing it does not publish a release or alter existing installations.
Both active source-link recipes use
pnpm add --global "openclaw@link:$PWD". Real native tests show why:pnpm link --globaland bare-directory global add fail, while namedfile:installs are snapshots and do not follow atomic source replacement.Capacity decision: retain the required native fs-safe assets and use 235 MiB as the installer/release unpacked-package ceiling, rather than deleting a working loader layout or modifying upstream binaries. This accepts the approximately 31 MiB payload introduced by the already-landed native loader repair. It is an artifact/disk-capacity limit, not a new RAM or startup budget. Root/non-root installer and runtime acceptance passed with the real 231.8 MiB candidate; this is not a universal low-memory-host capacity certification. Strict one-byte-over-limit rejection, explicit lower overrides, and missing-size rejection remain enforced.
No new OpenClaw operator option, capability-consent bypass, SQLite schema change, or runtime data migration is introduced. Generic old pnpm fixtures use 12; intentional older-version rollback, wrong-version, legacy-launcher, and actual v11 storage-layout contracts remain covered. The diagnostic SQLite inspection does not modify application rows or DB/WAL contents; ordinary read-side SHM bookkeeping is not a schema migration.
Evidence
Published candidate:
c8092c3a5c4e3c598471ab22ef9b5039a1355b7c, rebased onto frozen main249c248285b03eacc1fdcb9153bc47c6c3a2ec20after GitHub and local virtual merges confirmed real conflicts. The final overlap was one test-helper parameter: retain main's new candidate list while keeping the obsolete unused package-manager parameter removed. All 19 migration commits remain; 18 are patch-equivalent and one differs only in that conflict context. Main's new preflight reset/clean and Windows preference-policy coverage are retained. Canonical browser polling ownership and UI startup source-boundary repairs are inherited from main, not duplicate cherry-picks. The final commits contain refreshed fixtures and the independently reproduced Bun cleanup repair.Fresh exact-head validation passed: PR CI — 33222613135, Install Smoke including Bun — 33222660545, and Package Acceptance — 33222663641. CI completed 193 successful jobs with nine conditional skips, including both Windows jobs and lint/build. Its actual tested merge was
4dd1a830c3dcbc9c6116ac5b143291f0251bbf6f(maina86b427ca8ee077b4653a2a18615696f5586b151plus this PR); Linux startup gzip was 344,593 B, below 345,947 B.Both manual run heads were verified against the full candidate SHA, with package source/harness pinned. Installer update job 99021630797 executed
2026.7.1-2 → 2026.8.1: statusok, global update/swap/doctor exits 0, CLI/AI-runtime and freshness checks. Its frozen tar SHA-256 wasa939d38a40ea8bb3a5a09ed1a3aafe504dd56830517ede800735f6e8adf36e45. Root/Matrix, non-root, QR and Bun passed. Package Acceptance passed integrity, npm 12 installer acceptance and artifact-onlydocker-package-install; no live-provider/Telegram lane was requested. This installer fixture is not an authenticated Gateway test or the historical configured-plugin replay. Native preparation verifies the same head before merge; older successful runs below retain their original identities.Final local proof
At exact head
c8092c3a5c4e3c598471ab22ef9b5039a1355b7c, all 150 updater/manager/source-activation tests passed, including main's four new preflight cases. A fresh CI-artifact build passed in 2m46s, followed by the complete conflict-file changed gate in 13m18s and fresh full-branch isolated P0 autoreview (no actionable findings). Startup JS measured 345,167 B gzip against main's tightened 345,947 B enforcement limit (baseline 345,371 B); this PR makes no UI baseline change. Package, workspace, application lock, and instruction inputs did not change between the two selected main bases.Before that context-only refresh, the complete original-order installer/updater batch passed 587 tests across three projects, with 25 existing PowerShell cases skipped on this host: unit-fast 5, tooling 436, and infrastructure 146. All five explicit-preference/query-policy cases now pass without changing their assertions or weakening exact-version enforcement. Three installer fixture cases failed before their producer-state correction and passed afterward.
That pre-refresh source tree passed the repository's CI-artifact build in 5m54s, including runtime, external plugins, SDK entry declarations/checks, Control UI, and startup metadata. This ran before the two final repair commits; all five reviewed file hashes were verified unchanged after committing. It is not described as another full global-declaration build. Startup JavaScript measured 345,399 B gzip, below even the original 347,037 B cap. Its then-current 348,449 B baseline was inherited main policy, subsequently tightened on main as shown above; this PR authors no UI baseline increase.
The complete changed-file gate passed in 8m51s, including core-test/root-test typechecks, scoped lint/format, dependency and boundary guards, dead-export checks, and Docker E2E checks. The full rebased branch had a clean isolated P0 review; the final five-file repair also had a fresh independent scoped-clean P0 review. These are explicitly P0-threshold results, not broader-priority audits.
Bun cleanup proof preserves the initial failures. Native Darwin/Node 24.20 traces captured both orders: first SIGKILL succeeded; the other owner then received EPERM for the same-UID, same-start-time process already exiting with status 9. Deterministic CLI-boundary regressions failed before the repair. Afterward, 50/50 native repetitions exited 143, confirmed descendant cleanup, and sent exactly one SIGKILL; SIGINT/SIGHUP siblings returned 130/129 with cleanup. Three runs still observed transient EPERM from the existing presence probe, then ESRCH, without repeating force-kill. Genuine permission denial and uncleared-group cases remain failures. All 289 recorded native process identities were absent at cleanup; no cleanup signals were needed.
Exact final local commands
Retained hosted acceptance and earlier failures
6ccf3c2bfd99e1371ec4ed5746baeb5899385a4a. The fresh 231.8 MiB candidate cleared the size guard, and installer update executed2026.7.1-2 → 2026.8.1with statusok, global update/swap/doctor exits 0, updated CLI and AI-runtime verification, and freshness-policy proof. Root/Matrix image/runtime, non-root and QR checks passed. Bun was intentionally skipped in that dispatch after prior artifact proof; its newly changed cleanup helper is included in the fresh acceptance request.4ee3c3a44c38216ec891391b0c92064761b2b42d, customdocker-package-install, artifact-only transport, no Telegram/live-provider lane.a7b8283e87a5b51c1a49f041692e36b23d8f7b46.531640e9a7aadab26df27bf10da217dabe4704f3. Seven jobs stopped at the same UI prerequisite build, before their tests. The canonical source-only repair above now passes the original UI cap. A separate lint job reported a managed compiler group still active after command exit. On native Linux x64/Node 24.19/pnpm 12, the unmodified exact-merge cold lint command passed in 147.7s; sampled preparation also passed with all eleven strict groups gone. That historical compiler incident remains unexplained, not falsely labeled fixed or refuted. No process-tree guard was relaxed; the Testbox lease was stopped and verified complete.The full local build at
6f24ae9b9f1fbca5cf0331237dac6c79b4dd8652passed in 21m29s, including all declaration groups. The subsequent4ee3c3a44c38216ec891391b0c92064761b2b42dCI-artifact build passed in 7m34s. After both, the production native-pnpm updater activated the actual built OpenClaw checkout in isolated prefixes; exact root/SHA/readiness, expected version, and real CLI help passed. No operator Gateway was restarted. Earlier focused proof included 1,120 passing tests, the complete 273-test CLI suite after two wizard-fixture repairs, 123 owner/rollback tests, and import-cycle checks with zero runtime value cycles; these retain their original source identities rather than masquerading as fresh-head counts.Dependency contracts and review dispositions
Root package metadata differs from selected main only by the pnpm pin; workspace policy differs only by approved strict age. The application lock document is byte-identical to main
249c248285b03eacc1fdcb9153bc47c6c3a2ec20: SHA-256fa033c9a2ee7c4219af67c2c8545510d7a1ab1279918823de5a8b89e4837e046. The toolchain document remains966431094ca186a2bd325c549c0ef3b809636c86445eee0082997098db290fcd. Frozen and prefer-offline frozen installs passed across 174 workspaces, with 1,353 packages reused and no downloads. Main-owned dependency/patch updates were preserved.Real production resolver/updater matrices passed on pnpm 10.28, 11.22, and 12.0, including default/custom roots, named source activation, atomic launcher replacement, packaged archive replacement, conflicting inherited config, and negative ownership/readiness cases. Caller environment remained unchanged. Upstream sources and the older registry artifact's integrity were inspected directly, not inferred from wrappers.
The missing-final-stage-lockfile finding is refuted, not silently skipped. The pinned native invocation generates the runtime toolchain lockfile before chmod; a final-stage COPY is not its producer. Minimal runtime and complete final-image/offline/non-root proof passed. Direct upstream inspection covers document framing and the Corepack bridge/native provisioning contract. ClawSweeper's later network limitation does not replace this retained direct-source and executed proof.
The controlled cache proof shows ordinary pin changes invalidate the sandbox install layer and unchanged rebuilds reuse it. A deliberately frozen size/mtime mutation defeats both bind and COPY controls; no unsupported COPY workaround was added. Standalone common-sandbox docs now require
Dockerfile.commonplus the matching rootpackage.jsonfrom one ref. Actual two-file-context builds failed without the manifest and passed with it forINSTALL_PNPM=0and1, including final non-root/offline checks. This scoped proof disabled unchanged Bun/Homebrew provisioning and narrowed apt packages; it is not an all-tooling provisioning claim. Owned images were removed.Matrix downloader disposition: the exact direct invocation and five-attempt presence loop already existed inline on main. This PR extracts the loop and applies it after both fresh installs. The installed 0.6.6 downloader matches immutable upstream commit
d71b99cc0b5bd06597a7dc718a73eb4e4ff6d3f1, blob01dc7eda49f20d1de1bfc874037fc74dfc0959e0; its normal postinstall is the same command. Its downloader fetches a versioned GitHub asset and writes a plaintext version marker; it does not supply checksum/signature authentication. npm SRI pins the archive/downloader, not separately downloaded.nodebytes. No stronger guarantee is claimed. This pre-existing trust boundary is unchanged, and a separate Matrix native artifact installation hardening follow-up records integrity and stale/failed-download limitations; no unapproved vendor patch or dependency override was added.Latest rank-up disposition: actual conflicts were resolved; exact-merge CI and exact-head installer/package acceptance passed; the 235 MiB capacity decision and disk-versus-memory implications are recorded; the pinned Matrix contract was inspected and its real limitations explicitly documented. The missing-proof concern is not hidden behind a claim of cryptographic verification that upstream does not implement.
Historical upgrade and validation limits
The immutable historical automatic replay, from
[email protected]to frozen source570ee21030ad2523baeac1d99e9e59829e1f1c05, remains failed. Its post-core child returned warning and retained old Codex because replacement required consent; the historical parent restarted anyway, and the new Gateway failed on that old plugin's migration detector. Persisted identity and physical package hashes agree; no loaded-module trace is claimed.A separate explicit manual recovery trial passed with the same frozen artifacts: reviewed Codex/WhatsApp replacement, explicit capability acceptance, existing repair, managed restart, readiness, and authenticated RPC. It is manual recovery, never unattended-upgrade success. Its temporary driver/workflow are not in this PR. The separately owned explicit capability-consent repair is on main but does not retroactively change the historical parent.
The original local full-suite run executed all 564 shards and reported 21 failing shards; it is not claimed green. Earlier broad E2E/package sweeps retained independent lifecycle/consent failures or were incomplete; a native/platform umbrella retained a cancelled Swift lane despite a successful Wear retry. Canonical owner fixes were adopted through main. An earlier build was externally stopped while progressing; a subsequent full build passed. No operator Gateway/live state was modified. Failed AWS provisioning executed no tests; those leases and the later Linux diagnostic lease were released.
Scope and size
Against frozen base
249c248285b03eacc1fdcb9153bc47c6c3a2ec20: runtime +210/-172 (net +38); build/install tooling +262/-384 (net -122); config/CI +25/-20 (net +5); tests/support +2,655/-1,224; validation tooling +981/-63; docs +34/-13; required toolchain lock metadata +101/-0; shrink-only ratchet bookkeeping -1. Application/runtime/build/install/config is net -79, excluding the bookkeeping deletion. Runtime growth carries exact prepared-checkout identity and verification; extraction avoids a second readiness implementation. Validation-tooling growth is primarily bounded private upgrade diagnostics and their trusted publication boundary, plus the single-owner Bun cleanup repair—not application persistence.