Repository navigation
Phase 0: restart-free PoToken refresh via POST /youtube - #14
Merged
Merged
Conversation
refresh_and_inject now pushes the fresh token to the running Lavalink through the youtube plugin live update route (refreshToken "x" sentinel leaves OAuth untouched) instead of rewriting application.yml and restarting the container, which dropped every active player on each 6-hourly rotation. The yaml write remains, as the cold-start seed only. Push ordering: live push before seed write, so a rejected push leaves disk and runtime consistent. Tests: 163 passed (was 161), pyflakes clean.
cycle-five
approved these changes
Nov 6, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Phase 0 of
docs/DESIGN-two-node-split.md— useful on the current single node, independent of the split.Change
pot.refresh_and_inject()no longer restarts Lavalink on every 6-hourly rotation:/get_pot), as before.POST /youtuberoute (YoutubeRestHandlerin 1.18.x), withrefreshToken: "x"— the route's sentinel for leaving OAuth untouched. Active players survive.application.ymlafterwards, but as cold-start seed only, so a restart boots with the freshest token before the first scheduled refresh.Ordering matters: the live push happens before the seed write. If the push is rejected, the error propagates (and is recorded in state) with disk and runtime left consistent — the previously live token keeps serving.
The
docker_ctl.restart_containerimport leavespot.pyentirely; the tokens router just updates its log wording.Tests
163 passed (was 161; the pot suites now assert the live POST, its payload/auth header, the no-restart behaviour, and the push-before-seed ordering). pyflakes clean. Full suite re-run on this branch 2026-11-06 before push.