Repository navigation
test(api): MediaLit client fixtures for v0.8.0 responses - #934
Merged
Merged
Conversation
Stub /media/get and /media/seal with MediaLit v0.8.0 bodies, which add `processing` and `derivatives` and convert images to WebP at seal time. The fake is now stateful: get returns the unsealed PNG until sealed, and a repeat seal answers 200 with the sealed media. Cover that inspectUpload reports the original PNG while finalizeUpload reports the sealed WebP, that a failed conversion (original kept) still parses, and that a 503 seal-in-progress surfaces as medialit_request_failed_503 without a retry. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
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.
The MediaLit client tests stubbed
/media/getand/media/sealwith v0.7.1-shaped responses: noprocessingorderivatives, and the same PNG at upload and seal. MediaLit v0.8.0 changed both, so the tests passed without showing the client handles what production now returns.Only
apps/api/src/media-lit-client.test.tschanges. The fixtures are replaced, not added alongside, and follow MediaLit's v0.8.0 source:/media/getreturns the original PNG withprocessing: {status: "pending"}until the media is sealed;/media/sealreturnsmain.webp,image/webpand a smaller size withprocessing: {status: "ready"}and athumbnailderivative.inspectUploadreports the PNG,finalizeUploadthe WebP,getAssetthe sealed asset, and sealing twice returns the same asset. Whole-resulttoEqualchecks show the new fields are ignored.processing: {status: "failed", error}with the original kept still parses to the PNG's values.Retry-After: 1makesfinalizeUploadthrowmedialit_request_failed_503after one request. This records current behaviour; there's no retry.No client bug found.
downloads.test.tsis unchanged: its fake works at theMediaLitClientinterface, not HTTP bodies.Testing (
apps/api):bun test src/media-lit-client.test.ts4 pass, 0 fail;bun run typecheckpasses.bun run lintfails with 11 errors in files this PR doesn't touch; the base commit has the same counts.🤖 Generated with Claude Code