Skip to content

fix: restore npm plugins when core updates roll back - #188978

Merged
roboclaw-bot merged 4 commits into
mainfrom
roboclaw/update-plugin-cohort-recovery-current
Oct 31, 2026
Merged

roboclaw-bot merged 4 commits into
mainfrom
roboclaw/update-plugin-cohort-recovery-current

Conversation

@roboclaw-bot

@roboclaw-bot roboclaw-bot commented Oct 31, 2026 •

Copy link
Copy Markdown
Collaborator

Related: #188335

What Problem This Solves

Fixes: npm plugins become unavailable when an update rolls core back after replacing them with plugins that require the newer core.

User Impact

User impact: rollback restores the compatible plugin cohort and its settings, while preserving later independent plugin and config changes. This does not backport recovery into older released updater parents.

Why This Change Was Made

Retain plugin install transactions until activation verification, and journal their owned artifact, record and config preimages in the existing update recovery owner. Reopened repair reacquires live custody and compares before restoring. Database restore retains only the exact recovery pair. The legacy reservation stays unchanged for released readers.

Evidence

  • Pinned main edeae71308d8 reproduced the registered-updater failure: core rolled back while an incompatible npm plugin remained installed. The candidate restored the exact plugin artifact, record and settings and retained the verified backup.

  • Latest canonical package campaign (frozen 358d34b6 plus corrections to the selected Node path, recovery-pair reads and pending failure reporting) passed registered rollback, restored old-core Gateway readiness/read-only RPC, foreground update.run with a fresh ready successor, and an untouched published 2026.10.9 → unstamped/unfaulted candidate upgrade. Both foreground and published-parent installed payloads matched 16,835/16,835 files, with zero permission warnings. Canonical tar SHA-256: 5231adb743dd59426563aefd207b439b044931ee9621d64c11584d31e2ebdd95.

  • PostgreSQL 17 exact-pair restore/repeat/reopen passed; the three CI-failing credential rollback cases passed through the conformance lane. A populated physical witness passed owned migration restoration and refusal of later independent plugin-index/migration writes. Earlier whole-container death/reopen/repeated settlement and exact installed 10.9 reader/admission/cleanup proof remain applicable to unchanged recovery owners.

  • The terminal reporting correction has separate regression proof: retained recovery preserves the captured initiating failure, with lost-authority and release-denial siblings retained. This reporting-only branch postdates the package campaign; that campaign does not claim to cover it. Focused native owner/consumer tests, targeted types, lint, formatting and ratchets pass. Fresh independent canonical Codex P0–P2 review of 358d34b6 → repair snapshot 5edd1ac8 completed scoped-clean in one complete pass, with no findings.

  • Prior CI on 358d34b6 failed 26 jobs: 17 contained PR-caused failures addressed by this repair, 7 were wholly inherited, 1 was an unreproduced root-help timeout, and 1 was the aggregate. Doctor/X inheritance was reproduced with matching signatures on the actual CI main parent 96e05f7c; pinned branch-base tests alone were not used as inheritance evidence. The timeout remains an investigated gap.

  • CI on signed repair 6f542fa2 completed 114 passed / 12 failed: five wholly PR-caused jobs, one mixed, five inherited, and the aggregate. Matching main signatures and the source-pinned X replay are detailed below. R7 fixes failed legacy-Doctor rollback through the existing compatible-schema owner and corrects affected authority, process-copy, foreground, and terminal fixtures. Exact-head CI 41189435747 attempt 1 completed on signed repair 2e60dcd3350f1bc214ee15704744d65882bbbf68: 90 passed / 24 skipped / 10 failed, including the aggregate. All three PostgreSQL conformance shards passed. All 21 original PR-caused errors are absent: the five wholly PR-caused jobs pass, and the mixed job retains only its inherited registry assertion. Seven substantive failures match main. R8 single reruns pass for root-help and service-authority; the parent 10:53Z landing ruling classifies those two as one-off non-PR flakes, separately from inherited failures.

  • R8 requested one rerun per then-unattributed job: root-help / attempt 2 and service-authority / attempt 3 both PASS. Final latest-three scheduled main logs have no matching root-help timeout, and the exact service case passes all three. The parent landing ruling at 2026-10-31 10:53Z classifies both original failures as one-off flakes: not PR-caused, and not waived as inherited. This is an explicit maintainer disposition, not a claim of a matching main signature. Evidence links are below; no source change or new commit was justified.

  • R7 focused proof: candidate activation 14/14, Windows interruption 1/1, native populated rollback and independent index/migration writers 3/3, lease child boundaries 8/8, terminal outcomes 12/12, and foreground/index/compatibility consumers 8/8 pass. The strengthened failed-Doctor regression is red on 6f542fa2 and green with the repair, including exact previous package/config bytes. Type-aware lint, targeted CLI-update types, formatting, diff sanity, and the staged test-line ratchet pass. R7 adds exactly 22 LF to its existing allocation; the shared scalar is unchanged.

  • Fresh independent canonical Codex P0–P2 review of 6f542fa2 → staged tree 5add90c9 completed scoped-clean, one complete pass, no findings. Signed commit 2e60dcd3350f has that exact tree. Modern Doctor delegation also passes 12/12. Candidate file test time was 223.37s (235.82s Vitest file duration) (26-case command including delegation: 288.31s wall); the longer native fixtures exercise actual process admission, package compensation and SQLite boundaries.

The earlier canonical package and published-parent upgrade campaign predates R7. R7 proof exercises the changed rollback and native process boundaries; no new full package campaign was run.

Rollback failure injection and the foreground next-version stamp are test-only; the published-parent upgrade has neither. Linux proof does not qualify other operating systems or model inference. Older released-parent failed-rollback/backport compatibility and #188335's separate lease issue remain unresolved.

The separate +3,529 regression-test LF allocation covers distinct artifact/index/config, native handoff, cancellation, recovery and affected-consumer failures; the shared ceiling scalar is unchanged. Simplification reuses the existing owner and removes duplicate terminal scopes, hand-built cohort contexts, and a mock-only assertion. Necessary native fixture growth keeps actual delegated executor/Doctor boundaries under test.

Failure attribution for CI 41181159578
Failed job Classification Exact signature summary and matching main
checks-node-changed-compact-large-1-3 (124479118484) inherited node-runtime2: fixture node-a executable replaces process.execPath; incompatible service Node promise resolves undefined. Same tests/errors on main41184597021 job124488987970.
checks-node-changed-compact-large-14-2 (124479118630) PR-caused candidate-activation config-change/legacy-config-change: ExitError: exit1; live outer executor omitted by synthetic post-core child (R6diagnostic).
checks-node-changed-compact-small-18-3 (124479118634) inherited target-schema incompatible inspected runtime: vi.fn arguments differ by appended Updater Node/PATH Node diagnostic lines. Same main job124488988046.
checks-node-changed-2 (124479118646) inherited (main source-pinned replay) X composition: Error: Gateway SDK resource host is not bound at legacy-sdk-resource-host.ts:231. Matching local main96e05f7c replay (exit1), r5-main96-x-composition.json/log; same five owner/test blobs across main+CImerge.
checks-node-changed-compact-small-17-2 (124479118713) mixed PR-caused and inherited fresh-doctor foreground failures5: expected empty verification vs healthy old runtime (one), expected exit79 vs exit1(four); same cases PASS on main124488988110. Inherited sixth: resolveTargetNodeRuntime unexpectedly called1time, same main job.
checks-node-changed-compact-large-11 (124479118738) inherited candidate-admission newer Node: vi.fn arguments differ by appended Updater Node/PATH Node diagnostic lines. Same main job124488988138.
checks-node-changed-compact-large-14-1 (124479118746) PR-caused post-core-handoff2: expected failure observer object, received []; package-lifecycle requester-revoked: expected requester-revoked, received state-migrated-no-rollback.
checks-node-changed-compact-small-41-1 (124479118761) PR-caused lease candidate-runtime8: SystemError cp EISDIR/ERR_FS_CP_DIR_TO_NON_DIR; copied legacy-finalizer/node_modules directory conflicts with compiled-host node_modules symlink. Fixture setup failure, not product verdict.
checks-node-changed-compact-small-9 (124479118836) PR-caused Windows interruption: ENOENT access openclaw/dist/index.js after refused database rollback. Same test PASS main124488987981.
checks-node-changed-compact-large-15 (124479118846) PR-caused terminal-outcome2: retainedExists expectedtrue/gotfalse; sentinel expected error payload/gotnull. Same tests PASS main124488987997.
checks-node-changed-compact-large-2 (124479118890) inherited visitor-access5: Error: Gateway SDK resource host is not bound, same tests/cause in main124488988279.
openclaw/ci-gate (124483318569) aggregate checks-node-core-test-nondist-shard finished with failure (selected=true); exit1. Aggregates substantive failures.

X inheritance uses an exact-signature local replay of main 96e05f7c, not GitHub CI. Test and failure-owner blobs match actual CI main/merge and comparison main. Other inherited rows link matching GitHub main CI.

Remaining failures on R7 CI 41189435747

The workflow tested merge 7d84eeae (main 9367eace plus PR 2e60dcd3), attempt 1. Attempt 1 ended with seven inherited jobs, two initially unclassified jobs, and one aggregate. R8 reran only those two jobs once each at the maintainer’s request; the results and latest-three-main comparison are below.

Failed job Attribution and exact signature
Node runtime 124503344872 Inherited: fixture node-a replaces process.execPath; incompatible service Node resolves undefined. Same tests/errors on main124488987970.
Target schema 124503344914 Inherited: expected diagnostic omits Updater Node/PATH Node suffix. Matching main124488988046.
X composition 124503344972 Inherited: Gateway SDK resource host is not bound; same source-pinned main96e05 replay and owner comparison as original attribution above.
Candidate admission 124503345077 Inherited: expected diagnostic omits Updater Node/PATH Node suffix. Matching main124488988138.
Fresh Doctor 124503345106 Inherited registry assertion only: resolveTargetNodeRuntime called once rather than zero. Matching main124488988110. All five original PR-caused foreground cases pass.
Gateway connect 124503345118 Newly inherited: both gateway-cli-backend.connect cases fail with GatewayPayloadLimitError (78 > 1 bytes), pending-request.ts:274. Main commit 9367eace adds enforcement while the fixture advertises maxPayload1. Both exact errors/stacks reproduced on clean actual-main9367 source (2/2 failures, 39.39s wall); this is a local main replay with borrowed dependency qualification, not a matching GitHub CI run.
Visitor Access 124503345220 Inherited: all five SDK resource host errors match main124488988279.
Build 124503343900 One-off non-PR flake per parent 10:53Z ruling (R8 rerun PASS; not inherited): root-help-3n0l709r.mjs render timeout120000ms (elapsed120008ms), ETIMEDOUT. Fresh supported cliStartup builds with CI Node24.22.1 and qualified dependencies pass on actual main9367, PR2e60, and CI merge7d84; metadata3.71s/3.81s/4.45s respectively. Merge emits the same renderer filename; failed CI artifact bytes were unavailable. Passing replays prove neither inheritance nor a fix. Restored CI artifact/runner state remains uncovered; no cache/timeout workaround.
Service authority 124503345241 One-off non-PR flake per parent 10:53Z ruling (R8 rerun PASS; not inherited): external inherited Gateway ancestry / --no-restart case throws ExitError1 at triage.ts:178. Focused unchanged case passes on exact PR2e60, actual-main9367 and CI merge7d84 with CI Node24.22.1/pinned Bun. The full original service-authority file also passes 18/18 on exact CI merge (193.7s wall, 158.7s Vitest), including original predecessor order. No matching main failure or source-proven PR cause; passing replay is not a fix.
CI gate 124506501270 Aggregate of selected build/node failures; no separate product signature.

No source changes were made for the two investigated gaps. R7/R8 stopped before prepare/merge; the subsequent 10:53Z ruling authorizes native landing below.

R8: two-job rerun and latest-three-main attribution

Head remains 2e60dcd3350f1bc214ee15704744d65882bbbf68. Only the two previously unclassified jobs were requested for one rerun each. R8 originally retained UNATTRIBUTED because no matching main signature was found. The subsequent parent landing ruling at 2026-10-31 10:53Z explicitly classifies both as one-off flakes: not PR-caused, and not waived as inherited; the passing reruns and absence of a main match are retained as separate observed facts.

Failure One requested rerun Latest three comparable main CI jobs Attribution
Root-help render: root-help-3n0l709r.mjs, 120000ms timeout, ETIMEDOUT, renderFailureKind: timeout PASS: attempt 2 / 124509785351; fresh metadata generation 8.73s, entire job succeeds 10:25 / 124512628694, 09:25 / 124500894229, 08:26 / 124488986691: all reused startup metadata successfully (3.01/2.93/2.95s), then failed on unrelated missing dist/runtime-artifacts.d.ts. None has the timeout signature. One-off non-PR flake per parent 10:53Z ruling; rerun PASS, no main match; not included in inherited waiver
Service-authority: checks inherited Gateway ancestry before --no-restart updates: external, ExitError: exit 1, one-shot-exit.ts:89 → update-command-triage.ts:178 PASS: attempt 3 / 124512997230; exact external case passes in 24555ms; its selected group passes 192/192 Exact case explicitly passes 10:25 / 124512630125, 09:25 / 124500894821, 08:26 / 124488987961 (8190/8454/8285ms); all three jobs succeed. One-off non-PR flake per parent 10:53Z ruling; rerun PASS, all three main cases PASS; not included in inherited waiver

Main push CI skips these jobs, so this comparison uses the final latest three scheduled full main runs: 41192700295, 41188672443, 41184597021. The initial 07:26 comparison is retained as additional prior evidence. Main service-authority coverage was traced through selected group plans to compact-small-8 / hosted-17; the PR runs it in changed compact-large-16 / hosted-13. Job-name equality was not used as coverage or inheritance evidence. Main build jobs reused metadata, leaving fresh-render coverage absent.

Both requested single-job reruns passed without source changes. The parent 10:53Z ruling disposes of these two as one-off flakes, not PR-caused and not waived as inherited. Workflow attempt 3 still concludes failure; its native inherited-failure exception covers only the seven still-failed substantive jobs and their aggregate. Head stays at signed 2e60dcd3; no new commit was made. R8 used no containers and stopped before preparation/merge; subsequent landing authority is recorded below.

Landing ruling — 2026-10-31 10:53Z

The parent authorizes landing exact head 2e60dcd3350f1bc214ee15704744d65882bbbf68: all 21 PR-caused errors are fixed, the fresh independent review is clean, and seven CI failures are proven inherited with main signatures. Root-help and service-authority both passed their one exact-head rerun; no main match was found. They are explicitly classed as one-off flakes: not PR-caused, and not waived as inherited. Native review, security, exact-head, and live writer authority remain enforced.

Parent runtime GREEN covers the registered rollback, restored Gateway, foreground update.run, published-2026.10.9 upgrade, container death/reopen, and 16,826-file payload matches. This is the parent landing qualification; the earlier recorded package campaign above retains its separately measured file count. The known older-released-parent gap remains documented and is not claimed fixed.

Credit

Co-authored-by: steipete [email protected]

Work sessions

@clawsweeper

clawsweeper Bot commented Oct 31, 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 docs Improvements or additions to documentation gateway Gateway runtime cli CLI command changes scripts Repository scripts commands Command implementations size: XL labels Oct 31, 2026
@roboclaw-bot
roboclaw-bot marked this pull request as ready for review October 31, 2026 02:32
@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. P1 High-priority user-facing bug, regression, or broken workflow. merge-risk: 🚨 automation 🚨 May affect CI, automerge, proof capture, label sync, or maintainer automation. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. 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. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Oct 31, 2026
@clawsweeper

clawsweeper Bot commented Oct 31, 2026

Copy link
Copy Markdown
Contributor

Codex review: blocked before merge.

What this changes

This PR retains npm plugin artifacts, installation records, and settings so failed core updates can restore compatible plugins.

Example: Core rolls back from 2026.9.36 to 2026.9.34 after upgrading plugins.

  • Before: Plugins requiring API 2026.9.36 remain installed and are skipped by core 2026.9.34.
  • After: Rollback restores the previous plugin artifacts, records, and matching settings before restarting core.

Review scores

Measure Result What it means
Overall readiness 🧂 unranked krab (1/6) The repair is valuable, but verified compatibility and wrapper defects block merge, and the persisted-format upgrade claims lack inspectable result artifacts.
Proof confidence 🧂 unranked krab (1/6) Real behavior proof is not required for maintainer- or bot-authored pull requests.
Patch quality 🦪 silver shellfish (2/6) 2 actionable review findings remain.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Partial
User problem: After a failed update restores older core, installed plugins can remain too new to load.
Reason: Compatible plugin restoration has clear user value and maintainer-authored direction; the PR correctly uses Related because it does not resolve the linked report’s lease stall or backport.

Merge readiness

⛔ Blocked before merge - 4 items remain

Keep this PR open: it addresses a confirmed rollback defect, but introduces a shipped-updater compatibility regression and breaks the extracted PR wrapper’s import closure.

Priority: P1
Reviewed head: 59c8fb01c2e8ad2b7f27ef0a7b9d61567077150c

Before merge

  • Preserve the shipped post-core handoff without a transported executor (P1) - The published 2026.9.3 updater spawns the candidate’s update CLI with OPENCLAW_UPDATE_POST_CORE=1, a run ID, and result-file paths, but no executor object. resumePostCoreUpdate only acquires an executor for the 2026.9.2 legacy bridge, so the 2026.9.3 route reaches this new guard without opts.run.executorFence and fails before plugin convergence. Existing older-parent caller tests fail at this line in exact-head CI. Preserve that shipped route through the existing authority owner; an older installed updater cannot be changed by its candidate.
  • Include the new config dependency in the extracted wrapper sources (P1) - This eager import adds plugin-cohort-publication.ts and its recovery dependencies to a module included in the trusted PR wrapper, but the PR leaves scripts/pr-lib/wrapper-components.txt unchanged. The extracted wrapper therefore cannot resolve this import. Exact-head CI confirms both the unresolved module and missing transitive closure in the wrapper inventory tests. Update the inventory or narrow the dependency boundary so extracted consumers retain a complete runtime graph.
  • Add data-model compatibility proof - The review found that existing stored data may not work after upgrade. Show that existing data still loads and works with this change.
  • Explain or restore the original intent of Shipped post-core completion - unknown: The published 2026.9.3 caller and existing compatibility tests establish a child-owned post-core handoff without a transported executor; local history could not establish its introduction because older blobs were unavailable.

Findings

  • [P1] Preserve the shipped post-core handoff without a transported executor — src/cli/update-cli/update-command-resume.ts:521-526
  • [P1] Include the new config dependency in the extracted wrapper sources — src/config/mutate.include-io.ts:32

Provenance

  • Shipped post-core completion changes intended behavior without addressing why it exists (unknown: The published 2026.9.3 caller and existing compatibility tests establish a child-owned post-core handoff without a transported executor; local history could not establish its introduction because older blobs were unavailable.)

Tests

  • Low-value test src/cli/update-cli/update-command-convergence-authority.test.ts: Remove the added adopted-finalization table at lines 137–153: it checks a requiresCohort argument sent to a mocked producer, while the persistence suite exercises actual acceptance and refusal.
  • Missing end-to-end proof: Public source-bound output is still needed for the reported latest-stable upgrade and persisted recovery preservation; the shipped 2026.9.3 handoff also needs regression validation after repair.
Agent review details

How this fits together

The updater coordinates package activation, Doctor, plugin installation, database backups, and Gateway readiness; recovery restores owned changes under the existing executor and plugin lifecycle lease.

flowchart TD
A[Core updater] --> B[Verified database backup]
B --> C[Plugin recovery journal]
C --> D[Doctor and plugin installation]
D --> E[Gateway activation verification]
E --> F[Commit retained cohort]
E --> G[Restore previous cohort]
Loading

Technical review

Best possible solution:

Keep recovery in the existing update, plugin, and config owners while preserving shipped-parent handoffs and completing the wrapper’s source inventory.

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

The linked report establishes incompatible plugins surviving core rollback, and current-main rollback restores package/config/database state without a retained plugin-cohort restoration path.

Is this the best way to solve the issue?

Durable preimages and fresh lease acquisition address interrupted recovery appropriately, but the new guard must accommodate the verified shipped-parent contract and the config imports must remain available to extracted consumers.

Full review comments:

  • [P1] Preserve the shipped post-core handoff without a transported executor — src/cli/update-cli/update-command-resume.ts:521-526
    The published 2026.9.3 updater spawns the candidate’s update CLI with OPENCLAW_UPDATE_POST_CORE=1, a run ID, and result-file paths, but no executor object. resumePostCoreUpdate only acquires an executor for the 2026.9.2 legacy bridge, so the 2026.9.3 route reaches this new guard without opts.run.executorFence and fails before plugin convergence. Existing older-parent caller tests fail at this line in exact-head CI. Preserve that shipped route through the existing authority owner; an older installed updater cannot be changed by its candidate.
    Confidence: 0.98
  • [P1] Include the new config dependency in the extracted wrapper sources — src/config/mutate.include-io.ts:32
    This eager import adds plugin-cohort-publication.ts and its recovery dependencies to a module included in the trusted PR wrapper, but the PR leaves scripts/pr-lib/wrapper-components.txt unchanged. The extracted wrapper therefore cannot resolve this import. Exact-head CI confirms both the unresolved module and missing transitive closure in the wrapper inventory tests. Update the inventory or narrow the dependency boundary so extracted consumers retain a complete runtime graph.
    Confidence: 0.99

Overall correctness: patch is incorrect
Overall confidence: 0.96

AGENTS.md: found and applied where relevant.

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

Provenance checked

  • Package and included-config rollback keeps the original intent (82bd51a: Restore exact Doctor-owned include changes while preserving later operator edits and changed path ownership.)
  • Plugin install transaction lifetime keeps the original intent (f1098ee: Retain prior payloads until replacement publication settles and prevent cleanup after ownership changes.)
  • Shared host-link repair orchestration keeps the original intent (d00678f: Keep managed and registered repairs with one owner and settle admitted siblings before reporting failure.)

Testing

Proof path: in-process harness.

Security

None.

Evidence

Acceptance criteria:

  • pnpm test src/cli/update-cli/update-command-doctor-authority-callers.test.ts src/cli/update-cli/update-command-plugins.persistence.test.ts
  • pnpm test src/cli/update-cli/update-command-lease.test.ts
  • pnpm test test/scripts/eager-import-closure.test.ts test/scripts/pr-wrapper-source-closure.test.ts
  • git diff --check

What I checked:

Likely related people:

  • Peter Steinberger: Raw commit fd3914e adds src/cli/update-cli/update-command-rollback.ts:139 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: fd3914e0af3f; files: src/cli/update-cli/update-command-rollback.ts)
  • Vincent Koc: Raw commit d00678f adds src/plugins/plugin-peer-link.ts:513 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: d00678f88704; files: src/plugins/plugin-peer-link.ts)

PR surface

PR surface statistics unavailable: the file list is incomplete.

Review metrics

Metric Value Why it matters
Persisted recovery format 1 new companion record format; 0 new database tables The plugin-cohort JSON record is stored beside the existing reservation in config_machine_state, making released-reader and upgrade compatibility material.

Labels

Label changes:

  • add P1: The rollback defect disables installed plugins, and the patch additionally rejects a verified shipped-updater handoff.
  • add merge-risk: 🚨 compatibility: The new post-core executor requirement rejects the published 2026.9.3 caller.
  • add merge-risk: 🚨 automation: An added eager config import is absent from the extracted PR wrapper’s runtime source inventory.
  • add rating: 🧂 unranked krab: Overall readiness is 🧂 unranked krab; proof is 🧂 unranked krab and patch quality is 🦪 silver shellfish.
  • add status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action.

Label justifications:

  • P1: The rollback defect disables installed plugins, and the patch additionally rejects a verified shipped-updater handoff.
  • merge-risk: 🚨 compatibility: The new post-core executor requirement rejects the published 2026.9.3 caller.
  • merge-risk: 🚨 automation: An added eager config import is absent from the extracted PR wrapper’s runtime source inventory.
  • rating: 🧂 unranked krab: Overall readiness is 🧂 unranked krab; proof is 🧂 unranked krab and patch quality is 🦪 silver shellfish.
  • status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action.

Rating scale

6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

Reviewed October 30, 2026, 10:56 PM ET / October 31, 2026, 02:56 UTC.

roboclaw-bot and others added 3 commits October 31, 2026 05:32
Carry the matching recovery pair through the shared database restore owner and
refuse restoration that would erase independent plugin records or migration
decisions. Settle cold restored databases without advancing their schema, and
keep native update admission, failure classification and consumer fixtures
aligned with the retained cohort.

Co-authored-by: steipete <[email protected]>
Reuse the captured activation runtime and inspect recovery pairs without
altering database artifacts before restore generation validation. Preserve
captured pending-recovery failures through final reporting, and align CLI
and plugin fixtures with live owners and restored runtime identity.

Co-authored-by: steipete <[email protected]>
Let the existing rollback owner keep compatible databases in place after a
legacy Doctor fails, rather than forcing an unprovable early snapshot restore.
Repair the affected candidate, foreground, lease, and terminal fixtures while
preserving their authority and recovery assertions.

Co-authored-by: steipete <[email protected]>
@roboclaw-bot
roboclaw-bot merged commit 6fd646e into main Oct 31, 2026
445 of 473 checks passed
@roboclaw-bot
roboclaw-bot deleted the roboclaw/update-plugin-cohort-recovery-current branch October 31, 2026 10:57
@roboclaw-bot

Copy link
Copy Markdown
Collaborator Author

Merged via explicitly authorized admin squash with attributed pre-existing CI failures.

@steipete

steipete commented Nov 1, 2026

Copy link
Copy Markdown
Contributor

An update on my earlier comment: no revert is needed. The cause was the native state-database read at the start of the delegated Doctor (withPluginCohortConfigCapture with allowNativeRead: true), which changed the installed updater's captured file generation before Doctor's migration capture. #190179 (9172615f1db) fixes it by using the snapshot read, so the plugin-restore behavior stays. I've closed revert PR #189617.

One related item remains, outside #188978's scope. update-candidate-predecessor-stop records a run step through recordUpdateRunStepAsync before Doctor's capture whenever it stops a live supervised predecessor. That write predates this change. It doesn't fire on the native lane I tested, because the updater stops the Gateway first. It is tracked for the update sweep's next run.

steipete added a commit that referenced this pull request Nov 2, 2026
…190857)

2026.6.x updaters never pass a run id to the post-core child, so they cannot provide an outer executor fence or a plugin cohort. #188978 made post-core convergence require that fence and broke every update from the 2026.6 line (update-migration-2026.6.34 legacy-operator-state). Run-less legacy parents keep plain convergence; run-bearing post-core children without a fence still refuse.

Co-authored-by: Peter Steinberger <[email protected]>
steipete added a commit that referenced this pull request Nov 2, 2026
Use a dedicated fixture database so another conformance test removing a restore schema cannot invalidate the refusal-before-effect assertion. Preserve the whole-database namespace equality check and clean up the owned database.

The shared namespace assertion was introduced by #188978. Deterministic foreign-schema cleanup reproduces the failure on the exact parent and passes with this fixture isolation.
steipete added a commit that referenced this pull request Nov 2, 2026
* fix: reduce filesystem stalls during chat turn preparation

Await TTS preference reads and reuse owner-held database identities in prepared turn and row paths. Avoid eager media root and redundant attachment/path probes while preserving read containment and synchronous SDK contracts.

Includes main-thread filesystem instrumentation and synthetic Gateway delay proof. This mitigates measured owners; remaining synchronous paths and unresolved cold performance tails are documented in the PR.

* test: migrate remaining asynchronous prompt consumers

Preserve real TTS exports in the MCP and system-prompt command tests, await published model aliases, and remove their obsolete mock exceptions. Record the exact two native-addon instrumentation suppressions required by the opt-in filesystem census.

* test: await remaining tool and channel prompt builders

Migrate the Telegram loopback mock to the asynchronous TTS hint while preserving real exports, await minimal web-search prompts, and remove the obsolete mock exemption. Preserve all existing behavior assertions.

* test: isolate PostgreSQL restore cohort namespaces

Use a dedicated fixture database so another conformance test removing a restore schema cannot invalidate the refusal-before-effect assertion. Preserve the whole-database namespace equality check and clean up the owned database.

The shared namespace assertion was introduced by #188978. Deterministic foreign-schema cleanup reproduces the failure on the exact parent and passes with this fixture isolation.

* test: observe the Workshop review timer directly
steipete added a commit that referenced this pull request Nov 2, 2026
…191348)

A managed npm plugin whose install directory exists but has lost its package.json made the plugin-cohort preimage (#188978) throw ENOENT during package-swap, so every core update rolled back. Prior-artifact identities now record a null manifest digest for such a damaged install, so rollback restores that exact state; staged and published artifacts keep the strict reader, and a missing directory remains the only absent baseline.

Proof: regression test red on base / green on head; Docker update-corrupt-plugin lane red on main (run 41474947350) and green on this head (run 41494450346); autoreview scoped-clean; independent review findings fixed.
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 3, 2026
…penclaw#190857)

2026.6.x updaters never pass a run id to the post-core child, so they cannot provide an outer executor fence or a plugin cohort. openclaw#188978 made post-core convergence require that fence and broke every update from the 2026.6 line (update-migration-2026.6.34 legacy-operator-state). Run-less legacy parents keep plain convergence; run-bearing post-core children without a fence still refuse.

Co-authored-by: Peter Steinberger <[email protected]>
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 3, 2026
…191075)

* fix: reduce filesystem stalls during chat turn preparation

Await TTS preference reads and reuse owner-held database identities in prepared turn and row paths. Avoid eager media root and redundant attachment/path probes while preserving read containment and synchronous SDK contracts.

Includes main-thread filesystem instrumentation and synthetic Gateway delay proof. This mitigates measured owners; remaining synchronous paths and unresolved cold performance tails are documented in the PR.

* test: migrate remaining asynchronous prompt consumers

Preserve real TTS exports in the MCP and system-prompt command tests, await published model aliases, and remove their obsolete mock exceptions. Record the exact two native-addon instrumentation suppressions required by the opt-in filesystem census.

* test: await remaining tool and channel prompt builders

Migrate the Telegram loopback mock to the asynchronous TTS hint while preserving real exports, await minimal web-search prompts, and remove the obsolete mock exemption. Preserve all existing behavior assertions.

* test: isolate PostgreSQL restore cohort namespaces

Use a dedicated fixture database so another conformance test removing a restore schema cannot invalidate the refusal-before-effect assertion. Preserve the whole-database namespace equality check and clean up the owned database.

The shared namespace assertion was introduced by openclaw#188978. Deterministic foreign-schema cleanup reproduces the failure on the exact parent and passes with this fixture isolation.

* test: observe the Workshop review timer directly
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 3, 2026
…penclaw#191348)

A managed npm plugin whose install directory exists but has lost its package.json made the plugin-cohort preimage (openclaw#188978) throw ENOENT during package-swap, so every core update rolled back. Prior-artifact identities now record a null manifest digest for such a damaged install, so rollback restores that exact state; staged and published artifacts keep the strict reader, and a missing directory remains the only absent baseline.

Proof: regression test red on base / green on head; Docker update-corrupt-plugin lane red on main (run 41474947350) and green on this head (run 41494450346); autoreview scoped-clean; independent review findings fixed.
steipete added a commit that referenced this pull request Nov 6, 2026
…heck (#193941)

Once an update run has its own recovery record (#188978), each recovery guard check copied the whole shared state database. The guards passed Doctor schema admission, and any read with admission took a private copy, even with allowNativeRead.

These reads now use a fresh native read-only reader on the live file, like the first read in the same guard. Admission and schema policy are unchanged. Reads without allowNativeRead, and reads inside an artifact-preserving scope, still copy.

Native update lanes, base to the same build relabelled, with a live systemd Gateway:
- Guard copies: 12 to 0. Read-only `sync` children: 18 to 6.
- 400 MB database, /tmp on ext4: 96,873 to 90,827 MiB written.
- 2 GB database, /tmp on tmpfs: 51,318 to 51,323 MiB written.

This does not resolve the disk writes in #185656. Whole-database copies from other snapshot callers remain about 94% of the bytes written.

Refs #185656
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 7, 2026
…heck (openclaw#193941)

Once an update run has its own recovery record (openclaw#188978), each recovery guard check copied the whole shared state database. The guards passed Doctor schema admission, and any read with admission took a private copy, even with allowNativeRead.

These reads now use a fresh native read-only reader on the live file, like the first read in the same guard. Admission and schema policy are unchanged. Reads without allowNativeRead, and reads inside an artifact-preserving scope, still copy.

Native update lanes, base to the same build relabelled, with a live systemd Gateway:
- Guard copies: 12 to 0. Read-only `sync` children: 18 to 6.
- 400 MB database, /tmp on ext4: 96,873 to 90,827 MiB written.
- 2 GB database, /tmp on tmpfs: 51,318 to 51,323 MiB written.

This does not resolve the disk writes in openclaw#185656. Whole-database copies from other snapshot callers remain about 94% of the bytes written.

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

Labels

cli CLI command changes commands Command implementations docs Improvements or additions to documentation gateway Gateway runtime merge-risk: 🚨 automation 🚨 May affect CI, automerge, proof capture, label sync, or maintainer automation. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. 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. scripts Repository scripts size: XL status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants