docs: library comments say what the scanner and resolver do, not how they came to be (#6277)
release / govulncheck (push) Successful in 20s
release / web (push) Successful in 1m20s
release / go (push) Successful in 1m37s
release / integration (push) Successful in 5m15s
release / android (push) Successful in 5m26s
release / Build signed APK (releases and dev) (push) Successful in 5m45s
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

Rewrites the internal/library comment blocks to rule 32. Task, milestone,
decision and rule ids are gone; the incidents behind them are restated as
the constraint they left (why a file is deleted before its row, why the
missing mark is a mark, why duplicates block on duration). Counts and
album names from one library are dropped from production comments; test
comments keep the names their fixtures use. The tagReadVersion log keeps
each version's before and after, without the measurements.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-23 12:27:34 -04:00
co-authored by Claude Opus 5.5
parent 08a2c06b85
commit 7e6228c13f
66 changed files with 578 additions and 564 deletions
+12 -14
View File
@@ -95,8 +95,8 @@ func autoMergeAudit(t *testing.T, pool *pgxpool.Pool, groupID pgtype.UUID) (n in
}
// One album holding a song twice: the extra copy goes, the copy whose name and
// tags fit the album stays, and the merge is recorded as the resolver's
// (M502 #5517): Minstrel is the only program writing the library.
// tags fit the album stays, and the merge is recorded as the resolver's:
// Minstrel is the only program writing the library.
func TestResolveDuplicates_MergesASameReleaseCopy_Integration(t *testing.T) {
f := newResolveFixture(t)
res, err := ResolveDuplicates(context.Background(), f.pool, nil, "", true)
@@ -193,7 +193,7 @@ func newCrossReleaseRipFixture(t *testing.T) crossReleaseRipFixture {
}
// A video rip on one release with the clean copy on another: the rip is no
// release's copy, so it goes and the album cut stays (#5439).
// release's copy, so it goes and the album cut stays.
func TestResolveDuplicates_MergesARipAcrossReleases_Integration(t *testing.T) {
f := newCrossReleaseRipFixture(t)
res, err := ResolveDuplicates(context.Background(), f.pool, nil, "", true)
@@ -212,7 +212,7 @@ func TestResolveDuplicates_MergesARipAcrossReleases_Integration(t *testing.T) {
}
// Copies on two releases that are both clean each belong to their release:
// nothing is removed, and they are linked as one song. A rip the operator
// nothing is removed, and they are linked as one song. A rip an admin
// marked fine counts as clean.
func TestResolveDuplicates_KeepsCleanCopiesOnTwoReleases_Integration(t *testing.T) {
for name, prepare := range map[string]func(f crossReleaseRipFixture) (string, []any){
@@ -392,8 +392,8 @@ func TestResolveDuplicates_RemovesACopyFromAnotherSongsSlot_Integration(t *testi
if err != nil {
t.Fatal(err)
}
// Twelve slots were lost this way on 2026-10-20: folded by that MBID into
// the copy kept, and so never wanted back.
// Folded by that MBID into the copy kept, the slot would never be wanted
// back.
if pairs, err := PairMissingTracks(context.Background(), f.pool, nil); err != nil || pairs.Folded() != 0 {
t.Fatalf("missing-pair pass = %+v, %v; want the emptied slot left alone", pairs, err)
}
@@ -419,9 +419,8 @@ func TestResolveDuplicates_RemovesACopyFromAnotherSongsSlot_Integration(t *testi
// A slot emptied of another song's file folds into a copy of its own song the
// album already holds (Savant's VOID DLC "Weeper" beside Void's). A copy under
// the title that is not as long as the song is another song (the emptied "Open
// the Gateway" folded into a file holding Onward, 2026-10-20): the slot waits
// for a copy fetched again, and folds into that.
// the title that is not as long as the song is another song: the slot waits for
// a copy fetched again, and folds into that.
func TestResolveDuplicates_EmptiedSlotFoldsOnlyIntoItsOwnSong_Integration(t *testing.T) {
for _, tc := range []struct {
name string
@@ -522,7 +521,7 @@ func releaseBlocked(t *testing.T, pool *pgxpool.Pool, hash string) bool {
}
// AcoustID matched one copy to Tormentor's recording: that copy stays, Record
// Shop's goes, and the download they came from is set aside (#6169).
// Shop's goes, and the download they came from is set aside.
func TestResolveDuplicates_KeepsTheCopyAcoustIDNames_Integration(t *testing.T) {
f := seedTrimmedAlbum(t)
if _, err := f.pool.Exec(context.Background(),
@@ -551,9 +550,8 @@ func TestResolveDuplicates_KeepsTheCopyAcoustIDNames_Integration(t *testing.T) {
// Copies whose own lookups all name Record Shop's recording are that
// recording, though their fingerprints differ a little and one is six seconds
// from Tormentor's length, too near for the lengths to decide (the operator's
// Wombats and Monday Chill groups, 2026-10-20). With no lookups, copies that
// far apart are not asked about.
// from Tormentor's length, too near for the lengths to decide. With no
// lookups, copies that far apart are not asked about.
func TestResolveDuplicates_AgreeingLookupsDecideAnAcousticGroup_Integration(t *testing.T) {
setup := func(t *testing.T) oneAlbumFixture {
f := seedTrimmedAlbum(t)
@@ -706,7 +704,7 @@ func TestResolveDuplicates_LeavesAnUndecidedSlotForTheOperator_Integration(t *te
}
}
// A rip is held back from radio and the mixes; the operator's "fine" sticks
// A rip is held back from radio and the mixes; an admin's "fine" sticks
// through later passes; a renamed file is released.
func TestResolveDuplicates_HoldsBackRips_Integration(t *testing.T) {
f := newCrossReleaseRipFixture(t)