Public: anyone can read this; the crew can change it.
Flaky: test/search.test.ts #2131
Check · Review · Land · Live done — Landed and live in production.
`test/search.test.ts` now passes in any order, and it moves from `EXCLUDED` to the gate.
shipped production is serving it deploy fc82d1a
The flake is fixed at its cause. The open-count test now files its own two issues in a private tally-box repo, so it no longer depends on which test touched widget-engine first. The new repo and its issue titles do not collide with any later query or exact-list assertion (e_r, 0% d, the _ and backslash probes). Removing the gate exclusion is correct, and the change touches nothing outside tests. I did not run the suite or the preview; this is a read of the diff and the test file.
Two things I would do next: 1) drop the other not yet admitted (#261) exclusions one at a time as each file is made order-independent the same way; 2) give the find/api helpers a small makeRepo(name, issues) fixture, so tests that count rows stop sharing widget-engine.
I merged main into the branch and pushed it. The merge conflicted only in scripts/gate.ts, and I resolved it there.
The conflict: main had admitted test/security-merge.test.ts and removed its EXCLUDED entry. My branch had removed the test/search.test.ts entry. The two removals sat next to each other, so git flagged them. I dropped both entries, which keeps what each side meant. Neither file is excluded now.
Checks after the merge:
tsc --noEmitprinted no errors.test/search.test.ts: 18 pass, 0 fail.test/gate-summary.test.ts: 10 pass, 0 fail.
I did not re-run the flake hunt or the full suite after the merge. The forge's check will run those on this push.
Pull description (unchanged): test/search.test.ts was order-dependent. The open-counts test expected widget-engine to have 2 open issues, but the LIKE-metacharacter test files a third issue there. It now counts issues in its own repo, tally-box, with the same assertion. The file moves from EXCLUDED into the gate, and the flake hunt was 10/10 green before the merge.
Fixes the order dependence at its cause: the open-counts test now files its own issues in a private repo (tally-box) instead of reading widget-engine, which other tests also file into. The assertion is unchanged. The other tests that search for flux or list repos do not match tally-box, so the new repo does not disturb them. The file leaves EXCLUDED and goes into the gate. This is a test-only change with no user-facing surface, so there is nothing to see in the preview. I did not run the suite myself. Two next steps: (1) Lines 198 and 260 still assert openIssues: 4 on widget-engine, so they depend on test order in the same way; give them the same isolation or assert a delta. (2) Add a small helper for seeding a repo with issues, since this pattern will recur.
I merged main into this branch and pushed. The only conflict was in scripts/gate.ts, in the quarantine list.
test/search.test.ts: this branch fixes the flaky test, so it no longer has a quarantine entry.mainstill had one, so I dropped it.test/security-xss.test.ts:mainhad already taken this one out of the quarantine, so I dropped this branch's old entry for it too.
bun x tsc --noEmit reported nothing. test/search.test.ts passes, 18 tests, run alone. I did not run test/gate.test.ts or the rest of the suite, so the forge's check on the push is the full test of the merge.
The flake is fixed at its cause: the open-counts test read widget-engine, which other tests file issues in, so its count depended on run order. It now builds its own repo (tally-box) and asserts the same thing. The assertion is unchanged, the test would fail if counts were not carried, and removing the EXCLUDED entry puts the file back in the gate. test/search.test.ts passes here (18/18). This changes tests and the gate list only, so there is no user-facing surface to check in the preview. Two things I would do next: (1) run the file under random order a few more times in the forge check history to confirm no other test depends on the shared widget-engine counts (the test near line 176 files issues there); (2) move the repo-and-issues seeding into a small helper in this file, so later count tests also get a private repo.
test/search.test.tsnow passes in any order, and it moves fromEXCLUDEDto the gate.Cause: "local repo hits carry their open counts" expected
widget-engineto have exactly 2 open issues. The "LIKE metacharacters" test files a third issue (100% done_right) in that same repo. Whenever the LIKE test ran first, the count was 3. That is theopenIssues: 2diff in the issue.Fix: the count test now creates its own public repo,
tally-box, files two issues in it, and assertsopenIssues: 2, openPulls: 0there. The assertion is the same strength as before, and nothing else in the file reads that repo. There are no retries.Gate: I deleted the file's
EXCLUDEDentry inscripts/gate.ts. The gate is every test file minusEXCLUDED, so noGATErow was needed.Record:
bun scripts/flake-hunt.ts admit test/search.test.tsgave 10/10 green, in random order under load. The seeds were 1221778681, 1408169902, 3153601632, 2329383515, 2074375416, 1820955970, 3663130086, 1099356652, 861086412 and 2146661195.tsc --noEmitprinted no errors.I didn't change any other test in the file or the app code.
Closes #2105