fix: bound processing transfers and bypass the Drive media proxy - #2227
Merged
Conversation
richiemcilroy
marked this pull request as ready for review
September 6, 2026 13:43
Member
Author
|
hey @greptileai, please re-review the PR |
Member
Author
|
hey @greptileai, please re-review the PR |
Member
Author
|
hey @greptileai, please re-review the PR |
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.
Repeated recording processing can download the same Google Drive media through Vercel several times and continue across many attempts. Workers now receive authenticated descriptors for pinned Drive revisions, resume interrupted reads, reuse verified files, and reserve durable per-recording and daily transfer allowances before dispatch. New uploads retain normal concurrency while recovery work uses fewer slots. Size, identity, checksum, full decode, audio, and source timing checks remain enabled.
Production inventory analysis found that the initial daily default was too small. The final default is 512 GiB of conservative reservations; replaying 546 real recording sizes admitted all of them and produced the expected 103.12 GiB database counter. Six separate worker processes also stayed within shared limits under contention.
Validation: Linux AMD64 and ARM64 production container checks passed at the current head, including recording integrity and bounded-memory transfers over 2 GiB. The CI type check passed. A deployed preview route rejected bad credentials and changed identities, then served an authorized descriptor whose real Drive bytes matched the expected checksum. The isolated preview fixture, database credential and environment override were cleaned up. Earlier real-data tests covered three MP4s and a 71-part recording, including a cached replay with zero additional media downloads.
The additive
media_processing_budgetstable must reach production before the updated web workflow, and the web descriptor route must reach production before the updated worker. Coordinate the main-branch deployments in that order. Full rollout, no cohorting. Production has not been updated; post-release usage and billing verification remain.Migration provenance:
0043_flimsy_caretaker.sqlis checked-in Drizzle generator output from the schema change, not hand-edited SQL. The repository requirespnpm db:generatefor schema changes while prohibiting direct edits to generated files. Re-running that command reports no schema changes. Independently regenerating from the base branch migration snapshots with Drizzle Kit 0.31.0 produces byte-identical SQL (SHA-2569967ffb1a9ccaee6bfcbe2ed666965de29bbd07cdb1902bfe37a363f9e37d2f8). Migration-journal validation and the current CI typecheck pass.Greptile Summary
This PR bounds recording-processing transfers, lets media workers download authenticated pinned Google Drive revisions directly, resumes interrupted downloads, reuses verified local files, introduces durable per-recording and daily transfer reservations, and reduces concurrency for recovery work.
Confidence Score: 5/5
The PR appears safe to merge, with no outstanding or newly introduced actionable findings identified in this re-review.
The latest change only clarifies the generated-file policy and introduces no code regression or rule violation. All four previous findings were manually resolved without explanatory replies and therefore are not outstanding.
Important Files Changed
Reviews (4): Last reviewed commit: "docs: clarify required generated migrati..." | Re-trigger Greptile
Context used (3)