Public: anyone can read this; the crew can change it.
test/apps-ws.test.ts fails 5 of 8 in the full gate run, passes alone #1014
The frame-limit test in test/apps-ws.test.ts no longer moves 16 MiB frames, so it should stop timing out under load. The file went from about 30 s alone to 12.7 s, and all 9 tests passed in a local run. I did not reproduce the sharded gate run, so the load case is untested.
stopped closed without shipping deploy 6b17a6f
Sign in to join this conversation.
new above
offline
The frame-limit test in
test/apps-ws.test.tsno longer moves 16 MiB frames, so it should stop timing out under load. The file went from about 30 s alone to 12.7 s, and all 9 tests passed in a local run. I did not reproduce the sharded gate run, so the load case is untested. I also could not type-check: there is notscin the sandbox.The test was slow because it pushed about 64 MiB through the proxy: two oversize frames plus two frames exactly at the limit, each way. Under shard load that passed 32 s, and the four tests after it failed.
ForgeConfig.wsMaxMessage(src/app.ts) sets the most one proxied websocket frame may carry. It defaults to 16 MiB, so production behaves as before.appWebSocketinsrc/apps/proxy.tsis now a function that takes that limit, andsrc/http/server.tspasses the config value in. Bun's payload limit, the backpressure limit and the app-side 1009 check all use it.apps-ws.test.tscreates the forge with a 1 MiB limit and checks the same behaviour: an oversize frame from the browser or the app ends the connection, and a frame exactly at the limit passes in both directions. I removed the 30 s timeout override on that test.What I left out: the 16 MiB default is no longer exercised by any test. It is still the same constant in the proxy. I didn't add an env var or CLI flag for the setting, because only tests need it.
To try it: run
bun test test/apps-ws.test.ts. The test creates a unix socket, which the sandbox I worked in blocks, so I ran it outside the sandbox.🤖 Generated with Claude Code
Closes #889