Repository navigation
Report exact transfer files to Transmission clients - #52
Conversation
|
The bindery side (#903 / #933) lines up. Two changes should be separate from the manifest feature because they're independent bug fixes:
Can you pull those into their own commits or a separate PR? I'd merge them ahead of the manifest work. On the rest:
|
|
Cross-PR note, since all four of these are open at once. All four touch
Separately, CI only runs |
Retain the exact commits published in elsbrock#53 and elsbrock#54 before manifest ownership work.
…ship Persist exact Transmission file ownership and local completion, bound remote removal retries, and retain durable removal intent without unbounded active tracking. Include reviewed ownership, queue-locking, and Linux test-cleanup fixes. Reserve the manifest directory and document whole-transfer progress.
Persist NeedsReview for missing legacy source roots without ownership manifests. Keep holds non-removable across restarts and source changes; permit only verified, exact-ID record retirement. Include persistence recovery and classification/removal race fixes with regression coverage.
f11045a to
84d77a9
Compare
|
Thanks for both the detailed review and the cross-PR sequencing note. I've updated the original PR description, including the upgrade/restart behavior for release notes, and incorporated your suggestions.
The history is now two feature commits after the shared safety prerequisites, with the exact previously published source tree preserved. The new boundary passes |
|
Thanks for the extremely thorough writeup and testing notes on this one — the durability/generation-reservation discipline throughout One thing I want to confirm intent on before merging.
Is that an intentional fail-fast tradeoff, or should a per-ID failure still let the rest of the batch proceed (matching the old best-effort behavior, just with the new safety bookkeeping)? Sonarr/Radarr can send multi-ID Everything else looks solid to me — nothing further blocking on my end once this is settled. |
|
Thanks for catching this. The fail-fast behavior was unintended; ordinary multi-ID Commit 6ae264a restores that behavior. Preparation failures and exhausted three-attempt remote deletions are collected, processing continues through the batch, and the combined errors are returned afterward. Failed IDs retain local payload and ownership evidence; successful later IDs complete cleanup. The explicit reviewed-retirement guard remains separate. The added regression covers preparation failure, exhausted remote deletion, mixed failures, and a successful control, including absent selectors and retained manifests/categories. The PR description records the before/after regression and local race-test, vet, and build results. The updated head also passes hosted CI. This follow-up has not been deployed or exercised against live Put.io/Arr services. Could you take another look at the batch-removal fix? With #53 and #54 merged, this remains the next PR in the agreed sequence. |
|
The batch-removal fix looks right — I reverted torrent.go to the pre-fix version locally and confirmed TestTorrentRemoveContinuesBatchAfterFailure genuinely fails 3/4 subtests without it, so this isn't a vacuous test. errors.Join + continue is the correct shape, and it matches the old best-effort semantics exactly. go test -race ./..., vet, and build all clean. LGTM, merging. |
…al docs PR #52's README additions were authored before de5c48a landed on main and silently reverted its correction when rebased: the 'stateless architecture' claim and the FAQ answer both understated the local state plundrio keeps, which now includes the removal/review markers and file manifests under .plundrio-files/. Restore the accurate wording and extend the FAQ answer to cover the new state alongside .plundrio-state.json.
Summary
Return exact persisted transfer-file manifests to Transmission clients, including
numeric-ID/hash selection and restart-safe local ownership. Supports Bindery's
exact-file integration (vavallee/bindery#903 and vavallee/bindery#933).
The independent Put.io root-deletion guard and race CI
and stalled-download cancellation fix
merged on September 9. This branch now merges current
mainatef8cc9e,so the review diff excludes those landed prerequisites.
Review changes
before mutation, release active in-memory tracking, and keep disk ownership
evidence until confirmed remote absence and worker drain or successful retry.
retries from reviving removals, and avoid holding removal locks across blocked
queue sends or remote listing calls.
bytesCompletedgranularity..plundrio-files/; coordinated feat: reconcile unmanaged downloads #51 excludes internal state and protectspending payloads even when their remote transfer moves or disappears.
preserving real fsync and blocked queues/listings, and join removal goroutines
during failure cleanup so they cannot race temporary-directory removal.
Upgrade behavior / release notes
A Put.io COMPLETED/SEEDING transfer without local context now reports downloading
at 50%, not complete/seeding, until local restoration or download finishes.
Remote completion is not proof of local completion. Truly absent legacy manifests
with either FileID zero or a confirmed source-root404 enter durable
NeedsReviewinstead of assumed completion or a failed download. They report stopped/50%, no
files, zero rates, unknown ETA, and an explanatory warning with automatic
removal disabled. Restart, source reappearance and remote ERROR cannot release
the hold. Corrupt/unreadable/dangling manifests and missing child-folder404s
remain errors, not legacy absence.
Review markers retain original identity/category across storage repair. Ordinary
removal cannot race initial or retry-time classification. Explicit record-only
retirement requires one exact positive numeric ID,
plundrio-retire-reviewed,plundrio-copy-verified,delete-local-data=false, and fresh identity/sourcevalidation. It never calls source/local-file deletion; failed retirement keeps
its warning and durable hold. This is documented as an operator action, not
automatic migration or proof of historical imports.
Dependencies and validation
Remaining merge order: this PR → #49 → #50 → #51, with #51 still
pending agreement on product scope. The dependent branches include the same
upstream merge and batch-removal fix through ordinary merges, without rewriting
published history.
Independent Astra implementation/review completed in separate worktrees. Local
full unit/race tests, vet and build pass at this exact PR boundary. The combined
reviewed tree passes native and NAS Linux/Alpine full unit/race tests, vet/build,
100 focused legacy/removal race repetitions and Linux ARM64 cross-compilation.
The root/removal/storage/race regressions were reproduced before their fixes.
The combined integration at
9c1a8cfwas built and rolled out locally to Radarr,Sonarr and Bindery. Repeated read-only checks retain all 38 records, verify all
25 legacy review markers, and show zero numeric RPC errors or matching startup
errors. Sonarr exposes the checked legacy queue entry as warning/importPending.
This live result includes #49/#50/#51, including #50's integer-error correction;
it is not a standalone deployment test of this PR. No legacy retirement,
manifest backfill, consumer scan, or new download/import cycle was exercised.
Nix builds and historical retained-copy/import verification remain untested.
Follow-up verification (2026-09-09)
Ordinary
torrent-removenow attempts every selector independently when atransfer fails preparation or exhausts its three remote deletion attempts.
It returns the combined preparation/deletion errors after the batch. Failed
IDs retain local payload and ownership evidence; successful later IDs complete
cleanup. The explicit reviewed-retirement guard remains a separate operation.
The new regression reproduces classification failure, exhausted remote deletion,
and mixed failures on the previous implementation; those cases and a successful
control now pass, including absent selectors and retained manifests/categories.
Full
go test -race ./...,go vet ./...,go build ./..., and diff checks passat this updated branch boundary on darwin/arm64. Upstream
mainis included,including its OAuth2 dependency update. Hosted CI must validate the new published
head separately. Earlier deployment and platform evidence above is historical;
this follow-up has not been deployed or exercised against live Put.io/Arr services.
Nix builds remain untested.