release-group MBID backfill queries a table renamed away in plan 013 #189
Closed
opened 2026-08-21 20:17:01 +00:00 by logan
·
1 comment
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#189
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.
Report
BackfillReleaseGroupMBIDsqueries a table that has not existed sinceplan 013. It fails on the first statement, on every launch, and the
backfill it performs has therefore never run since
e7748f1.Found on the reference device (TLP301, Android 14) with a real
1,577-track library, in the first minute of logcat output after #160
landed — which is the point: this warning has been written on every
launch, desktop included, and on Android it went to
/dev/null.Findings
e7748f1("shape the library like files, and shrink the catalog")renamed
release_groupstoalbums.backend/database/sql/schemas/ albums.sqlsays so in its own second line — "This isrelease_groupsrenamed, and the rename is the point". Two raw-SQL statements in
backend/explore/explore.gowere not renamed with it:backfillReleaseGroupMBIDs, theSELECTat :285UPDATEat :347, in the same functionBoth are raw
QueryContext/ExecContextstrings rather than sqlcqueries, which is the whole reason the rename missed them: sqlc reads
sql/schemas/and would have failed to generate against a table thatis not declared.
grepsays these are the only two left in the tree.The columns the statements want are all present on
albumsunder thesame names (
id,mbid,pending_release_mbid), so this looks like apure rename rather than a reshaping.
What it costs
The function is what resolves a release-level MBID into the
release-group MBID everything else on the album page is keyed by. Its
own doc comment describes the split: a scan cannot afford a live
MusicBrainz call, so
library.updateMBIDsstashesMUSICBRAINZ_ALBUMIDin
pending_release_mbidand defers to this. Many taggers write thattag instead of
MUSICBRAINZ_RELEASEGROUPID, so for those albums thepending value is written by every scan and resolved by nothing —
the album is untagged as far as the catalog is concerned, permanently.
Worth confirming while fixing: how many rows are actually sitting on a
non-null
pending_release_mbidin a real library, since that is thesize of the affected set.
Direction
albums.sqlrather than assuming, since 013 reshaped as well asrenamed elsewhere.
NewTestDBwould have caughtthis and would catch the next one — the failure is a first-statement
error, so it does not need a network or a fixture library, only a
row with a
pending_release_mbid.made every other statement in the repo immune to this rename, and
neither of them uses anything outside sqlc's grammar.
Related
#160 is what made this visible on Android; it was equally invisible on
desktop only in the sense that nobody was reading a
Warnon a launchthat otherwise looked healthy.
Taking this together with #190 on
189-190-explore-correctness. Bothare Explore correctness, both surfaced in the same minute of logcat
after #160, and both are "supposed to work, doesn't" rather than
ergonomics.
Approach: rename the table in both statements, but check the columns
against
albums.sqlrather than assuming, since plan 013 reshaped aswell as renamed elsewhere. Then a test against
NewTestDBwith a rowcarrying a
pending_release_mbid-- the failure is a first-statementerror, so it needs no network and no fixture library, which is exactly
why nothing caught it.
Also looking at whether these two want to be sqlc queries. That is what
made every other statement in the repo immune to this rename, and
neither uses anything outside sqlc's grammar.