Repository navigation
fix(web): stop empty Instant caps from delaying stuck desktop recording recovery - #3107
Open
richiemcilroy wants to merge 4 commits into
Open
richiemcilroy wants to merge 4 commits into
richiemcilroy wants to merge 4 commits into
Conversation
…s cannot delay recovery for days
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
Member
Author
|
hey @greptileai, please re-review the PR |
richiemcilroy
marked this pull request as ready for review
October 24, 2026 14:46
Member
Author
|
hey @greptileai, please re-review the PR |
This branch was successfully deployed
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.
The
finalize-stale-desktop-segmentscron has a legacy pass for segmented desktop recordings that never got a processing job, usually because the app'srecording-completecall never arrived. Each run takes the oldest eligible rows (updatedAt ASC, 5 to 20 of them) and finalizes any whose segment manifest is complete.Instant recordings that never captured anything also sit in that window. Their rows never change: no manifest, no write-back, and the same
updatedAton every run. So they hold the front of the queue for their whole 7 days, and a recording that does have a finished manifest is only reached in the last hours before it would leave the window.flowchart LR W["Eligible legacy rows<br/>1 hour to 7 days old"] --> O["Oldest first<br/>every remaining slot, as before"] W --> N["Newest first<br/>up to 5 more"] O --> U[Oldest rows, then newest rows not already picked] N --> U U --> C[Check each manifest, as before]apps/web/lib/desktop-segments-recovery.ts:295).DESKTOP_SEGMENTS_LEGACY_NEWEST_BATCH_SIZE), so a recording is checked within one run of qualifying.Simulation
desktop-segments-recovery.test.tsadds a simulation of a day of 15-minute runs over 8 days of never-changing empty rows, with one stuck recording that has a finished manifest. It asserts:A second simulation keeps the durable pass full, so only 5 legacy slots remain, and adds a burst of rows that start together, one of them a finished recording. The finished recording must still be reached before it ages out.
Against the previous query the stuck recording is never reached during the day; giving the newest rows some of the oldest-first slots instead would miss the recording in the burst.


Confidence Score: 5/5
The PR appears safe to merge; the update preserves oldest-first coverage while checking newer recordings too.Summary
The update preserves every oldest-first recovery slot and adds up to five newest eligible recordings, skipping duplicates.
Reviews (3) · Last reviewed commit: "test(web): reach a finished recording in..." · Reviewed by Greptile