Skip to content

test: gate the frames-per-request ceiling across server and client - #913

Merged
JArmandoAnaya merged 3 commits into
mainfrom
fix/frames-per-request-single-source
Oct 12, 2026
Merged

JArmandoAnaya merged 3 commits into
mainfrom
fix/frames-per-request-single-source

Conversation

@JArmandoAnaya

Copy link
Copy Markdown
Contributor

Closes #849.

FRAMES_PER_REQUEST was 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.mjs holds 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.
  • 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 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 maxItems in openapi.json would never reach the sink as a number.

Verified: the gate fails when either side is changed; pnpm test:scripts 170/170; check_ci_path_coverage passes; frameSink vitest 6/6; app typecheck and lint clean; tests/server/test_video_imports.py 57 passed.

JArmandoAnaya and others added 3 commits October 11, 2026 21:04
)

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.
@JArmandoAnaya
JArmandoAnaya merged commit 0cba030 into main Oct 12, 2026
31 checks passed
@JArmandoAnaya
JArmandoAnaya deleted the fix/frames-per-request-single-source branch October 12, 2026 08:29
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.

FRAMES_PER_REQUEST is spelled three times, with nothing holding the copies together

1 participant