Repository navigation
Conversation
Restore and verify repeated the same loop: check the header, read each entry and its data, enforce the size cap, check the CRC. backup_walk now does that once and hands each verified entry to a visitor. Restore writes the entry; verify does nothing beyond the checks the walk already makes. Error codes and the order of cleanup are unchanged, and the file is closed by the caller on every path. test_backup passes, and the full ctest run is 46/46. Refs #89 Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
Owner
Author
|
Replaced by #108 (branch renamed to type/slug so the flow / conventions check passes). Same commits and content. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refs #89 (the
backup.cpart;blob_store.cis not in this PR).What this changes
src/repo/backup.c: restore and verify repeated the same loop (header check, entry header, 100 MB cap, allocation, read, CRC).backup_walknow does that once and passes each verified entry to a visitor. Restore writes the entry; verify does nothing extra.Verification
ctest: 46/46 pass, same as baseline.test_backupcovers the walk.Not done here:
blob_store.c'sblob_copy_filedoes a bounded streaming copy with a different shape (chunked, size-checked against a declared length), so sharing it withbackup.cneeds a separate design. Route helpers and the account registry are also still open under #89.Docs
None needed: internal refactor with no user-facing behaviour, config or API change.
Changelog: none — internal refactor, no behaviour change.
🤖 Generated with Claude Code