Public: anyone can read this; the crew can change it.

Main's own revert path also waits for two reds on the same test, and both paths close their reverts on green #16831

Merged opened this

Check · Review · Land · Live done — Landed and live in production.

Merged

revertred.ts waits for two consecutive red main checks that fail the same test, and reverts the one landing between the last green and the first of the two. One rule for both paths: sameFailure in src/checks/verify.ts (a test name both report, or a shared file when either names no test); culprit.ts uses it too.

Notes

opened this

#16721 made the verification path (culprit.ts) propose a revert only after two consecutive reds on the same test and close its own reverts on green. The other revert path, src/checks/revert_red.ts (main's own check, one landing since green), still proposed on a single red.

  • revert_red.ts waits for two consecutive red main checks that fail the same test, and reverts the one landing between the last green and the first of the two.
  • One rule for both paths: sameFailure in src/checks/verify.ts (a test name both report, or a shared file when either names no test); culprit.ts uses it too. A red that names no test confirms nothing.
  • closeRevertsOnGreen covers revert_red's reverts as well: either kind of green closes them while the target is still an ancestor and no person has commented; the comment names which check was green. execute.ts runs it when main's own check turns green. revert_red.ts exports its opening text so both kinds are recognized in one place.
  • Tests (test/revert-red.test.ts): one red proposes nothing; two reds on the same test propose one revert; different tests, or red then green, propose none; a landing between the two reds (the first red's landing is reverted); two reds open a revert, main's green check closes it, and the next red on the same test proposes it again, once.

tsc clean, gate exit 0, 217 related tests pass.

🤖 Generated with Claude Code

Sign in to join this conversation.

Search
↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs