fix: free-plan deploy, seekable playback, and interview worker name - #29
Merged
Merged
Conversation
Cloudflare Containers require Workers Paid. Keep the ffmpeg image for local alchemy dev, and on deploy assemble the submission by concatenating uploaded parts in the Worker.
Concatenated MediaRecorder output has no Cues or Duration, so the browser treats it as a live stream. Write a seek index on finalize and rebuild a blob in the player so the timeline can be scrubbed.
Use a short workers.dev name instead of interview-web-web-rev.
Review SummaryThis PR adds recording playback, WebM processing, passthrough finalization, and expanded recording test coverage. However, it exposes recording submission deletion without authentication or authorization, allowing anyone with an enumerable session ID to delete stored recording data. Key Changes:
Confidence Score: 5/5Recommendation: Request changes before merge. Rationale: The unauthenticated destructive endpoint is a clear, directly evidenced security vulnerability, and the affected recording identifiers can be enumerated through the unauthenticated listing flow. Special Attention- Require operator authentication and authorization before mounting the submission DELETE endpoint. - Add CSRF protection if authorization relies on cookies. - Review authentication and authorization for recording list and playback access. - Verify internal finalization routes cannot be invoked or abused externally.Important Files Changed
Flowchartflowchart TD
A[Caller obtains or enumerates session ID] --> B[Unauthenticated recording API]
B --> C{Request method}
C -->|GET| D[Read recording submission]
C -->|DELETE| E[Delete stored parts and output]
E --> F[Recording data lost]
G[Required operator authorization] -.-> C
Audit history |
Without ffmpeg, concatenated MP4 is not a valid submission. Fail those plans as ContainerRejected so the session is marked failed, not ready.
A refresh starts a new encoder session. Muxing those clusters into one bitstream makes the browser error on the second keyframe. Keep each segment as its own file and let the player step through parts.
Record, reload, continue, finalize two segments, then open operator playback and assert both parts load without Recording unavailable.
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
alchemy devstill uses the ffmpeg image; remote deploy concatenates uploaded parts in the Worker.interview(interview.mrevanzak.workers.dev).D1 migration squash is already on
main.Commits
fix(finalizer): concat parts on free-plan deploy without Containersfix(playback): make MediaRecorder WebM seekablechore(infra): publish the web worker as interviewTest plan
pnpm --filter @interview-web/finalizer testpnpm --filter web exec vitest run tests/recording-playback.test.ts tests/recording-playback-view.test.tsxbun run deploysucceeds on a free Cloudflare accounthttps://interview.mrevanzak.workers.dev