Repository navigation
fix: stop rejecting updates with enough snapshot space - #173284
fuller-stack-dev merged 7 commits into
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: needs maintainer review before merge. What this changesThis PR reduces SQLite snapshot reservations when the candidate worker supports single-generation copying. Example: Two SQLite databases with 8 MiB payloads and 100 MiB reported free space.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review This PR fixes a current snapshot-capacity overestimate and preserves conservative handling for older candidates and PostgreSQL; no actionable correctness or security finding remains. Priority: P2 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherThe updater inventories source databases and plugin files, checks destination capacity, and asks the staged candidate worker to create disposable rehearsal state before activation. flowchart TD
A[Update CLI] --> B[Initial capacity check]
B --> C[Candidate inventory worker]
C --> D[Engine and copy capability]
D --> E[Capacity admission]
E --> F[Private database and plugin copies]
F --> G[Candidate rehearsal]
Technical reviewBest possible solution: Use the candidate's copy capability to size SQLite rehearsal snapshots while retaining conservative admission for older workers and PostgreSQL exports. Do we have a high-confidence way to reproduce the issue? Current main's arithmetic deterministically rejects the supplied two-database, 100 MiB-free scenario; the maintainer reports matching before-and-after boundary results, and no target code was run during this review. Is this the best way to solve the issue? The change fixes the admission estimate at its existing owner, uses the canonical engine selector, and preserves older-worker behavior without adding configuration or changing source data. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against df6046b4b854. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource +24, Tests +205. Total +229 across 4 files. Added test files: 1. View PR surface stats
Review metrics
LabelsLabel changes: No label 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 (4 earlier review cycles)
Reviewed October 16, 2026, 9:07 PM ET / October 17, 2026, 01:07 UTC (Revision 5). |
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
@clawsweeper re-review Please review exact head The prerequisite #174463 is merged and incorporated. Package build and integrity both passed. Overall Package Acceptance remains red only because its separate installed-tree release-budget check counts 47,797 entries against 47,500. Canonical main reproduces that failure at ancestor No runtime deployment or proof waiver is requested. |
|
🦞👀 Re-review progress:
|
|
@clawsweeper re-review Final head The required published-driver upgrade now passed on this exact head in one 608-second attempt: published 2026.10.4 to d072524, finished update ledger, HTTP 200, running-version match, durable/incognito state checks, and service shutdown all passed. The artifact records the exact SHA, no lane failures, and joined cleanup. Package build, integrity and installation passed. Overall Package Acceptance remains red only for the inherited release-entry budget: 47,823 vs 47,500, below the shipped 50,000 cap. Main already fails at 47,789; manifest, lockfile, checker and workflow are unchanged through this PR base. No budget or assertion was weakened. The PR body now records final-head evidence and this separate failure. |
|
🦞👀 Re-review progress:
|
|
Merged via squash.
|
* fix: stop overestimating update snapshot disk space * test: normalize optional snapshot assertion message * fix: account for mixed database engines in snapshot space
What Problem This Solves
Update snapshot checks still reserve database copies removed by the single-image changes, so updates can fail even when enough space is available.
User Impact
Current SQLite candidates can proceed with space for one complete snapshot plus the largest database's temporary work, plugin files and the existing 64 MiB allowance. Older candidates and PostgreSQL exports keep the conservative requirement. An installed older updater keeps its early check until it is updated.
Why This Change Was Made
Budget current SQLite snapshots as
S + L + plugins + 64 MiB, whereSis all SQLite database sizes andLis the largest database. The candidate inventory capability selects this estimate; omission retains2*S + 3*L + plugins + 64 MiB.PostgreSQL portable exports remain beside their snapshots, so global PostgreSQL and any effective PostgreSQL family keep the larger allowance. External stores still follow the global setting when built-in families override it. The capability uses the canonical family selector and preserves the global guard. Copy, recovery and genuine-shortage refusal remain intact.
Related: #141773, #162403, #162429.
Evidence
Final head:
d07252409d2213dbfbf9e78e3c0d1fe005b6e03d. It includes canonical main4cb8e645without rewriting published ancestry.2026.10.4upgraded to candidate2026.10.4@d0725240; the update command took 507.54 seconds. The recorded run finished, readiness returned HTTP 200, the running version matched, durable session content survived, incognito content did not persist, and service shutdown exited zero. The artifact binds the exact source and records joined cleanup with no lane failures.Vincent Koc's packaging prerequisite #174463 is included. It fixed the missing Windows helper that had blocked both main and the earlier upgrade attempt. The final package build and integrity checks passed, and installation succeeded. The separate release-entry budget still fails at 47,823 entries against 47,500, so the overall Package Acceptance workflow is red. Canonical main already failed the same check at 47,789 entries. The package manifest, lockfile, checker and workflow are unchanged from that baseline through this PR's canonical base. Both counts remain below the shipped updater's 50,000-entry cap. No threshold or assertion was changed; this inherited release-readiness failure is not recorded as a passing check.
The recordings below exercise the isolated preflight/snapshot boundary with controlled free-space readings and real SQLite copies. This is a snapshot-creation budget, not a bound on arbitrary migration growth.
Base
9bf8143d508ee323b84e813a4b6699efa9a20d89:https://91b59577e757131d68d55a471fe32aca.r2.cloudflarestorage.com/openclaw-crabbox-artifacts/crabbox-artifacts/v2/org/b3BlbmNsYXc/owner/Z2l0aHViOjI2MzA2MDIwMg/publish/public/20261015-163549-624850000/base.mp4?X-Amz-Expires=604800&X-Amz-Date=20261015T163550Z&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=a677a1e59413a4e54bcc2da5fec6164a%2F20261015%2Fauto%2Fs3%2Faws4_request&X-Amz-SignedHeaders=host&X-Amz-Signature=0ee938be69ad613da18712bec80e033dceef2370766201a4a88a8090521e1c56
Head
8f2388c860a5d682fc38b03002354738815f67fe:https://91b59577e757131d68d55a471fe32aca.r2.cloudflarestorage.com/openclaw-crabbox-artifacts/crabbox-artifacts/v2/org/b3BlbmNsYXc/owner/Z2l0aHViOjI2MzA2MDIwMg/publish/public/20261015-163549-624850000/head.mp4?X-Amz-Expires=604800&X-Amz-Date=20261015T163550Z&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=a677a1e59413a4e54bcc2da5fec6164a%2F20261015%2Fauto%2Fs3%2Faws4_request&X-Amz-SignedHeaders=host&X-Amz-Signature=173516cf67830e4fd44d4ea971bd5aa5eaecc6dcbf855905bccc81366caac4dd
Reproduction contract · Evidence and exact test revisions · Artifact manifest