Repository navigation
fix(music): a busy server keeps its last catalogue, so /music is not emptied (0.80.7) - #434
Merged
Merged
Conversation
… no longer empties nixamp.com/music (0.80.7) The hub reads each server's /api/v1/label and guide with a 6 s timeout and dropped a server that missed it. server2 (the only AI label) at load 58 after the 0.80.6 rollout missed it, and /music showed nothing. Each server now keeps its last good answers for up to 30 minutes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ThreatCrush Security Scan1 finding(s) in the 3 file(s) this pull request changes. HIGH: 1
55 pre-existing finding(s) elsewhere in the repository — **HIGH**: 16 | **MEDIUM**: 15 | **LOW**: 24Not introduced by this pull request.
…and 35 more; the full set is in the SARIF artifact. Snippets are redacted; ThreatCrush never prints matched credential material. |
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.
nixamp.com/music went blank on 2026-11-14 around 12:40 UTC: /api/v1/music returned {"holders":[],"genres":[],"stations":[]}.
Cause: the 0.80.6 deploy restarted nixamp.com twice (12:31 and 12:37), and server2, the only server with the AI label, was at load 58 (ffprobe plus llama-server). MusicHub reads each server's /api/v1/label and guide with a 6 s timeout and drops a server that misses it, so the catalogue came back empty and kept doing so until server2 answered in time. It recovered by itself around 12:49.
Fix: MusicHub now keeps each server's last good label and guide for up to 30 minutes (STALE_MS) and uses them when a fresh read fails. A server that has been gone longer still drops out.
Test:
bun test test/music-hub.test.ts(8 pass, new case covers a server going down, being kept, then aging out);tsc --noEmitclean.🤖 Generated with Claude Code