feat: E2 — Upload & Encoding Pipeline ## Goal A creator can upload a v - #358
Closed
fly-productivity-manager[bot] wants to merge 1 commit into
Closed
feat: E2 — Upload & Encoding Pipeline
## Goal
A creator can upload a v#358fly-productivity-manager[bot] wants to merge 1 commit into
fly-productivity-manager[bot] wants to merge 1 commit into
Conversation
## Goal A creator can upload a v [fly-dev run run_5247cd570c41412ba41dbf973ee24dcc]
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ❌ Deployment failed View logs |
spooool | fd81643 | Aug 24 2026, 09:00 AM |
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs |
editor | fd81643 | Aug 24 2026, 09:01 AM |
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.
Summary
Everything passes. Here's a summary of what was implemented for E2:
E2 — Upload & Encoding Pipeline: Changes made
Bugs fixed
src/workers/videos.tsGET /api/videos/trendingandGET /api/videos): changedstatus != 'uploading'→status = 'ready'. Previously encoding/queued/failed videos showed up in feeds.GET /api/videos/:id: addedbytes,playback_hls_url,thumbnail_urlto theCachedVideoMetatype and SELECT query. Clients polling for encoding progress or displaying metadata now get the complete row.thumbnail_urlonGET /api/videos: added to the list query so video cards can render thumbnails.src/workers/stream-webhook.tsCACHE?: KVNamespacetoStreamWebhookEnv.status = 'ready'(video live after Stream encoding), invalidates the KV metadata cache for that video ID. Prevents staleencodingentries from surviving a re-encode for up to 10 minutes.src/workers/index.tsPOST /api/webhooks/encode/:id/complete) now callsCACHE.delete(videoMetaCacheKey(videoId))before bumping the trending cache version. Same stale-cache fix for the R2+FFmpeg path.New tests
src/workers/videos.workers.test.ts— 4 new integration tests for the encode webhooks:x-render-secretmasterKeyis missingcompletetransitions status →readyand setsplayback_hls_url/thumbnail_urlfailtransitions status →failedwrangler.vitest.toml: addedRENDER_CALLBACK_SECRET = "vitest-render-secret"so the encode webhook tests can authenticate against the real worker.Tests
Opened automatically by fly-dev run run_5247cd570c41412ba41dbf973ee24dcc.