Skip to content

Guard idle bump against racing metadata webhook#117

Open
errkk wants to merge 1 commit into
masterfrom
fix/idle-bump-race
Open

Guard idle bump against racing metadata webhook#117
errkk wants to merge 1 commit into
masterfrom
fix/idle-bump-race

Conversation

@errkk

@errkk errkk commented Jun 30, 2026

Copy link
Copy Markdown
Owner

The IDLE play-state handler evaluated premature_idle? before the settle sleep, against DB state captured before the racing metadata webhook had marked the newly-started track as playing. It then bumped unconditionally after the sleep, marking the just-started track played and removing it from the queue.

Re-check after the settle window, before the destructive bump: skip if the player is no longer idle, or if a track has started playing during the window. Only bump + re-trigger when genuinely still idle.

The IDLE play-state handler evaluated premature_idle? before the settle
sleep, against DB state captured before the racing metadata webhook had
marked the newly-started track as playing. It then bumped unconditionally
after the sleep, marking the just-started track played and removing it
from the queue.

Re-check after the settle window, before the destructive bump: skip if the
player is no longer idle, or if a track has started playing during the
window. Only bump + re-trigger when genuinely still idle.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant