Repository navigation
fix(postie): preserve cancellation during parallel PAR2 work - #283
Merged
Merged
Conversation
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.
When the main upload finishes before a parallel PAR2 operation, cancelling the job can still return success: the PAR2 branch tolerates its error, then the caller publishes an NZB and deletes generated recovery files in standalone mode.
Check the job context after joining the parallel branches in single-file and folder posting. A cancelled attempt now returns the context error before NZB publication or success cleanup. Ordinary PAR2 failures retain their existing fallback behavior.
Add four deterministic regressions covering cancellation during PAR2 generation and upload in both paths, plus local NNTP/SQLite integration tests that retry the durable transfer with a fresh Postie instance and real PAR2 generation.
Refs #184. This addresses a distinct cancellation defect; the nonblocking verification architecture and reused-source PAR2 ownership/duplication fixes are already present.
Validation:
make: passed aftermake build-frontendsupplied the fresh checkout's missing embed prerequisite; includes generation, tidy, lint, Bun frontend build, andgo test -race ./....go test -race ./pkg/postie -run 'Test(Integration_ParallelPar2CancellationCanRetry|ParallelPar2CancellationDoesNotCompleteUpload)' -count=20: passed.git diff --check: passed.