Skip to content

fix(update): refuse incompatible agent stores before changing the installation - #139722

Merged
fuller-stack-dev merged 6 commits into
mainfrom
fix/all-store-update-preflight-r174
Sep 6, 2026
Merged

fuller-stack-dev merged 6 commits into
mainfrom
fix/all-store-update-preflight-r174

Conversation

@fuller-stack-dev

@fuller-stack-dev fuller-stack-dev commented Sep 6, 2026 •

Copy link
Copy Markdown
Member

Related: #113565. Continues RoboClaw's original contribution in #135541, retaining its attribution, discussion and published history. The original PR was closed with the successor receipt only after this PR landed. This PR was repaired in place, without rebasing or replacing published ancestry.

What Problem This Solves

Fixes an issue where users updating OpenClaw could change their installation or stop the managed Gateway before discovering an incompatible configured or registered agent database. The missed store can belong to the service's profile rather than the shell invoking the update.

Why This Change Was Made

Package and Git updates inspect the union of applicable caller and managed-service stores before mutation. Configured and foreign registered paths are inspection candidates, not migration ownership. Private Git target inspection preserves the installed checkout, transports its repository-local SSH configuration, and rechecks source, configuration and service authority after awaited work.

The integration preserves upstream #138839's online candidate validation, promotion, recovery and run/outcome recording. It retains the artifact-preserving reader from #138868 and the landed Doctor-owned changes. It adds no schema version, persistent store, rollback framework or Doctor repair policy.

User Impact

Incompatible or indeterminate stores produce an early refusal with their locations. Configured, registered, shared and external stores participate. Native-path aliases are deduplicated without hiding distinct databases.

Unreadable managed ownership also refuses --no-restart, since that option still changes package or Git state. Proven-absent, inspectable-stopped and foreign services keep their distinct handling. Dry-run is a preview, not mutation authority.

Evidence

Published head 589398fba7f79d1a0136d9688f3e07e5dda84751 has tree b8bf3b699a7ec102e6946167f6055cbbcdd9af2d and a verified GitHub signature. Its 31-file authored diff contains canonical f5d1d85db24fc6371d719fc2dfc9162a4415c712 and preserves original public head 549abf7807afb1da92ad9db5c02207718c0d803b through additive history. All 31 repair blobs match validated tree 080de51c136318bb25cc843c9931c3549219178a; the intervening canonical changes do not affect the proof contract.

  • Real-Git red and corrective controls cover private upstream-ref selection, source drift, committer identity, failed-signing fallback, cancellation and pre-mutation reinspection. The retained runs cover 182 Git cases and 475 CLI cases through explicitly mapped initial and corrective runs, not a newly repeated whole matrix.
  • The schema-coordination extraction passed 43 existing caller cases. Its private-helper cleanup passed 24 schema/artifact cases. On the integrated canonical reader/discovery owners, 83 inventory/read cases and 43 selected CLI cases passed. These cover configured external and registered stores, native path aliases, malformed/unavailable inventory, dry-run and no-restart ownership refusal.
  • All 32 native changed-file stages plus Madge were completed through recorded carried/executed maps. The final-base integration passed 11 affected native graph, type, export, lint and guard stages, followed by the two ratchets with the explicit canonical base. This is mapped completion, not one new whole check run. Original type, lint, export and CI failures remain retained, not relabeled green.
  • The original P0-P2 review finding about stale upstream metadata was reproduced and repaired. Corrective P0-P2 reviews of that repair, schema coordination and private-helper cleanup are scoped-clean. Mechanical test-type/import corrections did not add production exports or weaken checks.
  • Historical build and remote proof retain their exact identities. The earlier cb6929/fd8cb6b8 native ciArtifacts build is not a build of this later integration. Published safe API observations and audit receipts belong to exact public 549abf78. They show the two selected refusals and 13 unchanged protected endpoint records, with successful cleanup. Raw initial-placement absence and measured-child identity remained unavailable. No current installed-service, transient-write, atomic-update or rollback result is inferred.

Exact-head CI34021717540 completed successfully for 589398fb. Security-fast101455414905 completed the canonical npm bulk production audit with no high-or-higher match. It was not an incomplete-audit warning. Upstream repository advisories were not checked. Raw log SHA256: cfb1a2c03e42e5600e6de22409792b75c7d1e103f27bb2c9bf74eb0475e50358. Native review, preparation and exact-head merge gates completed. Landed commit 87ceec92ecdcbf259c6f0a0d7c3a45f49e8d9e98 has canonical parent 279d42d4be3fd8c85a8dc0ac848c1bed85ee957f, a valid GitHub signature, and all 31 repair blobs equal to the reviewed head. The intervening upstream changes were assessed without replaying unaffected proof. The first native merge admission stopped before dispatch on UNKNOWN mergeability; the later explicitly authorized attempt proceeded only after positive MERGEABLE evidence. Both receipts remain preserved.

Validation scope

The user's 2026-09-06 scope correction removed per-feature custom Lab reenactments, runner repairs, environment admission, service/Git/SSH recordings and custom-observer completeness from individual PR landing gates. Those clauses are superseded, not passed. The separate disposable Lab belongs only to the combined older-installed-version-to-newer-artifact journey. No separate workstream is an artificial prerequisite for this PR.

All normal product regressions, substantive review dispositions, exact-head GitHub checks/security and deterministic native landing remain mandatory. No check bypass, new replacement PR, schema change or published-history rewrite is part of this update.

Carry forward the all-agent store preflight from #135541 on current canonical main. Inspect configured and registered stores without adopting migration ownership, and revalidate the actual managed-service context before package or Git mutation. Preserve recorded update outcomes and parent-owned post-core finalization.

Related: #113565. Original contribution and review history: #135541.
@fuller-stack-dev fuller-stack-dev self-assigned this Sep 6, 2026
@clawsweeper

clawsweeper Bot commented Sep 6, 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 cli CLI command changes size: XL maintainer Maintainer-authored PR labels Sep 6, 2026
@fuller-stack-dev
fuller-stack-dev marked this pull request as ready for review September 6, 2026 04:17
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Sep 6, 2026
@clawsweeper

clawsweeper Bot commented Sep 6, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: blocked before merge. Reviewed September 6, 2026, 4:43 AM ET / 08:43 UTC.

ClawSweeper review

What this changes

The updater checks caller and managed-service databases before changing an installation, stages Git target inspection privately, and refuses updates when database compatibility or service ownership is unresolved.

Regression provenance

Possible regression — suspected (reviewed change). No predecessor PR is attributed.

Merge readiness

⛔ Blocked before merge - 4 items remain

The fix remains necessary, but the integrated branch introduces a package-to-Git profile-selection regression that should block merge. The related merged work does not replace this PR’s complete-store admission checks.

Priority: P2
Reviewed head: 589398fba7f79d1a0136d9688f3e07e5dda84751

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) Useful admission hardening and substantial regression coverage are held back by a concrete downstream profile-selection defect.
Proof confidence 🌊 off-meta tidepool Not applicable: The ordinary external-contributor proof gate does not apply to this MEMBER-authored PR. Historical Linux refusal observations retain their 549abf7 identity and do not establish current package-to-Git Doctor profile selection; no new authority grant requiring separate proof was identified.
Patch quality 🦐 gold shrimp (3/6) 1 actionable review finding remain.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: The ordinary external-contributor proof gate does not apply to this MEMBER-authored PR. Historical Linux refusal observations retain their 549abf7 identity and do not establish current package-to-Git Doctor profile selection; no new authority grant requiring separate proof was identified.
Evidence reviewed 8 items Introduced ordering regression: The introduced diff moves Git service-context capture into inspectGitTarget. Consequently, updateGitInstall receives managedServiceEnv from preManagedServiceStop before that variable is populated; the later callback cannot update the already-created argument value.
Final migration effect: Package-to-Git exposure passes the captured parameters into runPackageUpdateDoctor. That function resolves its environment from managedServiceEnv, backs up the selected config, and launches Doctor; an undefined service environment selects the invoking shell’s profile. The package swap invokes this callback after replacing the package.
Current-main ordering: Current main captures the managed service context before constructing updateGitInstall’s arguments. This independently establishes that the deferred capture introduces the profile regression.
Findings 1 actionable finding [P1] Preserve the service environment when deferring Git inspection
Security None None.

How this fits together

OpenClaw’s updater selects a package or Git candidate, checks its compatibility with existing databases, and coordinates installation changes with the managed Gateway. The selected service environment must remain consistent through validation, config backup, Doctor migrations, and restart.

flowchart TD
  A[Requested update] --> B[Select package or Git candidate]
  C[Caller and service configuration] --> D[Discover database stores]
  B --> E[Check compatibility and ownership]
  D --> E
  E -->|Refused| F[Report without installation changes]
  E -->|Admitted| G[Validate and activate candidate]
  G --> H[Doctor and Gateway recovery]
Loading

Before merge

  • Preserve the service environment when deferring Git inspection (P1) - Moving service-context capture into this callback leaves preManagedServiceStop undefined when the surrounding updateGitInstall({...}) call evaluates managedServiceEnv at line 569. For package-to-Git conversion with different shell and service profiles, the exposure’s postVerifyStep therefore calls runPackageUpdateDoctor without the service environment. Its config backup and Doctor migration select the shell’s profile instead of the admitted service profile. Carry the admitted environment into the Git call, or resolve it after inspection, and cover the downstream Doctor invocation.
  • Resolve merge risk (P1) - Existing workflows using --no-restart when service ownership is unreadable will now refuse updates until inspection access is restored; the maintainer-authored proposal explicitly accepts this compatibility change.
  • Complete next step (P2) - Repair the managed-service environment handoff into package-to-Git Doctor before merge.
  • Add data-model compatibility proof - Confirm migration or upgrade compatibility proof before merge.

Findings

  • [P1] Preserve the service environment when deferring Git inspection — src/cli/update-cli/update-command-execution.ts:558-560
Agent review details

Security

None.

PR surface

Source +1128, Tests +1584, Docs +1. Total +2713 across 31 files.

View PR surface stats
Area Files Added Removed Net
Source 20 1408 280 +1128
Tests 10 2032 448 +1584
Docs 1 6 5 +1
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 31 3446 733 +2713

Review metrics

Metric Value Why it matters
Production versus regression coverage Net production +1128 lines; tests +1584 lines The stated production growth supports private Git inspection and coordinated admission; the integration still misses the downstream Doctor environment handoff.

Stored data model

Persistent data-model change detected: unknown-data-model-change: src/cli/update-cli/schema-preflight.ts. Confirm migration or upgrade compatibility proof before merge.

Root-cause cluster

Relationship: canonical
Canonical: #139722
Summary: The discussion designates this branch as the maintainer-owned continuation of the all-store preflight work; neither PR should be closed before the successor lands.

Members:

Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

Merge-risk options

Maintainer options:

  1. Preserve the admitted profile through conversion (recommended)
    Repair the deferred environment handoff and verify package-to-Git conversion with different caller and service profiles before accepting the documented refusal behavior.

Technical review

Best possible solution:

Carry the admitted managed-service environment through Git exposure, config backup, and Doctor while retaining early refusal and the existing candidate activation/recovery lifecycle.

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

Yes, source establishes a focused reproduction: convert a package installation to Git while the managed Gateway uses a different profile from the shell, then inspect the environment passed to Doctor. This review did not execute that scenario.

Is this the best way to solve the issue?

The complete-store admission approach fits the existing updater, but the current integration is not correct until the admitted service environment reaches the conversion-time backup and Doctor callback.

Full review comments:

  • [P1] Preserve the service environment when deferring Git inspection — src/cli/update-cli/update-command-execution.ts:558-560
    Moving service-context capture into this callback leaves preManagedServiceStop undefined when the surrounding updateGitInstall({...}) call evaluates managedServiceEnv at line 569. For package-to-Git conversion with different shell and service profiles, the exposure’s postVerifyStep therefore calls runPackageUpdateDoctor without the service environment. Its config backup and Doctor migration select the shell’s profile instead of the admitted service profile. Carry the admitted environment into the Git call, or resolve it after inspection, and cover the downstream Doctor invocation.
    Confidence: 0.96

Overall correctness: patch is incorrect
Overall confidence: 0.94

AGENTS.md: found and applied where relevant.

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

Labels

Label changes:

  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🌊 off-meta tidepool and patch quality is 🦐 gold shrimp.
  • add status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action. Not applicable: The ordinary external-contributor proof gate does not apply to this MEMBER-authored PR. Historical Linux refusal observations retain their 549abf7 identity and do not establish current package-to-Git Doctor profile selection; no new authority grant requiring separate proof was identified.
  • remove rating: 🐚 platinum hermit: Current PR rating is rating: 🦐 gold shrimp, so this older rating label is no longer current.
  • remove status: 👀 ready for maintainer look: Current PR status label is status: ⏳ waiting on author.

Label justifications:

  • P2: This is a bounded updater safety improvement with a package-to-Git conversion blocker, without evidence of an urgent shipped outage.
  • merge-risk: 🚨 compatibility: The patch changes --no-restart refusal behavior and can run conversion-time Doctor against the wrong existing profile.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🌊 off-meta tidepool and patch quality is 🦐 gold shrimp.
  • status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action. Not applicable: The ordinary external-contributor proof gate does not apply to this MEMBER-authored PR. Historical Linux refusal observations retain their 549abf7 identity and do not establish current package-to-Git Doctor profile selection; no new authority grant requiring separate proof was identified.

Evidence

What I checked:

  • Introduced ordering regression: The introduced diff moves Git service-context capture into inspectGitTarget. Consequently, updateGitInstall receives managedServiceEnv from preManagedServiceStop before that variable is populated; the later callback cannot update the already-created argument value. (src/cli/update-cli/update-command-execution.ts:558, 589398fba7f7)
  • Final migration effect: Package-to-Git exposure passes the captured parameters into runPackageUpdateDoctor. That function resolves its environment from managedServiceEnv, backs up the selected config, and launches Doctor; an undefined service environment selects the invoking shell’s profile. The package swap invokes this callback after replacing the package. (src/cli/update-cli/update-command-package.ts:65, 589398fba7f7)
  • Current-main ordering: Current main captures the managed service context before constructing updateGitInstall’s arguments. This independently establishes that the deferred capture introduces the profile regression. (src/cli/update-cli/update-command-execution.ts:405, fe33b727b9fd)
  • The central fix is still absent from main: Current main’s CLI schema helper passes only the environment and supported versions into database preflight; it does not supply the configured-store inventory or caller/service context union added here. The supplied merged PRs cover candidate lifecycle and artifact-preserving reads, not this complete inventory. (src/cli/update-cli/schema-preflight.ts:32, fe33b727b9fd)
  • Intentional compatibility change: The changed documentation and captured maintainer-authored body explicitly endorse refusal when service ownership cannot be inspected, including --no-restart. Tests retain compatible absent/stopped-service paths. This is an acknowledged behavior change, not an unconfirmed product proposal. Public docs: docs/cli/update.md. (docs/cli/update.md:524, 589398fba7f7)
  • Validation and review continuity: The captured body reports integrated inventory/CLI regressions and successful exact-head CI. Earlier remote observations are explicitly pinned to 549abf7 and demonstrate selected database refusals and unchanged protected records, not the current package-to-Git Doctor path. The previous completed review had no findings and requested integration validation. No tests were executed during this read-only review. (589398fba7f7)

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)

Rank-up moves

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

  • Add a package-to-Git regression with distinct caller/service profiles that verifies Doctor and its backup target the service profile while caller state remains untouched.

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 (5 earlier review cycles)
  • reviewed 2026-09-06T04:23:55.037Z sha 21b88df :: needs real behavior proof before merge. :: none
  • reviewed 2026-09-06T04:47:54.109Z sha a669ec3 :: needs real behavior proof before merge. :: none
  • reviewed 2026-09-06T05:05:04.151Z sha 549abf7 :: needs real behavior proof before merge. :: none
  • reviewed 2026-09-06T06:02:23.176Z sha 549abf7 :: needs real behavior proof before merge. :: none
  • reviewed 2026-09-06T07:26:43.422Z sha 549abf7 :: blocked before merge. :: none

@fuller-stack-dev

fuller-stack-dev commented Sep 6, 2026 •

Copy link
Copy Markdown
Member Author

Published the reviewed CI correction in a669ec3, with a valid GitHub signature and sole parent 21b88df. The static cycle is removed at the existing read-only type owner; runtime comparisons and pre-stop ordering are unchanged. The two ancestry-message assertions now match the existing managed-helper policy. Local red/green, all eight native architecture commands, affected types/export/guards/format/lint and 18 focused caller tests passed. The body records their exact scope and retained source identities.

The completed old CI run remains failed. Its separate unchanged suppression-inventory and runner-help failures were not claimed green. The a669 CI run was 34012084687.

The review's authority-chain and current-artifact proof concerns remain open. The documented no-restart refusal is intentional because installation mutation still occurs, but its native acceptance is still required. This patch introduces no schema/version/store change. Current-source independent inventory, real service/Git/private-SSH/reinspection and recording evidence, complete mandatory security audit, exact-head CI and native prepare/merge must pass before landing. No old clip, audit warning or local test substitutes for those gates.

Retained a669 failure: job 101429622361 failed the unchanged suppression-inventory line expectation, 363/374/377 versus 364/375/378 in the SOCKS test. Its raw log SHA256 is b9a47d3760fbd6127d04216900d1d7aa39232efb246a20144bb53de6f962a52d. This remains a failed receipt, not a waiver or a baseline runtime-pass claim.

Update at 05:03 UTC: 549abf7807afb1da92ad9db5c02207718c0d803b carries the exact three-line correction from upstream #139747, preserving a669 as its sole parent and a verified GitHub signature. Suppression text and count are unchanged. Native node scripts/run-vitest.mjs test/scripts/type-suppression-inventory.test.ts passed both tests; direct formatting and native commit guards passed. The preflight product files, dependencies and proof fixtures did not change. Fresh CI is 34012798004, still in progress when this update was posted. No old-head CI retry was requested.

Native scripts/pr review-init 139722 exited 0, capturing main f2b25df and the same 549abf head. The new main delta since the publication assessment changes only UI date grouping; it invalidates no preflight proof. The exact current source-only archive and head-only API access companion are sealed locally for the independent validator. They are preparation artifacts, not Linux installation, API, service or Git proof. The remaining acceptance and security gates above are unchanged; this PR is not merge-ready.

Current-head evidence, R211

Exact signed head 549abf7807afb1da92ad9db5c02207718c0d803b, tree 6e3cda782ca657e9de4df84b38faf3d336e05818.

The completed CI run 34012798004 is green, including openclaw/ci-gate and security-fast. The canonical production audit completed successfully. It was not an advisory-unavailable warning. Coverage is npm bulk production advisories; upstream repository advisories were not checked, so this is not comprehensive vulnerability clearance. Exact audit step and original log hash.

AWS run run_47d0f0294bd6, lease cbx_94d010db5ff4, used this exact head with Linux Node 24.20.0 and pnpm 12.3.4. Normal frozen installation and its canonical audit completed. The single head-registered-external-refusal invocation returned both required incompatibilities: shared state 16 > 5 and registered external agent retired 19 > 14. It returned no indeterminate records and left the caller environment unchanged. All 13 protected records matched before/after. Child and controller exited naturally with code 0. Native cleanup reported no failures or remaining UID 1001 processes; the lease was released. The heartbeat deadline warning remains recorded.

Artifact manifest · Raw responses, snapshots, installer output and receipts · Execution and cleanup selection · Redaction inspection.

All six published downloads were verified byte-for-byte. Manifest SHA256: 3f46afb31cd379b86c53e5d602b3392c8cb3a1c7979bf646adec5d3b2e03d4d1. Original archive SHA256: 76657c3d539cc395d531b9d96797865246cfa3c4f779fb95479c8313582e6b9a. Raw text uses reversible path-prefix redaction; non-path values are unchanged. Broker response projections and CI line selection are labeled. Original files and the private reverse map remain outside the branch. Artifact links expire September 13, 2026.

Qualification: the unchanged placement guard enforced initial absence, but a separate raw pre-placement absence observation was not retained. This is not an independent aggregate pass, a transient-write guarantee, or complete inventory coverage. The closed lease cannot supply that historical observation now.

The current review's native authority concern remains open. Still needed are current-source allowed-service admission with a distinct invoking profile, fail-closed unresolved ownership including --no-restart, real repository-local SSH transport, and post-transport reassignment refusal before service or installation effects, with the required actual recording. Canonical update-run records must remain permitted; they are not grounds to weaken protection of other database/config/package/Git state. No new schema or persistent store is introduced by this PR. API observations do not close these caller obligations. Both PR135541 and this replacement remain open; no merge readiness or full update journey is claimed.

Current integration, September 6

Published 589398fba7f79d1a0136d9688f3e07e5dda84751, tree b8bf3b699a7ec102e6946167f6055cbbcdd9af2d, with a verified GitHub signature and fuller-stack-dev attribution. The signed alignment and hosted additive merge preserve public 549abf78, original PR135541 history, and canonical f5d1d85d. No force-push, local signing workaround, or further replacement PR was used.

The current repair preserves upstream candidate validation, promotion, recovery and run/outcome recording. The original review's stale upstream-ref finding was reproduced with real Git and repaired at private inspection/import ownership. Corrective P0-P2 reviews are scoped-clean. The schema coordination extraction and private helper cleanup retain the same refusals and call order; test-only type/import repairs add no production export or suppression.

Scoped integration proof covers mapped182 Git cases and475 CLI cases,43 extraction callers,24 schema/artifact cases, then83 inventory/read and43 selected caller cases after relevant canonical discovery/reader changes. All32 native changed-file stages plus Madge have explicit carried/executed coverage. The last relevant integration passed11 affected native stages and both ratchets against its explicit canonical base. All31 published repair blobs match that validated candidate. Later canonical movement is unrelated to these contracts. Failed earlier type/lint/export/CI inputs remain retained, not converted to passes.

The user's September6 scope correction supersedes the outstanding per-feature custom Lab, installed-service/Git/SSH recordings and custom-observer completeness clauses above as individual-PR landing gates. They are not passed or reconstructed. The separate Lab now belongs only to the combined installed-version upgrade journey. The historical raw artifacts and limitations above remain unchanged.

Exact-head CI34021717540 completed successfully for 589398fb; its watcher exited GREEN. Security-fast101455414905 completed the canonical npm bulk production audit with no high-or-higher match. No audit-unavailable warning was accepted. Upstream repository advisories were not checked. Raw audit log SHA256: cfb1a2c03e42e5600e6de22409792b75c7d1e103f27bb2c9bf74eb0475e50358. Native review artifacts validated. Native preparation and final live merge gates remain; no merge or full atomic-update claim is made.

Disposition of the four checklist items in the earlier ClawSweeper review: current-main conflicts are resolved additively; candidate validation, activation, recovery and reporting are preserved and covered by the integrated product controls; compatible/absent/stopped/foreign-service and no-restart refusal branches are covered by the actual caller tests; and this change adds no schema, stored field, persistent store or migration ownership. The data-model filename classification is not a new migration requirement. Original findings and historical proof limits remain recorded above.

Carry the exact three-line correction from upstream 5b7e42b. Suppression text and count are unchanged.

Co-authored-by: Peter Steinberger <[email protected]>
@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: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Sep 6, 2026
…nges

Preserve current candidate validation and progress while inspecting all caller and managed-service stores before effects. Retain the original contribution and history from #135541.
@clawsweeper clawsweeper Bot added 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. and removed 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. labels Sep 6, 2026
@fuller-stack-dev
fuller-stack-dev merged commit 87ceec9 into main Sep 6, 2026
190 of 191 checks passed
@fuller-stack-dev
fuller-stack-dev deleted the fix/all-store-update-preflight-r174 branch September 6, 2026 08:44
@fuller-stack-dev

Copy link
Copy Markdown
Member Author

Merged via squash.

fuller-stack-dev added a commit that referenced this pull request Sep 6, 2026
Resolve the admitted managed-service environment when package-to-Git backup, Doctor, and source-publication recovery consume it. Preserve deferred inspection and mutation ordering.

Follow-up to #139722; original all-agent preflight context is #135541.
fuller-stack-dev added a commit that referenced this pull request Sep 6, 2026
* fix(update): keep the service profile when switching to Git

Resolve the admitted managed-service environment when package-to-Git backup, Doctor, and source-publication recovery consume it. Preserve deferred inspection and mutation ordering.

Follow-up to #139722; original all-agent preflight context is #135541.

* fix(update): restrict deferred Git profile to owned service
fuller-stack-dev added a commit that referenced this pull request Sep 6, 2026
* fix(update): keep the service profile when switching to Git

Resolve the admitted managed-service environment when package-to-Git backup, Doctor, and source-publication recovery consume it. Preserve deferred inspection and mutation ordering.

Follow-up to #139722; original all-agent preflight context is #135541.

* fix(update): restrict deferred Git profile to owned service

(cherry picked from commit add29ed)
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 7, 2026
…tallation (openclaw#139722)

* fix(update): refuse incompatible agent stores before mutation

Carry forward the all-agent store preflight from openclaw#135541 on current canonical main. Inspect configured and registered stores without adopting migration ownership, and revalidate the actual managed-service context before package or Git mutation. Preserve recorded update outcomes and parent-owned post-core finalization.

Related: openclaw#113565. Original contribution and review history: openclaw#135541.

* fix(update): keep service admission contracts acyclic

* test: sync upstream suppression inventory locations

Carry the exact three-line correction from upstream c73a462. Suppression text and count are unchanged.

Co-authored-by: Peter Steinberger <[email protected]>

* chore(update): align preserved branch for additive main integration

* fix(update): refuse incompatible agent stores before installation changes

Preserve current candidate validation and progress while inspecting all caller and managed-service stores before effects. Retain the original contribution and history from openclaw#135541.

---------

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

* fix(update): keep the service profile when switching to Git

Resolve the admitted managed-service environment when package-to-Git backup, Doctor, and source-publication recovery consume it. Preserve deferred inspection and mutation ordering.

Follow-up to openclaw#139722; original all-agent preflight context is openclaw#135541.

* fix(update): restrict deferred Git profile to owned service
fuller-stack-dev added a commit that referenced this pull request Sep 10, 2026
…mission (#140339)

* feat(update): verify served agent turns are persisted

Related: #124396
(cherry picked from commit a12b5fa)

* feat(update): persist recovery claims and guard interrupted admission

Related: #124396

Persist exact operational records in the existing shared machine-state owner, with revision fencing, observed effects, candidate handoffs, serving proofs, and history-preserving checkpoint carry-forward. Refuse new admission and diagnostic completion while operational recovery remains pending.

Integration checkpoint: package descriptors, terminal pair retention, checkpoint publication discovery, and matching-runtime replay still require the coordinated producer and finalizer consumers. Focused recovery/history/CLI tests: 75 passed; typechecking, focused lint, and independent P0-P2 review passed. Production unused-export checks remain blocked by the unfinished consumer integration.

(cherry picked from commit 5037c12fe8528136d7b32e6804230db23af63c10)

* fix(update): bind recovery checkpoints to admitted source

(cherry picked from commit 9d8bbc7bcabec9ae5fddbcb8fcc88935136fc49c)

* fix(update): reject aliased recovery databases

(cherry picked from commit b1d10c113bdf6d2ff8eae0c8d7bbb0af6318f418)

* feat(update): capture and restore verified update checkpoints

Related: #124396

Capture digest-bound config, plugin payload, service files and SQLite state.
Restore compatible newer work with three-way preservation, preserving FTS and
row identities, while refusing incompatible changes before publication.

Integrate the existing recovery owner for immutable plan references, exact
record/logical-data binding, two-copy sealing, interrupted preparation and
resource reconciliation. Keep live SQLite reads artifact-preserving.

Integration checkpoint: 34 focused tests, core/core-test typing, scoped type-aware lint and independent
P0-P2 review pass. The full changed-file gate still identifies absent real
production consumers; finalizer lifecycle and recovery admission/replay wiring
remain coordinated follow-ups. No complete whole-state rollout or containment
claim is made here.

(cherry picked from commit ec216121b2a8e6214576709fd0774eff28e0ae0a)

* fix(update): revalidate checkpoint sources before sealing

Bind source content, physical identity and absence again after all resource
copies so service and environment preimages cannot silently become stale
before manifest publication. Recheck owner-held exclusion before returning.

Three regressions reproduce edited, same-byte recreated and newly-created
service resources on the previous implementation. All 37 focused checkpoint
and real recovery integration tests pass, along with production/test typing,
scoped lint and fresh P0-P2 independent review.

The full changed-file gate still fails on missing production consumers in
the existing checkpoint/recovery/verifier stack. This additive integration
commit changes no public API and does not claim complete rollback or landing.

Related: #124396
(cherry picked from commit 85976a48ca3858cabab3de19c53c274614e5d90f)

* fix(update): block admission across interrupted database publication

Detect existing checkpoint restore families before any writable admission when the canonical shared database is missing. Treat locators as evidence requiring reconciliation, never as mutation authority. Keep first-install admission and existing pending-recovery checks intact.

Four real CLI negative controls reproduced new history database creation. All 65 focused recovery and CLI tests pass; production/test typechecks, scoped lint and independent P0-P2 review pass. Full changed gate still flags missing production consumers in the unfinished stack. Private integration checkpoint; no full replay or retention claim.

(cherry picked from commit 324bcd2d1c09d39b66442d56951177f9cdf0e459)

* fix(update): bind displaced recovery to publication record

(cherry picked from commit 4936cbfefd95f71934c3de75c31324d2e48b3616)

* fix(update): bind checkpoint file restores to mutation outputs

(cherry picked from commit f855a3ed6fa757a7797e1dc6f03468ce73fd5644)

* fix(update): bind plugin rollback to committed row receipts

(cherry picked from commit 2c4a077dbeeae6db9a03d9939fa469a396363371)

* test(update): verify exact checkpoint inventory and SQLite capture

(cherry picked from commit c24926024c64a7c718f1d1df15ab3a3b3c07d73c)

* fix(update): expose canonical recovery row ownership selector

* fix(update): enforce staged runtime validation before sealing

* fix(update): bind legacy admission plans to original config sources

* feat(update): persist checkpoint after-images by completed interval

(cherry picked from commit ee2bf95f44d624f258a8fbe2f9fe4cd4ef38b6b6)

* fix(update): preserve pre-stop file preimages through checkpoint sealing

(cherry picked from commit 5c81b9caf154334fa65d17d298417bedf5e5208e)

* fix: require saved agent turns before update verification succeeds (#140274)

* feat(update): verify served agent turns are persisted

Related: #124396

* fix: verify update serving and persistence on the final Gateway boot

* fix: retire advisory inference after durable update verification

* test: align Doctor update controls with boot-bound verification

* fix(test): accept release subpages in docs route shape

(cherry picked from commit 20673ed)

---------

Co-authored-by: Peter Steinberger <[email protected]>
(cherry picked from commit cbd5419)

* fix(update): converge plugins before managed service activation

* fix(update): keep the service profile when switching to Git (#140263)

* fix(update): keep the service profile when switching to Git

Resolve the admitted managed-service environment when package-to-Git backup, Doctor, and source-publication recovery consume it. Preserve deferred inspection and mutation ordering.

Follow-up to #139722; original all-agent preflight context is #135541.

* fix(update): restrict deferred Git profile to owned service

(cherry picked from commit add29ed)

* fix(update): await post-core writer settlement before continuing

Join child close and termination helper before returning committed plugin results, preserving committed work across termination races. Keep convergence as a step so restarting and verifying history remain monotonic.

* fix(update): validate checkpoint publication by resource role

(cherry picked from commit dd3e2e9ba7136acc87616ffd97560c8d53dfac15)

* fix(update): report unavailable checkpoint exclusion before apply

(cherry picked from commit 5c4021420f9f466da55fb656fc0ac1d80c100e12)

* feat(update): reconcile checkpoints before recovery claims

(cherry picked from commit 57ac8738a103bdf5b00a3a59278c047d8615a606)

* fix(update): stop repair continuation after authority loss

* feat(update): seal staged service files before native load

* feat(update): validate restored state with previous runtime

(cherry picked from commit cec342aa8e1e8e33e22f789c430e936e716b63e4)

* fix(update): retain pending staged-load failures

* test(update): supply retained runtime to checkpoint adapter

* feat(update): import immutable package recovery runtime

Use the exact four-file runtime closure from package-owner commit 6703db8f2b925e9c28235e24e418eb0f66ce5967. Package swap integration remains with its owner.

(cherry picked from commit 5f7338df8a87e07e51570a92208df0531d4148a7)

* feat(update): commit verified recovery outcomes and retained pairs

Persist typed package effects with fenced retry acknowledgements. Atomically commit terminal history and select the next retained package/checkpoint pair before superseded retirement. Preserve selection during rollback and interrupted cleanup; complete CLI runs from durable outcomes.

(cherry picked from commit bbf6f99bf05d6e6d88c651fcddd1120e5c735a6b)

* fix(update): consume durable terminal outcomes in finalization

* fix(update): reject serving proof after recovery changes

* feat(update): integrate retained package generation prerequisite

Exact committed-source slice: 56b2924..fc22114.
Includes only missing package owner paths; existing runtime imports preserved.

* feat(update): integrate bounded retained-generation readers

Exact committed-source slice: fc22114..e2279391b42f7794de0c82bded390e6f114477ba.
Includes only missing package owner paths; existing runtime imports preserved.

* feat(update): integrate canonical package recovery swap

Exact committed-source slice: e2279391b42f7794de0c82bded390e6f114477ba..6703db8f2b925e9c28235e24e418eb0f66ce5967.
Includes only missing package owner paths; existing runtime imports preserved.

* test(update): reopen retained recovery after-images with source binding

(cherry picked from commit 409b1ce3165bd9b3a06a72ecbb2b24d0bd10d2a5)

* feat(update): bind early recovery file preimages

Keep purpose-validated original file artifacts in a separate fenced recovery slot before lifecycle mutation. Reopen and recheck current claims before early lifecycle actions; require a later full checkpoint to link the exact early artifact without accepting it as complete state.

(cherry picked from commit e929332b9ee6794930d96e1626907205d35eda36)

* test(update): cover retained-reader publication races

(cherry picked from commit c20f9ff59aa9a4b3e515940ab72fbacbb80e5af8)

* fix(update): propagate durable package recovery hooks

* fix(update): retain exact backup diagnostics after failed publication

* fix(update): revalidate resource before recovery progress

(cherry picked from commit 85d3929a12968b5dd0feba2ede6f2e7ac1c07533)

* fix(update): validate restored agent databases with retained runtime

(cherry picked from commit 95a8ba67873858fd43970be8d11e003b09c69cb8)

* fix: coordinate cached state and direct config writes

* fix: coordinate shared-state checkpointing on retirement

* fix(state): retain handle exclusion through native and source-reader lifetimes

* fix(state): retain heartbeat exclusion through renewal and worker exit

* test(macos): preserve canonical modes in worker install fixture

* fix(state): bind source capture to its current physical exclusion

* fix(state): bind maintenance capture to settled heartbeat ownership

* fix(state): compose live lease owners for checkpoint capture

* feat(update): persist native manager recovery intent

(cherry picked from commit 8a0a2a3af098f4036b51a0bf82462578bb25ddaa)

* fix(update): bind checkpoints before releasing source exclusion

* fix(config): serialize writes to shared include targets

* feat(update): replay sealed checkpoint restoration

(cherry picked from commit b922f75b28db236c37131e4e26e649862ed8ef03)

* test(update): reconcile retained runtime replay fixture

* feat(update): bind systemd recovery manager identities

(cherry picked from commit a8b359cd7aa6852397bd00041c524b58ff3665ee)

* fix(update): inspect loaded systemd commands without activation

* fix(update): guard interrupted preview history settlement

(cherry picked from commit 588f70478515c7cfd53c642ba46b32bf4c5e6f3a)

* fix(update): settle interrupted previews within admitted command scope

* fix(update): reject uncertain loaded service admission

(cherry picked from commit 00c9931e91a8174feda08fa80af74ef4a61b43a7)

* fix(update): inspect loaded systemd runtime without activation

* fix(update): keep definition admission non-activating

* fix(update): retain observed native manager account identity

* test(update): exercise physical checkpoint publication owners

(cherry picked from commit 73bd1544bbf35bf51df7c83a2c1c8ba005837cae)

* feat(state): rebind live leases after checkpoint publication

(cherry picked from commit 1832bd986d1905f89e76a71ca11196f97a0c940b)

* fix(update): replay sealed recovery from rollback

(cherry picked from commit d4c2ad61c400e36d0fd582bee8b6b18b584f346f)

* fix(update): bind recovery CAS to publication custody

(cherry picked from commit d7da34a4480ced7cf28a5caa18543fd1be091d1e)

* fix(update): classify native admission read failures

(cherry picked from commit 0bf7e1faf2230885ec5236a4ce748e01949c9683)

* fix(update): defer legacy config writes until admitted execution

* fix(update): consume live publication in rollback

(cherry picked from commit 30ee0442378d9768c8324926a097d80c7cd06bf8)

* fix(update): preserve pending recovery through finalization and unwind

* fix(update): refuse finalization before displaced source admission

* fix(update): retain live executor ownership through command settlement

Reuse the managed handoff lease for direct invocations and borrow only the exact live helper assignment. Check the original executor after awaited candidate validation and retain it through recovery unwind. Keep physical checkpoint exclusion and durable recovery startup as separate unfinished integration.

* fix(update): retain executor authority across native lifecycle effects

* fix(update): inspect legacy terminal outcomes without granting mutation authority

* fix(update): fence migrated workers through descendant extinction

* fix(update): bind staged startup and original source capture

* fix(update): bind original native facts under lifecycle ownership

* fix(update): retain native stop authority through acknowledgement

* fix(update): preserve owned recovery across CI and artifact replacement

Retain the live state coordinator through heartbeat worker teardown, preserve the first lease failure across nested maintenance, and settle fresh locally owned pre-activation signals without migrating state. Treat explicit artifact targets, including package aliases, as replacements regardless of equal versions.
Separate shared type and fixture contracts to remove static dependency cycles, register the real Gateway client callsite, and correct platform and atomic-publication fixture boundaries.
Source-bound regression checks and independent review are retained with the CI correction proof; hosted exact-head checks and clean-head built presenter verification remain separate landing requirements.

* fix(update): finish package baseline reads before durable startup

Keep bounded file observations within their own reader lifetime. Await
startup and descriptor persistence afterward, preserving independent
package readback, retention, and native activation fences.

* fix(update): preserve typed recovery queries and isolated test owners

* fix(update): reconcile untouched preparation under live owners

Keep bounded package roots concurrent, preserve no-effect failed preparation evidence, and support loaded-only synthetic service inspection. Make the native deletion test barrier explicitly owned.

* fix(update): distinguish SQLite metadata reader export

* fix(update): resume journaled rollback with absent package root

* test(update): isolate Windows ACL creation in platform simulations

* fix(update): drain logical owners before checkpoint publication

* fix(update): settle retained agent WAL under publication custody

* fix(update): preserve WAL boundaries and deterministic lease fixtures

* fix(update): retain exact mutation custody through Doctor and rollback

* Fix preflight signal ownership and failed native restart recovery

* test(state): isolate competing maintenance lease claims

* fix(update): bind all phase receipts during checkpoint recovery

* fix(update): reconcile stopped candidate suppression under fresh authority

* fix(update): inspect collected systemd units under recovery custody

* fix(update): admit retained stopped service replay under fresh custody

* fix(update): inspect collected service processes on the native interface

* fix(update): admit sealed stopped recovery on ordinary entry

* fix(locks): report bounded stale-owner acquisition evidence

* fix: keep shipped SDK context aliases pending removal (#142708)

(cherry picked from commit c7cb45d)

* fix(update): validate ordinary interrupted-update recovery

Simplify the ordinary recovery path, retain strict existing-record refusal, and
repair cross-version admission, source ownership, native observation, and
checkpoint startup-metadata handling. Exclude the inactive capsule subsystem.

Validate the exact source with complete package build, independent reviews,
and serial installed rollback, upgrade, transport, signal, and interruption cases.

* fix(update): remove type cycle and scope migration test cleanup

* fix(update): retry owned PID-less activation observation transitions

* test(update): isolate refusal cases and join fixture descendants

* feat(update): defer full-state recovery and retain compatible rollback

* fix(update): separate type contracts and remove deferred recovery orphans

* fix(update): retain executor checks across native task recovery

* fix(update): avoid unsolicited notices after package rollback

---------

Co-authored-by: Peter Steinberger <[email protected]>
Co-authored-by: Jason Sy <[email protected]>
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 10, 2026
…mission (openclaw#140339)

* feat(update): verify served agent turns are persisted

Related: openclaw#124396
(cherry picked from commit a12b5fa)

* feat(update): persist recovery claims and guard interrupted admission

Related: openclaw#124396

Persist exact operational records in the existing shared machine-state owner, with revision fencing, observed effects, candidate handoffs, serving proofs, and history-preserving checkpoint carry-forward. Refuse new admission and diagnostic completion while operational recovery remains pending.

Integration checkpoint: package descriptors, terminal pair retention, checkpoint publication discovery, and matching-runtime replay still require the coordinated producer and finalizer consumers. Focused recovery/history/CLI tests: 75 passed; typechecking, focused lint, and independent P0-P2 review passed. Production unused-export checks remain blocked by the unfinished consumer integration.

(cherry picked from commit 5037c12fe8528136d7b32e6804230db23af63c10)

* fix(update): bind recovery checkpoints to admitted source

(cherry picked from commit 9d8bbc7bcabec9ae5fddbcb8fcc88935136fc49c)

* fix(update): reject aliased recovery databases

(cherry picked from commit b1d10c113bdf6d2ff8eae0c8d7bbb0af6318f418)

* feat(update): capture and restore verified update checkpoints

Related: openclaw#124396

Capture digest-bound config, plugin payload, service files and SQLite state.
Restore compatible newer work with three-way preservation, preserving FTS and
row identities, while refusing incompatible changes before publication.

Integrate the existing recovery owner for immutable plan references, exact
record/logical-data binding, two-copy sealing, interrupted preparation and
resource reconciliation. Keep live SQLite reads artifact-preserving.

Integration checkpoint: 34 focused tests, core/core-test typing, scoped type-aware lint and independent
P0-P2 review pass. The full changed-file gate still identifies absent real
production consumers; finalizer lifecycle and recovery admission/replay wiring
remain coordinated follow-ups. No complete whole-state rollout or containment
claim is made here.

(cherry picked from commit ec216121b2a8e6214576709fd0774eff28e0ae0a)

* fix(update): revalidate checkpoint sources before sealing

Bind source content, physical identity and absence again after all resource
copies so service and environment preimages cannot silently become stale
before manifest publication. Recheck owner-held exclusion before returning.

Three regressions reproduce edited, same-byte recreated and newly-created
service resources on the previous implementation. All 37 focused checkpoint
and real recovery integration tests pass, along with production/test typing,
scoped lint and fresh P0-P2 independent review.

The full changed-file gate still fails on missing production consumers in
the existing checkpoint/recovery/verifier stack. This additive integration
commit changes no public API and does not claim complete rollback or landing.

Related: openclaw#124396
(cherry picked from commit 85976a48ca3858cabab3de19c53c274614e5d90f)

* fix(update): block admission across interrupted database publication

Detect existing checkpoint restore families before any writable admission when the canonical shared database is missing. Treat locators as evidence requiring reconciliation, never as mutation authority. Keep first-install admission and existing pending-recovery checks intact.

Four real CLI negative controls reproduced new history database creation. All 65 focused recovery and CLI tests pass; production/test typechecks, scoped lint and independent P0-P2 review pass. Full changed gate still flags missing production consumers in the unfinished stack. Private integration checkpoint; no full replay or retention claim.

(cherry picked from commit 324bcd2d1c09d39b66442d56951177f9cdf0e459)

* fix(update): bind displaced recovery to publication record

(cherry picked from commit 4936cbfefd95f71934c3de75c31324d2e48b3616)

* fix(update): bind checkpoint file restores to mutation outputs

(cherry picked from commit f855a3ed6fa757a7797e1dc6f03468ce73fd5644)

* fix(update): bind plugin rollback to committed row receipts

(cherry picked from commit 2c4a077dbeeae6db9a03d9939fa469a396363371)

* test(update): verify exact checkpoint inventory and SQLite capture

(cherry picked from commit c24926024c64a7c718f1d1df15ab3a3b3c07d73c)

* fix(update): expose canonical recovery row ownership selector

* fix(update): enforce staged runtime validation before sealing

* fix(update): bind legacy admission plans to original config sources

* feat(update): persist checkpoint after-images by completed interval

(cherry picked from commit ee2bf95f44d624f258a8fbe2f9fe4cd4ef38b6b6)

* fix(update): preserve pre-stop file preimages through checkpoint sealing

(cherry picked from commit 5c81b9caf154334fa65d17d298417bedf5e5208e)

* fix: require saved agent turns before update verification succeeds (openclaw#140274)

* feat(update): verify served agent turns are persisted

Related: openclaw#124396

* fix: verify update serving and persistence on the final Gateway boot

* fix: retire advisory inference after durable update verification

* test: align Doctor update controls with boot-bound verification

* fix(test): accept release subpages in docs route shape

(cherry picked from commit 20673ed)

---------

Co-authored-by: Peter Steinberger <[email protected]>
(cherry picked from commit 17fa116)

* fix(update): converge plugins before managed service activation

* fix(update): keep the service profile when switching to Git (openclaw#140263)

* fix(update): keep the service profile when switching to Git

Resolve the admitted managed-service environment when package-to-Git backup, Doctor, and source-publication recovery consume it. Preserve deferred inspection and mutation ordering.

Follow-up to openclaw#139722; original all-agent preflight context is openclaw#135541.

* fix(update): restrict deferred Git profile to owned service

(cherry picked from commit 6ffc287)

* fix(update): await post-core writer settlement before continuing

Join child close and termination helper before returning committed plugin results, preserving committed work across termination races. Keep convergence as a step so restarting and verifying history remain monotonic.

* fix(update): validate checkpoint publication by resource role

(cherry picked from commit dd3e2e9ba7136acc87616ffd97560c8d53dfac15)

* fix(update): report unavailable checkpoint exclusion before apply

(cherry picked from commit 5c4021420f9f466da55fb656fc0ac1d80c100e12)

* feat(update): reconcile checkpoints before recovery claims

(cherry picked from commit 57ac8738a103bdf5b00a3a59278c047d8615a606)

* fix(update): stop repair continuation after authority loss

* feat(update): seal staged service files before native load

* feat(update): validate restored state with previous runtime

(cherry picked from commit cec342aa8e1e8e33e22f789c430e936e716b63e4)

* fix(update): retain pending staged-load failures

* test(update): supply retained runtime to checkpoint adapter

* feat(update): import immutable package recovery runtime

Use the exact four-file runtime closure from package-owner commit 6703db8f2b925e9c28235e24e418eb0f66ce5967. Package swap integration remains with its owner.

(cherry picked from commit 5f7338df8a87e07e51570a92208df0531d4148a7)

* feat(update): commit verified recovery outcomes and retained pairs

Persist typed package effects with fenced retry acknowledgements. Atomically commit terminal history and select the next retained package/checkpoint pair before superseded retirement. Preserve selection during rollback and interrupted cleanup; complete CLI runs from durable outcomes.

(cherry picked from commit bbf6f99bf05d6e6d88c651fcddd1120e5c735a6b)

* fix(update): consume durable terminal outcomes in finalization

* fix(update): reject serving proof after recovery changes

* feat(update): integrate retained package generation prerequisite

Exact committed-source slice: 4f148ac..fc22114.
Includes only missing package owner paths; existing runtime imports preserved.

* feat(update): integrate bounded retained-generation readers

Exact committed-source slice: fc22114..e2279391b42f7794de0c82bded390e6f114477ba.
Includes only missing package owner paths; existing runtime imports preserved.

* feat(update): integrate canonical package recovery swap

Exact committed-source slice: e2279391b42f7794de0c82bded390e6f114477ba..6703db8f2b925e9c28235e24e418eb0f66ce5967.
Includes only missing package owner paths; existing runtime imports preserved.

* test(update): reopen retained recovery after-images with source binding

(cherry picked from commit 409b1ce3165bd9b3a06a72ecbb2b24d0bd10d2a5)

* feat(update): bind early recovery file preimages

Keep purpose-validated original file artifacts in a separate fenced recovery slot before lifecycle mutation. Reopen and recheck current claims before early lifecycle actions; require a later full checkpoint to link the exact early artifact without accepting it as complete state.

(cherry picked from commit e929332b9ee6794930d96e1626907205d35eda36)

* test(update): cover retained-reader publication races

(cherry picked from commit c20f9ff59aa9a4b3e515940ab72fbacbb80e5af8)

* fix(update): propagate durable package recovery hooks

* fix(update): retain exact backup diagnostics after failed publication

* fix(update): revalidate resource before recovery progress

(cherry picked from commit 85d3929a12968b5dd0feba2ede6f2e7ac1c07533)

* fix(update): validate restored agent databases with retained runtime

(cherry picked from commit 95a8ba67873858fd43970be8d11e003b09c69cb8)

* fix: coordinate cached state and direct config writes

* fix: coordinate shared-state checkpointing on retirement

* fix(state): retain handle exclusion through native and source-reader lifetimes

* fix(state): retain heartbeat exclusion through renewal and worker exit

* test(macos): preserve canonical modes in worker install fixture

* fix(state): bind source capture to its current physical exclusion

* fix(state): bind maintenance capture to settled heartbeat ownership

* fix(state): compose live lease owners for checkpoint capture

* feat(update): persist native manager recovery intent

(cherry picked from commit 8a0a2a3af098f4036b51a0bf82462578bb25ddaa)

* fix(update): bind checkpoints before releasing source exclusion

* fix(config): serialize writes to shared include targets

* feat(update): replay sealed checkpoint restoration

(cherry picked from commit b922f75b28db236c37131e4e26e649862ed8ef03)

* test(update): reconcile retained runtime replay fixture

* feat(update): bind systemd recovery manager identities

(cherry picked from commit a8b359cd7aa6852397bd00041c524b58ff3665ee)

* fix(update): inspect loaded systemd commands without activation

* fix(update): guard interrupted preview history settlement

(cherry picked from commit 588f70478515c7cfd53c642ba46b32bf4c5e6f3a)

* fix(update): settle interrupted previews within admitted command scope

* fix(update): reject uncertain loaded service admission

(cherry picked from commit 00c9931e91a8174feda08fa80af74ef4a61b43a7)

* fix(update): inspect loaded systemd runtime without activation

* fix(update): keep definition admission non-activating

* fix(update): retain observed native manager account identity

* test(update): exercise physical checkpoint publication owners

(cherry picked from commit 73bd1544bbf35bf51df7c83a2c1c8ba005837cae)

* feat(state): rebind live leases after checkpoint publication

(cherry picked from commit 1832bd986d1905f89e76a71ca11196f97a0c940b)

* fix(update): replay sealed recovery from rollback

(cherry picked from commit d4c2ad61c400e36d0fd582bee8b6b18b584f346f)

* fix(update): bind recovery CAS to publication custody

(cherry picked from commit d7da34a4480ced7cf28a5caa18543fd1be091d1e)

* fix(update): classify native admission read failures

(cherry picked from commit 0bf7e1faf2230885ec5236a4ce748e01949c9683)

* fix(update): defer legacy config writes until admitted execution

* fix(update): consume live publication in rollback

(cherry picked from commit 30ee0442378d9768c8324926a097d80c7cd06bf8)

* fix(update): preserve pending recovery through finalization and unwind

* fix(update): refuse finalization before displaced source admission

* fix(update): retain live executor ownership through command settlement

Reuse the managed handoff lease for direct invocations and borrow only the exact live helper assignment. Check the original executor after awaited candidate validation and retain it through recovery unwind. Keep physical checkpoint exclusion and durable recovery startup as separate unfinished integration.

* fix(update): retain executor authority across native lifecycle effects

* fix(update): inspect legacy terminal outcomes without granting mutation authority

* fix(update): fence migrated workers through descendant extinction

* fix(update): bind staged startup and original source capture

* fix(update): bind original native facts under lifecycle ownership

* fix(update): retain native stop authority through acknowledgement

* fix(update): preserve owned recovery across CI and artifact replacement

Retain the live state coordinator through heartbeat worker teardown, preserve the first lease failure across nested maintenance, and settle fresh locally owned pre-activation signals without migrating state. Treat explicit artifact targets, including package aliases, as replacements regardless of equal versions.
Separate shared type and fixture contracts to remove static dependency cycles, register the real Gateway client callsite, and correct platform and atomic-publication fixture boundaries.
Source-bound regression checks and independent review are retained with the CI correction proof; hosted exact-head checks and clean-head built presenter verification remain separate landing requirements.

* fix(update): finish package baseline reads before durable startup

Keep bounded file observations within their own reader lifetime. Await
startup and descriptor persistence afterward, preserving independent
package readback, retention, and native activation fences.

* fix(update): preserve typed recovery queries and isolated test owners

* fix(update): reconcile untouched preparation under live owners

Keep bounded package roots concurrent, preserve no-effect failed preparation evidence, and support loaded-only synthetic service inspection. Make the native deletion test barrier explicitly owned.

* fix(update): distinguish SQLite metadata reader export

* fix(update): resume journaled rollback with absent package root

* test(update): isolate Windows ACL creation in platform simulations

* fix(update): drain logical owners before checkpoint publication

* fix(update): settle retained agent WAL under publication custody

* fix(update): preserve WAL boundaries and deterministic lease fixtures

* fix(update): retain exact mutation custody through Doctor and rollback

* Fix preflight signal ownership and failed native restart recovery

* test(state): isolate competing maintenance lease claims

* fix(update): bind all phase receipts during checkpoint recovery

* fix(update): reconcile stopped candidate suppression under fresh authority

* fix(update): inspect collected systemd units under recovery custody

* fix(update): admit retained stopped service replay under fresh custody

* fix(update): inspect collected service processes on the native interface

* fix(update): admit sealed stopped recovery on ordinary entry

* fix(locks): report bounded stale-owner acquisition evidence

* fix: keep shipped SDK context aliases pending removal (openclaw#142708)

(cherry picked from commit 8ab0f61)

* fix(update): validate ordinary interrupted-update recovery

Simplify the ordinary recovery path, retain strict existing-record refusal, and
repair cross-version admission, source ownership, native observation, and
checkpoint startup-metadata handling. Exclude the inactive capsule subsystem.

Validate the exact source with complete package build, independent reviews,
and serial installed rollback, upgrade, transport, signal, and interruption cases.

* fix(update): remove type cycle and scope migration test cleanup

* fix(update): retry owned PID-less activation observation transitions

* test(update): isolate refusal cases and join fixture descendants

* feat(update): defer full-state recovery and retain compatible rollback

* fix(update): separate type contracts and remove deferred recovery orphans

* fix(update): retain executor checks across native task recovery

* fix(update): avoid unsolicited notices after package rollback

---------

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

Labels

cli CLI command changes docs Improvements or additions to documentation maintainer Maintainer-authored PR merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. P2 Normal backlog priority with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. 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.

1 participant