Skip to content

Bound WebRTC video uploads and clean up owned files - #2960

Draft
digaobarbosa wants to merge 1 commit into
mainfrom
fix/webrtc-upload-bounds
Draft

Bound WebRTC video uploads and clean up owned files#2960
digaobarbosa wants to merge 1 commit into
mainfrom
fix/webrtc-upload-bounds

Conversation

@digaobarbosa

Copy link
Copy Markdown
Contributor

Description

WebRTC file uploads can retain arbitrary data and orphan temporary files; apply the existing video input budget to one validated upload per session and clean up failed or closed uploads.

Type of change

  • Bug fix

How has this change been tested?

  • 20 focused automated tests passed, including channel callbacks, concurrent completion and cleanup failures.
  • Black, isort and diff checks passed.
  • Staging validation pending.

Any specific deployment considerations

  • Inference HTTP/WebRTC workers, including the Modal worker image.
  • Reuses MAX_VIDEO_DOWNLOAD_SIZE_MB (512 MiB default; negative values opt out) and the existing 48 KiB WebRTC chunk size. The default permits at most 10,923 chunks; custom chunk sizes must fit this envelope.
  • Upload progress/watchdog policy is handled separately.

@github-actions

github-actions Bot commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

👋 Thanks for the pull request! Here is how automated Claude review works here, so you spend credits (and reviewer time) wisely.

🚧 Right now this is a draft, so automated Claude review is paused — nothing is being spent yet. Mark it Ready for review to trigger it.

Warning

💸 The Claude reviewer bills in credits, not vibes

Automated review spins up a real agent that reads real code and spends real credits on every pass. It is glad to help — but it is not a rubber duck, a linter you poke in a loop, or a substitute for reading the contributing guide. Treat it like an expensive senior reviewer whose time you booked, and show up prepared.

Draft when unsure, Ready when you mean it:

  • 🌱 Not sure the PR is in good shape yet? Keep it (or set it back) as a draft — drafts pause review, so you can push and iterate without burning credits on a moving target.
  • 💪 Feel strong about the contents? Mark it Ready for review and the reviewer will take a look.

However you get there, arrive prepared:

  • 🧱 Bring a SOLID, thorough PR. Point your local agent at our skills/ to tune it to our guidelines first — or, if you are one of those fabled carbon-based contributors, read them yourself. A half-baked diff costs exactly the same to review as a finished one.
  • Resolve every comment before you re-request review. Re-requesting with threads still open means paying twice for the same conversation.
  • 🔁 Do not use CI review as an inner loop for a local agent. The reviewer is not a step-by-step debugger — do the unfolding locally and arrive with the answer, not the search.
  • 🙋 If something looks off, ask a human. One question to a maintainer is cheaper and faster than three rounds of agent re-review chasing a misread.

Reviews are not free. A draft costs nothing to review; a Ready PR is a promise that it is worth reviewing.

  • Prefer to skip automated review entirely? Add the skip-claude-review label.

@PawelPeczek-Roboflow PawelPeczek-Roboflow left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe we have potential mismatch between client and server priors, which if adjusted though publicly exposed knobs would cause errors.

Client sdk could set WEBRTC_VIDEO_UPLOAD_CHUNK_SIZE not matching server-side CHUNK_SIZE. When this is done, server makes wrong assumptions regrading expected number of chunks.
As a result:

  • Server log: "Video upload rejected" with a traceback ending in "Invalid video upload chunk count". Misleading. The count is correct for the chunk size the client chose.
  • Client: "Upload channel closed during upload". No size, no reason.

@digaobarbosa

Copy link
Copy Markdown
Contributor Author

Thanks Pawel, still in draft, I need to do more testing and try to simplify this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants