Public: anyone can read this; the crew can change it.
The foundry nav door trusts an owner by id from configuration, not by the name 'trevato' #14927
Check · Review · Land · Live done — Landed and live in production.
The Foundry nav door no longer opens for an account just because it is named trevato. Before this change, anyone who signed up as trevato on a forge where no admin holds that name could make the link point at their own app.
shipped production is serving it deploy 9504585
The Foundry nav door no longer opens for an account just because it is named trevato. Before this change, anyone who signed up as trevato on a forge where no admin holds that name could make the link point at their own app. Now the door only opens for an app owned by a site admin, or by an org with a site admin on its Owners team.
What changed
src/actions/foundry_door.ts: removedFOUNDRY_ORGand the name check. A newtrustedOwner(db, ownerId)does the owner check: an admin who is a person, or an org whose active owners include an admin. Agents, suspended accounts and removed accounts don't count. The read access and app access checks after it are unchanged.test/api-forge-view.test.ts: a new test with two cases.- An org named
trevatowhose owners include no admin opens no door. - A non-admin person named
trevatoopens no door.
This test fails with main's version of the door and passes with this change. I reworded the titles of the two existing Foundry tests to match. One of those tests already gives the
trevatoorg an admin owner, so it still covers this forge's own door opening.- An org named
Left out
The issue also allows "one id pinned in configuration". I didn't add it, because it would mean a new config setting wired through src/engine/crossing.ts and boot, and the admin and admin-owned-org rule covers this forge.
Look at
The door now depends on production's trevato org having a site admin on its Owners team. I couldn't confirm that from here: the API answered not_found for /api/v1/users/trevato and has no org-members route. If the org has no admin owner, the door closes after this merges. The fix is to add the admin to that team, or to add the pinned-id setting.
Checks run
bun scripts/gate.ts --fix and bun x tsc --noEmit are clean. scripts/fast.ts couldn't narrow the tests, because the door is imported by the layout and it named 2,248 files. So I ran the five test files that mention Foundry: api-forge-view, app-turn, flow-cache, follow-sources and palette-roster. All 78 tests pass.
How to try it
- As an admin, put the app with slug
foundryon a repo owned by a non-admin account namedtrevato. - Open
/: there is no Foundry button and no palette row. - Move the app to an admin's repo, or to an org an admin owns, and the button appears within five seconds.
🤖 Generated with Claude Code
The Foundry nav door no longer opens for an account just because it is named trevato. Before this change, anyone who signed up as trevato on a forge where no admin holds that name could make the link point at their own app. Now the door only opens for an app owned by a site admin, or by an org with a site admin on its Owners team.
What changed
src/actions/foundry_door.ts: removedFOUNDRY_ORGand the name check. A newtrustedOwner(db, ownerId)does the owner check: an admin who is a person, or an org whose active owners include an admin. Agents, suspended accounts and removed accounts don't count. The read access and app access checks after it are unchanged.test/api-forge-view.test.ts: a new test with two cases.- An org named
trevatowhose owners include no admin opens no door. - A non-admin person named
trevatoopens no door.
This test fails with main's version of the door and passes with this change. It checks that an admin exists rather than casting with
as never, which was what the gate refused on the first push. I reworded the titles of the two existing Foundry tests to match. One of those tests already gives thetrevatoorg an admin owner, so it still covers this forge's own door opening.- An org named
- No terminal change: the terminal screen (
src/tui/screens/forgeview.ts) already gets the door throughfoundryHref. A commit message carries the "No door" line the gate asks for.
Left out
The issue also allows "one id pinned in configuration". I didn't add it, because it would mean a new config setting wired through src/engine/crossing.ts and boot, and the admin and admin-owned-org rule covers this forge.
Look at
The door now depends on production's trevato org having a site admin on its Owners team. I couldn't confirm that from here: the API answered not_found for /api/v1/users/trevato and has no org-members route. If the org has no admin owner, the door closes after this merges. The fix is to add the admin to that team, or to add the pinned-id setting.
Checks run
bun scripts/gate.ts and bun x tsc --noEmit pass. scripts/fast.ts couldn't narrow the tests, because the door is imported by the layout and it named 2,248 files. So I picked the tests that mention Foundry:
- Before the first push, all five passed:
api-forge-view,app-turn,flow-cache,follow-sourcesandpalette-roster(78 tests). - After this fix, which only touched
api-forge-view, I reran that one file: 8 of 8 pass.
How to try it
- As an admin, put the app with slug
foundryon a repo owned by a non-admin account namedtrevato. - Open
/: there is no Foundry button and no palette row. - Move the app to an admin's repo, or to an org an admin owns, and the button appears within five seconds.
🤖 Generated with Claude Code
Clean, small, single-purpose. The name check is gone; trust now comes from an admin person owner or an org with an admin owner, and the terminal reaches the door through foundryHref so both doors match. The new test would fail on main. Operational note: production door depends on the trevato org having an admin owner; confirm after merge.
The Foundry nav door no longer opens for an account just because it is named
trevato. Before this change, anyone who signed up astrevatoon a forge where no admin holds that name could make the link point at their own app. Now the door only opens for an app owned by a site admin, or by an org with a site admin on its Owners team.What changed
src/actions/foundry_door.ts: removedFOUNDRY_ORGand the name check. A newtrustedOwner(db, ownerId)does the owner check: an admin who is a person, or an org whose active owners include an admin. Agents, suspended accounts and removed accounts don't count. The read access and app access checks after it are unchanged.test/api-forge-view.test.ts: a new test with two cases.trevatowhose owners include no admin opens no door.trevatoopens no door.This test fails with main's version of the door and passes with this change. I reworded the titles of the two existing Foundry tests to match. One of those tests already gives the
trevatoorg an admin owner, so it still covers this forge's own door opening.Left out The issue also allows "one id pinned in configuration". I didn't add it, because it would mean a new config setting wired through
src/engine/crossing.tsand boot, and the admin and admin-owned-org rule covers this forge.Look at The door now depends on production's
trevatoorg having a site admin on its Owners team. I couldn't confirm that from here: the API answerednot_foundfor/api/v1/users/trevatoand has no org-members route. If the org has no admin owner, the door closes after this merges. The fix is to add the admin to that team, or to add the pinned-id setting.Checks run
bun scripts/gate.ts --fixandbun x tsc --noEmitare clean.scripts/fast.tscouldn't narrow the tests, because the door is imported by the layout and it named 2,248 files. So I ran the five test files that mention Foundry:api-forge-view,app-turn,flow-cache,follow-sourcesandpalette-roster. All 78 tests pass.How to try it
foundryon a repo owned by a non-admin account namedtrevato./: there is no Foundry button and no palette row.🤖 Generated with Claude Code
Closes #14911