Repository navigation
fix(engine): a failed parallel capture names the worker that failed, not the peers it stopped - #7803
Merged
miguel-heygen merged 1 commit intoNov 15, 2026
Conversation
…not the peers it stopped When one capture worker fails, the pool aborts its peers and each of them reports "Parallel worker cancelled". The pool message listed every worker in id order, so the one real cause sat between cancellations: Worker 0: Parallel worker cancelled; Worker 1: Parallel worker cancelled; Worker 2: Disk capture may need ~2712.6 MB ...; Worker 3: Parallel worker cancelled The message now carries the failures that are not cancellations and counts the peers that were stopped because of them. A pool where every worker was cancelled keeps the full list. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
miguel-heygen
approved these changes
Nov 15, 2026
miguel-heygen
left a comment
Collaborator
There was a problem hiding this comment.
Verified at d30ece6: formatPoolFailure keeps the real cause(s) and counts the cancelled peers; all-cancelled (outside abort) and no-cancelled keep the old list. The message still starts with [Parallel] Capture failed: Worker N:, kind/cause/workerDiagnostics unchanged, and nothing outside the coordinator matches on "Parallel worker cancelled". Tests pin all four shapes plus the peer-abort path. CI green.
Merged
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.
What
When one worker of a parallel capture fails, the render's failure message now carries that worker's error and a count of the peers it stopped, instead of listing every cancelled peer around it.
Why
A 1800-frame render of mine failed on a nearly full disk (0.9.43, 6 workers). The reason was in the message, but as the fourth of six entries:
The first fatal failure aborts the pool (
createPoolFailureHandler), each aborted peer is classifiedcancelled, andexecuteParallelCapturejoins every failed worker's message in id order. So the cancellations are a consequence of the one real failure, and they come first whenever the failing worker is not worker 0. The same line is repeated in the progress row and in theFailure summarylog.Related work
How
packages/engine/src/services/parallelCoordinator.ts: a newformatPoolFailure(errors)builds the message.cancelledand some are, it prints only the former and appends(N other workers were stopped after this failure).Only the message text changes. The failure's
kind,cause,workerDiagnosticsandpageErrorLinesare built as before, and the message still starts with[Parallel] Capture failed: Worker N: …, whichisRecoverableParallelCaptureErrorand the producer tests match on.Test plan
Unit (
packages/engine):parallelCoordinator.test.ts: a new case forformatPoolFailure(three stopped peers, one stopped peer, no peers, all cancelled).parallelCoordinator-peerAbort.test.ts: the existing two-worker peer-abort case now also checks the rejected message. On main (04ee926d) with the fix stashed it fails withexpected '[Parallel] Capture failed: Worker 0: …' to contain '(1 other worker was stopped after thi…'; with the fix both files pass (64 tests).vitest run src/services/inpackages/engine: 2292 passed. The 2 failures arebeginFrameReuse.browser.test.ts(HeadlessExperimental.beginFrame: Target closed), which fail the same way on main on this macOS machine.packages/producer:renderOrchestrator.test.ts,captureStageError.test.ts,renderEventPublisher.test.ts(vitest, 321 passed) andcaptureStreamingStage.test.ts(bun test, 48 passed).tsc --noEmit, oxlint, oxfmt,fallow audit --base origin/mainand the comment ratchet are clean.Real CLI: a 3600-frame 1080p project (the blank template over a noisy full-frame background that pans for 120 s), rendered with
TMPDIRon a 1.3 GB disk image so the capture runs out of room:hyperframes render --workers 4 -q draft.Before (main
04ee926d):After:
(The estimate differs between the two runs because it is measured from whichever worker's first 10 frames land first.)
🤖 Generated with Claude Code