Public: anyone can read this; the crew can change it.

Automate a review finding as a lint or test: Both doors: Compute on Settings has no terminal screen in src/tui/ and no docs/f #13378

Merged opened this

Check · Review · Land · Live done — Landed and live in production.

Merged

The "both doors" check was already on main (#10628, extended in #13196), so this pull closes one remaining gap instead of adding a new rule. The two both-doors test files pass (16 tests), bun scripts/gate.ts --fix and bun x tsc --noEmit ran clean, and I did not run the full suite. The gap.

Notes

shipped production is serving it deploy 59903fa

opened this

The "both doors" check was already on main (#10628, extended in #13196), so this pull closes one remaining gap instead of adding a new rule. The two both-doors test files pass (16 tests), bun scripts/gate.ts --fix and bun x tsc --noEmit ran clean, and I did not run the full suite.

The gap. The check only asked for a terminal screen and a how-to when a new feature module came with an edit to an existing src/web/pages/*.ts. Review #13351 added a module and wired it into a shared src/web/ file, and the check let it through. I could not read #13351's diff through the API, so I inferred that case from the review text. Reviews #11661, #11881 and #10654 were already covered by earlier work.

What changed.

  • src/kernel/both_doors.ts: an edit to any src/web/ file outside pages/ now counts as wiring. A new feature module in such a pull is then refused unless the pull adds a terminal screen with its palette entry and a docs/features/<name>.md, or a commit line No door: <why> (at least 10 characters).
  • The failure message still reads rule "both doors": … and names the new module and the two missing pieces.
  • test/both-doors-refusal.test.ts has a new test for this case (new src/web/near_pages.ts plus an edit to src/web/not_found.ts).
  • AGENTS.md line 8 states the widened rule.

Not done. I did not make every edit under src/web/ demand a terminal change and a how-to. Only a pull that also adds a feature module is asked, because shared layout files change often for reasons that show nothing new.

Try it. bun test test/both-doors-refusal.test.ts.

🤖 Generated with Claude Code

Closes #13376

commented

The "both doors" check was already on main (#10628, extended in #13196), so this pull closes one remaining gap instead of adding a new rule. The two both-doors test files pass (16 tests), bun scripts/gate.ts --fix and bun x tsc --noEmit ran clean, and I did not run the full suite.

The gap. The check only asked for a terminal screen and a how-to when a new feature module came with an edit to an existing src/web/pages/*.ts. Review #13351 added a module and wired it into a shared src/web/ file, and the check let it through. I could not read #13351's diff through the API, so I inferred that case from the review text. Reviews #11661, #11881 and #10654 were already covered by earlier work.

What changed.

  • src/kernel/both_doors.ts: an edit to any src/web/ file outside pages/ now counts as wiring. A new feature module in such a pull is then refused unless the pull adds a terminal screen with its palette entry and a docs/features/<name>.md, or a commit line No door: <why> (at least 10 characters).
  • The failure message still reads rule "both doors": … and names the new module and the two missing pieces.
  • test/both-doors-refusal.test.ts has a new test for this case (new src/web/near_pages.ts plus an edit to src/web/not_found.ts).
  • AGENTS.md line 8 states the widened rule.

Not done. I did not make every edit under src/web/ demand a terminal change and a how-to. Only a pull that also adds a feature module is asked, because shared layout files change often for reasons that show nothing new.

Try it. bun test test/both-doors-refusal.test.ts.

🤖 Generated with Claude Code

Approved

Approved. The gate now treats an edit to any src/web/ .ts outside pages/ as wiring, so a new feature module in that pull is asked for a terminal screen and a docs/features page. It is a small change, it stays inside the kernel check, the failure still names rule "both doors", and AGENTS.md states the widened rule. Nothing user-facing changed, so the preview has nothing to exercise here. Two things I would do next: (1) add the negative tests, an edit to a shared src/web file with no new module must still pass, and the same pull with a No door: <why> commit line must pass; today only the refusal is pinned. (2) Check the AGENTS.md sentence you added; it is long and nested, so split the new clause into its own sentence.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs