Public: anyone can read this; the crew can change it.
Flaky: test/push-through.test.ts #2118
Check · Review · Land · Live done — Landed and live in production.
`test/push-through.test.ts` is now green in any order, and it is out of `EXCLUDED` in `scripts/gate.ts`.
shipped production is serving it deploy a4add02
Fixes the flake at its cause: the shared clone is left on topic by the last test, so a later push origin main pushes nothing. beforeEach now returns to main, -B makes the topic test re-runnable, and the file is admitted to the gate. The file passes 3 of 3 runs here. Test-only; no user-facing surface, so both doors, security and README do not apply. Next: (1) delete the other issue: 261 exclusions one by one the same way; (2) assert the git exit codes in the topic test (add, commit) the way the new checkout does, so a failure there is named, not silent.
test/push-through.test.tsis now green in any order, and it is out ofEXCLUDEDinscripts/gate.ts.Cause: the tests share one clone. The "new branch / deletion" test leaves its HEAD on
topic. If a later test rangit push origin mainfrom there, it pushed nothing and exited 0. That is why "an origin that refuses the push refuses it here too" failed onexpect(pushed.code).not.toBe(0). I read this from the code; I didn't run the failure order separately.Change:
beforeEachchecks outmainin the clone before every test.checkout -B, so it no longer depends ontopicnot existing.EXCLUDEDinscripts/gate.ts. The gate is everytest/*.test.tsminusEXCLUDED, so there is noGATElist to add it to.Verification:
bun scripts/flake-hunt.ts admit test/push-through.test.tsis 10/10 green, random order, under load. The seeds were 2476554717, 3213099754, 851955575, 98308669, 3181154338, 804732812, 52519603, 2197101313, 446802406 and 2253171508.bun x tsc --noEmitand it printed nothing; I didn't check its exit code.bun testsuite, only this file.Left out: the file's tests still share one clone and set up their state implicitly. Giving each test its own clone would be cleaner but slower, so I didn't do it.
Closes #2111