From c073e41613ba75d670689d6cfbbe9c9a8430366a Mon Sep 17 00:00:00 2001 From: Bryan Van Deusen Date: Mon, 30 Nov 2026 21:29:04 -0500 Subject: [PATCH] fix(library): duplicate auto-resolve is off by default (#8252) Other programs file music into the library, so Minstrel acts on duplicates only once an admin turns this on. Migration 0114 sets the column default to false and turns the setting off on installs that hold the old default; the Go default follows, so an unreadable database behaves like a fresh one. The pass removes no file either way. Co-Authored-By: Claude Opus 5.5 --- .../0114_auto_resolve_off_by_default.down.sql | 1 + .../migrations/0114_auto_resolve_off_by_default.up.sql | 9 +++++++++ internal/library/fingerprint_settings.go | 10 ++++++---- 3 files changed, 16 insertions(+), 4 deletions(-) create mode 100644 internal/db/migrations/0114_auto_resolve_off_by_default.down.sql create mode 100644 internal/db/migrations/0114_auto_resolve_off_by_default.up.sql diff --git a/internal/db/migrations/0114_auto_resolve_off_by_default.down.sql b/internal/db/migrations/0114_auto_resolve_off_by_default.down.sql new file mode 100644 index 00000000..a36330d0 --- /dev/null +++ b/internal/db/migrations/0114_auto_resolve_off_by_default.down.sql @@ -0,0 +1 @@ +ALTER TABLE fingerprint_settings ALTER COLUMN auto_resolve SET DEFAULT true; diff --git a/internal/db/migrations/0114_auto_resolve_off_by_default.up.sql b/internal/db/migrations/0114_auto_resolve_off_by_default.up.sql new file mode 100644 index 00000000..8c1cb1d9 --- /dev/null +++ b/internal/db/migrations/0114_auto_resolve_off_by_default.up.sql @@ -0,0 +1,9 @@ +-- Duplicate auto-resolve starts off. Other programs file music into the +-- library, so Minstrel acts on duplicates only once an admin has turned this +-- on. The pass never removes a file either way: on, it links copies of one +-- song so they count once and notes which song a misfiled recording is. +-- +-- Installs that never chose a value hold the old default, true, and are set +-- off here too; an admin who wants it turns it back on. +ALTER TABLE fingerprint_settings ALTER COLUMN auto_resolve SET DEFAULT false; +UPDATE fingerprint_settings SET auto_resolve = false; diff --git a/internal/library/fingerprint_settings.go b/internal/library/fingerprint_settings.go index 962421e6..659e6cc5 100644 --- a/internal/library/fingerprint_settings.go +++ b/internal/library/fingerprint_settings.go @@ -56,9 +56,11 @@ type FingerprintSettings struct { AcousticMaxBitErrorRate float64 BackfillConcurrency int32 SweepIntervalHours int32 - // AutoResolve lets the duplicate resolver act on its own: merge copies no - // release needs. Off, it only classifies, and every group waits for an - // admin. + // AutoResolve lets the duplicate resolver act on its own: link copies of + // one song so they count once, dismiss distinct versions, hold back video + // rips, and note which song a misfiled recording is. It never removes a + // file. Off by default: Minstrel acts on duplicates only once an admin asks + // it to. Off, the pass only classifies, and every group waits for an admin. AutoResolve bool // UpdatedAt is when the settings were last saved. Set by the database; // ignored by Set. @@ -73,7 +75,7 @@ var DefaultFingerprintSettings = FingerprintSettings{ AcousticMaxBitErrorRate: defaultAcousticMaxBitErrorRate, BackfillConcurrency: fingerprintBackfillConcurrency, SweepIntervalHours: defaultSweepIntervalHours, - AutoResolve: true, + AutoResolve: false, } // ErrFingerprintSettingOutOfRange is returned by Set for a value migration