release / govulncheck (push) Successful in 17s
release / web (push) Successful in 1m33s
release / go (push) Successful in 1m49s
release / integration (push) Successful in 5m42s
release / android (push) Successful in 5m59s
release / Build signed APK (releases and dev) (push) Successful in 6m9s
release / Attach APK to the Release (tag releases only) (push) Skipped
release / Build + push container image (push) Successful in 16s
release / Verify release artifacts (tag releases only) (push) Skipped
Applies rule 32's migration exception: each header still says what the schema was, what changes and what it prevents, but task, milestone, decision and rule ids are replaced by the practice they stood for, the operator quotes by the decision, single-install counts are dropped, and pointers to a deleted package and an external design doc are gone. golang-migrate keeps no checksum, so editing applied migrations' comments is safe. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
34 lines
1.8 KiB
SQL
34 lines
1.8 KiB
SQL
-- 0057_songs_like_tuning.up.sql — a THIRD weight profile, for Songs-like.
|
|
--
|
|
-- Before: Songs-like shared the `daily_mix` profile with For-You. The two
|
|
-- surfaces want opposite things: For-You is a broad "what will they enjoy
|
|
-- today", Songs-like answers "what sounds like THIS" and should stay in one
|
|
-- neighbourhood of sound, and under one set of weights the broad answer wins.
|
|
--
|
|
-- Under the shared daily_mix weights, an UNRELATED track the user had liked
|
|
-- and not played recently scored 1.0 + 2.0 + 1.0 = 4.0 before taste, while a
|
|
-- PERFECT similarity match they had not liked scored 1.0 + 1.5 = 2.5. Liking
|
|
-- something outranked sounding like the seed. Splitting the profile is what
|
|
-- lets similarity dominate here without making For-You narrow.
|
|
--
|
|
-- Rows are seeded by the recsettings boot reconcile, not here, so shipped
|
|
-- defaults live in exactly one place (Go) — same as 0040.
|
|
|
|
-- Rule #36: a new value for a CHECK-gated column needs the constraint
|
|
-- rewritten in the SAME change, or the first row written under the new
|
|
-- profile fails at runtime rather than at migrate time.
|
|
ALTER TABLE recommendation_weight_profiles
|
|
DROP CONSTRAINT recommendation_weight_profiles_profile_check;
|
|
ALTER TABLE recommendation_weight_profiles
|
|
ADD CONSTRAINT recommendation_weight_profiles_profile_check
|
|
CHECK (profile IN ('radio', 'daily_mix', 'songs_like'));
|
|
|
|
-- The audit table gates the same name on a separate constraint. Missing this
|
|
-- one would let the profile be seeded and then fail on the first knob turn —
|
|
-- green at boot, 500 on first use.
|
|
ALTER TABLE recommendation_tuning_audit
|
|
DROP CONSTRAINT recommendation_tuning_audit_scope_check;
|
|
ALTER TABLE recommendation_tuning_audit
|
|
ADD CONSTRAINT recommendation_tuning_audit_scope_check
|
|
CHECK (scope IN ('radio', 'daily_mix', 'taste', 'discover', 'songs_like'));
|