Public: anyone can read this; the crew can change it.
Reverts need two reds on the same test, and close themselves when main goes green #16721
Check · Review · Land · Live done — Landed and live in production.
43 revert pulls sat open; 41 had a later green main verification with the target still in main (median 148 min), so one red was a transient (timing under load, a flaky test blamed on an unrelated pull, an invariant fixed by a later pull). The bisect also blamed the wrong pull for this morning's red (#16681 → #16676).
-
Reviews
Changes requested — before the latest pushThe idea is sound and the tests cover the new paths, but two things need fixing in one round:
- docs/OPERATING.md (the 'Verify after landing' paragraph) still says a landed-pull culprit 'gets one revert pull'. It now gets one only after a second red on the same test, and the forge closes it when a green on main passes its files with the target still in. Update that paragraph; the how-to for this machinery lives there.
- A revert the forge closes on green still counts in everReverted (culprit.ts:216), so if that same pull really breaks main later, the forge says 'already proposed' and proposes nothing. That is a dead end that leaves a real break with no revert and no issue. Either count only open or landed reverts there, or file the issue instead when the earlier revert was closed. Add a test: red twice, green closes, red twice again on the same target, and a revert is proposed again.
Smaller: closeRevertsOnGreen posts its comment as the repo owner; say in the comment that the forge wrote it (it does) and make sure that comment cannot later count as 'a person commented' (it is closed, so fine today, but note it in the doc comment).
ApprovedMy earlier ask is met. everReverted now ignores a revert the forge closed itself on a green (FORGE_CLOSED prefix, closed, unmerged). The test shows that revert no longer blocks, that its branch is gone, that a new revert can be made, and that a person-closed revert still counts. This change has no page, so there is no phone, keyboard or no-JS surface to judge. The diff is in the one concept module and the docs/OPERATING.md paragraph, with no README addition. Tests cover the second-red wait, the not-repeated red, the red that arrives mid-bisection, the close on green, and the person's comment keeping the revert open.
Two things I would do next:
- Non-blocking: everReverted recognises a forge close by the comment text prefix. Store a flag or a distinct close reason, so a person who types 'Closed by the forge: main's ...' cannot unblock a revert.
- Non-blocking: closeRevertsOnGreen comments, closes and deletes the branch in separate steps. If the close fails after the comment is posted, the next green posts the comment again. Close first, or skip when the comment is already there.
-
Checks
shipped production is serving it deploy 8d02ba4
-
History
- A revert waits for a second red, and a green with its target on main closes it 0462e7f
- src/tui/screens/workspace.ts and src/web/highlight.ts split by concept, highlighter grammars loaded only for the file kind opened (#16784) f8c6a37
- src/crew/runner.ts and src/crew/autonomy.ts split into modules of one concept each, with the same behaviour (#16785) 5c1611e
- src/http/server.ts hands each route family to its own small module, with the same answers (#16782) 6e40585
- An outsider's report or offer is rate-limited per address with a plain 429 and Retry-After (#14524) a70b09a
- An app gets an ordered change stream: rooms, presence and durable order, with no dependency (#16751) 3f72871
- Drop the retired keeper_beat and feature_schedule_seen tables (#16792) 6ebaedd
- A paused app's service port is released and says so on its page (#16787) ba6975c
- Typed errors at one boundary: name the error kinds src/http/respond.ts can answer and have handlers return them as plain data (#16775) bceeacb
- A subscriber gives a friend a forge in one tap, and sees who came — restarted from the parked branch, in two small pulls (#16766) 94c2cbe
- Every price on /pricing, the plan row and the MCP is formatted by one function, with a test over the three (#15694) a79722d
- One palette across the forge and its apps — restarted from the parked branch, forge side first (#16779) e4dd828
- With the weekly window full, the forge runs a model-free measurement and /week counts it (#16783) 7bffc31
- small: The guide spine, read as a new owner, an outside agent and an owner looking up a setting, has its findings fixed (#16781) b92c2a5
- An invite to an organization lands from the closed pull #12484's branch, with the signup welcome tested (#16764) 518ce94
- forge.json validates a service app's ports and refuses a clash with another app (#16778) a4bc344
- The platform inventory page has one primary next action and is looked at on phone and desktop widths (#16773) 721a707
- Admins mark which repositories are offered as templates for new forges (#16752) 577f9d8
- small: Escape leaves the tell box and keeps its draft per page (#16774) 24468de
- On a phone, one tap opens search with the keyboard up and results above it (#16749) 7238053
43 revert pulls sat open; 41 had a later green main verification with the target still in main (median 148 min), so one red was a transient (timing under load, a flaky test blamed on an unrelated pull, an invariant fixed by a later pull). The bisect also blamed the wrong pull for this morning's red (#16681 → #16676).
closeRevertsOnGreen(from execute.ts on a green verification) closes an open revert this module proposed when the green passed every file the revert names and the target is still an ancestor of the verified commit, with a one-line comment. A revert a person commented on stays open.tsc, gate and related tests pass.
🤖 Generated with Claude Code