Skip to content

fix(worker): let consumer own asset state on failure (DEV-34)#6

Merged
RndmCodeGuy20 merged 1 commit into
stagingfrom
feat/dev-34-consumer-owns-asset-state
Jun 16, 2026
Merged

fix(worker): let consumer own asset state on failure (DEV-34)#6
RndmCodeGuy20 merged 1 commit into
stagingfrom
feat/dev-34-consumer-owns-asset-state

Conversation

@RndmCodeGuy20

Copy link
Copy Markdown
Owner

Closes DEV-34.

processor.py's generic except wrote assets.status=failed on every exception — including RetryableException — so a retryable failure flipped the asset to failed while the job was still pending/retrying. A polling client saw a permanently-broken upload until (if) a later attempt succeeded.

Fix

  • Remove the asset-status write from the processor's except; keep logging + raise
  • The consumer (_handle_job) is now the single owner of asset state: failed only past the retry cap, ready on success, untouched during retries (asset stays processing)
  • Add a regression test asserting no failed-status write occurs on a processing exception

Note

Verified in an isolated venv — the local Poetry toolchain is currently broken (orphaned 3.12 interpreter after a homebrew upgrade).

🤖 Generated with Claude Code

- Stop the processor stamping assets.status=failed on every exception
- Retryable failures no longer leave the asset stuck failed mid-retry
- Consumer already marks failed only past the retry cap, ready on success
- Add regression test asserting no failed-status write on processing error
@RndmCodeGuy20 RndmCodeGuy20 merged commit 7246bb2 into staging Jun 16, 2026
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