Skip to content

chore: migrate tooling and source installs to pnpm 12 - #131043

Merged
steipete merged 19 commits into
mainfrom
steipete/pnpm-12-migration-cleanup-6945f8
Aug 29, 2026
Merged

steipete merged 19 commits into
mainfrom
steipete/pnpm-12-migration-cleanup-6945f8

Conversation

@steipete

@steipete steipete commented Aug 27, 2026 •

Copy link
Copy Markdown
Contributor

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: true preserves 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 named file: 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 --global and bare-directory global add fail, while named file: 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 main 249c248285b03eacc1fdcb9153bc47c6c3a2ec20 after 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 (main a86b427ca8ee077b4653a2a18615696f5586b151 plus 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: status ok, global update/swap/doctor exits 0, CLI/AI-runtime and freshness checks. Its frozen tar SHA-256 was a939d38a40ea8bb3a5a09ed1a3aafe504dd56830517ede800735f6e8adf36e45. Root/Matrix, non-root, QR and Bun passed. Package Acceptance passed integrity, npm 12 installer acceptance and artifact-only docker-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
node scripts/run-vitest.mjs test/scripts/install-cli.test.ts test/scripts/install-sh.test.ts test/scripts/install-ps1.test.ts 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.ts test/scripts/pnpm-lockfile-documents.test.ts test/scripts/check-package-patches.test.ts test/scripts/test-install-sh-docker.test.ts test/release-check.test.ts
node --import ./scripts/tsx.mjs scripts/build-all.mts ciArtifacts
node scripts/check-changed.mjs -- scripts/e2e/lib/bun-global-install/assertions.mjs src/infra/update-runner.test.ts test/scripts/install-cli.test.ts test/scripts/install-sh.test.ts test/scripts/test-install-sh-docker.test.ts
git diff --check

Retained hosted acceptance and earlier failures

  • Install Smoke — 33211728575: passed at 6ccf3c2bfd99e1371ec4ed5746baeb5899385a4a. The fresh 231.8 MiB candidate cleared the size guard, and installer update executed 2026.7.1-2 → 2026.8.1 with status ok, 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.
  • Package acceptance — 33205451183: passed at 4ee3c3a44c38216ec891391b0c92064761b2b42d, custom docker-package-install, artifact-only transport, no Telegram/live-provider lane.
  • PR CI — 33208824494: passed at a7b8283e87a5b51c1a49f041692e36b23d8f7b46.
  • Later integrated PR CI — 33211689872: failed on merge 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.
  • Earlier PR CI — 33205460406: failed the concurrent tiny-image browser test. The canonical context-owned polling repair reproduced 109 passes/1 failure before, then 110/110 and five sibling cases after, with unchanged assertions, concurrency, and deadlines.
  • Earlier root-image/install smoke — 33205454459: failed overall because installer update stopped at the old 204 MiB size guard before updating. Root/Matrix runtime, non-root, QR, and Bun passed. The retained candidate was 243,066,603 bytes; 32,466,720 bytes of its 32,850,422-byte growth came from the two required fs-safe native trees. Both trees match upstream bytes. The loader resolves distinct root/worker-relative paths; deleting one breaks that repair, and even one-tree deduplication would exceed the old budget. The 70 MB self-contained worker predates the failure and contained no accidental source-map payload. Six default/boundary assertions failed against the old policy; the real payload/exact new limit pass and one byte above fails. The successful later install smoke does not relabel this failed run green.

The full local build at 6f24ae9b9f1fbca5cf0331237dac6c79b4dd8652 passed in 21m29s, including all declaration groups. The subsequent 4ee3c3a44c38216ec891391b0c92064761b2b42d CI-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-256 fa033c9a2ee7c4219af67c2c8545510d7a1ab1279918823de5a8b89e4837e046. The toolchain document remains 966431094ca186a2bd325c549c0ef3b809636c86445eee0082997098db290fcd. 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.common plus the matching root package.json from one ref. Actual two-file-context builds failed without the manifest and passed with it for INSTALL_PNPM=0 and 1, 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, blob 01dc7eda49f20d1de1bfc874037fc74dfc0959e0; 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 .node bytes. 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 source 570ee21030ad2523baeac1d99e9e59829e1f1c05, 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.

@clawsweeper

clawsweeper Bot commented Aug 27, 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 docs Improvements or additions to documentation scripts Repository scripts docker Docker and sandbox tooling extensions: qa-lab extensions: canvas size: XL maintainer Maintainer-authored PR labels Aug 27, 2026
@steipete
steipete marked this pull request as ready for review August 27, 2026 17:10
@steipete
steipete requested a review from a team as a code owner August 27, 2026 17:10
@github-actions github-actions Bot added the dependencies-changed PR changes dependency-related files label Aug 27, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Dependency Guard

This PR changes dependency-related files. Maintainers should confirm these changes are intentional.

Changed files:

  • package.json
  • pnpm-lock.yaml
  • pnpm-workspace.yaml

Maintainer follow-up:

  • Review whether the dependency changes are intentional.
  • Inspect resolved package deltas when lockfiles or workspace dependency policy changes are present.
  • Treat pnpm-lock.yaml and package-lock.json diffs as dependency security-review surfaces.
  • Run pnpm deps:changes:report -- --base-ref origin/main --markdown /tmp/dependency-changes.md --json /tmp/dependency-changes.json locally for detailed release-style evidence.

@github-actions

github-actions Bot commented Aug 27, 2026 •

Copy link
Copy Markdown
Contributor

Dependency graph changes noted

This PR includes dependency graph changes. The dependency guard is informational because the PR author is a repository admin, a member of @openclaw/openclaw-secops, or an OpenClaw organization member with Maintain or Admin repository access.

  • Current SHA: c8092c3a5c4e3c598471ab22ef9b5039a1355b7c
  • Trusted actor: @steipete
  • Trusted role: pull request author; openclaw-secops

Security review is still recommended before merge when the dependency graph change is intentional.

@clawsweeper clawsweeper Bot added merge-risk: 🚨 availability 🚨 May cause crashes, hangs, restart loops, stalls, or process outages. P1 High-priority user-facing bug, regression, or broken workflow. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Aug 27, 2026
@clawsweeper

clawsweeper Bot commented Aug 27, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed August 28, 2026, 8:22 PM ET / August 29, 2026, 00:22 UTC.

ClawSweeper review

What this changes

Migrates repository tooling and source-install/update flows from pnpm 11 to pnpm 12, including bootstrap, lockfile, Docker, and package-budget support.

Merge readiness

⚠️ Ready for maintainer review - 5 items remain

Keep 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
Reviewed head: c8092c3a5c4e3c598471ab22ef9b5039a1355b7c
Owner decision: Required. See Decision needed.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) The inspected ownership and compatibility checks are coherent, with final confidence appropriately dependent on exact-head package acceptance.
Proof confidence 🌊 off-meta tidepool Not applicable: This maintainer-owned PR is not subject to the external-contributor proof gate; the supplied local Docker and package evidence remains supplemental while hosted exact-head runs finish.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: This maintainer-owned PR is not subject to the external-contributor proof gate; the supplied local Docker and package evidence remains supplemental while hosted exact-head runs finish.
Evidence reviewed 7 items Current-main baseline: The accessible current-main package manifest still pins pnpm 11.22.0, so the requested pnpm 12 migration is not already implemented.
Candidate package policy: The candidate pins pnpm 12.0.0 and enables strict 48-hour release-age enforcement.
Source-update owner boundary: The updater reads the target checkout’s package-manager pin and bootstraps that exact pnpm version through a script-scoped temporary install.
Findings None None.
Security None None.

How this fits together

OpenClaw’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]
Loading

Decision needed

Question Recommendation
Should the release and installer unpacked-package ceiling move from 204 MiB to 235 MiB to retain bundled native-loader assets? Accept the 235 MiB ceiling: Accept the increase after exact-head package acceptance confirms boundary enforcement and non-root install/update behavior.

Why: This is an operator-facing release-artifact capacity policy, so author evidence cannot substitute for maintainer acceptance.

Before merge

  • Resolve merge risk (P1) - Moving existing source/Git installs, global pnpm layouts, Docker builds, and package gates to pnpm 12 needs exact-head hosted acceptance; the cited CI, Install Smoke, and Package Acceptance runs were still running.
  • Resolve merge risk (P1) - The default unpacked-package ceiling increases from 204 MiB to 235 MiB to retain native-loader assets, which changes release-artifact disk capacity for installers and operators.
  • Resolve merge risk (P1) - Direct pnpm 12 parser and Matrix downloader artifact inspection was unavailable locally because dependency source/cache was absent and network resolution failed; this is a review-evidence gap, not a confirmed contributor defect.
  • Complete next step (P2) - This protected maintainer PR needs normal exact-head package and compatibility review rather than automatic repair dispatch.
Agent review details

Security

None.

Review metrics

Metric Value Why it matters
Production versus test LOC not independently computable The exact introduced diff is unavailable locally and supplied PR patches cover only 80 of 92 changed files, so a responsible production-versus-test classification cannot be calculated.
Package policy 1 release-age setting added Strict minimum-release-age enforcement preserves the 48-hour dependency-age gate under pnpm 12.
Unpacked package ceiling 204 MiB to 235 MiB (+31 MiB) This is a material installer and release-artifact capacity change requiring explicit acceptance.

Stored data model

Persistent data-model change detected: migration/backfill/repair: config/knip.config.ts, migration/backfill/repair: scripts/e2e/lib/upgrade-survivor/diagnostics.mjs, migration/backfill/repair: scripts/e2e/lib/upgrade-survivor/run.sh, migration/backfill/repair: scripts/e2e/lib/upgrade-survivor/update-restart-auth.sh, migration/backfill/repair: scripts/e2e/upgrade-survivor-docker.sh, persistent cache schema: Dockerfile, and 11 more. Confirm migration or upgrade compatibility proof before merge.

Merge-risk options

Maintainer options:

  1. Complete package acceptance before merge (recommended)
    Require the exact candidate’s hosted CI, Install Smoke, and artifact-only Package Acceptance results before landing the pnpm and installer transition.
  2. Pause for a smaller artifact
    Defer the migration if maintainers do not accept the 235 MiB unpacked-package capacity policy.
Copy recommended automerge instruction
@clawsweeper automerge

Special instructions:
Require exact-head hosted CI, Install Smoke, and Package Acceptance to pass, including non-root package install/update coverage and the package-size boundary.

Technical review

Best 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.

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-owned PR is not subject to the external-contributor proof gate; the supplied local Docker and package evidence remains supplemental while hosted exact-head runs finish.
  • 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.
  • remove merge-risk: 🚨 other: Current PR review merge-risk labels are merge-risk: 🚨 compatibility, merge-risk: 🚨 availability.

Label justifications:

  • P2: This is a compatibility-sensitive tooling migration with bounded but broad installer and release impact, not an active user-facing outage.
  • merge-risk: 🚨 compatibility: pnpm 12 changes existing source-update, global-layout, lockfile, and Docker dependency-install paths.
  • merge-risk: 🚨 availability: The raised unpacked-package limit affects installer disk capacity and package acceptance on constrained hosts.
  • 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-owned PR is not subject to the external-contributor proof gate; the supplied local Docker and package evidence remains supplemental while hosted exact-head runs finish.

Evidence

Acceptance criteria:

  • [P1] Hosted PR CI at c8092c3.
  • [P1] Hosted Install Smoke, including Bun.
  • [P1] Hosted Package Acceptance with artifact-only docker-package-install.
  • [P1] Source-link update and non-root runtime coverage.
  • [P1] 235 MiB package boundary and one-byte rejection.

What I checked:

  • Current-main baseline: The accessible current-main package manifest still pins pnpm 11.22.0, so the requested pnpm 12 migration is not already implemented. (package.json:2164, d53f57c3d250)
  • Candidate package policy: The candidate pins pnpm 12.0.0 and enables strict 48-hour release-age enforcement. (pnpm-workspace.yaml:8, c8092c3a5c4e)
  • Source-update owner boundary: The updater reads the target checkout’s package-manager pin and bootstraps that exact pnpm version through a script-scoped temporary install. (src/infra/update-package-manager.ts:154, c8092c3a5c4e)
  • Update validation coverage: Source-checkout tests cover wrong checkout identity, accidental source links, stale build identity, missing UI, and launcher validation. (src/infra/package-update-steps.source-checkout.test.ts:65, c8092c3a5c4e)
  • Docker security boundary: The Matrix native downloader was already executed by current-main Docker builds; the candidate extracts the retry into a helper and applies it to both frozen install trees, rather than introducing a new downloader capability. (Dockerfile:89, c8092c3a5c4e)
  • Package-capacity change: The candidate raises the default unpacked-package ceiling from 204 MiB to 235 MiB and tests the exact boundary, one-byte rejection, and lower override. (scripts/lib/npm-pack-budget.mts:4, c8092c3a5c4e)

Likely related people:

  • steipete: The supplied PR context identifies steipete as author, and the reviewed candidate revision is authored by Peter Steinberger across the updater and package-management migration surface. (role: current change owner and recent area contributor; confidence: medium; commits: c8092c3a5c4e; files: package.json, src/infra/update-package-manager.ts, Dockerfile)

Rank-up moves

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

  • Publish successful exact-head CI, Install Smoke, and Package Acceptance results, including source-update and non-root package paths.

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 (30 earlier review cycles; latest 8 shown)
  • reviewed 2026-08-28T19:23:11.951Z sha 6f24ae9 :: needs changes before merge. :: [P1] Copy the lockfile into the final runtime stage
  • reviewed 2026-08-28T20:02:59.460Z sha 4ee3c3a :: found issues before merge. :: [P1] Keep the common-image build self-contained | [P1] Copy the lockfile into the final runtime stage
  • reviewed 2026-08-28T20:50:00.612Z sha a7b8283 :: found issues before merge. :: [P1] Copy the lockfile into the final runtime stage
  • reviewed 2026-08-28T21:06:47.805Z sha a7b8283 :: found issues before merge. :: [P1] Copy the lockfile into the final runtime stage
  • reviewed 2026-08-28T21:22:08.518Z sha 6ccf3c2 :: found issues before merge. :: [P1] Copy the lockfile into the final runtime stage | [P1] Keep the package-size safety limit pending capacity approval
  • reviewed 2026-08-28T21:35:55.736Z sha 6ccf3c2 :: needs maintainer review before merge. :: none
  • reviewed 2026-08-28T22:15:28.165Z sha bec879b :: needs maintainer review before merge. :: none
  • reviewed 2026-08-28T23:51:43.066Z sha ebe6fc14fbe3791f72a9e14325d934f978a6a3fb :: needs maintainer review before merge. :: none

@clawsweeper clawsweeper Bot added rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. 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. P2 Normal backlog priority with limited blast radius. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. and removed rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. 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. P1 High-priority user-facing bug, regression, or broken workflow. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. labels Aug 27, 2026
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.
@steipete

steipete commented Aug 29, 2026 •

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

The conflict-resolved candidate is now c8092c3a5c4e3c598471ab22ef9b5039a1355b7c, based on main 249c248285b03eacc1fdcb9153bc47c6c3a2ec20. All 19 migration commits remain: 18 patch-equivalent, one context-only fixture resolution retaining main's new candidate-list parameter and preflight coverage. Application dependency inputs are unchanged.

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 d71b99cc0b5bd06597a7dc718a73eb4e4ff6d3f1 (01dc7eda49f20d1de1bfc874037fc74dfc0959e0). The exact direct invocation and five-attempt presence-check loop already existed inline on main, and the dependency was already build-approved. This PR extracts that loop and applies it after both fresh installs; it does not introduce that invocation or a new download destination.

The upstream normal postinstall is exactly node download-lib.js. Its downloader fetches the versioned GitHub release asset and writes a plaintext version marker; it does not supply checksum/signature verification. The npm SRI pins the archive/downloader, not the separately downloaded .node bytes. I am not claiming stronger artifact authentication than exists. The same pinned trust boundary is retained; a separate Matrix native artifact installation hardening follow-up records the integrity and inherited stale/failed-download handling limitations. No unapproved vendor patch, dependency override, or policy bypass was added.

Current hosted status:

  • PR CI — 33222613135: passed, 193 jobs succeeded and nine conditional jobs skipped, including both Windows jobs and lint/build success. The actual tested merge was 4dd1a830c3dcbc9c6116ac5b143291f0251bbf6f (main a86b427ca8ee077b4653a2a18615696f5586b151 plus this PR head); Linux startup gzip was 344,593 B, below 345,947 B.
  • Install Smoke, including the Bun leg — 33222660545: passed, including root/Matrix, non-root, QR and Bun. Actual update job executed 2026.7.1-2 → 2026.8.1 with status ok, global update/swap/doctor exits 0 and CLI/AI-runtime/freshness checks. Frozen installer candidate tar SHA-256: a939d38a40ea8bb3a5a09ed1a3aafe504dd56830517ede800735f6e8adf36e45.
  • Package Acceptance — 33222663641: passed, including package integrity, npm 12 installer acceptance, and the selected artifact-only Docker lane.

Both manual run heads were verified against the full candidate SHA. The package source and harness are pinned to it, installer update uses 2026.7.1-2, and package acceptance remains artifact-only docker-package-install with no live-provider/Telegram lane. Native review metadata is refreshed; prepare and merge have not run.

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.ts
node --import ./scripts/tsx.mjs scripts/build-all.mts ciArtifacts
node scripts/check-changed.mjs -- src/infra/update-runner.test.ts

@clawsweeper

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

@clawsweeper

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

@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app: macos App: macos cli CLI command changes dependencies-changed PR changes dependency-related files docker Docker and sandbox tooling docs Improvements or additions to documentation extensions: canvas extensions: qa-lab gateway Gateway runtime maintainer Maintainer-authored PR merge-risk: 🚨 availability 🚨 May cause crashes, hangs, restart loops, stalls, or process outages. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. P2 Normal backlog priority with limited blast radius. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. scripts Repository scripts size: XL 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.

2 participants