Route every removal path through the batch interface #5
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
wokoman/ironpod#5
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What to build
Every way of removing tracks —
ironpod rm,ironpod dedupe, and pressingdin the browser — goes through the batch interface from #4, and the single-track primitive becomes private so the guarantee cannot be bypassed.This is what closes #2. Today the two command-line paths abandon the database write when a deletion fails partway, so tracks vanish from disk while the iPod's database still lists them; the device then shows songs that will not play and cannot be removed. The browser already handled this correctly, by hand. After this ticket there is one implementation and the divergence is gone.
The contract-half of an expand–contract: #4 added the new form beside the old, this removes the old.
Acceptance criteria
ironpod rmandironpod dedupewrite the database even when a deletion fails partway, and report how many were removed before the failurecargo clippy --all-targetsclean; full suite passesNotes
The browser draws its progress popup from inside the removal loop, so its callback captures the terminal while the database is borrowed for the removal. These are disjoint borrows and should compile as-is. If the borrow checker disagrees, raise it rather than redesigning the interface — the callback shape was settled deliberately in #4.
Blocked by