You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
test(copilot): pin the read caps, and correct what the limits actually claim
Audit follow-up. No behaviour change; the code was right and the comments
explaining it were not.
Measured the bomb through this exact pipeline rather than reasoning about it
(100MP/256MP/576MP/1024MP): libvips decodes sequentially, so peak RSS stays
flat in the tens of MB no matter what the header declares. What scales is CPU,
roughly linearly — ~240ms at 100MP, ~1.35s at 1024MP, once per resize rung. The
pixel budget is a CPU bound, not the memory bound the comment described, and the
"~400MB raster" arithmetic was wrong by an order of magnitude.
- say that, with the measurements, so the next reader tunes against the real cost
- stop claiming the source byte cap covers everything a user can upload: presigned
and multipart accept gigabytes, so an image above it is stored fine and simply
cannot be read inline. Deliberate trade, now stated as one
- correct the resize-ladder comment, which asserted the failure is always a decode
when the try also wraps the encoder
- correct two claims in read-placeholders: the handler does pull the VFS, and the
oversized set excludes an image size refusal it said it included
Tests: cover the document and compiled-artifact size refusals (the document one
was the newest behaviour change and had no coverage at all), the text and
document download caps, and that the cap is handed to the download rather than
merely producing the right message. Placeholder cases are built from the
producers instead of hand-copied — a literal only proves the matcher agrees with
the test, which is the drift this module exists to prevent.
0 commit comments