Skip to content

fix(update): inspect retained recovery sets safely - #156366

Merged
fuller-stack-dev merged 4 commits into
mainfrom
openclaw/update-recovery-manifest-20260923
Sep 23, 2026
Merged

fuller-stack-dev merged 4 commits into
mainfrom
openclaw/update-recovery-manifest-20260923

Conversation

@fuller-stack-dev

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

Copy link
Copy Markdown
Member

Related: #145169, #144005. Uses the landed receipt schema from #156298.

What Problem This Solves

openclaw update status needs to show retained recovery sets, including sets captured by an older installation, without changing or restoring them. Recovery manifests also need validation before their inventory and recorded outcomes can be trusted.

User Impact

Adds recovery-set JSON/text status: unresolved, ambiguous, stale, or forward-resolved, with an inspection or repair next step. Malformed or contradictory evidence is reported separately without hiding ordinary update availability. Inspection does not write captures or receipts. Ordinary backup archives retain their existing contract; no migration or operator action is required.

Why This Change Was Made

The registered status command now uses the validated recovery manifest parser through the original read-only inspection flow. It checks configuration/database inventories, manifest location and identity, terminal outcomes, and forward-generation receipts. Durable identity is checked even when a terminal marker exists. The extracted shared driver validator is included in native wrapper materialization. Existing Doctor archives and canary rehearsal directories are recognized in the shared capture root without hiding incomplete captures or bypassing any present recovery manifest.

This is extracted from Jason’s #145169 (f6feb6b75d08785dc61da204fa9b0d4ea581693c), preserving Peter Steinberger’s capture design from #144005 (afaf382b8bb32d49a6bc6ecfeb845c63e6496341). Neither original PR is closed. Capture-before-mutation, durable capture publication, complete recovery, and preservation of newer writes remain distinct original-program work; this PR does not claim to deliver them.

Evidence

  • 24 real-filesystem status/manifest cases pass, including JSON/text output, malformed and incomplete captures, symlink/hardlink refusal, identity mismatch with/without terminal markers, ambiguous outcomes, and forward-generation binding. All SQLite opens are prohibited. Final runner wall: 75.45s; CLI shard: 60.88s, dominated by cold preparation.
  • All 14 unchanged parser cases pass. Original filesystem import-boundary correction and its 23 passing boundary cases remain unchanged.
  • All 58 existing status cases pass with task-private state and lifecycle-coordinator paths checked before every SQLite open. Suite wall: 158.53s. Auxiliary fixture isolation was corrected without changing tests, assertions, retries, or timeouts.
  • Full touched-test-file audit covers all 412 consumer-test lines and 343 parser-test lines, including imports, helpers, fixtures, hooks, and assertions. No valid distinct cases were removed; existing tables were extended for terminal-marker identity and shared-root artifact regressions, including wrong artifact types and canary-named manifests.
  • Regression controls fail before each correction: terminal marker hid the mismatched ledger hash; existing extracted-wrapper test failed to resolve the omitted driver schema. Both Doctor-archive and canary-directory regressions also fail before the classification fix; the privacy-marker control passes. Supplier controls demonstrate missing JSON/text recovery status on the exact status preimage.
  • Full repository pnpm deadcode:full passes: both parser exports now have a real reachable production consumer. No dummy references or unused-export exemptions.
  • Formatting and affected lint pass. Independent review covered the complete corrected eight-file working candidate and both full test files. Its only finding was the old index-layer classification defect; staging the exact reviewed working bytes resolved it. No additional P0–P2 defects were identified.
  • Local changed checks pass 16 guard/format lanes, then the existing compiler boundary rejects the supported global pnpm-store layout. No guard bypass or duplicate dependency graph: receiving-head hosted CI, which uses its normal isolated layout, remains required before landing.
  • Previous-head CI exposed install-smoke workflow-identity and isolated lint-fixture json5 defects; the exact fixes are already landed in test: finish Gateway cleanup and repair CI fixtures #156136 (ceb109668b4396181205e330a2b466c132fede89). They are not repaired or weakened here. Exact-head CI 35855042317 is successful. Published ClawSweeper revision 3 reviews this exact head and finds both prior defects resolved with no new actionable findings. No native/full-recovery runtime proof is claimed by this read-only inspection leaf.

Compatibility review disposition

The remaining generated “data-model compatibility proof” checkbox in the completed review is addressed by the existing source and passing compatibility coverage, not by a schema waiver:

  • backup-verify-manifest.update-recovery.test.ts:41 covers all v2 generation forms; line 52 retains legacy v1 readability without invented metadata and rejects mixed-version contracts. Line 331 verifies ordinary archives retain their separate parser contract. All 14 parser cases pass; their reviewed source is unchanged.
  • update-run-schema.ts only imports the extracted driver validator. Its host, PID, and start-identity constraints are identical to the prior inline validator. Landed fix(update): preserve recovery receipts across progress updates #156298 receipt definitions and persisted records are unchanged.
  • This PR adds a read-only parser/status consumer, not a capture writer, database migration, restore, or retirement path. Existing ordinary archive parsing remains unchanged apart from its canonical isRecord import. The exact-head review independently confirms no stored-data contract changes. No migration or upgrade action is needed.

Native review/merge admission and all enforced GitHub checks remain required. This disposition does not claim full-recovery runtime acceptance or change the manifest payload-digest meaning.

Extract the recovery manifest parser prerequisite from #145169; retain the original recovery and generation work there. Preserve the existing ordinary archive and update-run driver contracts. Capture design derives from Peter Steinberger’s #144005.
@clawsweeper

clawsweeper Bot commented Sep 23, 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.

@fuller-stack-dev
fuller-stack-dev marked this pull request as ready for review September 23, 2026 08:42
@fuller-stack-dev fuller-stack-dev self-assigned this Sep 23, 2026
@openclaw-barnacle openclaw-barnacle Bot added commands Command implementations size: L labels Sep 23, 2026
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 automation 🚨 May affect CI, automerge, proof capture, label sync, or maintainer automation. 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. labels Sep 23, 2026
@clawsweeper

clawsweeper Bot commented Sep 23, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: blocked before merge. Reviewed September 23, 2026, 8:06 AM ET / 12:06 UTC (Revision 3).

ClawSweeper review

What this changes

Adds validated, read-only recovery-set reporting to update status, including retained manifests, recorded outcomes, and inspection guidance.

Merge readiness

⛔ Blocked before merge - 1 item remains

Both prior blockers are resolved, and no new actionable defects were found at the pinned head. The work remains useful and absent from fetched main; keep it open for normal landing.

Priority: P2
Reviewed head: 8d21ae0f6248c99f8115dff781f39825a03d6653

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused inspection change with both prior findings resolved, meaningful boundary coverage, and successful exact-head CI.
Proof confidence 🌊 off-meta tidepool Not applicable: The MEMBER-authored PR is exempt from external-contributor proof requirements, and this read-only consumer does not trigger authority-chain proof. Filesystem consumer tests mock the ledger and do not establish full recovery behavior; no stored-data contract changes are introduced.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: The MEMBER-authored PR is exempt from external-contributor proof requirements, and this read-only consumer does not trigger authority-chain proof. Filesystem consumer tests mock the ledger and do not establish full recovery behavior; no stored-data contract changes are introduced.
Evidence reviewed 8 items Previous shared-root finding resolved: The exact-head patch recognizes regular Doctor archives and canary directories without manifests, while retaining validation for present manifests and refusing incorrectly typed artifacts. The complete consumer test file covers these cases and preservation of incomplete-capture refusal.
Wrapper finding resolved without changing driver semantics: The wrapper inventory includes the extracted driver schema. Its host, PID, and start-identity validators match the original inline schema; ordinary archive parsing is otherwise unchanged.
Read-only production boundary: The status consumer projects recovery classification and catches inspection errors separately from ordinary availability. The new inspection module performs filesystem reads and asynchronous ledger lookups, with no capture, restore, retirement, or receipt writer. Existing receipt definitions are consumed unchanged, so this patch introduces no stored-data migration or authority-bearing side effect.
Findings None None.
Security None None.

How this fits together

Update status combines installation information with retained update history. This change reads recovery manifests and ledger receipts to report recovery status without restoring or modifying captured data.

flowchart TD
  A[Update status command] --> B[Inspect capture directory]
  B --> C[Recognize ordinary artifacts]
  B --> D[Validate recovery manifests]
  E[Update ledger receipts] --> F[Classify recovery status]
  D --> F
  F --> G[JSON and terminal guidance]
Loading

Before merge

  • Add data-model compatibility proof - Confirm migration or upgrade compatibility proof before merge.
Agent review details

Security

None.

PR surface

Source +772, Tests +755, Other +1. Total +1528 across 8 files.

View PR surface stats
Area Files Added Removed Net
Source 5 779 7 +772
Tests 2 755 0 +755
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 1 1 0 +1
Total 8 1535 7 +1528

Review metrics

Metric Value Why it matters
Production versus test growth Production +772 net lines; tests +755; tooling +1 The stated production growth provides manifest validation and independent read-only inspection; the added tests cover parser and status-consumer contracts.

Stored data model

Persistent data-model change detected: database schema: src/commands/backup-verify-manifest.ts. Confirm migration or upgrade compatibility proof before merge.

Technical review

Best possible solution:

Keep recovery inspection within update status, preserve existing artifacts and archive contracts, and leave capture and restoration implementation with their separate owners.

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

Not applicable as a new inspection capability. Source comparison confirms fetched main lacks the reporting path; the previous patch defects have targeted regressions, which were inspected but not rerun.

Is this the best way to solve the issue?

Yes. The change extends the existing status command, reuses receipt and filesystem owners, and preserves ordinary update availability when recovery inspection fails.

AGENTS.md: found and applied where relevant.

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

Labels

Label changes:

  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: The MEMBER-authored PR is exempt from external-contributor proof requirements, and this read-only consumer does not trigger authority-chain proof. Filesystem consumer tests mock the ledger and do not establish full recovery behavior; no stored-data contract changes are introduced.
  • remove rating: 🦐 gold shrimp: Current PR rating is rating: 🐚 platinum hermit, so this older rating label is no longer current.
  • remove status: ⏳ waiting on author: Current PR status label is status: 👀 ready for maintainer look.

Label justifications:

  • P2: This improves recovery diagnostics with a bounded, read-only operator-facing change.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: The MEMBER-authored PR is exempt from external-contributor proof requirements, and this read-only consumer does not trigger authority-chain proof. Filesystem consumer tests mock the ledger and do not establish full recovery behavior; no stored-data contract changes are introduced.

Evidence

What I checked:

  • Previous shared-root finding resolved: The exact-head patch recognizes regular Doctor archives and canary directories without manifests, while retaining validation for present manifests and refusing incorrectly typed artifacts. The complete consumer test file covers these cases and preservation of incomplete-capture refusal. (src/infra/update-recovery-backup-status.ts:395, 8d21ae0f6248)
  • Wrapper finding resolved without changing driver semantics: The wrapper inventory includes the extracted driver schema. Its host, PID, and start-identity validators match the original inline schema; ordinary archive parsing is otherwise unchanged. (scripts/pr-lib/wrapper-components.txt:805, 8d21ae0f6248)
  • Read-only production boundary: The status consumer projects recovery classification and catches inspection errors separately from ordinary availability. The new inspection module performs filesystem reads and asynchronous ledger lookups, with no capture, restore, retirement, or receipt writer. Existing receipt definitions are consumed unchanged, so this patch introduces no stored-data migration or authority-bearing side effect. (src/cli/update-cli/status.ts:42, 8d21ae0f6248)
  • Focused validation and proof scope: Read both complete added test files. They exercise real filesystem manifests through the status consumer, with mocked ledger and surrounding services, plus parser compatibility and invalid-inventory cases. The captured body reports 24 consumer, 14 parser, and 58 existing status passes; these are supplemental boundary tests, not full recovery runtime proof. No tests were executed during this read-only review. (src/cli/update-cli/status.recovery.test.ts:14, 8d21ae0f6248)
  • Exact-head CI verified: GitHub reports the requested CI run completed successfully for the exact reviewed head: https://github.com/openclaw/openclaw/actions/runs/35855042317. This verifies CI identity and outcome, not full native recovery coverage. (8d21ae0f6248)
  • Still necessary on main: Fetched main's status command has no recovery-set consumer, and its tree lacks the new inspection module. The module is also absent from v2026.9.5. The merged receipt prerequisite does not implement this reporting capability. (src/cli/update-cli/status.ts:106, 3f7b01867bba)

Likely related people:

  • unknown: The claimed source-line change could not be verified from bounded local history. (role: source history unknown; confidence: low)
  • RomneyDa: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

Rating scale

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

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

Workflow

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

History

Review history (2 earlier review cycles)
  • reviewed 2026-09-23T09:51:29.568Z sha 1844777 :: blocked before merge. :: [P2] [P2] Include the extracted driver schema in the wrapper inventory
  • reviewed 2026-09-23T11:20:06.553Z sha ef84b26 :: blocked before merge. :: [P2] [P2] Distinguish existing artifacts from recovery-set directories

Integrate the read-only status consumer extracted from original #145169 source f6feb6b, retaining Peter Steinberger capture design provenance from #144005 (afaf382). Compose landed receipt schema #156298, retain the corrected parser import, validate durable identity even with terminal outcomes, and include the shared driver schema in native wrapper materialization.
@fuller-stack-dev fuller-stack-dev changed the title fix(update): validate recovery manifest inventories fix(update): inspect retained recovery sets safely Sep 23, 2026
@fuller-stack-dev

Copy link
Copy Markdown
Member Author

@clawsweeper re-review

Current head: ef84b26ab06e19f8d39495eb24523143489c6fa6.

The real registered update status consumer is now integrated with landed #156298 receipts; full repository deadcode:full passes. The driver schema is included in the wrapper inventory: the existing extracted-context test fails before the one-line fix and passes afterward, alongside all three source-closure cases (4 selected passes, 15.71s runner wall). Independent review also found and verified a terminal-marker/durable-identity correction; all 19 consumer, 14 parser, and 58 unchanged status cases pass with explicit private database/coordinator isolation. Both complete touched test files were audited.

This remains read-only inspection with unchanged ordinary archive/ledger validation and no new persisted writer or migration. Required receiving-head CI is running; the original capture/full-recovery/newer-write goals remain with their original PRs. Please reassess the concrete findings and current candidate, without initiating repair or automerge.

@clawsweeper

clawsweeper Bot commented Sep 23, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot removed the merge-risk: 🚨 automation 🚨 May affect CI, automerge, proof capture, label sync, or maintainer automation. label Sep 23, 2026
@openclaw-barnacle openclaw-barnacle Bot added cli CLI command changes scripts Repository scripts size: XL and removed size: L labels Sep 23, 2026
@fuller-stack-dev

Copy link
Copy Markdown
Member Author

@clawsweeper re-review

Current head: 8d21ae0f6248c99f8115dff781f39825a03d6653.

Resolved the exact shared-root finding: regular Doctor archives and canary rehearsal directories no longer suppress recovery-set reporting. Classification checks file type, continues validating any present manifest under a canary-like name, and still rejects incomplete captures. Both reported cases fail on the previous head; the privacy-marker control passes. All 24 real-status consumer cases now pass with every SQLite open prohibited (75.45s runner; 60.88s shard). Whole 412-line consumer and unchanged 343-line parser test audits are complete. Independent review assessed the full corrected candidate and found no additional P0-P2 defects after the reviewed working bytes replaced the old index layer.

The data-model warning is not applicable: this remains a read-only parser/inspection consumer, adds no persisted writer or schema migration, and uses already-landed #156298 receipt definitions unchanged. Existing v1/v2, ordinary archive and driver-validator coverage remains intact. No full recovery/runtime proof is claimed.

Previous-head CI failures in install-smoke identity, lint-fixture json5, and changelog-helper fixtures match exact fixes already landed in #156136 (ceb109668b4396181205e330a2b466c132fede89). New receiving-head CI remains required. Please review this correction without initiating repair or automerge.

@clawsweeper

clawsweeper Bot commented Sep 23, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@fuller-stack-dev

Copy link
Copy Markdown
Member Author

@clawsweeper re-review

Bounded recovery of an observed publication failure, same unchanged head 8d21ae0f6248c99f8115dff781f39825a03d6653.

Exact review run35855139770 completed and its artifact binds this head with review_status complete and no requested next step. The deterministic publication stage returned skipped_runtime_budget at 11:38:07Z: GitHub repository_actions rate limit, fallback reset11:39:07Z. The public review still points to ef84 despite the completed artifact. Required current-head CI35855042317 is now SUCCESS.

Please complete a fresh exact-head review/publication through the normal queue and freshness guards. This is one retry after a diagnosed transient publication failure, not a request for repair, autofix, rebase, automerge, or relaxed gates. The classification correction and all24 consumer cases remain unchanged; no duplicate supplier work is requested.

@clawsweeper

clawsweeper Bot commented Sep 23, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot removed the rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. label Sep 23, 2026
@clawsweeper clawsweeper Bot added rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Sep 23, 2026
@fuller-stack-dev
fuller-stack-dev merged commit c7ee253 into main Sep 23, 2026
239 of 240 checks passed
@fuller-stack-dev
fuller-stack-dev deleted the openclaw/update-recovery-manifest-20260923 branch September 23, 2026 12:12
@fuller-stack-dev

Copy link
Copy Markdown
Member Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 24, 2026
* fix(update): validate recovery manifest inventories

Extract the recovery manifest parser prerequisite from openclaw#145169; retain the original recovery and generation work there. Preserve the existing ordinary archive and update-run driver contracts. Capture design derives from Peter Steinberger’s openclaw#144005.

* fix(update): retain the filesystem policy import boundary

* fix(update): distinguish retained recovery artifacts
@roboclaw-bot roboclaw-bot mentioned this pull request Sep 24, 2026
2 of 8 tasks
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 P2 Normal backlog priority with limited blast radius. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. 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.

1 participant