Skip to content

test(update): preserve unverified restart outcomes after package swaps - #142102

Merged
fuller-stack-dev merged 16 commits into
openclaw:mainfrom
baovo15:fix/update-handoff-swap-enoent
Sep 20, 2026
Merged

fuller-stack-dev merged 16 commits into
openclaw:mainfrom
baovo15:fix/update-handoff-swap-enoent

Conversation

@baovo15

@baovo15 baovo15 commented Sep 8, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

A missing runtime module after an install swap must not be reported as a verified Gateway restart or authorize deletion of the previous package.

User Impact

Regression coverage and a required-CI partitioning repair: no product behavior or configuration change against incorporated main.

Why This Change Was Made

Preserves @baovo15's original outage report and contributor ancestry while retaining main's installed-runtime restart, executor, readiness, and recovery owners. The original error-to-success fallback and preload registry are superseded by that implementation.

The delta includes three update regression files, seven focused fixture corrections discovered by required CI, and a core storage/state CI partitioning repair with its regression and capacity documentation. They exercise thrown module failures, real filesystem swaps, unverified backup retention, pending readiness, and verified retirement through complete production source modules. The unit-fast entry pins source and dependency inputs to its checkout.

Evidence

Current Verification

Current source: 664bb4f, incorporating main 97c7b35.

  • Child regression: 19/19; supported Vitest entry: 1/1.
  • Reconciled update execution tests: 55/55; reset cleanup tests after the in-test settlement correction: 22/22.
  • Canonical typed script lint and formatting pass. Independent API review found no actionable P0–P2 issues.
  • The fixture now evaluates main's real post-update maintenance owner, pending-service-load classifier/Error classes, and staged-service schemas. Unknown dependency calls still fail closed and retain their diagnostic chain.
  • Earlier CI fixture corrections remain in the signed ancestry. Main now supplies the no-service deadline fixture and direct task-event settlement fence; the merge keeps those upstream implementations, leaving no update-execution delta. The reset fixture now also joins accepted task events before its three in-test residual-root checks, not only in afterEach.
  • CI at8c60f854 exposed a task-event root still active at an in-test collector settlement point. The correction awaits the existing event owner before the unchanged root assertion; no timeout or production code changed.

The repeated hosted handshake failure came from cold shared-state command-runtime loading inside the one-second handshake deadline. Fixture setup now awaits a real empty-token read before the client starts; the real client still performs its fresh read during the handshake. Both capability cases pass with all original deadlines and wire assertions unchanged. Resulting-head required CI and native landing checks must pass.

The original typed script lint reproduced all 12 diagnostics before correction and passed after it. The regression entry also passed with hostile inherited proof-path settings.

Required CI Capacity Correction

Run 35477045216 passed the three previously failing shards but its 203-file serial storage/state job reached GitHub's one-hour execution limit while still passing tests. Its 196-file sibling took 2,867 test seconds. This was diagnosed from the actual job logs, not treated as a flaky assertion or blindly retried.

The existing compact split owner now caps GitHub-hosted storage/state stripes at 64 files, independently of stale timing costs. Blacksmith and hybrid retain their existing measured partitioning. Prerequisite ownership and distinct-family packing keep the pieces separate. The real-inventory regression fails on the original 203-file hosted job, then passes for hosted, Blacksmith, and hybrid profiles with exact file coverage and the unchanged 80-row cap. All 549 focused timing/planner/routing/runner tests, typed lint, and formatting pass. The hosted PR plan remains 80 rows; existing timeouts, serial file execution, fork isolation, and worker limits are unchanged. Independent API review is P0–P2 clean. Measured resulting-head timing is recorded below; the final repaired head still requires green hosted CI.

The first partitioning head exposed four existing hybrid runtime-placement fixture assertions in job 105997407029. All four reproduced locally. Scoping the new ceiling to the profile with the observed timeout makes all four original assertions pass without changing tests or weakening coverage. The complete 549-test suite and independent API-only review pass. Measured storage-job timing is recorded below. Resulting-head hosted completion remains required; no CI failure is waived.

Measured Hosted Storage Completion and Readiness Repair

Run 35481614496 tested the prior published head against main 87fdeff3…. All nine storage stripes completed, selecting the full 411-file inventory with at most 64 files per stripe. Measured stripe elapsed times were 73, 571, 1543, 812, 227, 799, 1075, 1211, and 123 seconds. The longest stripe took 25m43s; the longest containing job took 31m36s, below the unchanged one-hour limit. These are actual executed-group logs, not inferred job numbering or forecast estimates.

Eight storage stripes passed. Job 106000534947 failed two transcript-routing fixture assertions: the default one-second poll expired before real state initialization reached the provider callback. The CI fixture matched local source byte-for-byte, and both failures reproduced locally on the unchanged source.

The small correction joins the existing provider-callback deferred instead, retaining explicit call-count, routing, ownership, status, summary, and cleanup assertions. Both cases pass with actual elapsed times above one second; the full 19-test file, typed core lint, and formatting pass. Independent API-only review is P0–P2 clean with unchanged-source verification. No product code, mock expansion, deadline increase, or blind CI rerun is involved. The new signed head still requires exact-head CI and native landing gates; the failed run is not waived.

Required-CI Ownership Fixture Corrections

Run 35483375540 exposed three additional fixture failure groups in the GitHub merge composition 2bf3d1e5… (published dee3bce6… plus main 576ba7e6…).

  • ACK worker cleanup: Main's fix: fence claimless ackDelivery against a live platform-send claim #153083 correctly rejects ownerless ACKs of claimed deliveries. The two explicit null/undefined rejection cases still used an ownerless ACK for cleanup. Both failures reproduced on the exact CI merge; passing the captured claim only to cleanup makes all 4 worker tests pass, retaining the rejection, row-retention, cold-reopen, host-SQL, and media-ordering controls.
  • Exec-completion teardown: The real WebChat publication test deleted a selected session directory while its Gateway/SQLite owners remained live, producing CI ENOTEMPTY. The fixture now uses the existing removeSessionTestDirectories owner, as its sibling suite already does, to drain work, deselect the store, and close the fixture databases before removal. Both connected/disconnected scenarios pass with all exactly-once event/history assertions unchanged. The original also passed locally; the CI log remains the failure evidence, not a claimed local red reproduction. No retry or timeout was added.

The corrected files were qualified on the exact CI merge, then transferred back to the original PR head with byte-for-byte hash verification. Only the two test files are carried; no synthetic merge or production change is published. Typed core lint and formatting pass. Independent API-only review of the two ownership fixtures is P0–P2 clean. Resulting-head CI remains required; no failing run is waived.

Sibling Transcript Startup Readiness

The same completed run's job 106005217455 exposed seven startup-readiness assertions in the selection and provider-reload fixtures. All seven reproduced locally on source identical to the CI composition (the two complete files initially had 7 failures and 16 passes). Their one-second readiness poll began before real cold state initialization reached the fake provider callback.

The correction joins the existing deferred callback signal after the provider fixture has completed its startup work, then retains the original active-state assertions and polling deadlines. The selection fixture resolves after its real utterance write; provider reload also joins the second successful admission on the next date. Same-date conflict detection, the 65-second no-retry check, explicit start/write counts, source-privacy checks, summaries, and cleanup assertions are unchanged. The shared fixture harness and product code are not modified.

Both complete fixtures pass 23/23. Typed core lint and formatting pass. Independent API-only review is P0–P2 clean, with final source verification. Exact-head hosted CI and native landing remain required; no failed check is waived.

Current-main CI fixture ownership

Run 35485394439 exposed three further fixture boundaries, diagnosed from the actual failed logs:

  • Maintenance (job106010849388): join the existing exact-store/key committed-maintenance event before both original archive polls. The failing case reproduced; the complete file passes 7/7.
  • Readonly lifecycle (job106010849009): a previously evaluated real reader bypassed the fixture transport mocks and attempted to open its intentionally text-only source. A real-module setup preload reproduced the exact error stack. A fixture-local hoisted module reset before its existing mocks/imports passes 16/16 under that preload. The exact initiating Linux import is not inferred from interleaved worker logs.
  • Queue admission (job106010849339): join the existing real committed-enqueue reply helper, immediately releasing the reply, before the unchanged queue-presence and custody assertions. The original case reproduced; the complete file passes 9/9.

All original assertions, transport mock coverage, both held writer boundaries, privacy/root checks, and timeouts remain. Typed core lint, formatting, and independent API-only P0–P2 review pass. A broader local shared-selector probe passed the readonly target but ended in a native SIGSEGV during completion; it is not claimed as a full-suite pass.

The tested CI main parent afa9d8de67b60c5bf7d09c1adf2a947a26fa6765 is incorporated with the original PR as first parent, preserving contributor ancestry and the upstream committed-enqueue helper. The genuine reconciliation's tree is verified identical to the qualified CI composition plus these three fixture corrections. The synthetic CI merge is not published. Resulting-head hosted CI and native landing remain required; no failed check is waived.

Subsequent current-main conflict reconciliation

Native review captured main 3a2ce26706457fed70a84b865ee0dc6bca475bf3. It independently contains the transcript routing callback fix and a complete-start-promise join for the transcript selection fixture. The one selection conflict is resolved to the exact canonical upstream version; both overlapping files now match main, removing their duplicate changes from this PR.

The adopted selection fixture passes 21/21, and the updater regression entry passes 1/1 on the reconciled tree. Typed core lint and formatting pass. Final independent API-only review of the complete remaining PR diff against that main is P0–P2 clean. The three additional CI correction files remain byte-identical to their qualified 7/7, 16/16, and 9/9 source. The earlier run's last pending substantive job completed successfully; its three actual failures are all covered by the recorded repairs. Resulting-head required CI is still required, and the recorded installed-package acceptance remains source-bound rather than being replayed or relabeled.

Retained Installed-Package Qualification

The original head reproduced false success and backup deletion for real ENOENT and ERR_MODULE_NOT_FOUND cases. The source-bound installed-package qualification at signed head 3ddc135 passed: healthy activation verified the candidate and retired its backup; removing an actual Gateway CLI module after the next activation produced exit1, a truthful error, and verified automatic rollback. Product functions/outcomes were not mocked in that native lane.

That proof is retained for its recorded artifact. Current main has advanced; no byte-identical runtime or all-platform qualification is claimed.

Redacted isolated managed-upgrade transcript and artifact bindings

Environment: Docker/Linux, canonical systemctl supervisor fixture, real Gateway processes and token-authenticated RPC. This is not host-systemd, Windows/macOS service, or live-model-inference proof. No live operator Gateway was updated or restarted.

installed baseline: CI runtime artifact 10588476414, source 0b753f1e15b27f13252f10aaf644613f52ecac0a
candidate source: 3ddc1358d8a975f775d2ac47103f7457c91ac29d
candidate package SHA-256: 6e851272cf7f821da9802d8feacf4b8b8a5549fed763a80d95d0eeac8f79c37d
changed-chunk successor fixture SHA-256: e13b8e3754b784b2af4734325ae6f9a3a685e1a0da6e22def057f41dbe6cff63

$ openclaw update --tag file:/candidate.tgz --yes --json
exit=0 status=ok
runId=200cc931-9b51-4ce3-a6bb-2893490a9c08
RPC buildId=2026.9.5-3ddc1358d8a9-2026-09-19T20-30-30.369Z
pid=5146 readyz=true settled=true
one actual previous-package backup observed, then retired

$ openclaw update --tag file:/future.tgz --yes --json
# Harness physically renames gateway-cli-BocSAfIJ.mjs after activation.
exit=1 status=error reason=restart-unhealthy run.status=rolled-back
runId=1cae6403-fdf6-4c9b-9cd2-5c31e1b5bec0
packageRollbackVerified=true service=healthy
RPC buildId=2026.9.5-3ddc1358d8a9-2026-09-19T20-30-30.369Z
pid=10690 readyz=true settled=true
previous package restored by automatic rollback, not discarded as successful activation

The successor tarball is produced by the repository’s canonical first-hop fixture transformer. The injected module’s bytes were verified against both bound packages. The final harness remained unchanged during execution. An earlier setup/path refusal and an earlier harness follow-up failure were corrected; neither is counted as a full passing run.

This artifact proof is bound to the recorded head. Advanced-main caller/launcher changes still require the resulting-head CI and native merge-relevance checks before landing.

…he install swap

A managed package update stages the new version, swaps it over the live
install root, and only then restarts and verifies the gateway. That
restart runs inside the updater process, which is still executing the
build that was just replaced. The bundled dist is split into
content-hashed chunks, so any `import()` reached for the first time after
the swap resolves to a chunk name that only the old tree contained:

  Gateway: restart failed: Error: ENOENT: no such file or directory,
  open '.../node_modules/openclaw/dist/shared-DFJEouXv.js'

`maybeRestartService` caught that as a restart failure, which became
`recovery.serviceRestartSafe: false`, which made the update helper exit
with the unsafe code and log "keep the gateway stopped until the
installation is repaired". The installation was fine -- npm install, the
swap, and doctor had all exited 0 -- but the gateway stayed down until
someone restarted it by hand. Observed on a 2026.9.1 -> 2026.9.2 npm
update: a 3h outage from a successful upgrade.

Two changes:

- Warm the restart path's lazy modules in `beforeActivate`, the last
  point where this process can still read its own install tree. The probe
  gained a loader for `gateway/call.js`, which was a bare dynamic import
  and so could not be warmed.

- Recognize a missing module inside our own install root and stop
  treating it as a verdict on the new install. Restarting the service is
  strictly better than parking it: the old process is gone either way,
  and a genuinely broken install still surfaces through the service's own
  supervision. A missing *data* file in the install root is still a real
  failure.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01WKVaMWLzdHNJCa82nnTfWg
@clawsweeper

clawsweeper Bot commented Sep 8, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@openclaw-barnacle openclaw-barnacle Bot added cli CLI command changes size: M triage: needs-pr-context Candidate: external PR body lacks required problem context or evidence. labels Sep 8, 2026
@clawsweeper clawsweeper Bot added P1 High-priority user-facing bug, regression, or broken workflow. merge-risk: 🚨 availability 🚨 May cause crashes, hangs, restart loops, stalls, or process outages. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Sep 8, 2026
@clawsweeper

clawsweeper Bot commented Sep 8, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 20, 2026, 12:02 AM ET / 04:02 UTC (Revision 13).

ClawSweeper review

What this changes

Adds package-swap restart regressions, synchronizes asynchronous test fixtures, and caps GitHub-hosted storage/state test partitions at 64 files.

Merge readiness

✅ Ready for maintainer review

Keep open: the branch retains useful regression coverage and a measured CI repair absent from current main. The prior maintenance-owner finding is resolved, live GitHub reports the reconciled head mergeable, and no actionable introduced defect was found.

Priority: P2
Reviewed head: f53eb9b5ef1caabe8db651b36f9a89a9c8e1c138

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) Useful regression coverage and a bounded CI repair have concrete proof and no identified correctness defect.
Proof confidence 🦞 diamond lobster (5/6) Sufficient (terminal): The captured Linux installed-package transcript exercises real update activation, module failure, and verified rollback at its recorded artifact; hosted execution demonstrates the changed CI partitioner's bounded jobs. Current regressions supplement that proof without changing the product runtime, and the historical native result is not presented as all-platform or current-runtime qualification.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (terminal): The captured Linux installed-package transcript exercises real update activation, module failure, and verified rollback at its recorded artifact; hosted execution demonstrates the changed CI partitioner's bounded jobs. Current regressions supplement that proof without changing the product runtime, and the historical native result is not presented as all-platform or current-runtime qualification.
Evidence reviewed 9 items Introduced scope and current-main necessity: The pinned base-to-head diff contains regression tests, fixture corrections, documentation, and the hosted planner cap. Comparing the update service and post-update owners with fetched main showed no runtime delta; the planner cap remains unique, and the new regression entry is absent from main and v2026.9.5.
Regression boundary and prior finding: The harness evaluates complete production restart, finalization, maintenance, service-load, and transaction modules. It asserts truthful failure records, retained on-disk backups after actual missing-file/import errors, and retirement after verification. The previously omitted maintenance owner is now included; the supported entry pins all source/dependency overrides to its checkout.
Complete captured proof recovered: Read the complete 15,160-unit PR body and verified its SHA-256 matches the supplied snapshot: 8e8beef7bc28cb998d64b85b52a13e7e930b661049f514e23ffff2366bc33bc9. Its Docker/Linux transcript binds candidate 3ddc135 and package digest 6e851272cf7f821da9802d8feacf4b8b8a5549fed763a80d95d0eeac8f79c37d: healthy activation retires the backup; physically removing a Gateway CLI module produces exit 1 and verified automatic rollback with authenticated RPC readiness. The body explicitly preserves this as historical artifact qualification, not current-runtime or all-platform proof.
Findings None None.
Security None None.

How this fits together

OpenClaw's update finalizer verifies the restarted Gateway before retiring the previous package. These tests protect that decision, while the CI planner divides the test inventory into bounded jobs.

flowchart TD
  A[Package swap fixtures] --> B[Production update finalizer]
  B --> C{Restart verified?}
  C -->|No| D[Retain recovery material]
  C -->|Yes| E[Retire previous package]
  F[Test inventory] --> G[CI partition planner]
  G --> H[Bounded test jobs]
  H --> A
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Tests +845, Docs +2, Other +23. Total +870 across 13 files.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 11 856 11 +845
Docs 1 2 0 +2
Config 0 0 0 0
Generated 0 0 0 0
Other 1 24 1 +23
Total 13 882 12 +870

Review metrics

Metric Value Why it matters
Production versus test growth Product runtime +0; CI tooling net +23; tests/support net +845 Growth primarily adds failure-boundary coverage; the tooling growth addresses a measured hosted timeout.
Hosted workload bound 64 files per storage stripe; 9 measured stripes completed Recorded execution supports the partition bound without increasing the one-hour job deadline.

Technical review

Best possible solution:

Retain one production restart and recovery owner, protect its outcomes through regression coverage, and bound hosted CI work without weakening assertions or deadlines.

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

Not applicable as a new product-bug reproduction: the final branch preserves main's runtime behavior. Historical missing-module and hosted-timeout failures have recorded evidence; this read-only review executed no tests.

Is this the best way to solve the issue?

Yes. The branch tests existing update owners and extends the existing CI splitter; fixture corrections synchronize on committed work while retaining the original assertions.

AGENTS.md: found and applied where relevant.

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

Labels

Label justifications:

  • P2: This improves update regression protection and repairs bounded CI capacity without changing shipped product behavior.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (terminal): The captured Linux installed-package transcript exercises real update activation, module failure, and verified rollback at its recorded artifact; hosted execution demonstrates the changed CI partitioner's bounded jobs. Current regressions supplement that proof without changing the product runtime, and the historical native result is not presented as all-platform or current-runtime qualification.
  • proof: sufficient: Contributor real behavior proof is sufficient. The captured Linux installed-package transcript exercises real update activation, module failure, and verified rollback at its recorded artifact; hosted execution demonstrates the changed CI partitioner's bounded jobs. Current regressions supplement that proof without changing the product runtime, and the historical native result is not presented as all-platform or current-runtime qualification.

Evidence

What I checked:

  • Introduced scope and current-main necessity: The pinned base-to-head diff contains regression tests, fixture corrections, documentation, and the hosted planner cap. Comparing the update service and post-update owners with fetched main showed no runtime delta; the planner cap remains unique, and the new regression entry is absent from main and v2026.9.5. (scripts/lib/ci-node-test-plan.mts:2677, f53eb9b5ef1c)
  • Regression boundary and prior finding: The harness evaluates complete production restart, finalization, maintenance, service-load, and transaction modules. It asserts truthful failure records, retained on-disk backups after actual missing-file/import errors, and retirement after verification. The previously omitted maintenance owner is now included; the supported entry pins all source/dependency overrides to its checkout. (scripts/tests/update-restart-module-outcome.mjs:252, f53eb9b5ef1c)
  • Complete captured proof recovered: Read the complete 15,160-unit PR body and verified its SHA-256 matches the supplied snapshot: 8e8beef7bc28cb998d64b85b52a13e7e930b661049f514e23ffff2366bc33bc9. Its Docker/Linux transcript binds candidate 3ddc135 and package digest 6e851272cf7f821da9802d8feacf4b8b8a5549fed763a80d95d0eeac8f79c37d: healthy activation retires the backup; physically removing a Gateway CLI module produces exit 1 and verified automatic rollback with authenticated RPC readiness. The body explicitly preserves this as historical artifact qualification, not current-runtime or all-platform proof. (3ddc1358d8a9)
  • Measured planner behavior: The captured body reports all nine storage stripes completing in run 35481614496, covering 411 files with at most 64 per stripe; the longest stripe took 25m43s and its containing job 31m36s. GitHub confirms the run used head 394d5e9. That run failed a separately documented transcript fixture, so it is not claimed as a green full run. Direct log retrieval was blocked by the artifact host allowlist; timing details remain attributed to the captured transcript. (test/scripts/ci-node-test-plan.test.ts:3431, 394d5e973ffe)
  • Partition invariants: The ceiling applies only to the GitHub storage/state owner, after prerequisite partitioning. Existing family admission prevents recombining sibling stripes. The added real-inventory test checks exact once-only coverage, all three backend profiles, the 80-job cap, serial file execution, and fork isolation. (scripts/lib/ci-node-test-plan.mts:2829, f53eb9b5ef1c)
  • Review continuity and sponsorship: The supplied steipete comment accepts the regression's merits and asks for current-main reconciliation. The current body documents adopting upstream transcript readiness. Live reads retain head f53eb9b with mergeable=true and mergeable_state=blocked; the former conflict warning is therefore not repeated. The supplied test merge is stale and was not used to infer removal of main behavior. (f53eb9b5ef1c)

Likely related people:

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

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (12 earlier review cycles; latest 8 shown)
  • reviewed 2026-09-19T23:03:25.851Z sha 2e56ff4 :: blocked before merge. :: [P2] [P2] Load main's extracted maintenance owner in the regression harness
  • reviewed 2026-09-19T23:29:05.277Z sha 8c60f85 :: needs maintainer review before merge. :: none
  • reviewed 2026-09-19T23:58:23.900Z sha 77a7193 :: needs maintainer review before merge. :: none
  • reviewed 2026-09-20T01:13:40.487Z sha 2e56116 :: blocked before merge. :: none
  • reviewed 2026-09-20T01:40:27.486Z sha 394d5e9 :: blocked before merge. :: none
  • reviewed 2026-09-20T02:19:53.880Z sha dee3bce :: needs maintainer review before merge. :: none
  • reviewed 2026-09-20T03:08:03.900Z sha 664bb4f :: needs maintainer review before merge. :: none
  • reviewed 2026-09-20T03:52:46.791Z sha 8f75b62 :: blocked before merge. :: none

@fuller-stack-dev fuller-stack-dev changed the title fix(update): keep a managed update from stranding the gateway after the install swap test(update): preserve unverified restart outcomes after package swaps Sep 19, 2026
@openclaw-barnacle openclaw-barnacle Bot removed the triage: needs-pr-context Candidate: external PR body lacks required problem context or evidence. label Sep 19, 2026
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. 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. and removed P1 High-priority user-facing bug, regression, or broken workflow. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. merge-risk: 🚨 availability 🚨 May cause crashes, hangs, restart loops, stalls, or process outages. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Sep 19, 2026
@openclaw-barnacle openclaw-barnacle Bot added scripts Repository scripts size: L and removed cli CLI command changes size: M labels Sep 19, 2026
@openclaw-barnacle openclaw-barnacle Bot added triage: needs-pr-context Candidate: external PR body lacks required problem context or evidence. and removed gateway Gateway runtime cli CLI command changes triage: needs-pr-context Candidate: external PR body lacks required problem context or evidence. labels Sep 19, 2026
@clawsweeper clawsweeper Bot added 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. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. merge-risk: 🚨 automation 🚨 May affect CI, automerge, proof capture, label sync, or maintainer automation. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Sep 19, 2026
@openclaw-barnacle openclaw-barnacle Bot added the gateway Gateway runtime label Sep 19, 2026
@openclaw-barnacle openclaw-barnacle Bot added the docs Improvements or additions to documentation label Sep 20, 2026
@openclaw-barnacle openclaw-barnacle Bot added the agents Agent runtime and tooling label Sep 20, 2026
@openclaw-barnacle openclaw-barnacle Bot removed the agents Agent runtime and tooling label Sep 20, 2026
@fuller-stack-dev
fuller-stack-dev merged commit 184cdd4 into openclaw:main Sep 20, 2026
184 checks passed
@fuller-stack-dev

Copy link
Copy Markdown
Member

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 21, 2026
openclaw#142102)

* fix(update): keep a managed update from stranding the gateway after the install swap

A managed package update stages the new version, swaps it over the live
install root, and only then restarts and verifies the gateway. That
restart runs inside the updater process, which is still executing the
build that was just replaced. The bundled dist is split into
content-hashed chunks, so any `import()` reached for the first time after
the swap resolves to a chunk name that only the old tree contained:

  Gateway: restart failed: Error: ENOENT: no such file or directory,
  open '.../node_modules/openclaw/dist/shared-DFJEouXv.js'

`maybeRestartService` caught that as a restart failure, which became
`recovery.serviceRestartSafe: false`, which made the update helper exit
with the unsafe code and log "keep the gateway stopped until the
installation is repaired". The installation was fine -- npm install, the
swap, and doctor had all exited 0 -- but the gateway stayed down until
someone restarted it by hand. Observed on a 2026.9.1 -> 2026.9.2 npm
update: a 3h outage from a successful upgrade.

Two changes:

- Warm the restart path's lazy modules in `beforeActivate`, the last
  point where this process can still read its own install tree. The probe
  gained a loader for `gateway/call.js`, which was a bare dynamic import
  and so could not be warmed.

- Recognize a missing module inside our own install root and stop
  treating it as a verdict on the new install. Restarting the service is
  strictly better than parking it: the old process is gone either way,
  and a genuinely broken install still surfaces through the service's own
  supervision. A missing *data* file in the install root is still a real
  failure.

Claude-Session: https://claude.ai/code/session_01WKVaMWLzdHNJCa82nnTfWg

* test(update): use canonical normalization in restart regression

* test(update): register package-swap regression in its CI owner

* test(gateway): join task events before reset fixture cleanup

* test(gateway): join task events before in-test settlement

* test(gateway): prepare auth command runtime before handshake

* fix(ci): bound serial storage-state test stripes

* fix(ci): scope storage file ceiling to hosted jobs

* test(transcripts): wait for routed provider startup

* test: honor delivery and session fixture ownership

* test(transcripts): join configured provider startup

---------

Co-authored-by: baovo15 <[email protected]>
Co-authored-by: Jason (Json) <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Improvements or additions to documentation gateway Gateway runtime P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. scripts Repository scripts size: L 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.

4 participants