Revert the deliberate break (#8297)
release / web (push) Successful in 1m23s
release / go (push) Successful in 1m53s
release / govulncheck (push) Successful in 19s
release / integration (push) Successful in 2m47s
release / android (push) Successful in 4m21s
release / Build signed APK (push) Successful in 5m2s
release / Attach APK to the Release (tag releases only) (push) Skipped
release / Publish the release image to GHCR (dispatch only) (push) Skipped
release / Build + push container image (push) Successful in 15s
release / Verify release artifacts (tag releases only) (push) Skipped

All eight broken behaviours failed their named tests in run 11283. Also
failing, as expected: the other tests pinning the same rules from other
sides (Discover's own album cap, a genre mix's artist cap, recsettings'
similarity weight, and Subsonic's playlist visibility and write checks).

This reverts commit 60b0edac7a.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-12-02 13:47:51 -05:00
co-authored by Claude Opus 5.5
parent 60b0edac7a
commit bd95cdb105
6 changed files with 8 additions and 8 deletions
+1 -1
View File
@@ -69,7 +69,7 @@ func Score(in ScoringInputs, w ScoringWeights, now time.Time, rng func() float64
s += recencyDecay(in.LastPlayedAt, now) * w.RecencyWeight
s -= skipRatio(in.PlayCount, in.SkipCount) * w.SkipPenalty
s += in.ContextualMatchScore * w.ContextWeight
s += in.SimilarityScore // DELIBERATE BREAK: weight ignored
s += in.SimilarityScore * w.SimilarityWeight
s += in.TasteMatchScore * w.TasteWeight
s += in.ContextAffinityScore * w.ContextTimeWeight
s += (rng()*2 - 1) * w.JitterMagnitude
+1 -1
View File
@@ -22,7 +22,7 @@ type SessionVector struct {
func BuildSessionVector(priorTracks []dbq.Track) SessionVector {
v := SessionVector{
Seed: len(priorTracks) < 2, // DELIBERATE BREAK
Seed: len(priorTracks) < 3,
Artists: []string{},
Tags: map[string]int{},
RecentTrackIDs: []string{},
+2 -2
View File
@@ -20,7 +20,7 @@ var DefaultSimilarityWeights = SimilarityWeights{
// session vectors. Returns 0 if either input is Seed=true (low-confidence
// vectors don't contribute to scoring).
func Similarity(a, b SessionVector, w SimilarityWeights) float64 {
if a.Seed && b.Seed { // DELIBERATE BREAK
if a.Seed || b.Seed {
return 0.0
}
tagJ := setJaccardKeys(a.Tags, b.Tags)
@@ -88,7 +88,7 @@ func ContextualMatchScore(current SessionVector, likes []SessionVector, w Simila
}
best := 0.0
for _, l := range likes {
if l.Seed && l.Artists == nil { // DELIBERATE BREAK
if l.Seed {
continue
}
s := Similarity(current, l, w)