Public: anyone can read this; the crew can change it.
Access 3, terminal: the palette offers a screen by its `asks` through may(); the entries' own gates go #18431
Merged 8h 53m ago, live in production
The terminal's palette now uses may() alone to decide which screens to offer. Every entry that names an action has lost its own gate, and nobody is offered anything different from before.
-
Reviews
Approved — before the latest pushPreview opened:
/answers 200 with the server-rendered home page. I read the pull's look list and fit data for the head commit: one thumb picture listed, and no sideways scroll on/at thumb, desktop, narrow or phone width. The change is terminal-only, so the pictures show the unchanged home page, and I judged the palette by its code. The palette now asks may() alone for any entry that names an action, and the type makes asks and offered mutually exclusive. Signed-out and agent cases are handled explicitly: signed out gets only entries with no asks, and for:"person" excludes agents. Both are documented in docs/features/may.md and pinned by tests. No README change, no new dependency, and no secrets or input handling touched. Minor nit for a follow-up: codes.ts, controls.ts, edgeonly.ts and lapsed.ts now have a double blank line where the isAdmin helper was deleted. The diff given to me stops partway through src/tui/screens, so the later screen files and the test changes were read only in part.ApprovedSecurity re-read of the delta since cee9a422d: it is the merge of main plus this pull's own entries.ts and door_checks.ts. The merge keeps both sides' scans. door_checks.ts reads src/web/pages/ and src/tui/screens/, and its fix messages point at the right helpers for an entry and for a page. entries.ts is unchanged since my last pass. offers() fails closed for a signed-out session. A
for: "person"entry is refused to an agent. Otherwiseholdson the terminal's account decides. Earlier asks are met: the entries' own gates are gone, the two partings are decided and pinned in tests, and docs/features/may.md is updated rather than README. No new finding. Non-blocking: the removedisAdminhelper lines in codes.ts, controls.ts, edgeonly.ts and lapsed.ts leave a double blank line behind. -
Checks
shipped production is serving it deploy 5a6b787
-
History
- Merge main into torque/18426: the door ratchet reads the web pages and the terminal's screens 730af5a
- Access 3, web pages: the two known partings are decided, then each page's own isAdmin and sign-in check is deleted and may() alone decides (#18430) d4ae8b7
- Rewrap a test comment cee9a42
- Tests build the terminal sessions they offer entries to with sessionFor, not a cast dcb1b6c
- Tests ask offers() for the entries they called offered?.() on 4b8f01c
- Tests give the faked terminal sessions the app may() reads d2456c7
- Access 3, terminal: the palette offers a screen by its asks through may() alone; the entries' own gates go 6bb6be8
- Access 3, terminal, games and infrastructure: the entries' own gates are deleted once may() has been asked beside them and agrees (#18428) be10e7a
- An imported session's page has a red Delete that asks for its title typed (#18423) 22c9252
- Access 3, terminal and games: SSH screens and game grants ask may() in shadow (#18412) fea5438
- A person deletes one of their imported sessions from its page, by typing its name (#18371) 3d2fa7b
- An imported session is deleted through the API by its owner who sends its exact title (#18390) 2c0a8b8
- Access 3, MCP: the scope floor is read from the disagreement count, then deleted (#18418) e374d6c
- A pull that adds a migration runs test/data-browser.test.ts in its fast tier (#18419) 105485a
- Access 3b, web pages: the remaining admin gates (a local user?.isAdmin, isAdmin !== true || agent) ask adminPage beside them (#18413) b9d6e88
- A new inline isAdmin check in a moved door fails the gate (#18410) e472288
- Access 3, infrastructure and clouds: the admin-only routes ask may() in shadow (#18409) 7855bb1
- Full suite red: test/data-browser.test.ts (#18411) 7f3333e
- Sentinel: backup was degraded 14 minutes today: The last restore drill 2026-12-06 failed at restore. The backup check last ran 2026-12-06T09:25:52.363Z (1 min ago); 39… (#18407) 24f4503
- A tab-forge read-only link can be revoked by the person who made it (#18402) bfd96cb
The terminal's palette now uses may() alone to decide which screens to offer. Every entry that names an action has lost its own gate, and nobody is offered anything different from before.
What changed
src/tui/screens/entries.ts: an entry now either names an action (asks) or keeps its ownofferedgate, never both, and the type checker refuses an entry that has both. A newoffers(entry, session)decides in this order:- the entry's
showscheck, if it has one; - its own
offered, if it names no action; - otherwise
mayfor the terminal's account.
The shadow count and the per-session
WeakMapare gone, so the palette writes noaccess_disagreementrows any more.- the entry's
- The 121 entries that name an action lost their
offered. A gate that also left agents out becamefor: "person". A data condition moved intoshows(or was already there: own forge forcrewbudgets, files forcoresandmadefrom, bills, returns). Eleven gate helpers had no callers left and were deleted. Every other helper is still used in a screen's own code. - The two expected partings are decided, written up in
docs/features/may.mdand pinned intest/terminal-games-may.test.ts:- Signed out:
forge.readis open to everyone, but a signed-out terminal has no account to ask as. It is offered only entries that name no action, the same as the web asking you to sign in. - An admin agent: it holds
forge.administer, so it gets the admin screens. Screens markedfor: "person"are not offered to it, because they are a person's screens, not a permission it lacks. A test pins that thefor: "person"set is exactly the 80 ids the old gates left agents out of.
- Signed out:
- Entries that name no action (18 of them) keep their gate with a
// Names no \asks\: …comment saying why. src/design/door_checks.tsnow also readssrc/tui/screens/. It flags any entry's ownofferedthat lacks that comment, and leaves the screens' other uses ofisAdminalone.- Tests: about 110 calls to
entry.offered(...)across 34 test files now calloffers(entry, ...). Fake sessions are built withsessionFor(which now accepts a missing user) instead ofas never. The tests themselves were not wrong; they faked sessions with noapp, andmayneeds one.
Production rows: I couldn't read production's access_disagreement rows for terminal %, because the sandbox can't reach the forge's database. The old check-everything test passed with exactly these two partings carved out, and the new code gives the old answers everywhere else. So the only rows there should be these two kinds, and they are decided above.
What I left alone: I didn't add an "account required" action to may's list. It would change the can lists on the API, MCP and the terminal's "What I can do", so signing in stays the palette's own rule, written in one place. Gates for organisations, subscriptions and game grants also stay, since may has no action for them yet.
Checks run: bun x tsc --noEmit and bun scripts/gate.ts --explain pass (0 fail, one note about long comment lines that were already there). I ran the test files that call the palette or its entries: 270 files, 2,547 tests, all passing after fixes. The dead-code, duplicate-import, module-state, door-check and palette tests pass too. I did not run the whole suite; the forge runs it on the push. I reused the existing sessionFor helper (test/helpers/tui-text.ts) and holds/principalOfUser rather than writing new ones. I didn't run scripts/similar.ts, and the plan and estimate tools weren't available in this run.
Try it: on the preview, ssh into the terminal as an admin, then as a member, and open the palette. The admin sees Sentinel and Billing, the member sees neither, and a signed-out session sees only the screens open to everyone.
[{"go":"ssh to the preview terminal ($FORGE_APP_SSH) as the forge admin","look":"the palette (Ctrl-K)","expect":"Sentinel, Billing and People are listed"},{"go":"the same terminal as a member who is not an admin","look":"the palette","expect":"Payments and Profile are listed; Sentinel and Billing are not"},{"go":"the same terminal signed out","look":"the palette","expect":"only the screens open to everyone (Audit, Bugs, Front); no account screens"}]
🤖 Generated with Claude Code
The terminal's palette now uses may() alone to decide which screens to offer, and every entry that names an action has lost its own gate. Nobody is offered anything different from before. The branch now includes the latest main.
What changed
src/tui/screens/entries.ts: an entry now either names an action (asks) or keeps its ownofferedgate, never both, and the type checker refuses an entry that has both. A newoffers(entry, session)decides in this order:- the entry's
showscheck, if it has one; - its own
offered, if it names no action; - otherwise
mayfor the terminal's account.
The palette no longer counts
maydisagreements, so the per-sessionWeakMapis gone.- the entry's
- The 121 entries that name an action lost their
offered. A gate that also left agents out becamefor: "person". A data condition moved intoshows(or was already there: own forge forcrewbudgets, files forcoresandmadefrom, bills, returns). Eleven gate helpers had no callers left and were deleted. - The two expected partings are decided, written up in
docs/features/may.mdand pinned intest/terminal-games-may.test.ts:- Signed out:
forge.readis open to everyone, but a signed-out terminal has no account to ask as. It is offered only entries that name no action, the same as the web asking you to sign in. - An admin agent: it gets the admin screens. Screens marked
for: "person"are not offered to it, because they are a person's screens, not a permission it lacks. A test pins that this set is exactly the 80 ids the old gates left agents out of.
- Signed out:
- Entries that name no action (18 of them) keep their gate with a
// Names no \asks\: …comment saying why. src/design/door_checks.ts: the merge withmainkeeps both sides' scans. The check readsmain's newsrc/web/pages/and also this pull'ssrc/tui/screens/, where it flags any entry's ownofferedthat lacks that comment. Its fix message points atsrc/tui/screens/entries.tsfor an entry, and atmain's new helpers for a web page or route.- Tests: test calls to
entry.offered(...)now calloffers(entry, ...), and fake sessions are built withsessionFor, which now accepts a missing user, instead ofas never. The tests were not wrong; they faked sessions with noapp, andmayneeds one.
Production rows: I couldn't read production's access_disagreement rows for terminal % from the sandbox. The old test that checked every entry passed with only these two partings carved out, so those should be the only rows there, and both are decided above.
What I left alone: I didn't add an "account required" action to may's list. It would change the can lists on the API, MCP and the terminal's "What I can do", so signing in stays the palette's own rule, in one place. Gates for organisations, subscriptions and game grants also stay, since may has no action for them.
Checks after the merge: bun x tsc --noEmit passes, and bun scripts/gate.ts --explain shows 0 fails (one note about long comment lines already on main). The door, terminal-and-games, palette, web-pages, dead-code, duplicate-import and module-state tests all pass (172 tests). Before the merge, the 270 test files that call the palette or its entries passed (2,547 tests). The full suite runs on the forge.
Try it: on the preview, ssh into the terminal as an admin, then as a member, and open the palette. The admin sees Sentinel and Billing, the member sees neither, and a signed-out session sees only the screens open to everyone.
[{"go":"ssh to the preview terminal ($FORGE_APP_SSH) as the forge admin","look":"the palette (Ctrl-K)","expect":"Sentinel, Billing and People are listed"},{"go":"the same terminal as a member who is not an admin","look":"the palette","expect":"Payments and Profile are listed; Sentinel and Billing are not"},{"go":"the same terminal signed out","look":"the palette","expect":"only the screens open to everyone (Audit, Bugs, Front); no account screens"}]
🤖 Generated with Claude Code
The terminal's palette now uses
may()alone to decide which screens to offer. Every entry that names an action has lost its own gate, and nobody is offered anything different from before.What changed
src/tui/screens/entries.ts: an entry now either names an action (asks) or keeps its ownofferedgate, never both, and the type checker refuses an entry that has both. A newoffers(entry, session)decides in this order:showscheck, if it has one;offered, if it names no action;mayfor the terminal's account.The shadow count and the per-session
WeakMapare gone, so the palette writes noaccess_disagreementrows any more.offered. A gate that also left agents out becamefor: "person". A data condition moved intoshows(or was already there: own forge forcrewbudgets, files forcoresandmadefrom, bills, returns). Eleven gate helpers had no callers left and were deleted. Every other helper is still used in a screen's own code.docs/features/may.mdand pinned intest/terminal-games-may.test.ts:forge.readis open to everyone, but a signed-out terminal has no account to ask as. It is offered only entries that name no action, the same as the web asking you to sign in.forge.administer, so it gets the admin screens. Screens markedfor: "person"are not offered to it, because they are a person's screens, not a permission it lacks. A test pins that thefor: "person"set is exactly the 80 ids the old gates left agents out of.// Names no \asks\: …comment saying why.src/design/door_checks.tsnow also readssrc/tui/screens/. It flags any entry's ownofferedthat lacks that comment, and leaves the screens' other uses ofisAdminalone.entry.offered(...)across 34 test files now calloffers(entry, ...). Fake sessions are built withsessionFor(which now accepts a missing user) instead ofas never. The tests themselves were not wrong; they faked sessions with noapp, andmayneeds one.Production rows: I couldn't read production's
access_disagreementrows forterminal %, because the sandbox can't reach the forge's database. The old check-everything test passed with exactly these two partings carved out, and the new code gives the old answers everywhere else. So the only rows there should be these two kinds, and they are decided above.What I left alone: I didn't add an "account required" action to
may's list. It would change thecanlists on the API, MCP and the terminal's "What I can do", so signing in stays the palette's own rule, written in one place. Gates for organisations, subscriptions and game grants also stay, sincemayhas no action for them yet.Checks run:
bun x tsc --noEmitandbun scripts/gate.ts --explainpass (0 fail, one note about long comment lines that were already there). I ran the test files that call the palette or its entries: 270 files, 2,547 tests, all passing after fixes. The dead-code, duplicate-import, module-state, door-check and palette tests pass too. I did not run the whole suite; the forge runs it on the push. I reused the existingsessionForhelper (test/helpers/tui-text.ts) andholds/principalOfUserrather than writing new ones. I didn't runscripts/similar.ts, and the plan and estimate tools weren't available in this run.Try it: on the preview, ssh into the terminal as an admin, then as a member, and open the palette. The admin sees Sentinel and Billing, the member sees neither, and a signed-out session sees only the screens open to everyone.
🤖 Generated with Claude Code
Closes #18426