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
+8 -8
View File
@@ -148,8 +148,8 @@ func TestScanner_Integration(t *testing.T) {
t.Fatalf("GetTrackByPath after ScanFiles: %v", err)
}
// Re-running ScanFiles on the now-unchanged file (duration probed) skips it,
// so no album is reported as changed.
// Re-running ScanFiles on the now-unchanged file (duration probed) skips
// it, so no album is reported as changed.
if _, err := pool.Exec(ctx, "UPDATE tracks SET duration_ms = 1000 WHERE duration_ms = 0"); err != nil {
t.Fatalf("seed durations (2): %v", err)
}
@@ -206,14 +206,14 @@ func writeTestMP3(t *testing.T, path string, frames map[string]string) {
}
}
// TestScanner_AdoptsMovedFile_Integration is the #2528 proof: a renamed file
// TestScanner_AdoptsMovedFile_Integration: a renamed file
// must keep its existing tracks row — same id, so likes, play history and
// playlist memberships travel with it — rather than forking into a marked ghost
// plus a fresh zero-history row.
//
// Uses the MBID path. The synthetic MP3s here carry no real audio, so their audio
// stream hash cannot be relied on — which is why the recording MBID is the signal
// under test. The audio-hash path is covered by moved_test.go.
// Uses the MBID path. The synthetic MP3s here carry no real audio, so their
// audio stream hash cannot be relied on — which is why the recording MBID is
// the signal under test. The audio-hash path is covered by moved_test.go.
//
// Eight tracks with one rename keeps the marked fraction at 12.5%, under
// missingMarkMaxFraction. That is load-bearing: if the rename exceeded the cap,
@@ -309,7 +309,7 @@ func TestScanner_AdoptsMovedFile_Integration(t *testing.T) {
}
}
// TestScanner_ReleaseGroupMBID_Integration is #5241's scan half: a new album
// TestScanner_ReleaseGroupMBID_Integration: a new album
// takes its release-group id from the tag, and an album indexed before this
// read existed gets it on the next scan, through the tagReadVersion bump,
// without its file changing.
@@ -387,7 +387,7 @@ func TestScanner_ReleaseGroupMBID_Integration(t *testing.T) {
}
// Two albums of one name by one artist, in different release groups, are two
// albums: Weezer's six self-titled albums shared one row until 2026-10-20. A
// albums, as Weezer's self-titled albums are. A
// track of the same group joins its album, and a track filed under the other
// album's row by the old lookup moves to its own on the tagReadVersion re-read.
func TestScanner_SameTitledAlbumsOfTwoGroupsAreTwoAlbums_Integration(t *testing.T) {