[PR #4904] [MERGED] Fix Music DJ Spotify playback verification #6536

Closed
opened 2026-10-23 04:11:22 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/4904
Author: @SpicyMarinara
Created: 8/11/2026
Status: ✅ Merged
Merged: 8/11/2026
Merged by: @SpicyMarinara

Base: staging ← Head: agent/fix-spotify-playback-verification-4903


📝 Commits (2)

📊 Changes

3 files changed (+40 additions, -21 deletions)

View changed files

📝 CHANGELOG.md (+1 -0)
📝 packages/server/src/services/tools/tool-executor.ts (+26 -16)
📝 scripts/regressions/prompt.regression.ts (+13 -5)

📄 Description

Linked issue

Closes #4903

Why this change

  • Music DJ can receive a successful Spotify API response while the active device continues playing the previous track. Marinara currently marks that unverified command as applied, preventing a meaningful fallback and leaving users without music.

What changed

  • Clear and verify Spotify's previous repeat mode before replacing a repeatable multi-track playback context.
  • Reapply context repeat only after Spotify reports the selected first track as active, while preserving the established single-track sequence.
  • Return persistent playback or repeat verification mismatches as failures instead of successful playbackPending results.
  • Strengthen the Spotify regression fixtures to reject unsafe request ordering and false verification success.

Validation

  • pnpm check passes locally
  • Container (Docker / Podman) built and ran without issue
  • Ran the app, clicked through the changes manually
  • Checked edge cases (light + dark mode, mobile viewport, empty states, error paths)
  • Above manual verification completed (describe below)
  • Read and followed CONTRIBUTING.md

Manual verification notes

  • Automated verification: pnpm regression:prompt.
  • Automated verification: pnpm regression:manual-agent-retry.
  • Automated verification: pnpm check.
  • A live Spotify Premium account/device was not available to the automated repository harness. Manually verify that a multi-track Music DJ selection replaces the currently playing song and retains context repeat.

Docs and release impact

  • No docs changes needed
  • Updated docs (README / CONTRIBUTING / android/README / CHANGELOG) as needed
  • Translated docs on the docs-i18n branch updated to match, or a [docs-i18n] <paths> follow-up issue opened (see CONTRIBUTING.md § Translated documentation)
  • Version/release files updated (only if this PR includes a version bump)

UI evidence (if applicable)

  • Not applicable; this is a server-side Spotify playback fix.

Summary by CodeRabbit

  • Bug Fixes

    • Improved Spotify playback reliability when starting multi-track sessions.
    • Repeat mode is now verified after playback begins, reducing incorrect repeat behavior.
    • Playback failures now provide clearer error reporting instead of remaining pending.
    • Added handling for cases where Spotify playback does not start as expected.
  • Documentation

    • Updated the changelog with the restored Spotify playback behavior.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Pasta-Devs/Marinara-Engine/pull/4904 **Author:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Created:** 8/11/2026 **Status:** ✅ Merged **Merged:** 8/11/2026 **Merged by:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Base:** `staging` ← **Head:** `agent/fix-spotify-playback-verification-4903` --- ### 📝 Commits (2) - [`5ee5e64`](https://github.com/Pasta-Devs/Marinara-Engine/commit/5ee5e648f1ebd2ee4eb7c603b11f51e05b22d190) Start Spotify playback verification fix (#4903) - [`cd84548`](https://github.com/Pasta-Devs/Marinara-Engine/commit/cd84548d15aa545407b19e1dde29ffb8fee4492e) Fix Spotify playback verification (#4903) ### 📊 Changes **3 files changed** (+40 additions, -21 deletions) <details> <summary>View changed files</summary> 📝 `CHANGELOG.md` (+1 -0) 📝 `packages/server/src/services/tools/tool-executor.ts` (+26 -16) 📝 `scripts/regressions/prompt.regression.ts` (+13 -5) </details> ### 📄 Description ## Linked issue Closes #4903 ## Why this change - Music DJ can receive a successful Spotify API response while the active device continues playing the previous track. Marinara currently marks that unverified command as applied, preventing a meaningful fallback and leaving users without music. ## What changed - Clear and verify Spotify's previous repeat mode before replacing a repeatable multi-track playback context. - Reapply context repeat only after Spotify reports the selected first track as active, while preserving the established single-track sequence. - Return persistent playback or repeat verification mismatches as failures instead of successful `playbackPending` results. - Strengthen the Spotify regression fixtures to reject unsafe request ordering and false verification success. ## Validation - [ ] `pnpm check` passes locally - [ ] Container (Docker / Podman) built and ran without issue - [ ] Ran the app, clicked through the changes manually - [ ] Checked edge cases (light + dark mode, mobile viewport, empty states, error paths) - [ ] Above manual verification completed (describe below) - [ ] Read and followed `CONTRIBUTING.md` ### Manual verification notes - Automated verification: `pnpm regression:prompt`. - Automated verification: `pnpm regression:manual-agent-retry`. - Automated verification: `pnpm check`. - A live Spotify Premium account/device was not available to the automated repository harness. Manually verify that a multi-track Music DJ selection replaces the currently playing song and retains context repeat. ## Docs and release impact - [ ] No docs changes needed - [ ] Updated docs (README / CONTRIBUTING / android/README / CHANGELOG) as needed - [ ] Translated docs on the `docs-i18n` branch updated to match, or a `[docs-i18n] <paths>` follow-up issue opened (see CONTRIBUTING.md § Translated documentation) - [ ] Version/release files updated (only if this PR includes a version bump) ## UI evidence (if applicable) - Not applicable; this is a server-side Spotify playback fix. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Bug Fixes** * Improved Spotify playback reliability when starting multi-track sessions. * Repeat mode is now verified after playback begins, reducing incorrect repeat behavior. * Playback failures now provide clearer error reporting instead of remaining pending. * Added handling for cases where Spotify playback does not start as expected. * **Documentation** * Updated the changelog with the restored Spotify playback behavior. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-23 04:11:22 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Pasta-Devs/Marinara-Engine#6536
No description provided.