diff --git a/core/artwork/housekeeping.go b/core/artwork/housekeeping.go index 6f1fa20a3..fea80eec6 100644 --- a/core/artwork/housekeeping.go +++ b/core/artwork/housekeeping.go @@ -26,8 +26,8 @@ var staleAbsentKinds = []string{"ar", "al", "pl", "ra"} // Fingerprint summarizes the config knobs that affect artwork resolution outcomes; a // change means previously resolved (or absent) state may no longer be correct. func Fingerprint() string { - raw := fmt.Sprintf("%s|%s|%s|%t|%s", - conf.Server.CoverArtPriority, conf.Server.ArtistArtPriority, + raw := fmt.Sprintf("%s|%s|%s|%s|%t|%s", + conf.Server.CoverArtPriority, conf.Server.ArtistArtPriority, conf.Server.ArtistImageFolder, conf.Server.Agents, conf.Server.EnableExternalServices, consts.Version) sum := md5.Sum([]byte(raw)) //nolint:gosec // fingerprint, not security-sensitive return hex.EncodeToString(sum[:]) diff --git a/core/artwork/housekeeping_test.go b/core/artwork/housekeeping_test.go index 8272514b0..4103d94c7 100644 --- a/core/artwork/housekeeping_test.go +++ b/core/artwork/housekeeping_test.go @@ -72,6 +72,13 @@ var _ = Describe("Housekeeping", func() { f2 := Fingerprint() Expect(f1).NotTo(Equal(f2)) }) + + It("changes when ArtistImageFolder changes", func() { + conf.Server.ArtistImageFolder = "/before" + f1 := Fingerprint() + conf.Server.ArtistImageFolder = "/after" + Expect(Fingerprint()).NotTo(Equal(f1)) + }) }) Describe("Backfill", func() { diff --git a/core/artwork/processor.go b/core/artwork/processor.go index 0c4d6c520..94262f552 100644 --- a/core/artwork/processor.go +++ b/core/artwork/processor.go @@ -31,8 +31,8 @@ const ( // thumbnailSize is the max dimension fed to blurhash. const thumbnailSize = 128 -// workerDeps are the collaborators processItem needs; extGate is nil outside -// tests, in which case resolveItem falls back to a plain passthrough. +// workerDeps are the collaborators processItem needs; extGate is set by NewWorker in +// production and nil only in tests, where resolveItem falls back to a plain passthrough. type workerDeps struct { ds model.DataStore store *ImageStore diff --git a/core/artwork/worker_soak_test.go b/core/artwork/worker_soak_test.go index f6ecef422..03ed1247c 100644 --- a/core/artwork/worker_soak_test.go +++ b/core/artwork/worker_soak_test.go @@ -19,10 +19,8 @@ import ( // performance benchmark, so it favors a stable signal over raw speed. const soakCycles = 2200 -// TestWorkerSoak drives processItem across a mix of sources (folder, embedded -// extraction, dangling refs) for many cycles, reading each acquired image back -// through ImageStore.Open, and asserts goroutines/heap plateau instead of -// growing unbounded. Skipped under -short. +// TestWorkerSoak runs processItem over many cycles across a mix of sources, asserting +// goroutines/heap plateau instead of growing unbounded (a leak guard). Skipped under -short. func TestWorkerSoak(t *testing.T) { if testing.Short() { t.Skip("skipping soak test in short mode")