Add a headless render check for the 16-bit sidecar swap.

The proxy and sidecar reach the GPU through different upload paths, and whether
they agree depends on UNPACK_FLIP_Y_WEBGL being ignored for ImageBitmap. A unit
test cannot see that, so the picture could silently start flipping again. The
check encodes a two-tone sidecar with the server's encoder, serves it beside the
matching JPEG and measures the rows that land in a WebGL2 texture in headless
Chrome.

🤖 Generated with Codebuff
Co-Authored-By: Codebuff <noreply@codebuff.com>
This commit is contained in:
2026-11-28 14:30:36 +00:00
parent c10ff97670
commit 1e7ec0cf15
3 changed files with 348 additions and 0 deletions
+8
View File
@@ -956,6 +956,7 @@ positions. Camera-lens defaults require both a normalised camera and lens name t
| `npm run dev` | Vite HMR on 5173 |
| `npm run typecheck` | `tsc --noEmit` |
| `npm test` | Vitest, one pass then exit |
| `npm run check:render` | Headless Chrome check that the 16-bit sidecar and JPEG proxy upload in the same row order |
Conventions worth knowing before changing code:
@@ -991,6 +992,13 @@ Conventions worth knowing before changing code:
There are no server integration tests; the API is exercised through the UI.
`npm run check:render` covers the one thing the unit suite cannot: real GPU upload
orientation. It encodes a two-tone 16-bit sidecar with the server's own encoder, serves
it beside the matching JPEG proxy and measures the rows that reach a WebGL2 texture in
headless Chrome. If the sidecar ever lands upside down against the proxy again, it fails
with the measured row values. It needs Chrome (`CHROME_PATH` overrides discovery) and
skips with a notice when none is installed.
---
## Troubleshooting