Assert the contract the service actually has

TestConversionService
Shipped
September 6, 2026 at 4:39 AM UTC
Author
Kamo
Commit
e03e880

**************** asserted that an image already inside the box comes back byte-identical to what went in. It has been failing since afee6fd in July, and the code is right — the test is not. That commit replaced ImageIO + webp-imageio with an ffmpeg subprocess because the old pair could native-crash the JVM (SIGSEGV in libwebp's UpsampleBgraLinePair_SSE2) and take the whole ConversionService pod down. Its stated contract is to "always emit a real, height-capped .webp", so returning the caller's original PNG is exactly what it must no longer do. The test was written before that and never revisited; nothing was wrong except the assertion. Deleting it would have thrown away something worth keeping, though. The half that still holds is that an image within the box is not resampled — `factor` is clamped to 1.0 for that reason (0b7fe3c, "never upscale small images") and nothing else asserted it. So the test now checks dimensions are preserved and the output is a real WebP, and two more cover the neighbouring guarantees: that an image SMALLER than the box is not stretched up to it, and that a PNG in always yields a WebP out. Verified the new guard bites rather than decorating: removing the 1.0 clamp fails **************** The suite passes end to end again — 68 tests, first green run since July.

All changes

Like what you see shipping?

Every one of these updates lands in your workspace automatically. Start free and watch it grow week after week.

Start Free ForeverView Pricing