Repository navigation
refactor(update): simplify manual capture and Doctor evidence - #178629
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex review: needs maintainer review before merge. What this changesThis PR simplifies manual recovery capture, optional Doctor scan receipts, and pnpm bootstrap handling. Example: A verified database image contains row 42 with value "retained", then the live database receives "later" before capture sealing.
Review scores
ProductKind: Refactor · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep open: this maintainer-authored PR makes a justified simplification, with no actionable correctness or security findings and passing exact-head gates. Priority: P2 Before mergeNone. FindingsNone. Tests
Agent review detailsHow this fits togetherThe update and Doctor infrastructure receives configuration, database inventories, and prior scan receipts, then produces private recovery images, advisory scan results, and a resolved build manager. flowchart TD
A[Update or Doctor command] --> B[Existing maintenance owners]
B --> C[Verified database acquisition]
C --> D[Manual recovery capture]
B --> E[Physical generation observations]
E --> F[Optional clean scan receipts]
A --> G[Pinned pnpm bootstrap]
Technical reviewBest possible solution: Keep verified manual images and advisory scan reuse in their existing owners while preserving independent acquisition, repair, and automatic rollback checks. Do we have a high-confidence way to reproduce the issue? Current-main source rejects manual sealing after a post-snapshot generation change, and the changed regression supplies that exact trigger; no target code was executed during this review. Is this the best way to solve the issue? The simplification uses the existing capture, generation, and bootstrap owners, removes the replaced paths, and documents the intentional manual-evidence and advisory-reuse tradeoffs. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 1bb67632b182. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource -101, Tests +2, Docs 0. Total -99 across 6 files. Added test files: 0. View PR surface stats
LabelsLabel changes:
Label justifications:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
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 Reviewed October 20, 2026, 2:38 PM ET / 18:38 UTC. |
|
Merged via squash.
|
What Problem This Solves
Update recovery and Doctor each carried extra bookkeeping around evidence that does not authorize a write. Manual original-state captures rejected already verified private images when the live database advanced afterward. Optional clean-history hints separately retained native admissions and checked write tokens despite the update owner already comparing full physical generations and file-family observations. The pnpm bootstrap also wrapped its successful result in an intermediate nullable envelope.
User Impact
Manual recovery evidence can seal a verified image even if the live database has since advanced. It remains manual evidence, not permission for automatic restoration. No user action or migration is required.
Why This Change Was Made
Trust the chosen manual SQLite images after safe acquisition and verification; preserve backup warnings and document that those bytes may precede later live writes. Remove the redundant final live-generation reread, not automatic rollback's generation guard. Keep a direct WAL/journal check at missing-database inventory admission so pre-existing recovery bytes still prevent sealing incomplete evidence.
Remove native admission/token retention from optional historical-scan hints. Keep full generation comparisons, file-family observations, canonical paths, bounded external parsing, complete scan identity and actual repair authority/current-row comparison. Return the resolved pnpm bootstrap directly, sharing failure cleanup and the existing string-record helper.
Net production LOC: 101 removed across three existing owners (27 manual capture, 62 optional hints, 12 bootstrap). This is a residue under the campaign's 100-line waiver, not a LARGE PR. No persisted shape, schema, config, protocol, dependency or public export change. Standalone session memory machinery is untouched.
Best-effort tradeoffs accepted
Evidence
Focused proof completed: all five selected capture cases, all 25 unchanged historical-scan reuse cases, three original-capture cases, 15 Doctor result/IPC cases, three PR-wrapper import-closure cases, 14 suppression cases, and all four unchanged WAL-generation restore transitions pass. The first full backup/package run also supplies 27 unaffected backup cases and ten bootstrap cases; counting overlapping replays once gives 106 distinct passing cases across eight files. Follow-up selectors deselect unrelated cases; no configured skip, timeout, retry or assertion was weakened.
The first run caught a stale worker count and showed that the removed broad reread also carried missing-database journal rejection. The final candidate tightens the count to one worker and checks the authoritative missing-resource inventory inside the existing error boundary. Both existing sidecar tests remain unchanged and pass, preserving their recovery bytes and contextual refusal.
Six-root targeted types, typed lint, formatting and whitespace pass. Runtime and Madge import cycles were zero; the later repair changes no imports. Fresh independent whole-candidate P0–P2 review is scoped-clean with no actionable findings. All local runtime proof used task-owned HOME/OpenClaw/XDG state, nice 10 and one worker. No red-control, latency, native-Windows, live Gateway or upgrade claim. Hosted CI on the exact pushed head is broad proof.