Public: anyone can read this; the crew can change it.
Automate a review finding as a lint or test: Both doors: nothing in src/tui/ for the archive or for sending a patch. Add a sc #14371
Check · Review · Land · Live done — Landed and live in production.
The "both doors" rule from #10628 now catches the cases behind these four comments that it used to miss. bun test test/both-doors.test.ts test/both-doors-refusal.test.ts and tsc --noEmit pass, and scripts/gate.ts --fix ran clean, so I pushed. Most of what the four reviews asked for was already enforced.
shipped production is serving it deploy 2829c4f
The "both doors" rule from #10628 now catches the cases behind these four comments that it used to miss. bun test test/both-doors.test.ts test/both-doors-refusal.test.ts and tsc --noEmit pass, and scripts/gate.ts --fix ran clean, so I pushed.
Most of what the four reviews asked for was already enforced. The new-page, edited-page, new-action, studio-module and edited-API cases (#10628, #12972, #13196, #14040) cover #11901, #12566 and #12953. Reading the files those pulls changed, two routes still got through:
- #11849, the archive:
src/http/archive.tswas added and wired only intosrc/http/server.ts. Aserver.tsedit never counted as wiring, so nothing asked for a screen or a how-to. A new module undersrc/plus an edit toserver.tsnow needs both a terminal screen and adocs/featurespage. - New API or MCP tool files: a new
src/http/api/.tsorsrc/http/mcp/tools/.tsis now treated like a new action and needs a terminal screen. Before, it only counted if an edited API file sat beside it.
A bare edit to server.ts still asks for nothing. Both rules take the existing No door: <why> commit line as a waiver.
The failure message names rule "both doors" and the added files. test/both-doors.test.ts has a new test that fails without the change. I also added a line to AGENTS.md saying the same.
Not done: new files under src/contract/openapi/routes/ are not covered, since they describe a route rather than add one. The wider rule still passes a pull that adds a screen without its page in the same shape, because checking that the screen matches the page would need a parser.
To try it: bun test test/both-doors.test.ts, or push a pull that adds a src/http/*.ts module and edits server.ts and see bun scripts/gate.ts refuse it.
I merged main into this branch and pushed it. The only conflict was in AGENTS.md.
- Conflict: both sides edited the "both doors" rule. I kept my sentence, which asks for the terminal screen when a pull adds a new
src/http/api/.tsorsrc/http/mcp/tools/.tsfile. It also asks for both the screen and a features doc when a module is wired intosrc/http/server.ts(#14320). I also kept the paragraphmainadded abouttest/doorless.test.tsandscripts/doorless-allow.json(#14289). - Checks:
bun scripts/gate.ts --fixandbun x tsc --noEmitwere clean.scripts/fast.tsreturned exit 2 (diff too broad to name, becausesrc/kernel/both_doors.tschanged), so I ran the door tests by hand:test/doorless.test.ts,test/both-doors.test.tsandtest/both-doors-refusal.test.ts. All pass. I did not run the full suite; the forge runs it on the push.
The rule now catches the two walks that got through: a new module wired only through server.ts (the archive), and a new src/http/api or src/http/mcp/tools file. A bare server.ts edit still asks nothing, and kernel/ and tui/ modules stay exempt. The test fails without the change, and the failure names rule "both doors" and the added file. The pull changes no src/web, so the preview has no new surface. Next: (1) add the openapi/routes case the pull says it left out, or open an issue for it; (2) the AGENTS.md rule is now one very long line, so split it into a short list.
The "both doors" rule from #10628 now catches the cases behind these four comments that it used to miss.
bun test test/both-doors.test.ts test/both-doors-refusal.test.tsandtsc --noEmitpass, andscripts/gate.ts --fixran clean, so I pushed.Most of what the four reviews asked for was already enforced. The new-page, edited-page, new-action, studio-module and edited-API cases (#10628, #12972, #13196, #14040) cover #11901, #12566 and #12953. Reading the files those pulls changed, two routes still got through:
src/http/archive.tswas added and wired only intosrc/http/server.ts. Aserver.tsedit never counted as wiring, so nothing asked for a screen or a how-to. A new module undersrc/plus an edit toserver.tsnow needs both a terminal screen and adocs/featurespage.src/http/api/.tsorsrc/http/mcp/tools/.tsis now treated like a new action and needs a terminal screen. Before, it only counted if an edited API file sat beside it.A bare edit to
server.tsstill asks for nothing. Both rules take the existingNo door: <why>commit line as a waiver.The failure message names
rule "both doors"and the added files.test/both-doors.test.tshas a new test that fails without the change. I also added a line to AGENTS.md saying the same.Not done: new files under
src/contract/openapi/routes/are not covered, since they describe a route rather than add one. The wider rule still passes a pull that adds a screen without its page in the same shape, because checking that the screen matches the page would need a parser.To try it:
bun test test/both-doors.test.ts, or push a pull that adds asrc/http/*.tsmodule and editsserver.tsand seebun scripts/gate.tsrefuse it.Closes #14320