Repository navigation
refactor(backup): remove pre-payload allocation retries - #175983
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 removes retries when allocating empty backup scratch and documents rerunning the backup command after allocation failure. Example: Maintenance reclaims openclaw-backup-owned-Ab12Cd before lifetime admission during openclaw backup create.
Review scores
ProductKind: Refactor · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep this PR open: the maintainer-approved simplification preserves payload cleanup and ownership checks, and no actionable correctness defect was found. Priority: P3 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherArchive creation, offsite backup, and downloaded-backup verification or restore request private scratch from the shared allocation owner before writing payloads; the lifetime token protects admitted scratch until retirement and cleanup. flowchart TD
A[Backup CLI] --> B[Archive and remote callers]
B --> C[Private scratch allocation]
C --> D[Directory identity checks]
D --> E[SQLite lifetime admission]
E --> F[Backup payload operations]
F --> G[Retirement and cleanup]
Technical reviewBest possible solution: Keep allocation straight-line under the existing scratch owner, with explicit rerun recovery and the retained lifetime, identity, and payload-cleanup contracts. Do we have a high-confidence way to reproduce the issue? This is an intentional recovery-policy refactor rather than a new bug report; source and earlier deterministic tests establish the creator-versus-maintenance path without executing target code. Is this the best way to solve the issue? The diff is the smallest coherent implementation of the accepted policy: it removes the retry owner, preserves admission and cleanup protections, and updates the documented recovery. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 5631247395c8. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource -15, Tests -44, Docs +1. Total -58 across 3 files. Added test files: 0. View PR surface stats
Review metrics
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 Reviewed October 17, 2026, 9:58 PM ET / October 18, 2026, 01:58 UTC. |
|
Exact reviewed head: 0679b70. The final narrowed three-blob backup allocation change retains the completed full independent review scoped-clean P0-P2/0.97. Current formatting, type-aware lint and mandatory suppression guard passed; input-identical historical focused owner proof is identified as historical in the PR body. Local dependency/type and pinned-native gaps are not claimed as passes. Only imports/edges are removed, so no new cycle/component is introduced. Exact-head CI39087588674 succeeded. All filter=all check runs enumerated individually: no failed, cancelled or unfinished check. The selected runtime, PostgreSQL conformance, UI browser, type, lint, source-contract and architecture suites succeeded. All three commit statuses succeeded. Reviews and inline findings are empty; live head is unchanged and MERGEABLE. No rerun, repush, rebase or inherited-red exception. Using the coordinator-authorized Ending10 exact-SHA guarded squash fallback after twice-recorded native startup infrastructure failures. Native locks and shared dependencies remain untouched; this bypasses broken tooling, not CI/review gates. 15 net production lines and44 net test lines removed;1 documentation line added. Best-effort empty-allocation failures surface directly; payload durability and human-incident recovery stay intact. Phase E session-memory surfaces untouched. |
What Problem This Solves
Backup scratch allocation retries speculative maintenance interleavings before any backup payload exists, adding a second recovery policy around the existing lifetime owner.
User Impact
Normal backups, interrupted-backup cleanup and abandoned-payload reclamation remain unchanged. If allocation or lifetime admission fails, the original error surfaces and the operator can rerun the backup command; the CLI guide now states that best-effort policy.
Why This Change Was Made
Replace the three-attempt pre-payload loop and missing/native-open/path-mismatch retry classifier with straight-line allocation. Keep native busy/retired-owner refusal, non-owner failure cleanup, exact error identity, private directory/Root identity checks and the admitted lifetime unchanged. Payload copying begins only after this operation returns in the actual archive/offsite/download callers.
Fifteen net production lines removed (+21/-36),44net test lines removed, one net documentation line added. This is the backup area of the existing wide preservation family, not a new large-family or duplicate credit. Remove only synthetic retry-success variants; retain read-only pending-creator inspection, replacement/symlink preservation, native failure identity and cleanup, retired-token refusal/maintenance recovery, active transactions, real abandoned payload and failed-retirement cleanup contracts.
Best-effort tradeoffs accepted
Evidence
Release-note context: report initial backup scratch-allocation failures directly instead of retrying empty-directory admission; ordinary backup recovery stays intact.