Skip to content

fix: stop backup creation and verification after client disconnect - #1615

Open
frahlg wants to merge 2 commits into
masterfrom
codex/backup-client-cancel-20261013
Open

frahlg wants to merge 2 commits into
masterfrom
codex/backup-client-cancel-20261013

Conversation

@frahlg

@frahlg frahlg commented Oct 13, 2026 •

Copy link
Copy Markdown
Member

Problem and change

A CLI full-backup request sends {}. When its HTTP/1 connection closes, Core can keep copying and publish the archive because the handler has not read the body. Separate HTTP backup verification has the same unread-body issue, and Inspect(ctx, ...) also dropped the caller context during full archive verification.

Read the ignored create/verify body with the existing 1 MiB API limit before acquiring operation locks. An unreadable body returns 400; an oversized body returns 413 before work starts. Pass the caller context through the full Inspect verification, as well as the final archive hash, so cancellation releases the verification workspace and backup lock. Create also releases its update lock. SQL, durability, deadlines, retry and backup pacing stay unchanged.

Validation

  • Create disconnect and oversized-body regressions fail on exact published .142.1 before the fix. The two added verify regressions also fail on that source: oversized JSON reaches archive lookup, and a canceled inspection parses the archive.
  • All relevant create/verify regressions pass in three race runs; full make verify passes.
  • Published .142.1 Core/CLI on an own 250000-row copy keeps JSON/CLI creation running after SIGINT; empty POST cancels. A separate valid archive with 512 MiB of synthetic padding shows JSON verification writing metadata after SIGINT.
  • A local modified ARM64 Core with the published CLI cancels all three create cases without an archive. Empty and JSON verification release their active workspace within 70/39 ms of the signal in this probe and write no verification metadata. Normal JSON creation and verification still pass. All own probe containers are removed.

These are isolated copy/protocol checks on a virtual SSD. They do not prove Raspberry Pi backup throughput, the old household request’s exact network behavior, or the first household write-delay cause. No box runtime, release or version changed.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 13, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-13T15:41:30.337810Z f1421ec PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@frahlg frahlg changed the title fix(backup): stop full backup when the client disconnects fix: stop backup creation and verification after client disconnect Oct 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant