Repository navigation
fix(update): keep first upgrade alive after package replacement - #136395
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: blocked before merge. Reviewed September 2, 2026, 6:11 PM ET / 22:11 UTC. ClawSweeper reviewWhat this changesThe branch emits two legacy runtime modules and adds a Docker package-update scenario so old updaters can finish a package replacement and restore the managed gateway service. Merge readiness⛔ Blocked before merge - 3 items remain Keep open. This MEMBER-authored, maintainer-labeled PR has an explicitly accepted, bounded compatibility window; the exact introduced diff has no actionable correctness finding, and the packaged upgrade evidence supports the intended repair. Priority: P1 Review scores
Verification
How this fits togetherOpenClaw’s package updater replaces the installed package while an older CLI process may still be executing. The package postbuild step must retain the exact runtime modules that process imports until it can finish service restoration. flowchart LR
A[Running old updater] --> B[Package replacement]
B --> C[Postbuild package output]
C --> D[Legacy runtime bridge]
D --> E[Managed service restoration]
F[Packaged Docker upgrade test] --> A
E --> G[Active gateway service]
Before merge
Agent review detailsSecurityNone. PR surfaceTests +118, Config +1, Other +459. Total +578 across 13 files. View PR surface stats
Review metrics
Stored data modelPersistent data-model change detected: Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Keep exactly the two documented bridge modules through the accepted source-artifact window, then remove them only after an owner-approved replacement-path proof shows affected updaters no longer import them. Do we have a high-confidence way to reproduce the issue? Yes — the supplied packaged Testbox evidence exercises released v2026.8.2 through negative, repaired, and future hops, while the checked-in harness asserts exit status, selected package, service state/PID, missing-import absence, and residue. Is this the best way to solve the issue? Yes — emitting two self-contained modules at the package postbuild owner preserves the precise old import ABI without retaining an arbitrary historical runtime graph, matching the repository’s existing legacy-chunk approach. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 868aae3c56db. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (7 earlier review cycles)
|
e9a402f to
47640f0
Compare
|
@clawsweeper re-review Exact head |
|
🦞🧹 I asked ClawSweeper to review this item again. |
|
Maintainer resolution of the remaining ClawSweeper rank-up move:
This resolves the reviewer-side promisor limitation without expanding the supported artifact boundary. |
|
Maintainer exact-head landing disposition:
Abort conditions remain: head change, merge conflict, active release hold, or a new branch-owned failure. |
|
Exact-head resolution for the three remaining review checklist items on
Final isolated product proof passed on AWS Linux amd64, lease Published v2026.8.2 and exact d413 each produced the intended negative missing-chunk failure, then completed repaired and fake-future hops with exits Exact-head GitHub CI is also clean: 265 successful checks, 40 skipped, one neutral, and no failed or pending check. The post-push |
|
Merged via squash.
|
…claw#136395) * fix(update): bridge legacy updater runtime chunks * fix(test): use canonical package cleanup variable * docs(changelog): note first-hop updater bridge * test(infra): include updater bridge in runtime scaffold * chore: remove release-owned changelog entry * test(release): register updater first-hop lane * test(update): prove bridge expiry on future hop --------- Co-authored-by: Vincent Koc <[email protected]>
) * fix(update): bridge legacy updater runtime chunks * fix(test): use canonical package cleanup variable * docs(changelog): note first-hop updater bridge * test(infra): include updater bridge in runtime scaffold * chore: remove release-owned changelog entry * test(release): register updater first-hop lane * test(update): prove bridge expiry on future hop --------- Co-authored-by: Vincent Koc <[email protected]> (cherry picked from commit 023ce6d)
…ry (#137286) The first-hop Docker wrapper bypassed the shared package mount owner, so unpublished companion dependencies failed with ETARGET before the negative control could replace the installed package. Reuse the registry entrypoint for the entire lane, including the future fixture's candidate dependencies. Consolidate update execution to preserve exits and print failure output. Proof: built and packed frozen caa2719. The unchanged lane retained 2026.8.2 after ETARGET for @openclaw/[email protected]; the fix passed the negative control and both positive hops in Docker. A missing-registry probe exposed ETARGET in the main lane log. The wiring regression failed before the fix; 461 focused tests, check:changed, and shellcheck passed. Local autoreview through P2 found no actionable issues. Related: #136395; Full Release Validation run 33728228813.
…ry (openclaw#137286) The first-hop Docker wrapper bypassed the shared package mount owner, so unpublished companion dependencies failed with ETARGET before the negative control could replace the installed package. Reuse the registry entrypoint for the entire lane, including the future fixture's candidate dependencies. Consolidate update execution to preserve exits and print failure output. Proof: built and packed frozen caa2719. The unchanged lane retained 2026.8.2 after ETARGET for @openclaw/[email protected]; the fix passed the negative control and both positive hops in Docker. A missing-registry probe exposed ETARGET in the main lane log. The wiring regression failed before the fix; 461 focused tests, check:changed, and shellcheck passed. Local autoreview through P2 found no actionable issues. Related: openclaw#136395; Full Release Validation run 33728228813.
What Problem This Solves
Fixes an issue where updating from the published
v2026.8.2package could install the candidate successfully, then fail with a missing hashed runtime chunk while the old updater process was restoring the managed service. The command exited 1 and left the service stopped even though package replacement had already succeeded.The same failure affects the exact untagged d413 updater artifact. Its support here is tied to immutable package digest
74919d75d6a9ce8204cc49164947c56cc93d890aac11fd7b36b4fb477a7550de, not every package labeled2026.8.1.Why This Change Was Made
Package postbuild now emits the two exact legacy filenames and their old
resolveNodeRunnerexport ABI as tiny, self-contained Node built-in modules. That lets an already-running supported updater finish after the package root has been replaced without retaining an arbitrary historical chunk graph or copying code from the incumbent installation.Regression coverage runs each unmodified old packaged updater through three observable stages: a negative candidate with the compatibility input removed, the repaired candidate, and a distinct fake-future package. This is intentionally separate from npm rollback in #135462 and from future coherent self-replacement, service-intent restoration, and crash-journal work.
User Impact
The next release can serve as the one-hop bridge from
v2026.8.2: the old command completes after installing it, and the managed service returns to its active intent. The bridge also covers the exact d413 artifact above. Other untagged builds with different hashed imports are outside the supported boundary.Compatibility Window
Maintainer acceptance: retain exactly
shared-Y6bNiw2w.jsandshared-DTaQo6Hi.js, with the frozenresolveNodeRunnerABI, until the supported upgrade window for publishedv2026.8.2and the exact d413 artifact closes. Removal requires an explicit window decision plus replacement-path proof; renaming either file or changing its export earlier would strand those running updaters again.Evidence
05201df7ed95df449f3968db69cfb27588194b10, directly extending owner-accepted headf3972ecdef9df2b67c788493fb70c7acb33758af. The post-review repair changes only the five canonical lane catalog/workflow/test files; the accepted two-file ABI window and existing first-hop scenario are byte-for-byte unchanged.update-first-hop-compatin the package-update maintenance catalog, the releasepackage-update-self-upgradechunk, package/product acceptance profiles, and release package acceptance. The matrix planner already schedules that chunk for minimum, beta, stable, and full profiles, so it required no edit.[5,2,2]instead of[5,2,3]for all four release profiles, and package/product acceptance omittedupdate-first-hop-compat. Those exact assertions pass after the catalog repair.test/scripts/docker-e2e-plan.test.tspassed 76/76;test/scripts/package-acceptance-workflow.test.tspassed 333/333; runtime-postbuild plus first-hop fixture tests passed 44/44; the four release-profile matrix assertions passed 4/4. The full matrix file's sole local failure was its unrelated Bash 4 lowercase expansion under macOS Bash 3.2.git diff --checkpassed.05201df7ed9started automatically from the contributor-branch push. No Testbox, manual CI, FRV campaign, publication, or merge was dispatched for this head.[email protected]archive SHA-25620e9c2f16742dfcebfb21504e51067d31e000a19577126ff4fab117e5e87dbe2; its updater importsshared-Y6bNiw2w.jsafter replacement.d413210bc7420923d101ce64211511cdac7b9464; successful CI run33613782124, artifact9840260310, artifact ZIP SHA-2563818ddeff1f0048ee5df32839eea28aa67ca35147c243587e47d8240d1e7203c. Its updater importsshared-DTaQo6Hi.js. Both old chunks expose the sameresolveNodeRunnerimplementation reproduced by this bridge.blacksmith-testbox, leasetbx_01m1hf5f5562pbdep7hkw8h6jq, hydration Actions run 33655065437. Delegated sync retained main as remoteHEAD, so exact PR content was verified separately: all seven product/harness changed-file blob hashes matched code head47640f0ba50, combined digest6bec4ff6740184572fec550a55d5d381dce8e10d02342578f0be4f6b49b7eefd. The remaining PR-unique commits add only the changelog entry and clean-dist test-fixture repair; the exact tip then merges unrelated main changes.v2026.8.2-> negative/repaired/future exits1/0/0; the negative lane reproduced missingshared-Y6bNiw2w.jsand left the service inactive; repaired and future hops preserved active service intent with distinct PIDs1774/3259/4863; transaction residue0/0. Candidate archive SHA-256d9ccf0525d7984066ae3c94007871e7386ab50cdc6a2cb2b7cd7172ef1fe4248. Runtime: 6m18s.test/scripts/docker-build-helper.test.tspassed 275/275; runtime-postbuild and package-fixture suites passed 44/44.src/infra/run-node.test.tspassed 90/90 withtest/vitest/vitest.infra.config.tsin 3.38s;oxfmtandgit diff --checkpassed.33659738248:checks-node-compact-small-25passed on0034a3fc512; 227 checks passed.check-guardsfailed only after its checks completed when Git credentials were unavailable (exit 128), andbuild-artifactsreproduced the known SQLite flip-proof baseline at assertion line 7. As of 2026-09-02 17:30 UTC, 11 CI prerequisites remained queued with no runner and zero executed steps, soopenclaw/ci-gatehad not been emitted.OPENCLAW_TESTBOX=1 OPENCLAW_ALLOW_ROOT_CHANGELOG_PR=1 scripts/pr prepare-run 136395revalidated the exact review artifact, then stopped because no successful recent CI workflow exists for0034a3fc512. The retained operation lock was recovered after verifying no child tools remained. No unchanged broad CI/FRV graph was rerun.Prior CI Differential
The original-head CI had one branch regression:
checks-node-compact-small-66showed the new Docker runner bypassed the canonical generated-package cleanup variable. Code commit47640f0ba50usesPACKAGE_TGZand the existing cleanup contract now passes in the 275-test Docker helper suite.The next exact-head graph exposed test-fixture fallout in
checks-node-compact-small-25: all 16 failures were insrc/infra/run-node.test.tsbecause its canonical clean-dist scaffold omitted the two newly required postbuild outputs. Headb6e109bda38adds those outputs to the scaffold and the existing missing-core-output coverage; the exact file now passes 90/90.The known SQLite baseline failure, assigned runners that executed zero steps, and post-test Git credential loss are not branch regressions. Unrelated gateway/session failures are likewise not attributed without a changed-surface differential. No unchanged broad CI or FRV graph was rerun.
LOC Judgment
Total diff is
+578/-5across thirteen files:+19inscripts/runtime-postbuild.mts.+1inpackage.json.+12/-3across the canonical Docker lane catalog and package acceptance workflows.+546/-2across the Docker scenario, fixtures, and focused tests.The larger surface is isolated package-replacement proof. It exercises archive replacement, the old running updater, managed-service restoration, a negative control, a later update, and cleanup; no smaller unit-only test proves that boundary.