Repository navigation
refactor(update): reuse one recovery ledger observation - #188081
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
@clawsweeper review |
|
🦞👀 Re-review progress:
|
|
Codex review: needs maintainer review before merge. What this changesThis PR carries one selected ledger observation through recovery-capture validation and status classification. Example: Run openclaw update status --json with a retained PostgreSQL capture and malformed configuration.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep open: this maintainer-authored PR fixes inconsistent recovery-status ledger observations with no actionable findings; exact-head PostgreSQL checks remain in progress. Priority: P2 Before mergeNone. FindingsNone. Tests
Agent review detailsHow this fits togetherUpdate status combines retained capture manifests with update-run history to produce recovery guidance; this read-only projection does not authorize restoration or cleanup. flowchart TD
A[Update status command] --> B[Selected ledger reader]
A --> C[Capture inventory]
B --> C
C --> D[Manifest and receipt validation]
D --> E[Recovery classification]
E --> F[JSON or terminal guidance]
Technical reviewBest possible solution: Carry the selected ledger result through the existing reader and classifier while retaining filesystem and receipt validation. Do we have a high-confidence way to reproduce the issue? Current-main source shows the selected reader being bypassed during inventory and receipt validation; supplied regressions cover absent, failed and unavailable observations, but no target code was executed during this review. Is this the best way to solve the issue? This is the smallest complete fix: reuse the existing observation, preserve known absence, and remove redundant reads and their obsolete classification catch. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 098188527dab. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource -3, Tests +36, Other +2. Total +35 across 5 files. Added test files: 0. View PR surface stats
LabelsLabel changes:
Label justifications:
Rating scale6/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. WorkflowClawSweeper edits this one comment on every review. Comment HistoryReview history (1 earlier review cycle)
Reviewed October 30, 2026, 12:33 AM ET / 04:33 UTC (Revision 2). |
|
@clawsweeper re-review Please review ccdf227. The follow-up changes only the PostgreSQL recovery-status expectation and its test allocation; production files are byte-identical to 91716af. The malformed-configuration case now requires directory-only unreadable evidence, checks healthy/broken/restored configuration, and verifies retained anchor and manifest bytes. Fresh CI run 41002164560 is still running its PostgreSQL and browser bootstrap jobs; those results are not claimed passing. Current-head scoped source review found no actionable issue. The shipped-CLI trace remains a documented follow-up. |
|
🦞👀 Re-review progress:
|
|
Merged via squash.
|
What Problem This Solves
Recovery status reread the same run ledger during capture admission, receipt validation and final classification. Later reads bypassed the caller-selected ledger reader, so one projection could combine different observations or silently query the default state store.
User Impact
Each sealed capture uses one ledger observation throughout status inspection. A missing run stays missing; an unavailable selected reader becomes directory-only unreadable evidence. Filesystem seals, generation bindings and forward-recovery receipts are still validated before they influence status. This projection does not grant restore or cleanup authority.
Why This Change Was Made
Carry the fact from the capture reader through the existing status owner. Remove repeated database reads and the obsolete catch around pure classification. There is no cache, alternate store, fallback reader, schema change or public configuration change.
Evidence
Production delta: -3 lines; tests: +36 lines with a dedicated allocation. Release-note context is recorded here; CHANGELOG.md remains release-owned.
Proof boundary: validation uses the real-filesystem status harness with a selected ledger reader. A shipped-CLI trace using a nondefault history engine remains a named follow-up; no live repair or recovery is claimed.
Initial CI caught a stale PostgreSQL sibling expectation for deliberately malformed configuration: it expected the old classification-time ambiguous result. The test-only follow-up now requires exact directory-only unreadable evidence containing the configuration refusal, exercises healthy/broken/restored configuration, and verifies retained anchor and manifest bytes. The accepted auto request was retired before updating the branch; the failed run is not waived or claimed green.