WAV tags are written but never read: metadata.ExtractTags cannot see a WAV's id3 chunk #104
Closed
opened 2026-08-18 22:18:56 +00:00 by logan
·
2 comments
No Branch/Tag Specified
main
fix/146-stub-etxtbsy
fix/175-wizard-follows-the-library
fix/231-setter-rollback
fix/197-duplicate-column-label
docs/225-fixtures-wav-tags
docs/220-skill-check-scope
test/217-fixture-names-in-queue-selection
fix/216-riff-parse-allocation
fix/170-queue-header-action-names
fix/210-nav-sheet-scroll-affordance
docs/50-readme-landing-page
feat/65-art-prefetch-ahead
feat/71-more-as-a-bottom-sheet
feat/54-native-touch-feel
feat/67-entity-links-into-menus
test/196-visual-tier-gates
fix/138-ui-test-storage-leak
fix/104-wav-tags-read
fix/207-sheet-scroll-affordance
fix/204-ui-visual-update-filter
pi-agent-backlog-automation
63-touch-model-phase-2
63-android-touch-model
186-touch-targets-settings
186-touch-targets-page-header
187-seek-bar-hit-area
189-190-explore-correctness
135-android-underrun-instrumentation
51-android-small-screens
fix/171-phone-queue-scrim
fix/137-touch-only-affordances
fix/154-nested-css-check
feat/58-mini-player-progress-line
fix/66-album-page-scrolls-as-one
60-context-menu-action-sheet
64-android-system-volume
59-slim-the-mini-player
55-queue-as-a-screen
feat/57-drop-the-android-top-bar
feat/62-jobs-as-a-notification
fix/53-seek-bar-never-moves
fix/159-android-task-app-id
fix/52-android-activity-recreation-restarts-the-process
fix/150-expand-button-under-the-art
feat/42-inline-volume-and-centred-transport
fix/156-queue-selection-fixture-order
fix/151-fuse-the-scroll-guard-and-the-write
fix/43-queue-panel-selection
fix/143-top-bar-fits-its-window
feat/27-jobs-into-settings
feat/25-configurable-sidebar-tabs
feat/6-global-back-forward
fix/72-active-view-broadcast
fix/69-page-header-action-overflow
fix/quick-wins-batch
fix/118-in-library-clear
fix/61-mini-player-plain-text
fix/68-hover-affordances-pointer
fix/119-dev-headless-port
fix/130-issue-claim-user
fix/131-codegen-check-scope
feat/28-autotag-match-on-album
feat/17-demote-version-selector
feat/38-ownership-visibility
ci/115-manual-release
feat/34-icon-language
feat/7-full-tracklist-toggle
fix/16-tagwriter-totals
fix/unclaim-ca-certs
fix/unclaim-shell
ci/unclaim-on-close
docs/closing-keyword
docs/retire-stale-planning-docs
docs/issue-driven-workflow
integration/small-fixes
fix/small-issue-batch
fix/queue-toggle-state
fix/drag-count-badge
fix/album-card-year
fix/album-tracklist-heading
fix/seek-bar-clock-width
fix/explore-art-scanner-requests
chore/workflow-guardrails
v0.7.0
v0.6.0
v0.5.0
v0.4.0
v0.3.1
v0.3.0
v0.2.3
v0.2.2
v0.2.1
v0.2.0
v0.1.0
v0.0.1
v0.0.0
Labels
Clear labels
Area/Design
Area/Downloads
Area/Explore
Area/Library-UI
Area/Metadata
Area/Packaging
Area/Player
Area/Queue
Area/Settings
Area/Shell-Nav
Compat/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
Platform/Android
Platform/Desktop
Breaking change that won't be backward compatible
Something is not working
Documentation changes
Improve existing functionality
New functionality
This is security issue
Issue or pull request related to testing
Priority
Critical
1
The priority is critical
Priority
High
2
The priority is high
Priority
Medium
3
The priority is medium
Priority
Low
4
The priority is low
Reviewed
Confirmed
1
Issue has been confirmed
Reviewed
Duplicate
2
This issue or pull request already exists
Reviewed
Invalid
3
Invalid issue
Reviewed
Won't Fix
3
This issue won't be fixed
Status
Blocked
1
Something is blocking this issue or pull request
Status
Need More Info
2
Feedback is required to reproduce issue or to continue work
Status
Abandoned
3
Somebody has started to work on this but abandoned work
Status
In Progress
Somebody is actively working on this right now
Milestone
No items
No Milestone
Projects
Clear projects
No projects
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: yonlu/yellowjacket#104
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Finding
Tripped over while writing the totals round-trip test for #16: the WAV
case of
TestWriteTotals_RoundTripsInEveryFormatfailed with everyfield zero, not just the totals.
tagwriterwrites a WAV's tags into a RIFFid3chunk(
backend/tagwriter/wav.go), correctly — butdhowden/tag, which iswhat
metadata.ExtractTagsis built on, has no RIFF/WAVE reader atall. There is no
wav.goin the module and nothing matchesRIFFinits dispatch. So the scanner cannot see a WAV's tags: not the totals,
not the title, not the artist, not the embedded cover.
Reproduction
Why nothing caught it
backend/tagwriter/wav_test.goverifies its writes by parsing theid3chunk itself (readWavID3Tags) rather than by reading the fileback through
metadata. That is a reasonable unit test of the writerand it is why the writer is known-good; it just cannot see that the
other half of the round trip is missing. Every other format's tests go
through
metadata.ExtractTags.Consequence
WAV is in
metadata.SupportedFileExtensions, so these files scan andplay. They just import with whatever the filename fallback gives and
stay that way — editing tags on a WAV, autotagging a WAV folder, or
importing a WAV download all appear to succeed and change nothing the
library can see. The file on disk really is tagged; other players will
read it.
Direction
metadataalready has a lenient ID3v2 recovery path(
extractID3v2Lenientintags_lenient.go) that takes a reader andparses ID3v2 with
bogem/id3v2— the same library the WAV writeruses. The missing piece is locating the
id3chunk and handing thatreader to it.
parseRIFFinbackend/tagwriter/wav.gois the parser,so this is mostly deciding where it should live so both packages can
use it (
metadataimportingtagwriteris the wrong direction).Worth measuring first how much WAV is realistically in a library —
this may be
Priority/Lowon volume alone. Filing it because it isinvisible, not because it is urgent.
Picking this up on
fix/104-wav-tags-read, fromorigin/main.Approach, following the Direction: the RIFF read side moves into a
new
backend/riffpackage, becausemetadatacannot importtagwriterin either direction —tagwriteralready importsmetadata, so it is an import cycle rather than merely the wrong wayround.
backend/tagtotalsis the precedent for a tiny package thatexists so two callers need not import each other.
metadata.ExtractTagsFromReaderthen dispatches on the container: aRIFF/WAVE file's tags are the
id3chunk, handed to the existingextractID3v2Lenient, which is alreadybogem/id3v2— the samelibrary the writer uses.
One thing the move is not:
parseRIFFreads every chunk's data intomemory, which is what rewriting a file needs and is exactly wrong on
the scan path, where the
datachunk is the whole of the audio. Sothe read side gets a seek-over-chunks locator beside the existing
parser, sharing one header walker.
totals_test.go's WAV case reads the chunk itself today and itscomment says why; that is the seam the issue's "why nothing caught it"
names, so it goes through
metadata.ExtractTagslike the other threeformats afterwards.
Not doing the volume measurement the issue suggests: it would decide
the priority, and the priority is already
Low.PR #218 — #218 —
CI green (
checkande2e, the latter covering chromium and WebKit).The Direction held, with one correction to its wording:
metadataimporting
tagwriteris not merely the wrong direction, it is animport cycle —
tagwriteralready importsmetadata. So the RIFFread side is a new
backend/riff, onbackend/tagtotals' precedent.parseRIFFmoved there verbatim asriff.Parse, but the scan pathdeliberately does not use it: it holds every chunk's data in
memory, which is what rewriting a file needs, and a WAV's audio is a
chunk — so
riff.ID3Chunkseeks over what it is not looking forinstead. Both walk the same headers.
Two decisions the issue did not name. The container is asked before
tag.ReadFromrather than after it fails, because dhowden's lastresort is an ID3v1 trailer and a WAV carrying both would be read by the
wrong one. And an untagged WAV — no chunk, RF64, a tag with every frame
cleared — reads as empty metadata with no
TagReadWarning, sincethe filename fallback is the right answer there and a warning would
report a fault on a healthy file.
TestWAVTagsAreNotReadableYetdid its job exactly as written: itfailed the moment the reader learned and told me in its own comment
what to update. Deleted,
wavskip dropped fromTestFixturesMatchManifest, andtotals_test.go's WAV case moved ontometadata.ExtractTags— which is the seam "why nothing caught it"names.
Measured on a rebuilt seed: the fixture library's two WAVs now import
as
Tone A/Tone B,Field Recordings,Test Tones,Field Recording, 2024, with cover art, where they used to arrive untitledwith no album.
make e2ewas run for that reason and is green.Not done, deliberately: the volume measurement the issue suggests — it
would decide the priority and the priority is already
Low. Twofindings filed instead of folded in: #216 (
riff.Parseallocateswhatever size a chunk header claims — writer path only) and #217
(an e2e comment that names these two WAVs as the library's albumless
tracks, which they no longer are).