fix: keep tracks without a track_class row in the sequencing pool#7
Open
gnujoow wants to merge 1 commit into
Open
fix: keep tracks without a track_class row in the sequencing pool#7gnujoow wants to merge 1 commit into
gnujoow wants to merge 1 commit into
Conversation
tracks_for_sequence used an inner JOIN on track_class, so a track inserted outside sync (e.g. a playlist-only track) that had full enrichment (BPM/camelot/energy) was silently excluded from the pool until a separate classify run — resequence then sequenced only a handful of tracks and dumped the rest as 'no mixing data'. - tracks_for_sequence: LEFT JOIN track_class (bucket/slots NULL when unclassified) - build_pool: NULL bucket/slots parse to empty lists. Unclassified tracks pass when no slot/bucket filter is active (resequence and the draft-track pool run with filters off); an explicit filter still excludes them — unknown never matches a requested value - transition_cost: an empty bucket set gets the mild adjacent_penalty instead of other_penalty (unknown isn't a clash — same neutral-when-unknown convention as era/genre distance) - render_report: buckets[0] no longer crashes on an empty bucket list Fixes #4 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.
Summary
Fixes #4.
tracks_for_sequence()used an innerJOIN track_class, so a track inserted outside sync (e.g. a playlist-only track) with full enrichment data was silently dropped from the sequencing pool until a separateclassifyrun.resequenceon such a playlist sequenced only 1–3 tracks and appended the rest as "no mixing data" despite BPM/camelot/energy being present.Changes
tracks_for_sequencenowLEFT JOINstrack_class; unclassified tracks come back with NULLgenre_bucket/dj_slots(enrichment/musicae joins unchanged).build_pool: NULL bucket/slots parse to empty lists. Semantics: unclassified tracks pass when no slot/bucket filter is active — which coversresequenceand the draft-track (--require-track/--from-playlist) pool, both of which run with filters off — while an explicit--slot/--bucketfilter still excludes them (unknown never matches a requested value), so the defaultsequencepool composition is unchanged.transition_cost: an empty bucket set now gets the mildadjacent_penaltyinstead ofother_penalty— unknown isn't a genre clash, matching the existing neutral-when-unknown convention for era/genre distance.render_report: fixed a latentIndexErroront.buckets[0]for tracks with no buckets and no genres (renders?).I went with the LEFT JOIN option from the issue rather than auto-running classify — it removes the hidden ordering dependency entirely instead of adding another implicit step.
Tests
tracks_for_sequencewith NULL bucket/slots and joined BPM.adjacent_penalty.150 passed(baseline 145).🤖 Generated with Claude Code