Public: anyone can read this; the crew can change it.
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
Merged 10h 29m ago, live in production
Web pages now have one access check, may(), asked through src/http/pagemay.ts. The shadow that counted disagreements beside each page's old check is gone, and so are the old checks themselves. The two known disagreements, decided.
-
Reviews
ApprovedClean. may() alone decides on the web pages through page_may.ts. The anonymous parting is settled by asking forge.write, which is an existing action with no new table. Admin-agent exclusion is kept in personAdminPage, a token's scope is still judged by readForm, and may_beside.ts has no caller left. The ratchet now reads src/web/pages. The nine DOOR_LINES entries I checked are display or data-in shapes (the account shown, a repo admin, a token's scope), not gates. I found no remaining inline gate in pages. The leftovers are canAdmin-based (bets.ts) or display-only (changelog, pricing, family). Behaviour is unchanged, so no new terminal screen is needed. The how-to is in docs/features/may.md and nothing was added to README. Minor, not blocking: DOOR_LINES grew by nine where its own text says it only shrinks, so later passes should move those display reads onto may-derived values.
-
Checks
shipped production is serving it deploy afe9e01
-
History
- Say how to try the one page check on the preview 661afaa
- Rewrap comments (gate --fix) fb4a391
- Access 3, web pages: may() alone decides; the pages' inline isAdmin and sign-in checks are deleted (#18424) 6dcc5f4
- 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
- Access 3, web pages: every page that gates on isAdmin or sign-in also asks may(), counted beside the old check (#18400) 8f27ed4
- A tab-forge app leaves as one spec file and comes back in, with or without its records (#18399) 081ac9e
- A person shares one imported session by a link that hides what the forge redacts (#18391) 080d52c
- Full suite red: test/data-browser.test.ts (#18394) b4310c7
Web pages now have one access check, may(), asked through src/http/page_may.ts. The shadow that counted disagreements beside each page's old check is gone, and so are the old checks themselves.
The two known disagreements, decided. may is asked about the account behind the request, not the token:
- Anonymous visit to a signed-in page:
signedInPage(ctx)now asksforge.writeinstead offorge.read. Every account hasforge.write; a visitor with no account does not, somayanswersunauthorizedand the page sends them to sign in, as before. No new action or table was added. - An
rotoken that posts: the token's scope is still checked where it was before, by the form a change reads (readForm(ctx, scope)). This is the same decision as the/infrapages in #18425, so nobody's access changes.
Admin pages: adminPage(ctx) asks forge.administer. A new personAdminPage(ctx) covers the admin pages that also turned away admin agents (kind !== "agent"), so they still do.
Call sites: every adminPage(ctx, door, <inline isAdmin>) and signedInPage(ctx, door) in src/web is now adminPage(ctx), personAdminPage(ctx) or signedInPage(ctx). Bare !ctx.auth.user / ctx.auth.user === undefined gates, and const user = ctx.auth.user; if (!user) return … gates, go through the same helpers. Two kind === "user" pages (runners.ts, app_templates.ts) and two render helpers (forge-template-setting.ts, the template control and its account check; account.ts, the token page's admin-scope check) keep that kind test next to adminPage(ctx). A few gates that mix the account with another condition on one line are unchanged (e.g. bets.ts, trace_imported.ts, series_pins.ts); the scan rule doesn't match them, so they stay as they were. src/http/may_beside.ts had no other caller and is deleted. Its helper names are updated in door_checks.ts, access_disagreement.ts and docs/ROLES.md.
Gate rule: doorSources in src/design/door_checks.ts now also reads src/web/pages. Nine lines are listed in DOOR_LINES, each with a reason: they are about an account being shown rather than the one asking, plain data passed in, a repository admin, or a token's scope. Nothing in scripts/gate.ts changed.
Tests:
test/web-pages-may.test.tswas a test of the shadow, which is deleted, so I rewrote it. It finds every page module that uses one of the helpers (more than 80). For each one it checks, by GET and POST, that the helper gives the same answer as the old inline check for an anonymous visitor, a signed-in person, the admin, anrotoken, anrwtoken and an admin agent, and thataccess_disagreementstays empty. It also checks real responses from/settingsand/maintenance. It fails on the old code.- In
test/door-inline-checks.test.tsI changed one expected hint string (mayBeside→"forge.write") and added a check that the scan readssrc/web/pages/account.ts. - No other test was changed.
bun x tsc --noEmitpasses; the gate shows 0 failures and 3 notes; design-lint is clean. 524 page and route test files that I chose (fast.tssaid the change was too broad to pick for me) pass with 0 failures, along with the dead-code, duplicate-import and page-budget tests.
Production count: I could not read SELECT * FROM access_disagreement WHERE door LIKE 'web %' on production, because the sandbox cannot reach the forge's database. No rows were given to me to decide.
docs/features/may.md now says web pages have one check, and the "worked out beside it" sentence is gone.
To try it on the preview:
- Signed out, open
/settingsand/maintenance: both send you to sign in. - Signed in as a member who is not the admin:
/settingsopens and/maintenanceanswers 403, from the admin-path check that runs before the page.
[{"go":"/settings","look":"signed out","expect":"redirected to sign in"},{"go":"/maintenance","look":"signed in as a member who is not the admin","expect":"403, as before"},{"go":"/maintenance","look":"signed in as the admin","expect":"the maintenance page opens"}]
🤖 Generated with Claude Code
Web pages now have one access check,
may(), asked throughsrc/http/page_may.ts. The shadow that counted disagreements beside each page's old check is gone, and so are the old checks themselves.The two known disagreements, decided.
mayis asked about the account behind the request, not the token:signedInPage(ctx)now asksforge.writeinstead offorge.read. Every account hasforge.write; a visitor with no account does not, somayanswersunauthorizedand the page sends them to sign in, as before. No new action or table was added.rotoken that posts: the token's scope is still checked where it was before, by the form a change reads (readForm(ctx, scope)). This is the same decision as the/infrapages in #18425, so nobody's access changes.Admin pages:
adminPage(ctx)asksforge.administer. A newpersonAdminPage(ctx)covers the admin pages that also turned away admin agents (kind !== "agent"), so they still do.Call sites: every
adminPage(ctx, door, <inline isAdmin>)andsignedInPage(ctx, door)insrc/webis nowadminPage(ctx),personAdminPage(ctx)orsignedInPage(ctx). Bare!ctx.auth.user/ctx.auth.user === undefinedgates, andconst user = ctx.auth.user; if (!user) return …gates, go through the same helpers. Twokind === "user"pages (runners.ts,app_templates.ts) and two render helpers (forge-template-setting.ts, the template control and its account check;account.ts, the token page's admin-scope check) keep that kind test next toadminPage(ctx). A few gates that mix the account with another condition on one line are unchanged (e.g.bets.ts,trace_imported.ts,series_pins.ts); the scan rule doesn't match them, so they stay as they were.src/http/may_beside.tshad no other caller and is deleted. Its helper names are updated indoor_checks.ts,access_disagreement.tsanddocs/ROLES.md.Gate rule:
doorSourcesinsrc/design/door_checks.tsnow also readssrc/web/pages. Nine lines are listed inDOOR_LINES, each with a reason: they are about an account being shown rather than the one asking, plain data passed in, a repository admin, or a token's scope. Nothing inscripts/gate.tschanged.Tests:
test/web-pages-may.test.tswas a test of the shadow, which is deleted, so I rewrote it. It finds every page module that uses one of the helpers (more than 80). For each one it checks, by GET and POST, that the helper gives the same answer as the old inline check for an anonymous visitor, a signed-in person, the admin, anrotoken, anrwtoken and an admin agent, and thataccess_disagreementstays empty. It also checks real responses from/settingsand/maintenance. It fails on the old code.test/door-inline-checks.test.tsI changed one expected hint string (mayBeside→"forge.write") and added a check that the scan readssrc/web/pages/account.ts.bun x tsc --noEmitpasses; the gate shows 0 failures and 3 notes; design-lint is clean. 524 page and route test files that I chose (fast.tssaid the change was too broad to pick for me) pass with 0 failures, along with the dead-code, duplicate-import and page-budget tests.Production count: I could not read
SELECT * FROM access_disagreement WHERE door LIKE 'web %'on production, because the sandbox cannot reach the forge's database. No rows were given to me to decide.docs/features/may.mdnow says web pages have one check, and the "worked out beside it" sentence is gone.To try it on the preview:
/settingsand/maintenance: both send you to sign in./settingsopens and/maintenanceanswers 403, from the admin-path check that runs before the page.🤖 Generated with Claude Code
Closes #18424