fix(etl): persist orig_filename and stop track updates from unlinking stems - #421
Merged
Conversation
Three parity/robustness fixes to entity-manager track writes, found while investigating stems that never appeared on a remix contest page (AudiusProject/api#995): - Persist orig_filename on create and update (never-clear, like the CIDs). Only legacy Python-indexed rows carried it, and downstream consumers (/v1/tracks/{id}/stems) read it for stem download filenames. - Ignore an explicit "stem_of": null on update. Clients send the full track object on edit, so a carried null permanently unlinked the stem from its parent — same failure class as the CID wipe fixed in #410. No edit flow legitimately detaches a stem; removing one means deleting the stem track. - Upsert the stems join row when an update carries stem_of, keeping the join table in sync and giving an on-chain repair path for stems whose link was lost. The regression test replays the exact on-chain create tx from the incident (core block 28480422) and covers all three behaviors. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Contributor
|
Thx!!
…On Mon, Jul 27, 2026 at 17:48 Dylan Jeffers ***@***.***> wrote:
Merged #421 <#421> into
main.
—
Reply to this email directly, view it on GitHub
<#421?email_source=notifications&email_token=AAU22YQEHZQJC5WONLYF4K35G7E2TA5CNFSNUABQM5UWIORPF5TWS5BNNB2WEL2JONZXKZKFOZSW45CON52GSZTJMNQXI2LPNYXTEOBVGY2DCOBQHE3DLJTSMVQXG33OVJZXKYTTMNZGSYTFMSSWK5TFNZ2KYZTPN52GK4S7MNWGSY3L#event-28564180965>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAU22YWRUDA24Q6MY6P5N2L5G7E2TAVCNFSNUABGKJSXA33TNF2G64TZHMYTANBZGIZTIOBQGI5US43TOVSTWNBZHEZDIOJTGMYTRILWAI>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
dylanjeffers
added a commit
to AudiusProject/api
that referenced
this pull request
Jul 27, 2026
…audio#421) (#996) Bumps both `github.com/OpenAudio/go-openaudio` and `.../pkg/etl` pins from `b4a5ebe` (2026-07-16) to `1d9f697` — the merge of **OpenAudio/go-openaudio#421**, same flow as #994 did for the #410 CID fix. ## What the new pin brings (ETL / entity manager) - Persist `orig_filename` on track create/update (never-clear, like the CIDs) — new stem rows no longer rely on the `/stems` endpoint's title fallback - Ignore explicit `"stem_of": null` on track updates so client edits can't unlink a stem from its parent (#410 failure class) - Upsert the `stems` join row when an update carries `stem_of` (on-chain repair path for lost links) Intervening upstream commits also included (library-only for api): mediorum transcode/retry fixes (#338, #417–#419) and core/logging spam guards (#420). Nothing release- or mainnet-config-related. ## Relation to #995 #995 is the unblocking change (endpoint tolerates NULLs already in the DB); this bump prevents recurrence at the write path. Both trace back to the July stems-invisible incident (Andrew Lux's "Alone" remix contest). Verified locally: `go build ./...`, stems endpoint tests, and `go test ./indexer/...` all pass on the new pin. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Context
Pairs with AudiusProject/api#995 (the July 2026 "contest stems invisible" incident — Andrew Lux's "Alone" remix contest). The api PR is the unblocking change: it makes
/v1/tracks/{id}/stemstolerate the row shapes the ETL currently produces. This PR fixes the ETL so those shapes stop being produced — it prevents recurrence rather than unblocking anything.Verified against the incident's real chain data: the on-chain create txs (core blocks 28480416–28480440) always carried correct
stem_ofandorig_filename; the losses documented below are write-path gaps, not chain/client issues.Changes
Persist
orig_filenameon track create/update. The create handler never extracted it, so only legacy Python-indexed rows carry a value;/v1/tracks/{id}/stemsreads it for stem download filenames (NULLs there 500'd the endpoint before api#973/#995). On update it gets the same never-clear treatment as the CIDs, since only the upload flow sets it and clients resend the full track object on edit.Ignore an explicit
"stem_of": nullon update. Clients send the full track object on edit, so a carried null permanently unlinked a stem from its parent — the same failure class as the CID wipe fixed in fix(etl): don't let track updates wipe CIDs via explicit null #410. No edit flow legitimately detaches a stem: removing one means deleting the stem track.Upsert the
stemsjoin row when an update carriesstem_of. Keeps the join table in sync with the jsonb and provides an on-chain repair path (a signed UpdateTrack can restore a lost parent link).Tests
stem_repro_test.goreplays the exact on-chain create tx from the incident (user 8151, track 61740430, core block 28480422) and asserts:stem_of+stemsrow persist on create,orig_filenamepersists, an explicit"stem_of": nullupdate does not unlink, and an update carryingstem_ofrestores a deletedstemsrow. Fullprocessors/entity_managersuite passes.Follow-up
Once released, bump the ETL pin in AudiusProject/api (same flow as api#994 did for #410).
🤖 Generated with Claude Code