Files
karaoke-gen/backend/scripts
Andrew Beveridge ☄️andClaude Opus 4.6 7b7c0f7ff4 fix: allow PENDING → DOWNLOADING_AUDIO state transition (#445)
## Summary
- Adds `DOWNLOADING_AUDIO` as a valid transition from `PENDING` in the
state machine
- Fixes 500 error on the `create-from-search` endpoint deployed in #444
- The `create-from-search` path creates a job (PENDING) then transitions
directly to DOWNLOADING_AUDIO since audio is pre-selected from the
search session

## Changes
- `backend/models/job.py` — Add DOWNLOADING_AUDIO to PENDING transitions
- `backend/scripts/generate_state_diagram.py` — Keep diagram in sync
- `backend/tests/test_standalone_search.py` — Add state transition test

## Testing
- All 31 standalone search tests pass
- All 158 related tests pass (standalone + models + audio search)

@coderabbitai ignore

---
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-02 19:22:32 -05:00
..