@remotion/serverless-client: Fix cost estimate increasing after fatal error#6959
Merged
JonnyBurger merged 1 commit intomainfrom Apr 1, 2026
Merged
@remotion/serverless-client: Fix cost estimate increasing after fatal error#6959JonnyBurger merged 1 commit intomainfrom
@remotion/serverless-client: Fix cost estimate increasing after fatal error#6959JonnyBurger merged 1 commit intomainfrom
Conversation
…al error When a render encountered a fatal error, the cost estimation for unfinished chunks used Date.now() on every getRenderProgress call, causing costs to grow indefinitely even with no lambdas running. Store a fatalErrorTimestamp when a fatal error is recorded and use it to cap the elapsed time calculation for unfinished chunks. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Contributor
|
Reviewed PR #6959 — no actionable issues found. The fix correctly caps the cost estimate at the time of the first fatal error by threading a Task list (4/4 completed)
|
Contributor
There was a problem hiding this comment.
Clean fix. The fatalErrorTimestamp is recorded exactly once on the first fatal error, threaded correctly through to estimatePriceFromMetadata, and the ?? null fallback in progress.ts handles backward compatibility with serialized data from before this change. All callsites updated, no issues found.
Big Pickle (free) | 𝕏
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.

Summary
getRenderProgress()kept increasing on every call, even though no Lambda functions were runningDate.now()to estimate their duration, so the cost grew linearly with wall-clock timefatalErrorTimestampwhen a fatal error is recorded and use it to cap the elapsed time calculationTest plan
price-calculation.test.tspassesbun run buildsucceedsgetRenderProgress()returns stable cost values after the error🤖 Generated with Claude Code