You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
update is the family-standard verb; do not add a radio-edit-specific or raw whole-playlist replacement command.
Accept the established playlist and track reference forms and reuse the playlist-item read/add/remove paths.
Re-read and validate the current item and snapshot at execution time. Reject non-track, local, unavailable, out-of-range, same-item, stale, and duplicate-source cases before mutation.
Preserve order by adding the replacement at the target position before removing the unique original URI, passing the snapshot returned by the add into the removal.
Prefer a recoverable partial failure: if removal fails after add succeeds, retain both tracks and report the exact playlist, position, old ID, and new ID needed for cleanup. Never lose the original silently.
A successful result reports the position plus old/new IDs compactly and gives enough information to run the inverse update.
Do not expose Spotify's raw whole-playlist uris replacement operation.
Update the behavioral spec, README, and user smoke script for the completed workflow.
Command tests prove replacement at start/middle/end, unchanged item count/order outside the target slot, URI/URL/raw-ID inputs, and compact stdout/stderr routing.
Duplicate-source, same-item, stale/out-of-range, non-track/local/unavailable, invalid reference, and missing-scope cases fail before unintended mutation.
A simulated second-step failure proves the original remains present and the recovery error contains only non-secret actionable identifiers.
The opt-in live smoke composes playlist discovery, ordered item listing, candidate track selection, and items update; it verifies the exact replaced position and all neighboring IDs, then performs the inverse update and verifies exact restoration.
The static live-smoke test covers success, inverse restoration, partial failure reporting, and cleanup failure.
make check, make snapshot, and the opt-in replace-and-restore smoke pass.
Goal
Replace one playlist track at an exact position while preserving playlist order, completing the composable radio-edit-to-full-version workflow.
Depends on #24.
Surface
sptfy playlists items update <playlist-reference> <zero-based-position> --item <track-reference>Constraints
updateis the family-standard verb; do not add a radio-edit-specific or raw whole-playlist replacement command.urisreplacement operation.Empirical acceptance criteria
items update; it verifies the exact replaced position and all neighboring IDs, then performs the inverse update and verifies exact restoration.make check,make snapshot, and the opt-in replace-and-restore smoke pass.