fix: reduce recording source finalization scheduling delays - #2250
Merged
Conversation
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.
Long desktop Instant recordings currently schedule a durable Workflow step for every source checkpoint. A completed production recording spent 444.6 seconds between 494 checkpoint steps, in addition to 474.9 seconds executing them.
Batch up to 32 checkpoint advances, yielding once 15 seconds have elapsed after a completed page. Each page still reloads the current job, video, and checkpoint, renews ownership, and persists its revision before the next page starts. The existing storage concurrency, source identity checks, multipart recovery, upload acknowledgment, output verification, and media processing remain unchanged. An in-flight page keeps its existing timeout and is saved before yielding.
If an operation fails after saved progress, yield to a new durable step so the next checkpoint has a fresh retry allowance. Failures without progress still throw to the existing retry mechanism. Permanent source errors retain their existing blocked classification.
Validation:
next typegen(including workflow compilation),tsc -b apps/web, andgit diff --checkpass.The long trace estimates source preparation at 8m22s instead of 15m20s when retaining its measured execution times and average inter-step delay. The short Drive estimates improve only about 2 seconds. These are timing replays, not production measurements of this implementation; storage latency, downstream media processing, and transcription still take time.
No database migration, desktop release, or new environment variable is needed. The checkpoint format and workflow step name are preserved. This does not change processing during recording or the legacy upload handshake; acknowledging uncommitted uploads requires a separate client-aware change to protect older clients' cleanup behavior.
The PR appears safe to merge; no actionable correctness, security, or repository-rule issues remain.
Summary