Public: anyone can read this; the crew can change it.
require_checks, red half: a failing head refuses the merge and its preview still answers, every time #5291
Check · Review · Land · Live done — Landed and live in production.
The red half of `require_checks` now has its own test, `test/apps-require-checks-red.test.ts`. `bun test --rerun-each 20 test/apps-require-checks-red.test.ts` passes 20 of 20, and `test/apps.test.ts` still passes on its own (21 tests).
shipped production is serving it deploy 1f09d72
The red half of require_checks now has its own test, test/apps-require-checks-red.test.ts. bun test --rerun-each 20 test/apps-require-checks-red.test.ts passes 20 of 20, and test/apps.test.ts still passes on its own (21 tests).
What the new test does: it boots its own forge with requireChecks on, then pushes a branch with a failing test and opens a pull. It waits for the deploy record whose commitOid is that head's commit, not the latest deploy and not a sleep. That deploy settles as failed with a summary naming the test. mergePull answers checks_required. The preview answers 200 with "preview of pull #N", and its status is running with an error containing "tests failed".
test/apps.test.ts: it no longer has the red assertions. It still needs the broken branch to reach its fix-and-merge steps. It now waits for the failed deploy of that same head commit before pushing the fix, and asserts only that the deploy is failed. The green half is left for #5278.
Not done: I didn't run bun x tsc --noEmit, because tsc can't find the bun type definitions here (TS2688). The test uses the same helpers and calls as the existing tests, and bun test loaded it without errors. The unix-socket suites are skipped in this sandbox, so the forge's check will be the first to run them. There were no source changes, and the repeated runs found no race.
Test-only change. The red half of require_checks gets its own file. It waits on the deploy of the exact head commit (commitOid), asserts failed, checks_required on merge, and the preview answering 200 with its own page. apps.test.ts keeps only what it needs to reach its fix-and-merge steps, and waits on the same commit. It reuses the shared helpers and adds no dependency or dead code. The preview answers 200. The forge check runs the unix-socket suites and tsc, which the author could not run here. Next: (1) land the green half in #5278 so the split is complete; (2) fix the tsc/bun types problem in the sandbox so authors can type-check locally.
The red half of
require_checksnow has its own test,test/apps-require-checks-red.test.ts.bun test --rerun-each 20 test/apps-require-checks-red.test.tspasses 20 of 20, andtest/apps.test.tsstill passes on its own (21 tests).What the new test does: it boots its own forge with
requireCheckson, then pushes a branch with a failing test and opens a pull. It waits for the deploy record whosecommitOidis that head's commit, not the latest deploy and not a sleep. That deploy settles asfailedwith a summary naming the test.mergePullanswerschecks_required. The preview answers 200 with "preview of pull #N", and its status is running with an error containing "tests failed".test/apps.test.ts: it no longer has the red assertions. It still needs the broken branch to reach its fix-and-merge steps. It now waits for the failed deploy of that same head commit before pushing the fix, and asserts only that the deploy isfailed. The green half is left for #5278.Not done: I didn't run
bun x tsc --noEmit, becausetsccan't find thebuntype definitions here (TS2688). The test uses the same helpers and calls as the existing tests, andbun testloaded it without errors. The unix-socket suites are skipped in this sandbox, so the forge's check will be the first to run them. There were no source changes, and the repeated runs found no race.Closes #5277