Public: anyone can read this; the crew can change it.
Automate a review finding as a lint or test: Fix first: item 1, the terminal door, then the tests in item 2. #14041
Check · Review · Land · Live done — Landed and live in production.
The "both doors" rule now also refuses a pull that changes how people reach a feature through the API or an MCP tool but touches nothing under src/tui/. The gate and tsc are clean and the two both-doors test files pass (18 tests). I ran no other suites; the forge's check runs the full suite on this push.
shipped production is serving it deploy 4adf612
The "both doors" rule now also refuses a pull that changes how people reach a feature through the API or an MCP tool but touches nothing under src/tui/. The gate and tsc are clean and the two both-doors test files pass (18 tests). I ran no other suites; the forge's check runs the full suite on this push.
The four comments (#10072, #10663, #10703, #11735) were all the same ask: the terminal door was missing. The rule already covered new pages, renderers, actions and studio modules, and edited pages. The gap was work reached only through the API or MCP. #10072 added a route plus a core module, and #11735 added actions to an existing MCP tool.
- Edited route, tool or action: an edit to an existing
src/http/api.ts,src/http/api/.ts,src/http/mcp/*orsrc/actions/*.tsnow needs a change undersrc/tui/, or a commit lineNo door: <why>(10 or more characters). The how-to is not asked of these edits. - New module behind a route or tool: a new feature module wired into one of those edits is now asked for the screen and
docs/features/<name>.md, the same as when it is wired into an existing page. - Failure message: it begins
rule "both doors": this pull edits <files> but has no change under src/tui/; …, so the rule is named in the log. - Code and docs: the change is in
src/kernel/both_doors.ts, with one line added toAGENTS.md. - Tests: two new cases in
test/both-doors.test.tscover the edited-file refusal, thesrc/tui/pass, the waiver, and a new module wired into a route. I changed one existing assertion in that file. It expected an editedsrc/actions/*.tsto pass with nothing else, which the new rule now refuses, so it now includes asrc/tui/change.
I did not make the rule check that the src/tui/ change is actually related to the edited route. Any src/tui/ change satisfies it, as it already does for edited pages. The No door: waiver is the way out when an edit shows nothing new.
To try it, edit src/http/api.ts on a branch with no src/tui/ change and run bun scripts/gate.ts.
The check's 3 failures were in tests my change doesn't touch, and they pass here. I changed only AGENTS.md, src/kernel/both_doors.ts and test/both-doors.test.ts. I ran test/pull-check-again.test.ts and test/apps-rollout.test.ts alone: 11 pass, 0 fail. The failures came from heavily loaded shards (the log shows 92 shards running at once). I'm treating them as flaky.
I have not re-run bun x tsc --noEmit or test/both-doors.test.ts in this turn. I made no code changes, so there is nothing new to push; the next push or a re-run of the check should come back green.
Pull description: The both-doors rule now treats an edited API route, MCP tool or action as needing a terminal change too, and test/both-doors.test.ts covers it. AGENTS.md says so. The check's three failures were in pull-check-again and apps-rollout, which don't involve this change. Both pass when run alone.
The both-doors gate now refuses an edited API route, MCP tool or action with no change under src/tui/, and asks a new module wired into one for the screen and the how-to. The failure message names the rule. The tests would fail without the change, and AGENTS.md carries the rule. It touches no page, so there is nothing to see in the preview.
Two things I would do next:
- Narrow EDITED_API.
src/http/mcp/.+also catches shared MCP plumbing such as the tools/list budget (#6217), which will need aNo door:line each time. Consider limiting it to tool files. - Check that the src/tui/ change is related to the edited route. Any src/tui/ edit satisfies the rule today, as it already does for edited pages.
The "both doors" rule now also refuses a pull that changes how people reach a feature through the API or an MCP tool but touches nothing under
src/tui/. The gate andtscare clean and the two both-doors test files pass (18 tests). I ran no other suites; the forge's check runs the full suite on this push.The four comments (#10072, #10663, #10703, #11735) were all the same ask: the terminal door was missing. The rule already covered new pages, renderers, actions and studio modules, and edited pages. The gap was work reached only through the API or MCP. #10072 added a route plus a core module, and #11735 added actions to an existing MCP tool.
src/http/api.ts,src/http/api/.ts,src/http/mcp/*orsrc/actions/*.tsnow needs a change undersrc/tui/, or a commit lineNo door: <why>(10 or more characters). The how-to is not asked of these edits.docs/features/<name>.md, the same as when it is wired into an existing page.rule "both doors": this pull edits <files> but has no change under src/tui/; …, so the rule is named in the log.src/kernel/both_doors.ts, with one line added toAGENTS.md.test/both-doors.test.tscover the edited-file refusal, thesrc/tui/pass, the waiver, and a new module wired into a route. I changed one existing assertion in that file. It expected an editedsrc/actions/*.tsto pass with nothing else, which the new rule now refuses, so it now includes asrc/tui/change.I did not make the rule check that the
src/tui/change is actually related to the edited route. Anysrc/tui/change satisfies it, as it already does for edited pages. TheNo door:waiver is the way out when an edit shows nothing new.To try it, edit
src/http/api.tson a branch with nosrc/tui/change and runbun scripts/gate.ts.Closes #14040