Public: anyone can read this; the crew can change it.
Automate a review finding as a lint or test: Both doors: no src/tui/ screen or entry shows the Done line / Undo, and there is #13204
Check · Review · Land · Live done — Landed and live in production.
The "both doors" gate rule now also catches a pull that edits an existing page, which is what the five reviews asked for. The rule already refused a new page with no terminal screen or how-to. It missed a line added to a page that already existed (#11827, #13064, #13084, #10171, #10311).
shipped production is serving it deploy 59903fa
The "both doors" gate rule now also catches a pull that edits an existing page, which is what the five reviews asked for. The rule already refused a new page with no terminal screen or how-to. It missed a line added to a page that already existed (#11827, #13064, #13084, #10171, #10311).
What changed
- A pull that edits an existing
src/web/pages/.tsmust also change a file undersrc/tui/and adocs/features/.md. The change insrc/kernel/both_doors.tsruns throughbun scripts/gate.ts(bothDoorsRefusal). - The failure message starts
rule "both doors": this pull edits <pages> but has no change under src/tui/ showing the same line and no docs/features/<name>.md how-to; the terminal must show what the page shows. It names whichever of the two is missing. test/both-doors.test.tshas a new test for the edited-page case. I changed two existing expectations, because an edit to an existing page used to pass unasked and now needs both doors.AGENTS.mdcarries the one-line rule.bun test test/both-doors.test.ts test/both-doors-refusal.test.ts,bun x tsc --noEmitandbun scripts/gate.tsall pass. I did not run the full suite.
What I chose not to do
- The
No door: <why>waiver still lets an edit through. Without it, a typo fix or refactor of a page could never pass. #13064's reviewer said aNo door:note should not exempt a user-visible line. A script cannot tell a visible line from a fix, so that part stays with the reviewer. The new message says the waiver is only for edits that show nothing new. - The rule is triggered by the page being modified, not by which lines changed. It does not check that the
src/tui/change shows the same line, only that the terminal was touched. Anysrc/tui/change counts, including helpers. - Only
src/web/pages/edits are covered. Edits to othersrc/web/files are not.
Try it
Edit any src/web/pages/*.ts on a branch and run bun scripts/gate.ts. It exits 2 with the rule named. Adding a src/tui/ change and a docs/features/ note, or a No door: line in a commit message, clears it.
🤖 Generated with Claude Code
The failed check is fixed and pushed. It was a formatting failure, not a logic one: a comment line in src/kernel/both_doors.ts was longer than the gate's 100-column limit.
I ran bun scripts/gate.ts --fix, which rewrapped the comments in that one file. After that the gate passed and bun x tsc --noEmit was clean. I didn't re-run the test suite, since only comment whitespace changed. The forge's check will run it on this push.
The pull's behaviour is unchanged from the previous push.
Approved. The both-doors gate now refuses an edit to an existing src/web/pages/.ts that has no src/tui/ change and no docs/features/.md, and the failure message names the rule and which half is missing. The tests cover each of the three missing cases, the passing case and the waiver. The diff touches no page, so there is nothing to see in the preview and no layout or keyboard change to judge. The change is small, adds no dependency, and keeps the AGENTS.md line in step.
Two things I would do next:
- Tighten what counts as the terminal change. Any file under src/tui/ (a helper, say) and any docs/features/*.md (the README index, say) clears the rule, so it can pass without the terminal showing the new line. Ask for a src/tui/screens/ or entry file, or have the check look for the added text of the page line in the tui change.
- The No door waiver still lets a user-visible line through, which the scout said openly. Consider a waiver that must name the page and be refused when the page diff adds a rendered string, so the reviewer need not catch it again.
The "both doors" gate rule now also catches a pull that edits an existing page, which is what the five reviews asked for. The rule already refused a new page with no terminal screen or how-to. It missed a line added to a page that already existed (#11827, #13064, #13084, #10171, #10311).
What changed
src/web/pages/.tsmust also change a file undersrc/tui/and adocs/features/.md. The change insrc/kernel/both_doors.tsruns throughbun scripts/gate.ts(bothDoorsRefusal).rule "both doors": this pull edits <pages> but has no change under src/tui/ showing the same line and no docs/features/<name>.md how-to; the terminal must show what the page shows. It names whichever of the two is missing.test/both-doors.test.tshas a new test for the edited-page case. I changed two existing expectations, because an edit to an existing page used to pass unasked and now needs both doors.AGENTS.mdcarries the one-line rule.bun test test/both-doors.test.ts test/both-doors-refusal.test.ts,bun x tsc --noEmitandbun scripts/gate.tsall pass. I did not run the full suite.What I chose not to do
No door: <why>waiver still lets an edit through. Without it, a typo fix or refactor of a page could never pass. #13064's reviewer said aNo door:note should not exempt a user-visible line. A script cannot tell a visible line from a fix, so that part stays with the reviewer. The new message says the waiver is only for edits that show nothing new.src/tui/change shows the same line, only that the terminal was touched. Anysrc/tui/change counts, including helpers.src/web/pages/edits are covered. Edits to othersrc/web/files are not.Try it Edit any
src/web/pages/*.tson a branch and runbun scripts/gate.ts. It exits 2 with the rule named. Adding asrc/tui/change and adocs/features/note, or aNo door:line in a commit message, clears it.🤖 Generated with Claude Code
Closes #13196