Conversation
xe-nvdk
approved these changes
Sep 14, 2026
xe-nvdk
left a comment
Member
There was a problem hiding this comment.
Approving. This is the lift-and-share #779 asked for, done without changing either side's error wording.
trackingWriter, the temp-file seam, and the classifier now live inreadto.gowith one sharedcreateTempFile(pattern), so backup and restore keep distinct temp-file names while sharing the test seam.classifyReadTostays as restore's thin wrapper, so nothing that matches on its messages moves.streamBackupFilewraps the temp file and classifies witherrBackupRead, soisSourceReadErrorkeeps working for genuine source reads and a temp-side failure is fatal. The new test drives it the same way the restore test does (read-only temp file), asserts the error is not a source read, and assertsSkippedFilesstays zero.- Verified on your head:
go build ./cmd/... ./internal/..., gofmt and vet clean, the backup suite twice under-race, both seam tests green, and no reference to the oldcreateRestoreTempremains. CI green.
One thing I did on your branch: main moved after your base, so the note conflicted positionally. I merged main into fix/backup-temp-write-classification (1343ef6, a merge commit, no rewrite), kept your entry on top, verified the merged tree, and pushed. Pull before pushing again.
Two notes, neither blocking:
- The paragraph on
streamBackupFilethat stated its classification contract ("only a source-read failure is wrapped witherrBackupRead; temp file, seek and write failures are fatal") was deleted rather than updated. It was the one place that said the rule out loud. Please restore it with the tracking-writer clause added, the waystreamRestoreFile's comment reads. - Wrapping the temp file costs the source→temp hop its zero-copy fast path on Linux, exactly as it did on restore in #778. On restore that is a rare, disk-bound operation. On backup it runs on a schedule, so the cost is worth stating in the release note, and I have filed a separate follow-up to get zero-copy back while keeping the attribution. Nothing for this PR beyond the sentence.
Thank you — three for three today.
…e release-notes placement after Basekick-Labs#789/Basekick-Labs#782)
Member
|
Merging — thank you @efegokdemir. Six of yours in across two days. README credit follows in a moment; #791 (the zero-copy follow-up) is yours if you want it. |
xe-nvdk
added a commit
that referenced
this pull request
Sep 14, 2026
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.
Summary
ReadTowriter-tracking/classification logic between backup and restoreRegression coverage
ReadTofails while writing to that destinationSkippedFilesremains zeroValidation
go test ./internal/backup/...go test -race ./internal/backup/...go vet ./internal/backup/...go test ./...go build ./...git diff --checkAll pass locally.
Closes #779