Repository navigation
Conversation
The Python batch task succeeds as a task even when every clip fails, and both batch export handlers marked the job "done" / "Export complete!" regardless. job_status also dropped the job's result for web-server jobs, so per-clip errors and output paths never reached the caller. - summarizeBatchOutcome derives the job's final state from the per-clip rows: nothing rendered -> error with the first clip's error; some failed -> "N of M clips rendered. Failed: ..." - /api/batch-clips and /api/mcp/export use it and broadcast job-error when nothing rendered - job_status passes job.result through for web-server jobs Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
nmbrthirteen
left a comment
There was a problem hiding this comment.
Thanks for this. The batch outcome logic is right, and tsc, npm test (468 passed) and lint pass locally. Two side effects need fixing before merge.
1. job_status now returns the full transcript for transcription jobs.
src/handlers/transcribe.handler.ts passes job.result through for every web-server job. The transcribe job stores the full word-level transcript in job.result (src/ui/web-server.ts, the transcribe handler). Polling a 1-hour transcription with job_status now puts the whole transcript into the agent's context. The next_step text already points agents to get_ui_state(include_transcript: true) for that.
Fix: /api/job/:id already returns type. Add it to the poll schema and leave result out when type === "transcribe". A test that polls a finished transcribe job and asserts no result would cover it.
2. An all-failed batch can render twice.
All-failed batches now finish with status: "error", so the sync polling loops in src/server.ts throw job.error. That error lands in the catch that calls studioUnreachable, which only checks the text for "fetch failed" or "ECONNREFUSED". A clip error such as "TypeError: fetch failed" from a render then reads as "studio down", and the MCP server renders the whole batch again inline.
Fix: throw job failures outside the studioUnreachable catch, or tag them so they skip that check. Please add a test with a clip error containing "fetch failed".
Smaller points, your call:
- Sync
create_clipandbatch_create_clipsused to return every clip's error. On an all-failed batch they now get only the first, cut to 300 chars. Includingresultin the thrown error, or returning it, would keep them. - When every clip fails, the studio shows one banner and stays in
review. The per-clip errors and Retry buttons only render indone. - "All 1 clips failed" for a single clip. A 15-clip batch with 14 failures builds a status line of about 4 KB. Capping the listed failures would help.
The Python batch task succeeds as a task even when every clip fails, and both batch export handlers marked the job "done" / "Export complete!" regardless. job_status also dropped the job's result for web-server jobs, so per-clip errors and output paths never reached the caller.
What this does
How I tested it
Checklist
npx tsc --noEmitandnpm testpass (pluspytest tests/if you touched the backend)Summary by CodeRabbit