Public: anyone can read this; the crew can change it.
A flaky test refiled after its issue closed names the earlier closes and goes first, not a new copy for the twentieth time #15370
Check · Review · Land · Live done — Landed and live in production.
When the filer opens a flake whose title already has closed issues, the new issue now lists them, so a repeat flake stops looking like a fresh one. bun test on test/flake-repeat.test.ts and test/check-flake.test.ts passes, bun x tsc --noEmit is clean, and gate.ts --fix found nothing left to rewrap.
shipped production is serving it deploy 3fede26
When the filer opens a flake whose title already has closed issues, the new issue now lists them, so a repeat flake stops looking like a fresh one. bun test on test/flake-repeat.test.ts and test/check-flake.test.ts passes, bun x tsc --noEmit is clean, and gate.ts --fix found nothing left to rewrap. I didn't run scripts/fast.ts or the full suite.
- Two closed predecessors: the body gains a "Repeat:" paragraph that lists them (
#n, oldest first, at most 20). The issue gets therepeat-flakelabel, which the filer creates in the repo on first use. No "repeat" label or title prefix existed in the rules, so this is a new one; say if you'd rather use a title prefix. - Three or more closed predecessors: the paragraph also says a pull that only changes a bound or adds a retry doesn't close it: "fix the cause; quarantine is not allowed."
- Unchanged: which tests count as flaky (
FILE_AT, the 7-day window) and the one-open-issue-per-title rule are untouched. With 0 or 1 closed predecessors the body is exactly as before. I didn't touch the changelog-timing flake; that stays with #15358. - Tests:
test/flake-repeat.test.tshas two cases.- Five filings: five filings of one title over closes leave one open issue whose body names the closed four, carries
repeat-flakeand has the rule line. The first issue has neither. - Boundary: one closed predecessor is plain, and two is a repeat without the rule line.
- Five filings: five filings of one title over closes leave one open issue whose body names the closed four, carries
- Doc: one line in
docs/features/check-flake.mddescribes the new behaviour.
The change is in src/checks/flake.ts. The "not closed by a pull" rule is text in the issue body only; nothing in the forge enforces it when a pull closes the issue. I didn't add a gate for that.
To try it: file the same flake twice, close its issue, and repeat. The third open issue lists the earlier closes.
🤖 Generated with Claude Code
The gate refused as never at test/flake-repeat.test.ts:31. I've removed the cast: the test now takes the owner from createUser's result and passes it to createRepo. I pushed that as f531d5d7c.
The local gate.ts run printed the same as never complaint after the fix, but that run was against the earlier commit's diff, not the fix. The file now has no as never. I didn't re-run the gate after committing, so I haven't seen it pass on the fixed commit.
bun x tsc --noEmit is clean and test/flake-repeat.test.ts passes (2 tests). The gate also notes that my new ensureOwner helper looks like makeUser in test/check-pull-flake.test.ts. It's a note, not a failure, and I left the helper as is.
Approved. The filer now lists closed predecessors, labels repeats repeat-flake, and adds the no-quarantine rule at three. Both tests cover it. It is scoped to the flake filer, adds no dependency, and has no UI or terminal surface. The how-to is in docs/features/check-flake.md, not README. Next two things: (1) closedPredecessors caps at 20 oldest-first, so the count in the note stops at 20 and omits the newest closes. Count with SELECT count(*) and list the newest. Also reuse CLOSED_LISTED instead of the literal 20 in the SQL. (2) Wrap the long doc line in check-flake.md and split the repeat behaviour into its own bullet. I did not exercise the preview, because the change is a background filer with no page.
When the filer opens a flake whose title already has closed issues, the new issue now lists them, so a repeat flake stops looking like a fresh one.
bun testontest/flake-repeat.test.tsandtest/check-flake.test.tspasses,bun x tsc --noEmitis clean, andgate.ts --fixfound nothing left to rewrap. I didn't runscripts/fast.tsor the full suite.#n, oldest first, at most 20). The issue gets therepeat-flakelabel, which the filer creates in the repo on first use. No "repeat" label or title prefix existed in the rules, so this is a new one; say if you'd rather use a title prefix.FILE_AT, the 7-day window) and the one-open-issue-per-title rule are untouched. With 0 or 1 closed predecessors the body is exactly as before. I didn't touch the changelog-timing flake; that stays with #15358.test/flake-repeat.test.tshas two cases.repeat-flakeand has the rule line. The first issue has neither.docs/features/check-flake.mddescribes the new behaviour.The change is in
src/checks/flake.ts. The "not closed by a pull" rule is text in the issue body only; nothing in the forge enforces it when a pull closes the issue. I didn't add a gate for that.To try it: file the same flake twice, close its issue, and repeat. The third open issue lists the earlier closes.
🤖 Generated with Claude Code
Closes #15365