v0.16.0: the file already told you

Two real failures from the first hour of round 45, both fixed by treating
the file itself as evidence.

"B. Clem - Zuuso [1025657891]" fingerprinted fine and matched nothing.
Checked before building: AcoustID returns zero results, a MusicBrainz text
search for "Zuuso" returns zero, iTunes returns zero. The track is in no
metadata service on earth, so no smarter lookup could have answered it —
but its filename said exactly what it was. New filename_tags.py reads that,
validated against all 474 files in the untagged folder rather than invented
examples: it strips yt-dlp ids, drops "(Official Video)" noise, splits
Artist - Title, reads a leading 1-04, and falls back to the iTunes tree.
It is careful about what it removes — an 11-char trailing token counts as a
YouTube id only if it carries a digit, an underscore or flipping case, or
"Cold Draft-Underground" loses a word, and a hyphen only splits when it has
spaces around it so Jay-Z survives.

A guess says it is one: candidates carry a source, and the dialog quotes a
confidence only for real fingerprint matches.

The file now ranks lookup results too, which fixes the Alhambra case: token
overlap (words double, bare numbers single), a duration bucket against the
recording lengths AcoustID returns, and a filename year that predates what
the database knows. Live also stops counting as a demerit — it was lumped in
with Compilation and buried a live album for a file whose name said "Live At
The Alhambra". That track now proposes the right album with year 1961
instead of a compilation with 2002.

The year genuinely needed the filename: MusicBrainz's own first-release-date
for "Ahmad Jamal's Alhambra" is 2002, because its three original 1961
pressings are stored undated. The obvious fix of a second MusicBrainz call
returns the same wrong answer.

Not done on purpose: trav rejected "never propose a shorter title" —
truncating is wanted, since the garbage is usually the part being dropped.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NsiFHdyVg1UhBSxDJfTNRm
This commit is contained in:
2026-09-02 17:24:07 -04:00
co-authored by Claude Opus 5
parent f0d4d1eff2
commit 4acc57b648
9 changed files with 674 additions and 36 deletions
+46
View File
@@ -1,5 +1,51 @@
## Done
### Round 46 (2026-09-02) — The file already told you (v0.16.0)
Round 45 shipped and trav broke it in two places within the hour, both real.
"B. Clem - Zuuso [1025657891]" fingerprinted fine and matched **nothing**, and
"Snowfall (Live At The Alhambra_1961)" matched but proposed a 2002 reissue year
and ranked a compilation above the album its own filename named.
- [x] **The limit is the database, not the fingerprint.** Verified before
building anything: that Zuuso fingerprint returns zero AcoustID results,
a MusicBrainz text search for "Zuuso" returns zero, and iTunes returns
zero (and irrelevant fuzz for "B. Clem"). The track exists in no metadata
service on earth. So no smarter lookup — LLM or otherwise — could have
answered it, because there was nothing to answer with.
- [x] **But the filename knew.** New `lintunes/filename_tags.py` reads tags out
of the name yt-dlp gave the file. "B. Clem - Zuuso [1025657891]" → artist
"B. Clem", name "Zuuso", which is exactly what trav said it was. Checked
against all 474 files in the untagged folder, not against invented
examples.
- [x] **Careful about what it strips.** An 11-character trailing token is only
a YouTube id if it carries a digit, an underscore, or case that flips
repeatedly — otherwise "Cold Draft-Underground" loses a word. A hyphen
only splits artist from title when it has spaces around it, so "Jay-Z"
and "350-440-DialTone" survive. A 4-digit year is never a numeric id.
- [x] **A guess is labelled a guess.** `IdentifyCandidate.source` is
"acoustid" or "filename"; the dialog quotes a match confidence only for
the former and says "No database knows this — read from the file's name"
for the latter, rather than inventing a percentage.
- [x] **The file now ranks the results too.** `hint_for(track)` feeds tag +
filename tokens into `parse_lookup`: overlap scoring (words count double,
bare numbers single — "alhambra" identifies a release, "1961" appears in
every compilation spanning it), a coarse duration bucket against the
recording lengths AcoustID returns, and a filename year that predates
what the database knows. Alhambra now ranks the right album first with
year 1961 instead of a compilation with 2002.
- [x] **Live is no longer a demerit.** It was lumped in with Compilation, which
buried a live album for a file whose name said "Live At The Alhambra".
Only compilations, remixes, interviews and the like are demoted now.
- [x] **Why the year needed the filename at all:** MusicBrainz's own
`first-release-date` for "Ahmad Jamal's Alhambra" is *2002* — its three
original 1961 pressings are in the database undated. A second MusicBrainz
call, the obvious fix, returns the same wrong answer. 1961 exists only in
trav's filename.
- [x] Not done, deliberately: trav rejected "never propose a shorter title" —
truncating is *wanted*, because the garbage in a title is usually the
part being dropped.
### Round 45 (2026-09-02) — Ask the song what it is (v0.15.0)
Some files arrive with the title right and everything else missing or wrong,