Files
minstrel/internal/db/migrations/0095_tracks_emptied_at.up.sql
bvandeusenandClaude Opus 5.5 3ebd35e51d
release / govulncheck (push) Successful in 16s
release / web (push) Successful in 1m28s
release / go (push) Successful in 1m36s
release / android (push) Successful in 5m2s
release / integration (push) Failing after 5m7s
release / Build signed APK (releases and dev) (push) Successful in 5m12s
release / Attach APK to the Release (tag releases only) (push) Skipped
release / Build + push container image (push) Skipped
release / Verify release artifacts (tag releases only) (push) Skipped
fix: a slot the resolver emptied folds only into a copy of its own song (M498)
On 2026-10-20 the emptied "Open the Gateway" slot of Auvic's Speed Demons
was folded by title into another file tagged "Open the Gateway" that holds
Onward (244 s against the song's 254 s), so the album was never wanted
back. A wrong-slot removal now stamps tracks.emptied_at (migration 0095)
when the album holds no copy of the song as long as its MusicBrainz slot,
and missing-pair folding pairs such a row by title only with a track added
since: a copy fetched again. A slot whose song the album does hold (VOID
DLC's Weeper beside Void's) folds into it as before.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-20 11:55:23 -04:00

14 lines
797 B
SQL

-- 0095_tracks_emptied_at.up.sql — a slot the duplicate resolver emptied
-- waits for a copy fetched again (Scribe milestone #498).
--
-- When the resolver removes a file filed under another song's title and the
-- album holds no copy of that song as long as the song is, the row is marked
-- missing and stamped here with the same time. Missing-pair folding then pairs
-- it by title only with a track added after that time, a copy fetched again,
-- and not with one already on the album: on 2026-10-20 an emptied "Open the
-- Gateway" was folded into a file tagged so that holds another song.
--
-- The stamp counts only while it equals missing_since: a row whose file came
-- back and later went missing again is an ordinary missing row.
ALTER TABLE tracks ADD COLUMN emptied_at timestamptz;