With every gate green, only the byte count said the bodies were never delivered.
A prop built with Object.create(null) throws at React's Flight boundary, and the defect walked through every gate: pnpm -r build green, the suite green, the HTTP response 200. The only observable difference was the payload size, 22693 bytes down to 15986, which is to say the bodies were simply not delivered. Each gate is blind for its own reason. vitest renders with the client React, so Flight is never involved; the route is dynamic, so next build never serializes that tree; and the error falls behind a Suspense boundary, so the shell has already been flushed and the status line already written. The root cause was small: the check was looking at the prototype rather than at the keys, so it threw even when the projects list was empty, and Object.fromEntries closed it.
What the probe had to learn about itself
There is no deterministic gate for this class, only a hand-run probe, and the probe had to learn something of its own: payload size is not a pure function of code plus content. Same build, same content, same user agent, and yet a cold fetch cache gives 45821 bytes while a warm one gives 44369. That 1452-byte difference comes purely from whether a Suspense boundary resolved before or after the shell flush. In the cold regime the difference between two user agents came out as 42 bytes in one run and 1 byte in another; both are correct, and both are evidence that the cold regime is not byte-stable. So the probe prints three columns, cold, warm and repeat, and the binding column is repeat: in one run the claim that the two agents differ by exactly 1 byte measured minus 371 in the warm column and plus 1 in the repeat column. One warm-up request is not always enough.
Tags
- React
- Testing