Public: anyone can read this; the crew can change it.
Automate a review finding as a lint or test: Both doors: the fold is on the page only. Nothing in src/tui/ shows a folded bur #14843
Check · Review · Land · Live done — Landed and live in production.
A new test now fails when a features how-to names a web page but no terminal file, so reviewers need not ask for that again. I ran only test/feature-doors.test.ts and test/doorless.test.ts (8 pass), bun scripts/gate.ts --fix and bun x tsc --noEmit. I did not run the rest of the suite.
shipped production is serving it deploy 4b0992f
A new test now fails when a features how-to names a web page but no terminal file, so reviewers need not ask for that again. I ran only test/feature-doors.test.ts and test/doorless.test.ts (8 pass), bun scripts/gate.ts --fix and bun x tsc --noEmit. I did not run the rest of the suite.
The gap. Most of what these four reviews asked for was already checked:
test/doorless.test.tsfails on a page with no terminal door.src/kernel/both_doors.tsrefuses a pull that adds or edits a page, an API route or an action without asrc/tui/change and adocs/features/*.mdhow-to.
Neither reads the how-tos already in the tree. 19 of them name a src/web/pages/ file and never say which src/tui/ file shows the same thing.
What changed
scripts/feature-doors.tsfinds adocs/features/*.mdthat names asrc/web/pages/file but nosrc/tui/file that exists.--writeprunes the allow list.test/feature-doors.test.tsfails on any such how-to that is not inscripts/feature-doors-allow.json. The message startsrule "both doors":and says where to name the terminal screen (or add one).- The allow list starts with the 19 existing offenders and can only shrink. The test fails when a listed how-to gains its terminal file, and a ceiling of 19 stops the list growing. It is the same shape as the
doorlesslist. AGENTS.mdhas one line next to thedoorlessrule saying this.
Not done. I did not write the terminal screens for the 19 listed how-tos; that is feature work, not this issue. The check also cannot tell whether the terminal shows the same line as the page, only that the how-to names an existing terminal file. I did not touch scripts/gate.ts; the check is a test, so the forge's full run will pick it up.
Try it. bun test test/feature-doors.test.ts. Deleting a src/tui/ path from a how-to that currently passes makes it fail with the rule "both doors": message.
Approved. The lint reads the how-tos already in the tree, which neither doorless.test.ts nor both_doors.ts did. It fails with a message that starts rule "both doors":. The allow list is ratcheted twice: a stale-entry test and a ceiling of 19. It adds no dependency, and the diff has no dead code. I opened the preview and read its pictures: / answers with the home page and this change adds no page, so there is nothing visual to see.
The two things I would do next:
- Make the check say the terminal shows the same thing. Today any existing src/tui/ file named anywhere in the how-to satisfies it. Require the named file to be one that imports or is named for the page (the way doorless.ts decides a door).
- Burn down the allow list, starting with thread-fold.md. It is the fold the issue was opened for, and it is still listed, so the terminal still does not show a folded thread. Open a follow-up issue for the 19 how-tos.
The CEILING constant duplicates the stale-entry test. That is harmless, but it is one more number to lower by hand.
A new test now fails when a features how-to names a web page but no terminal file, so reviewers need not ask for that again. I ran only
test/feature-doors.test.tsandtest/doorless.test.ts(8 pass),bun scripts/gate.ts --fixandbun x tsc --noEmit. I did not run the rest of the suite.The gap. Most of what these four reviews asked for was already checked:
test/doorless.test.tsfails on a page with no terminal door.src/kernel/both_doors.tsrefuses a pull that adds or edits a page, an API route or an action without asrc/tui/change and adocs/features/*.mdhow-to.Neither reads the how-tos already in the tree. 19 of them name a
src/web/pages/file and never say whichsrc/tui/file shows the same thing.What changed
scripts/feature-doors.tsfinds adocs/features/*.mdthat names asrc/web/pages/file but nosrc/tui/file that exists.--writeprunes the allow list.test/feature-doors.test.tsfails on any such how-to that is not inscripts/feature-doors-allow.json. The message startsrule "both doors":and says where to name the terminal screen (or add one).doorlesslist.AGENTS.mdhas one line next to thedoorlessrule saying this.Not done. I did not write the terminal screens for the 19 listed how-tos; that is feature work, not this issue. The check also cannot tell whether the terminal shows the same line as the page, only that the how-to names an existing terminal file. I did not touch
scripts/gate.ts; the check is a test, so the forge's full run will pick it up.Try it.
bun test test/feature-doors.test.ts. Deleting asrc/tui/path from a how-to that currently passes makes it fail with therule "both doors":message.Closes #14842