Skip to content

fix(update): isolate unreadable recovery captures in status - #188044

Merged
vincentkoc merged 1 commit into
mainfrom
fix/update-recovery-inventory-errors-20261030
Oct 30, 2026
Merged

vincentkoc merged 1 commit into
mainfrom
fix/update-recovery-inventory-errors-20261030

Conversation

@vincentkoc

@vincentkoc vincentkoc commented Oct 30, 2026 •

Copy link
Copy Markdown
Member

What Problem This Solves

One damaged marked recovery capture aborted the complete inventory, hiding healthy neighboring captures and their recovery guidance.

User Impact

Status reports a damaged capture as directory-only unreadable evidence while retaining verified neighbors. Unreadable evidence still competes conservatively with failed captures. Root enumeration failures remain global. This read-only projection never grants restore or cleanup authority.

Why This Change Was Made

Keep capture validation at its existing reader and preserve one classification flow. Strict manifest, link, digest, generation and forward-receipt checks stay intact; no fabricated run identity is attached to rejected evidence.

Evidence

  • Ten new or strengthened real-filesystem cases fail against base production. The candidate passes all 21 recovery-status tests and core typechecking.
  • Faults cover foreign state, wrong directory, terminal binding, manifest links, malformed text, canary evidence, durable identity, stale forward receipts and incomplete generations. Healthy neighbors and retained bytes remain visible and unchanged.
  • A valid failed capture remains ambiguous beside unreadable marked evidence; a capture-root enumeration failure remains a global error.
  • Independent owner-boundary review found no consequential issue. No live installation or recovery was performed.

Production delta: +13 lines for per-capture diagnostic outcomes; tests: +48 lines with a dedicated allocation.

Final commit verified in its native PR checkout: all 21 recovery-status tests passed (33.07s); core typechecking passed. Formatting and diff checks passed. Release-note context is recorded here; CHANGELOG.md remains release-owned.

Review disposition: the exact-head ClawSweeper review has no findings, before-merge items or rank-up moves. A shipped-CLI trace with damaged and healthy neighboring captures remains a named follow-up; this PR claims the real-filesystem, in-process status harness only.

@vincentkoc vincentkoc self-assigned this Oct 30, 2026
@clawsweeper

clawsweeper Bot commented Oct 30, 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 cli CLI command changes size: M labels Oct 30, 2026
@vincentkoc
vincentkoc marked this pull request as ready for review October 30, 2026 02:32
@vincentkoc

Copy link
Copy Markdown
Member Author

@clawsweeper review

@clawsweeper

clawsweeper Bot commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Oct 30, 2026
@vincentkoc
vincentkoc enabled auto-merge (squash) October 30, 2026 02:35
@clawsweeper

clawsweeper Bot commented Oct 30, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

This PR reports damaged recovery captures individually while keeping verified neighboring captures visible.

Example: A marked capture contains malformed manifest text { beside a valid committed capture.

  • Before: Status reports recoverySetsError and omits both captures.
  • After: Status lists the damaged directory as unreadable and the committed capture as stale.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) A focused, source-supported repair with meaningful filesystem regressions and no concrete findings; supplied behavioral evidence remains limited to an in-process harness.
Proof confidence 🦐 gold shrimp (3/6) This maintainer-authored PR is outside the ordinary contributor proof gate; its reported validation exercises recovery reading, classification, and status projection with real files in-process, without a shipped CLI run or live recovery.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: One damaged recovery capture hides healthy captures and their recovery guidance.
Reason: The maintainer-authored direction restores useful diagnostics without adding configuration, changing stored formats, or relaxing recovery validation.

Merge readiness

✅ Ready for maintainer review

Keep open: this maintainer-authored PR fixes a current recovery-inventory failure through the existing owners, with no actionable introduced defect found.

Priority: P2
Reviewed head: 42601ef30917e97dd645ee3656743ce6d1b72058

Before merge

None.

Findings

None.

Tests

  • Missing end-to-end proof: The supplied evidence does not exercise the shipped CLI with damaged and healthy neighboring captures; it exercises the status command in a filesystem harness with mocked history and runtime output.
Agent review details

How this fits together

The recovery reader validates retained capture files and recorded outcomes; the status classifier combines that evidence with update history and projects JSON or terminal guidance.

flowchart TD
  A[Retained capture directories] --> B[Recovery reader]
  B --> C[Validated captures]
  B --> D[Unreadable directory evidence]
  C --> E[Status classification]
  D --> E
  F[Recorded update outcomes] --> E
  E --> G[JSON and terminal guidance]
Loading

Technical review

Best possible solution:

Keep per-capture failures in the existing reader and classifier, preserving strict validation, healthy neighbors, and conservative recovery guidance.

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

Current-main source shows malformed marked manifests aborting inventory, and the PR reports matching base failures in its filesystem regression cases; this review executed no reproduction.

Is this the best way to solve the issue?

The patch is a focused fix at the existing inspection boundary: failed validation produces unverified evidence rather than suppressing unrelated results, and every changed hunk serves that invariant.

AGENTS.md: found and applied where relevant.

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

Provenance checked

  • Capture discovery and strict manifest validation keeps the original intent (e47d0ce: Preserve original update state and validate capture identity; later marker-based discovery excluded unrelated entries without accepting malformed manifests.)
  • Forward-receipt validation and status projection keeps the original intent (c7ee253: Inspect retained recovery evidence without restoring or modifying it; malformed evidence must remain distinct from trusted recovery references.)
  • Classification before ambiguity counting keeps the original intent (0d85985: Completed captures must not obscure a failed capture, while unreadable and standalone evidence remains conservative.)

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

Likely related people:

  • Peter Steinberger: Raw commit 0f1de69 adds src/infra/update-recovery-backup-reader.ts:553 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 0f1de690fa59; files: src/infra/update-recovery-backup-reader.ts)
  • Jason (Json): Raw commit c7ee253 adds src/infra/update-recovery-backup-status.ts:352 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: c7ee253e2c4c; files: src/infra/update-recovery-backup-status.ts)
  • Vincent Koc: Raw commit 0d85985 adds src/infra/update-recovery-backup-status.ts:97 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 0d85985e975d; files: src/infra/update-recovery-backup-status.ts)

PR surface

Source +13, Tests +48, Other +2. Total +63 across 5 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 3 91 78 +13
Tests 1 56 8 +48
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 1 2 0 +2
Total 5 149 86 +63

Labels

Label changes:

  • add P2: A damaged retained capture hides useful recovery inventory, while ordinary update availability and stored capture bytes remain intact.
  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Label justifications:

  • P2: A damaged retained capture hides useful recovery inventory, while ordinary update availability and stored capture bytes remain intact.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Rating scale

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

Workflow

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

Reviewed October 29, 2026, 10:36 PM ET / October 30, 2026, 02:36 UTC.

@vincentkoc
vincentkoc merged commit ddd5383 into main Oct 30, 2026
223 of 224 checks passed
@vincentkoc
vincentkoc deleted the fix/update-recovery-inventory-errors-20261030 branch October 30, 2026 02:57
@vincentkoc

Copy link
Copy Markdown
Member Author

Merged via squash auto-merge.

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

Labels

clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. cli CLI command changes size: M

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant