mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[GH-ISSUE #2998] [Issue]: Manual Music DJ (Spotify) retry never applies playback or the deterministic fallback in non-game chats #1572
Labels
No labels
android
bug
bugfix
ci
client
code freeze pause
container
dependencies
docs
documentation
duplicate
enhancement
feature
feature
feature
feature-creep
fixed-in-refactor
fixed-in-staging
good first issue
help wanted
in-pr
in-pr
needs-codeowner-decision
normal-scope
old-codebase
old-codebase
pull-request
qol
question
refactor
regression
revisit later
roadmap
scope-risk
scope-risk
server
server
shared
soup
upstream
windows
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Pasta-Devs/Marinara-Engine#1572
Loading…
Add table
Add a link
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?
Originally created by @kolacheee on GitHub (Jun 29, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/2998
Originally assigned to: @SpicyMarinara on GitHub.
What's wrong
On the retry path, the only place that turns a Spotify Music DJ retry result into actual playback or applies the server-side deterministic fallback bails out for every non-game chat. The Spotify retry agent runs with tools, and its prompt explicitly permits an intent-only response. So in a roleplay/conversation manual retry, if the model returns
action:"play"with track URIs but does NOT call spotify_play, nothing is queued/played — yet the client shows a "🎵 Music DJ started playback" bubble. The same intent-only result is rescued in game mode and always rescued on the main /generate route.How to reproduce (try it yourself)
{action:"play", trackUris:[...]}) WITHOUT emitting a spotify_play tool call.You'll see: the result is success/action=play, the client shows a "started playback" bubble, but no track is queued/played on Spotify.
Expected: the same deterministic fetch-and-play fallback that game mode and the main /generate flow apply.
Where it is
packages/server/src/routes/generate/retry-agents-route.ts:1820-1821(gate insidevalidateSpotifyRetryPlayback, 1804-1946; sole call site at :2027). Contrast: mode-agnosticapplySpotifyAgentPlaybackFallbackatpackages/server/src/services/generation/spotify-agent-runtime.ts:335-446, invoked unconditionally ingenerate.routes.ts:7700and:7746.What's happening
The deterministic playback validation/fallback for manual Spotify retries was scoped to game mode only (
constraints.mode !== "game"early-return), but the retry agent runs in tool mode where the model may legitimately return intent-only output, and there is no roleplay-mode equivalent of the main route's unconditional fallback.Suggested fix
Widen the gate for non-game while keeping game mode's logic intact, and only rescue the genuine gap (model returned action:"play" but never called spotify_play). Two surgical edits in retry-agents-route.ts:
if (!forceFreshPick) return result;(drop the|| constraints.mode !== "game").spotifyPlayCalled/spotifyPlayAppliedare computed), add a non-game guard so the single-track game logic never clobbers a correctly-queued roleplay result:This leaves the existing
!spotifyPlayCalledrecovery active for non-game — exactly the missing safety net. Regression avoided: do NOT simply run the full game-modevalidateSpotifyRetryPlaybackbody for non-game (whatif (!forceFreshPick) return result;alone does) — roleplay Music DJ queues MULTIPLE tracks while the validator's accept paths are single-track-only, so a correct 5-track queue would fall through to the deterministic single-track re-pick, discarding the model's queue and emitting false-failure toasts. This is the exact regression v1.6.1 fixed; the added non-game guard preserves it.AI-investigated against v2.0.6; cited lines read and confirmed. Please verify before fixing.
@SpicyMarinara commented on GitHub (Jun 29, 2026):
Fixed in merged staging PR #3004.