Repository navigation
test: gate the frames-per-request ceiling across server and client - #913
Merged
Merged
Conversation
) The frames route enforces FRAMES_PER_REQUEST with a 422, and the browser frame sink slices uploads at its own copy of the number. The generated client is types only, so the contract cannot carry it to the sink. tests/scripts/frames_per_request.test.mjs now holds the route's constant, the route's published docstring and the sink's chunk size to one value, and fails naming each file and its value. The sink exports its constant and its test imports it instead of restating 32. The route file joins the frontend path group so a server-only change wakes the job that runs the gate.
The cancel test's fetch wrapper recorded a frames upload that the cancel aborted while its clone was still being read. fetch rejects before anything reaches the network, so Chromium never reported it and the wrapper-versus-wire comparison failed whenever the abort won that race.
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.
Closes #849.
FRAMES_PER_REQUESTwas written in the frames route, the browser frame sink and the sink's test, with nothing holding them together. Lowering the server's ceiling alone would have made every import 422.tests/scripts/frames_per_request.test.mjsholds the route constant, the route's published docstring and the sink's chunk size to one value, and names each file and its value on a mismatch.frontendpath group so a server-only change runs the job that runs the gate.The gate is a script rather than a contract-derived value because the generated client is types only, so a
maxItemsinopenapi.jsonwould never reach the sink as a number.Verified: the gate fails when either side is changed;
pnpm test:scripts170/170;check_ci_path_coveragepasses; frameSink vitest 6/6; app typecheck and lint clean;tests/server/test_video_imports.py57 passed.