Repository navigation
fix(update): refuse Git updates early when database backup space is insufficient - #183133
chelsealong wants to merge 2 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: stale review; fresh review needed. Summary Next step Review history (1 earlier review cycle)
|
|
The failed CI shard returned the expected directory entries in a different order. I changed the test to compare sorted entries. All five focused tests pass locally, along with the targeted CLI updater typecheck, lint, format check, and git diff --check. CI has not run on this edit yet. Commit: 4160417 |
|
The directory-order assertion is fixed in head |
|
Thanks @chelsealong for working on this and correcting the directory-order assertion. This is already covered on main by #183177, commit 8738c09: 8738c09. I checked current main ( The later capture batching (#188919), bounded capture and service recovery (#189025), and unsealed capture cleanup (#189249) are also present; they handle separate recovery concerns and retain this early capacity guard. Closing as superseded by the merged fix. Thank you for the contribution! |
Closes #183091
What Problem This Solves
A Git update can pass the candidate snapshot space check, spend time validating, then fail because its durable SQLite backup needs more space.
User Impact
Updates with measurably insufficient backup space now refuse before staging and show the required and available space. Disk use can still change during validation.
Why This Change Was Made
Preflight and activation now share the backup sizing formula. Candidate snapshots retain their smaller, separate budget and destination selection.
Evidence
With 140 MiB available for candidate snapshots and 100 MiB at the backup destination, the new regression returned success on the base source (expected refusal). With the fix, it refuses; raising backup space to 140 MiB admits it. The isolated Git updater suite confirms refusal before staging. The full build, 27 resource tests, 5 Git updater tests, focused backup capacity test, targeted test typechecks, lint, format, Docs MDX, and
git diff --checkpassed before the directory-order test correction.PR CI shard
checks-node-changed-compact-large-6failed on the earlier head because the new test assumed a fixedfs.readdirorder. The assertion now compares sorted entries. On head41604171816c, the focused CLI updater suite passed all 5 tests locally, as did targeted typecheck, lint, format, andgit diff --check; the previously failing exact-head CI shard has also passed. Three PostgreSQL conformance jobs were still in progress when last checked.The broad core typecheck has an unchanged TS2739 error in
session-catalog.test-helpers.ts. The full backup suite encounters the same staging-directory trust error at/homeon both patched and base source in this runner. Shipped-CLI low-space refusal and admission, and a latest-stable upgrade preserving settings and database content, remain unverified.AI disclosure: generated and automatically reviewed with Codex.