Skip to content

fix: bound encode/upload deadlines and classify SDK 4xx as permanent - #87

Merged
AnikMajumdar merged 1 commit into
anikfrom
fix/upload-review-comments
Sep 12, 2026
Merged

AnikMajumdar merged 1 commit into
anikfrom
fix/upload-review-comments

Conversation

@AnikMajumdar

Copy link
Copy Markdown
Collaborator

Addresses PR #86 review comments:

  • make_streamable_mp4 shares one encode deadline across both codec attempts, so a hung nvenc followed by a hung libx264 can no longer each burn the full budget (previously up to 2x900s = the whole 1800s job).
  • Upload retries are bounded by an overall 600s per-artifact budget: the deadline gates both the retry loop and each TUS chunk's request timeout, so a degraded endpoint cannot run out the 1800s process_video wall-clock.
  • _permanent_status classifies storage3 StorageApiError 4xx (e.g. a heatmap 413) as permanent, not just httpx.HTTPStatusError, so SDK-path 4xx aren't retried.

Adds tests for SDK 4xx classification and the time-budget cutoff (7 pass).

Addresses PR #86 review comments:

- make_streamable_mp4 shares one encode deadline across both codec attempts, so a
  hung nvenc followed by a hung libx264 can no longer each burn the full budget
  (previously up to 2x900s = the whole 1800s job).
- Upload retries are bounded by an overall 600s per-artifact budget: the deadline
  gates both the retry loop and each TUS chunk's request timeout, so a degraded
  endpoint cannot run out the 1800s process_video wall-clock.
- _permanent_status classifies storage3 StorageApiError 4xx (e.g. a heatmap 413)
  as permanent, not just httpx.HTTPStatusError, so SDK-path 4xx aren't retried.

Adds tests for SDK 4xx classification and the time-budget cutoff (7 pass).
@vercel

vercel Bot commented Sep 12, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
courtcheck Ready Ready Preview Sep 12, 2026 7:35pm UTC

@AnikMajumdar
AnikMajumdar merged commit 0985851 into anik Sep 12, 2026
2 checks passed

This branch was successfully deployed

1 active deployment
Preview — 55fffaab Deployed Sep 12, 2026 by vercel[bot]
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.

1 participant