Skip to content

feat(update): clean up retained migration recovery files - #133864

Merged
steipete merged 6 commits into
mainfrom
steipete/updater-backup-behavior-0ba004
Aug 31, 2026
Merged

steipete merged 6 commits into
mainfrom
steipete/updater-backup-behavior-0ba004

Conversation

@steipete

@steipete steipete commented Aug 31, 2026 •

Copy link
Copy Markdown
Contributor

Closes #133805 — explicit retirement of update recovery originals after a verified upgrade.

What Problem This Solves

Operators upgrading legacy session stores to SQLite retain potentially large JSONL/index originals, but had no supported way to retire safe rollback data without guessing which files still contain unique history. Repeated migrations could also prune successful recovery manifests while leaving their payloads behind, losing restore mappings without freeing meaningful space. Public Doctor repair made an extra full raw transcript copy and rewritten intermediate before the streaming importer.

Why This Change Was Made

Add openclaw update cleanup as a thin CLI frontend to the migration owner's recovery lifecycle, not ordinary session retention or a filename-based recursive delete. The owner records preservation evidence, keeps required mappings, verifies destinations/originals under exclusive offline ownership, claims the complete selected set before deletion, and persists resumable disposal receipts. All known importing owners contribute before archival; incomplete/unselected groups stay recoverable, and historical evidence is adopted conservatively.

Move migration-time branch/provider repair into the existing disposable SQLite import spool, retaining one untouched original instead of an extra full raw copy/rewrite. Preserve current main's lazy updater loading and final result reporting. No new dependency, configuration setting, automatic expiration, persistent SQLite schema/version, or full-state snapshot framework is introduced. The operator explicitly approved the irreversible-retirement contract and temporary spool metadata design for this task; the spool DDL is not a change to a persistent user database.

User Impact

Preview with openclaw update cleanup --dry-run, then stop the selected Gateway and explicitly retire eligible originals. Interactive confirmation defaults to No; unattended deletion requires --yes, including JSON mode. Cleanup never stops/restarts a service or silently redirects to another profile. Current history, operator backups, malformed/unique unimported data, unsupported ownership, and unmanifested files remain protected. Failed/interrupted disposal has explicit outcomes and can be retried without deleting recreated files.

Update cleanup documentation and the updating guide explain profile/state selection, permanent rollback loss, protected files, retry/restore behavior, portable-backup exclusions, and disk/RAM costs. Originals, temporary SQLite staging, and destination/WAL can coexist; SQLite can be larger than JSONL. Neither update nor cleanup creates an automatic full pre-upgrade backup.

Release-note context: add explicit update recovery cleanup, preserve migration mappings until originals are retired, and avoid the additional full-file Doctor repair copy for large histories.

Evidence

Published head: 2bac192281227838d90d243b16ee6c582852af66, based on a226416b01a2960478176952d7a953bac9083555. The passive-startup and foreign-root recovery findings are repaired and independently verified. All six commits rebased patch-identically. Post-rebase proof passed 370 tests across six files/four configurations, complete changed checks, and the full local build with no ineffective-dynamic-import diagnostics. The incremental repairs have a fresh scoped-clean P0 review. The refreshed installed-package proof below also passed on this exact head. Exact-head CI completed successfully. Merged as 78d2d914db75; native reconciliation verified the landed tree against this prepared head.

Regression and local proof

Failing-before/passing-after cases cover retained payloads losing manifests after more than 50 runs; public Doctor's extra raw copy/rewrite; confirmation/publication races; shared failed/unselected owners; duplicate-owner restore; admitted inputs disappearing; cross-run and historical dependency selection; recreated files; database/WAL changes; symlinks/hardlinks; consumed generations; malformed data; offline ownership; and failed-delete accounting.

After the shared-owner/dependency repairs, the integrated selection run passed 341 tests across nine files/four configurations, followed by eight CLI process cases and complete changed checks. CI-wiring follow-through passed 50 focused contract cases and eight managed-build-prerequisite process cases; the latest canonical-roster integration passed 57 neighboring cases. These runs overlap and are not a full-suite count. The feature, CI repair, and roster integration each have scoped-clean P0/P1 reviews; newly accepted findings will receive their own validation before landing.

Native dist-backed CLI preflights also passed all three shared-owner scenarios and custom-store import → exact original restore → reimport → cleanup → intentional-disposal reporting. Earlier native installed-updater and nine-clause source-blind proof, plus four real chmod publication faults under normal/canonical macOS root aliases, remain supplemental evidence rather than proof of every later change.

Actual old-npm updater and Gateway proof

On exact published head 2bac192281227838d90d243b16ee6c582852af66, installed actual npm [email protected] in isolated synthetic environments and invoked that old installed updater against the packed candidate. Both small and 150,000-record scenarios asserted migration/original preservation before standalone Doctor, then exercised public Gateway history, appends/new sessions without inference, online preview/refused apply, custom restore/reimport, offline cleanup, retry, recreated paths, intentional-disposal reporting, restart, and exact old/new history checks. Both passed. A separate fresh npm installation of the same candidate passed 37 public CLI commands across complete shared ownership, an unselected known owner, and incomplete index coverage.

Blacksmith Testbox tbx_01m1c0qk6nkwv8vvhekvz2wze8; all 69 changed files hash-verified against exact head. Backing environment run. The 16m34s command returned exit 0 with both scenario pass markers and complete structured evidence; the lease was then stopped. The backing workflow is environment provenance, not the test verdict: lease cleanup may cancel it.

Measurement Small Large
Largest original transcript 30,172 B 646,837,441 B
Old updater elapsed 83.674 s 143.575 s
Cleanup elapsed 0.718 s 3.501 s
Logical bytes removed 64,272 B 646,841,082 B
Removed files 9 8
Protected bytes reported 1,866 B 1,866 B

Candidate package SHA-256: 1461e375411c2a5b46a9b7ffc08d014371948a8a6d8c650e41e70ccd23d283b7. Package version is the local development candidate, not a release/publication claim.

Remaining gates and limits

  • Resolved: foreign-root interrupted retry. The dependency producer now records local recovery filenames while preserving the generic reader's foreign-path contract. The test-only patch failed three canonical-relocated v1/v2/v3 cases before the owner fix; all 190 recovery-owner tests then passed. An independent real-maintenance-lock receipt-EIO/retry/restore probe restored both originals byte-for-byte with a readable manifest and no conflicts.
  • Resolved: ClawSweeper's passive-startup finding. One shared update-option declaration supplies Commander and command discovery. Raw-argv tests now observe zero config reads, proxy starts, PATH ensures, or proxy-dispatcher ensures before rejecting unsupported parent flags; 361 parser/policy/Commander tests and eight built-CLI state cases passed. Valid flag positions, option-value spoofing, delimiters, and agent/models/gateway siblings remain covered.
  • Resolved: the earlier CI-plan expectation now requires the registered CLI runtime build prerequisite; 411 planner/routing cases passed. The prompt-policy fixture correction is integrated from the canonical Matrix lifecycle/CI repair.
  • Prior-head CI ended red with those planner/prompt failures, a prepared Anthropic subprocess timeout, and a lint runner shutdown rather than a lint finding. Repaired-head CI completed successfully on the exact published head, including the required aggregate gate and both Windows jobs. The separately landed provider-owner/packaged-probe repair superseded the proposed probe deletion. Compiler/startup performance and avatar lifecycle remain separately owned follow-ups; no stale provider-runtime or ordinary restore patch was cherry-picked.
  • Real installed CLI/Gateway/storage proof used synthetic external services, not authenticated provider/channel inference. No operator Gateway or live state was modified. All package-proof processes and owned leases are stopped.
  • Native Windows installed-package and native large-scale proof were not performed. Linux covered the large-history flow. No peak-disk or 2-GiB-host claim: large updater sampled process-tree RSS was about 2.13 GiB, cleanup about 331 MiB. Summed RSS includes package-manager work/shared pages and is not unique host memory.
  • Read-only SQLite verification can initialize transient SHM indexes. Only exact selected transient paths are allowed; existing persistent DB/WAL/unrelated bytes and all preview paths remain strict.
  • Ordinary restore's pre-existing overwrite race is owned by the separate exclusive restore-publication follow-up, not silently merged here.

Current production delta: +3,593/-1,385 (net +2,208); tests/support +3,903/-221 (net +3,682); docs +164/-11; tooling/config +18/-5, across 69 files. Production growth implements the explicit verification/retirement/recovery lifecycle, bounded staging, and one shared startup option contract; moved code cancels in the net. No ratchet was widened.

@clawsweeper

clawsweeper Bot commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation cli CLI command changes scripts Repository scripts commands Command implementations docker Docker and sandbox tooling size: XL maintainer Maintainer-authored PR labels Aug 31, 2026
@steipete steipete self-assigned this Aug 31, 2026
@clawsweeper

clawsweeper Bot commented Aug 31, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed August 31, 2026, 10:32 AM ET / 14:32 UTC.

ClawSweeper review

What this changes

The branch adds openclaw update cleanup, which previews and retires only manifest-verified legacy session-migration recovery artifacts after confirmation.

Warning

SQLite table change

This PR modifies persisted SQLite tables in src/config/sessions/session-accessor.sqlite-import-stage.ts. Prefer a design that avoids changing persisted SQLite tables. Migration or upgrade compatibility proof is recorded, but maintainers should still confirm that the schema change is necessary.

Merge readiness

⚠️ Ready for maintainer review - 4 items remain

Keep open for maintainer review. The branch is not superseded by current main and implements a coherent, guarded public cleanup capability, but its irreversible upgrade and recovery-data lifecycle needs explicit acceptance before merge.

Priority: P2
Reviewed head: 2bac192281227838d90d243b16ee6c582852af66
Owner decision: Required. See Decision needed.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) Substantial real-behavior and owner-boundary evidence supports a coherent implementation, with public retention semantics awaiting maintainer acceptance.
Proof confidence 🦞 diamond lobster (5/6) ✨ media proof bonus Sufficient (linked_artifact): The changed production owner is the manifest-backed retirement flow, entered by update cleanup; supplied exact-head installed-package evidence covers migration, cleanup, Gateway history, restore/reimport, and a 150,000-record case, while source tests cover fault and ownership boundaries.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (linked_artifact): The changed production owner is the manifest-backed retirement flow, entered by update cleanup; supplied exact-head installed-package evidence covers migration, cleanup, Gateway history, restore/reimport, and a 150,000-record case, while source tests cover fault and ownership boundaries.
Evidence reviewed 8 items Introduced command and ownership boundary: The new leaf command routes cleanup through the dedicated owner and supports only dry-run, JSON, and explicit acknowledgement; unsupported inherited update flags are rejected before work starts.
Retirement safety: The retirement owner requires state-write admission and a maintenance lock, rechecks preview and manifest state after consent, verifies artifact identity and destination ownership, records durable disposal intent, and only then unlinks claims.
Dependency and unknown-data protection: Inventory trusts only configured, state-owned migration targets; unmanifested, unreadable, incomplete, aliased, changed, and transitively dependent artifacts are protected or blocked rather than selected.
Findings None None.
Security None None.

How this fits together

Session migrations import legacy transcript and index artifacts into agent SQLite databases while retaining originals for rollback. The new update subcommand inspects those recovery records, protects incomplete or dependent data, and removes only verified originals after offline ownership checks.

flowchart LR
  A[Legacy session artifacts] --> B[SQLite migration]
  B --> C[Recovery manifest]
  C --> D[Cleanup preview]
  D --> E{Confirmed and verified?}
  E -->|Yes| F[Retire recovery originals]
  E -->|No| G[Retain recovery data]
  F --> H[SQLite session history remains]
Loading

Decision needed

Question Recommendation
Should openclaw update cleanup become the supported public command for permanently retiring verified legacy session-migration recovery artifacts? Accept the cleanup contract: Publish the confirmation-gated manifest-backed cleanup flow as the supported way to retire verified originals after an upgrade.

Why: The implementation is guarded, but deciding to expose irreversible recovery retirement defines the supported operator rollback and retention experience.

Before merge

  • Resolve merge risk (P1) - This adds a public command that permanently retires legacy rollback artifacts, changing the recovery expectations for existing upgraded installations.
  • Resolve merge risk (P1) - The migration manifest now records disposal lifecycle state; compatibility depends on the documented restore, reimport, and interrupted-cleanup semantics remaining stable.
  • Complete next step (P2) - The code is a viable canonical implementation, but the new public irreversible recovery-retirement contract needs maintainer product acceptance rather than automated repair.
Agent review details

Security

None.

PR surface

Source +2277, Tests +2519, Docs +153, Other +1107. Total +6056 across 69 files.

View PR surface stats
Area Files Added Removed Net
Source 35 3666 1389 +2277
Tests 17 2730 211 +2519
Docs 4 164 11 +153
Config 0 0 0 0
Generated 0 0 0 0
Other 13 1118 11 +1107
Total 69 7678 1622 +6056

Review metrics

Metric Value Why it matters
Production versus test delta production +3,593/-1,385 (net +2,208); tests/support +3,903/-221 The substantial production growth implements the new manifest-backed migration and recovery owner; regression coverage is correspondingly extensive.
Changed surface 69 files affected; docs +164/-11; tooling/baselines +18/-5 The change spans CLI routing, migration ownership, recovery, documentation, and installed-package proof support.

Stored data model

Persistent data-model change detected: database schema: src/config/sessions/session-accessor.sqlite-import-stage.ts, migration/backfill/repair: config/assertion-safety-baseline.txt, migration/backfill/repair: config/knip.config.ts, migration/backfill/repair: config/max-lines-baseline.txt, migration/backfill/repair: scripts/e2e/lib/upgrade-survivor/config-recipe.mts, migration/backfill/repair: scripts/e2e/lib/upgrade-survivor/recovery-cleanup-fixture.mjs, and 42 more. Migration or upgrade compatibility proof is recorded; maintainers should verify it before merge.

Root-cause cluster

Relationship: canonical
Canonical: #133864
Summary: This PR is the primary proposed implementation for session-migration recovery cleanup; the downstream restore-publication work is related but distinct.

Members:

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

Merge-risk options

Maintainer options:

  1. Accept the documented retirement semantics (recommended)
    Confirm that verified recovery originals may be permanently removed only after explicit acknowledgement and the implemented recovery checks.
  2. Pause the public command
    Defer the irreversible CLI surface if maintainers do not want migration recovery data to have an explicit retirement path yet.

Technical review

Best possible solution:

Accept one manifest-backed, confirmation-gated cleanup flow as the supported retirement path, with its documented rollback loss and recovery safeguards treated as the upgrade contract.

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

Not applicable as a defect report: this PR adds a capability, and the supplied installed-package after-fix scenarios exercise its intended behavior.

Is this the best way to solve the issue?

Yes, subject to maintainer acceptance of the product contract: keeping deletion authority in the manifest and migration owner is safer than suffix-, age-, or directory-based cleanup because unknown and dependent artifacts remain protected.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 9323eae1deab.

Labels

Label changes:

  • add proof: sufficient: Contributor real behavior proof is sufficient. The changed production owner is the manifest-backed retirement flow, entered by update cleanup; supplied exact-head installed-package evidence covers migration, cleanup, Gateway history, restore/reimport, and a 150,000-record case, while source tests cover fault and ownership boundaries.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit. Replaced prior rating: 🦐 gold shrimp.
  • remove rating: 🦐 gold shrimp: Current PR rating is rating: 🐚 platinum hermit, so this older rating label is no longer current.

Label justifications:

  • P2: This is a bounded migration and recovery feature requiring normal maintainer review, not emergency incident handling.
  • merge-risk: 🚨 compatibility: The new documented CLI command changes the supported lifecycle of legacy migration artifacts for existing installations.
  • merge-risk: 🚨 session-state: Retirement and restore behavior operates on session indexes, transcripts, and their persisted recovery records.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit. Replaced prior rating: 🦐 gold shrimp.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (linked_artifact): The changed production owner is the manifest-backed retirement flow, entered by update cleanup; supplied exact-head installed-package evidence covers migration, cleanup, Gateway history, restore/reimport, and a 150,000-record case, while source tests cover fault and ownership boundaries.
  • proof: sufficient: Contributor real behavior proof is sufficient. The changed production owner is the manifest-backed retirement flow, entered by update cleanup; supplied exact-head installed-package evidence covers migration, cleanup, Gateway history, restore/reimport, and a 150,000-record case, while source tests cover fault and ownership boundaries.

Evidence

What I checked:

  • Introduced command and ownership boundary: The new leaf command routes cleanup through the dedicated owner and supports only dry-run, JSON, and explicit acknowledgement; unsupported inherited update flags are rejected before work starts. (src/cli/update-cli.ts:203, 2bac19228122)
  • Retirement safety: The retirement owner requires state-write admission and a maintenance lock, rechecks preview and manifest state after consent, verifies artifact identity and destination ownership, records durable disposal intent, and only then unlinks claims. (src/commands/doctor-session-sqlite-retirement.ts:71, 54a2f09df0bb)
  • Dependency and unknown-data protection: Inventory trusts only configured, state-owned migration targets; unmanifested, unreadable, incomplete, aliased, changed, and transitively dependent artifacts are protected or blocked rather than selected. (src/commands/doctor-session-sqlite-recovery-inventory.ts:149, 2bac19228122)
  • Recovery and regression coverage: Focused owner tests cover restore then reimport then retirement, peer-maintenance exclusion, interrupted shared-manifest disposal, protected consumed archives, changed artifacts, and shared-store ownership. (src/commands/doctor-session-sqlite.test.ts:701, 2bac19228122)
  • Public contract alignment: The CLI documentation accurately describes confirmation, offline ownership, protected artifact classes, retry behavior, and the loss of rollback after retirement. Public docs: docs/cli/update.md. (docs/cli/update.md:175, 2bac19228122)
  • Current-main check: The fetched main revision has the update CLI but no cleanup route, so it does not already provide the requested capability. (src/cli/update-cli.ts:125, 9323eae1deab)

Likely related people:

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

  • Record explicit maintainer acceptance of the irreversible cleanup and recovery-retention contract before merge.

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 (6 earlier review cycles)
  • reviewed 2026-08-31T06:31:31.776Z sha bd6aeb3 :: needs maintainer review before merge. :: none
  • reviewed 2026-08-31T09:57:53.968Z sha 7f33259c6961af733f70492f35c488a32d503588 :: needs maintainer review before merge. :: none
  • reviewed 2026-08-31T12:11:50.930Z sha 82ab32b :: needs maintainer review before merge. :: none
  • reviewed 2026-08-31T12:19:19.367Z sha 82ab32b :: found issues before merge. :: [P2] Preserve cleanup’s passive startup for rejected parent flags
  • reviewed 2026-08-31T12:51:42.927Z sha 82ab32b :: found issues before merge. :: [P2] Preserve passive startup for rejected cleanup parent flags | [P2] Do not persist foreign paths as archive dependencies
  • reviewed 2026-08-31T13:44:30.725Z sha 2bac192 :: needs maintainer review before merge. :: none

@steipete

steipete commented Aug 31, 2026 •

Copy link
Copy Markdown
Contributor Author

Merged as 78d2d914db75. Native reconciliation confirmed the landed tree against exact prepared/tested head 2bac192281227838d90d243b16ee6c582852af66. The initial request hit GitHub quota; one explicitly authorized native recovery request succeeded, followed by read-only receipt reconciliation after main moved. No bypass was used. CI run 33397679218, attempt 1, completed successfully with the required aggregate and both Windows jobs green.

Exact-head installed proof passed actual npm [email protected] → candidate updates for small and 150,000-record histories. Both cover migration/original checks before standalone Doctor, real Gateway history/appends, online preview/refused cleanup, custom restore/reimport, offline cleanup, retry/recreated paths, intentional-disposal reporting, restart, and old/new history. A separate fresh candidate installation passed all 37 shared-owner CLI commands. All 69 changed source files matched. Candidate SHA-256: 1461e375411c2a5b46a9b7ffc08d014371948a8a6d8c650e41e70ccd23d283b7.

Blacksmith Testbox tbx_01m1c0qk6nkwv8vvhekvz2wze8, environment provenance: the 16m34s command returned exit 0 with complete structured evidence; the lease is stopped. The large case preserved its 646,837,441-byte original until consented cleanup, which removed 646,841,082 logical bytes across eight files in 3.501 seconds. Protected originals and SQLite history remained intact. This is real package/CLI/Gateway/storage proof with synthetic external services, not authenticated provider inference or a full-state backup claim.

The passive-startup and foreign-root recovery findings have failing-before/passing-after proof. Raw startup now performs zero config/proxy/PATH/dispatcher setup before rejecting unsupported parent options. Interrupted relocated-state import records local dependencies and restores both exact originals with a readable manifest. Local runs passed 190 owner cases, 361 CLI boundary cases, 411 planner/routing cases and eight built-CLI state cases; counts overlap. The following final post-rebase commands passed:

node scripts/run-vitest.mjs src/commands/doctor-session-sqlite.test.ts src/cli/run-main.profile-env.test.ts src/cli/update-cli.option-collisions.test.ts src/agents/embedded-agent-runner/run/attempt-system-prompt.test.ts src/agents/embedded-agent-runner/run/attempt-setup.test.ts test/scripts/ci-node-test-plan.test.ts

370 tests across six files/four configurations passed.

node scripts/check-changed.mjs
pnpm build

Changed checks and the full build passed, with zero ineffective-dynamic-import diagnostics. Fresh incremental Codex review is scoped-clean at P0; earlier feature/CI/roster reviews were scoped-clean at P0/P1. All six commits rebased patch-identically. No actionable code findings remain in the latest ClawSweeper review, and its exact-head installed-proof and required-CI Rank-up moves are both satisfied.

Prior CI failures and repairs remain documented in the PR body. The original Anthropic Windows case passed on this head in 87.090 seconds, along with all four source/compiled scoped/prepared flows. The separate canonical packaged-provider repair is already on main; no discarded provider patch or ordinary restore change was copied here.

The operator explicitly approved irreversible retirement and temporary import-spool metadata. No new configuration setting or persistent SQLite schema/version was added; the flagged DDL is disposable staging only. Docs cover commands, consent, rollback loss, protected data, offline ownership, relocated-state recovery, large-log costs, and absence of automatic full-state backups. Native Windows installed-package/native-scale proof, authenticated inference and peak-disk measurements remain unclaimed. The exclusive ordinary restore-publication follow-up stays separate.

@steipete
steipete force-pushed the steipete/updater-backup-behavior-0ba004 branch from bd6aeb3 to fbe4960 Compare August 31, 2026 09:34
@steipete
steipete marked this pull request as ready for review August 31, 2026 09:37
@steipete
steipete force-pushed the steipete/updater-backup-behavior-0ba004 branch from fbe4960 to 7f33259 Compare August 31, 2026 09:46
@clawsweeper clawsweeper Bot added merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. merge-risk: 🚨 session-state 🚨 May lose, corrupt, stale, or mis-associate session, agent, or context state. P2 Normal backlog priority with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Aug 31, 2026
@steipete
steipete force-pushed the steipete/updater-backup-behavior-0ba004 branch from 7f33259 to 82ab32b Compare August 31, 2026 12:03
@clawsweeper

clawsweeper Bot commented Aug 31, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@clawsweeper clawsweeper Bot added status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. and removed status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Aug 31, 2026
Add explicit, profile-aware recovery cleanup with read-only preview, offline consent, durable disposal receipts, and conservative protection of unique history. Preserve one untouched legacy transcript through bounded import repair and retain recovery mappings until their payloads are retired.

Document rollback loss, portable-backup exclusions, and migration resource requirements.

Refs #133805
Prepare built CLI artifacts before test workers, register the exact inert survivor catalog, and give extracted update fixtures their complete scenario context. Preserve strict directory synchronization through its canonical owner. Verify both retained-in-place and archived unindexed history without weakening original identity or history checks.
@steipete
steipete force-pushed the steipete/updater-backup-behavior-0ba004 branch from 82ab32b to 2bac192 Compare August 31, 2026 13:34
@clawsweeper

clawsweeper Bot commented Aug 31, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@clawsweeper clawsweeper Bot added status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Aug 31, 2026
@steipete
steipete merged commit 78d2d91 into main Aug 31, 2026
254 of 255 checks passed
@steipete
steipete deleted the steipete/updater-backup-behavior-0ba004 branch August 31, 2026 15:15
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 1, 2026
…3864)

* feat(update): clean up retained migration recovery files

Add explicit, profile-aware recovery cleanup with read-only preview, offline consent, durable disposal receipts, and conservative protection of unique history. Preserve one untouched legacy transcript through bounded import repair and retain recovery mappings until their payloads are retired.

Document rollback loss, portable-backup exclusions, and migration resource requirements.

Refs openclaw#133805

* test(update): complete recovery cleanup validation contracts

Prepare built CLI artifacts before test workers, register the exact inert survivor catalog, and give extracted update fixtures their complete scenario context. Preserve strict directory synchronization through its canonical owner. Verify both retained-in-place and archived unindexed history without weakening original identity or history checks.

* test(update): adapt recovery roster through baseline recipe

* fix(doctor): keep recovery dependencies in the local session boundary

* fix(cli): preserve passive cleanup startup through parent options

* test(update): reflect CLI runtime preparation in the CI plan
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 docker Docker and sandbox tooling docs Improvements or additions to documentation maintainer Maintainer-authored PR merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. merge-risk: 🚨 session-state 🚨 May lose, corrupt, stale, or mis-associate session, agent, or context state. P2 Normal backlog priority with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. scripts Repository scripts size: XL status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature]: Retire update recovery originals after verifying an upgrade

1 participant