Skip to content

fix(mediorum): restore worker identity at transcode completion - #571

Closed
raymondjacobson wants to merge 3 commits into
mainfrom
codex/fix-transcode-attribution-race
Closed

fix(mediorum): restore worker identity at transcode completion#571
raymondjacobson wants to merge 3 commits into
mainfrom
codex/fix-transcode-attribution-race

Conversation

@raymondjacobson

@raymondjacobson raymondjacobson commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

After #570, main-branch CI repeatedly completed an upload with an empty transcoded_by, failing both worker attribution and the transcode statistics assertions in TestUploadFile.

A mirror worker can read the initial upload row, then persist that whole snapshot after the transcode worker has written its identity with busy. Completion reloads the row and used to inherit that now-empty identity. Previously, analysis failure wrote the in-memory upload and could incidentally restore the identity; #570 correctly stopped analysis from publishing the overall upload state and removed that incidental repair.

Persist the completing worker's identity alongside its CID, timestamp, and done status. Keep the CIDless fix intact: analysis still cannot complete the upload. This is a narrow correction for transcode attribution, not a general solution to concurrent full-row snapshot writes.

Validation:

  • The deterministic regression failed on the test-only commit with the expected worker host versus an empty actual value: https://github.com/OpenAudio/go-openaudio/actions/runs/34266825416.
  • With the correction, the full Mediorum and general unit suites passed, but integration failed waiting for devnet readiness: https://github.com/OpenAudio/go-openaudio/actions/runs/34267629680. Its underlying cause is unresolved; the old workflow removed node containers without collecting their logs.
  • The regression forces a stale mirror operation immediately after the busy operation, then checks both the final row and completion operations for a CID and worker identity.
  • gofmt and git diff --check pass. Docker is unavailable locally, so tests run through the repository CI harness.

CI now captures container state, resource usage, and node logs before teardown when integration fails. The run with those diagnostics passed all build and test jobs with unchanged application code. Integration completed in 35.454 seconds; TestBlockCreation, which previously failed its 300-second readiness wait, passed in 0.53 seconds: https://github.com/OpenAudio/go-openaudio/actions/runs/34270220380.

The original merged run passed on its third attempt, consistent with a timing-dependent failure. The deterministic test establishes the bug independently of that intermittent upload test.

The passing rerun establishes that the integration failure is intermittent, but does not establish its root cause. No readiness timeout was increased and no test was disabled. The original failed run has no retained node logs, so attributing it to a specific node crash, resource limit, or startup race would be speculation.

@raymondjacobson
raymondjacobson marked this pull request as ready for review September 8, 2026 19:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant