feat(web): duplicates report flags identical audio under different titles (#3885)
release / govulncheck (push) Successful in 15s
release / web (push) Successful in 1m10s
release / go (push) Successful in 1m28s
release / integration (push) Successful in 4m21s
release / android (push) Successful in 4m43s
release / Build signed APK (releases and dev) (push) Successful in 4m57s
release / Attach APK to the Release (tag releases only) (push) Skipped
release / Build + push container image (push) Successful in 26s
release / Verify release artifacts (tag releases only) (push) Skipped
release / govulncheck (push) Successful in 15s
release / web (push) Successful in 1m10s
release / go (push) Successful in 1m28s
release / integration (push) Successful in 4m21s
release / android (push) Successful in 4m43s
release / Build signed APK (releases and dev) (push) Successful in 4m57s
release / Attach APK to the Release (tag releases only) (push) Skipped
release / Build + push container image (push) Successful in 26s
release / Verify release artifacts (tag releases only) (push) Skipped
An exact-tier group whose copies carry different titles means at least one file's tags are wrong, and the recording the other title names may be missing from the library. WWW (2020) was this: "WWW" was a second copy of the instrumental, the vocal was absent, and nothing said so. The report now names the titles and says what it implies, so the absence surfaces at the moment of choosing which copy to keep. Titles compare case- and whitespace-insensitively. Acoustic-tier groups are left alone: across encodings a "Remastered" suffix is routine, not a mislabel. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -124,6 +124,61 @@ describe('admin duplicates', () => {
|
||||
expect(text(screen.getByTestId('duplicate-tier'))).toBe('Same recording · 96% match');
|
||||
});
|
||||
|
||||
// #3885: identical audio titled "WWW" and "WWW (instrumental)". One file
|
||||
// claimed to be the vocal and wasn't, and nothing said the vocal was missing.
|
||||
describe('identical audio under different titles', () => {
|
||||
function www() {
|
||||
const r = response();
|
||||
r.groups[0] = {
|
||||
...r.groups[0],
|
||||
members: [member('www-01'), member('www-02', { title: 'WWW (instrumental)' })]
|
||||
};
|
||||
return r;
|
||||
}
|
||||
|
||||
test('says the copies are titled differently and names both titles', () => {
|
||||
renderWith(www());
|
||||
const notice = text(screen.getByTestId('title-mismatch'));
|
||||
expect(notice).toContain('titled “WWW” and “WWW (instrumental)”');
|
||||
expect(notice).toContain("isn't in your library");
|
||||
});
|
||||
|
||||
test('three different titles are all named', () => {
|
||||
const r = www();
|
||||
r.groups[0].members.push(member('www-03', { title: 'WWW (Radio Edit)' }));
|
||||
renderWith(r);
|
||||
expect(text(screen.getByTestId('title-mismatch'))).toContain(
|
||||
'“WWW”, “WWW (instrumental)” and “WWW (Radio Edit)”'
|
||||
);
|
||||
});
|
||||
|
||||
test('titles differing only in case or spacing are the same title', () => {
|
||||
const r = response();
|
||||
r.groups[0] = {
|
||||
...r.groups[0],
|
||||
members: [
|
||||
member('www-01', { title: 'WWW (Instrumental)' }),
|
||||
member('www-02', { title: ' www (instrumental) ' })
|
||||
]
|
||||
};
|
||||
renderWith(r);
|
||||
expect(screen.queryByTestId('title-mismatch')).toBeNull();
|
||||
});
|
||||
|
||||
test('matching titles raise nothing', () => {
|
||||
renderWith(response());
|
||||
expect(screen.queryByTestId('title-mismatch')).toBeNull();
|
||||
});
|
||||
|
||||
// Across encodings a "Remastered" suffix is routine, not a mislabel.
|
||||
test('an acoustic group with different titles raises nothing', () => {
|
||||
const r = www();
|
||||
r.groups[0] = { ...r.groups[0], tier: 'acoustic', worst_bit_error_rate: 0.04 };
|
||||
renderWith(r);
|
||||
expect(screen.queryByTestId('title-mismatch')).toBeNull();
|
||||
});
|
||||
});
|
||||
|
||||
// Three states all show zero groups. Each must say which it is.
|
||||
test('empty while still fingerprinting says so', () => {
|
||||
renderWith(
|
||||
|
||||
Reference in New Issue
Block a user