Public: anyone can read this; the crew can change it.
Connections: a Minecraft name is a second kind of proven connection beside email #18227
Merged 3h 17m ago, live in production
A person can now add a Minecraft name to their connections next to their emails. It shows as not proven until the game proves it, its uses start off, and only one account can prove a given name.
-
Reviews
Changes requested — before the latest pushOne thing to fix: a Minecraft connection stays proven after the game link that proved it is removed. The rest reads well. The migration copies the columns in the same order as the original table, the lookup still needs a proven connection with its use on, the page and terminal both gate on the signed-in account, and the tests cover add, prove, second-account and removal.
Fix first: unproving on unlink. A Minecraft name can pass to another player after the first one renames, and an integration would then keep resolving it to this forge user. The pull's own docs say that unlinking on Settings > Minecraft does not unprove the connection, so the proof outlives its basis. When the game link for that player is removed, clear
proven_atand the uses on this account'sminecraftconnection of that name. The simplest way is anunproveMinecraftincore/identities.tscalled from the same place that deletes thegame_linkrow. Add a test that fails without it: prove, unlink, then the lookup answers null. Then drop the 'unlinking does not unprove' line from the docs.Smaller: in
docs/features/account-identities.mdthe API bullet and the Lookup bullet are now one very long line each; wrap them to the file's width.Boxes: 1 and 3 are met. Box 2 is met, since the list, add and remove use the existing pages and routes. All three are ticked below on that basis. I am leaving the unproving change as a request rather than a left box, because it is a safety fix beyond what the boxes ask.
ApprovedSince my last review (bf507a18d) the change adds
unproveMinecraft, called from both places that delete agame_linkrow (unlinkand the UUID-mismatch drop inchat.ts). That meets my earlier ask that the proof must not outlive its link. The link is checked after the delete, so a link on another box keeps the proof. Uses are cleared on unprove, and the lookup then answers null. The new test covers the two-box case. Docs were updated and nothing was added to the README. Nothing new to raise. All three boxes are met. -
Checks
shipped production is serving it deploy 3eab8eb
-
History
- Connections: unlinking the game link that proved a Minecraft name unproves it (#18221) 44157ae
- Merge main into mason/18221-connections-a-minecraft-name-is-a-second bf507a1
- Access 5b: at sign-up or sign-in a person is shown what this visitor made and chooses to bring it, with a receipt and an undo window (#18217) a338207
- The games page shows a profile natively: flame graph, slowest ticks, per-mod time, linked findings (#18178) 1df6f9e
- An app made in the tab forge can be published as a read-only link on the forge, with no login (#18219) 7a7184b
- The spark page shows the slowest ticks and the time per mod, from the decoded profile (#18237) 281fd2f
- Crash reports, part 2: a private app's testers can report (a report key), in the shape the app sends, through one door (#18202) fbb3da4
- Sentinel: shared:01m23vygyffx5hg2f5vm8r74sr:f4rzrnk9yv is past its budget: trevato/forge: "the survival performance set > the terminal shows the set as the page does, and s previews it" failed o… (#18236) 6bd5128
- Full suite red: test/data-browser.test.ts (#18235) 6eb8475
- Full suite red: test/security-floor-routes.test.ts (#18234) ecc8b8c
- Sentinel: The lane has stopped: nothing has merged and nothing said so (#18233) b716c9e
- Crash reports: the route accepts the Apple app's body (os, device, at, previousRun, findings) (#18226) 24247ac
- Connections: the identities page has no picture slot (#18221) b8963a3
- Games: spark profile call tree and flame graph on the forge (#18211) 5ce50ab
- Stop and Delete a cloud machine or volume from the cost row, each confirmed only by typing its name (#18187) bcce730
- Access 5c: a linked game player mints the visitor principal (#18209) d46f453
- Connections: how to try the Minecraft kind on the preview (#18221) 2ceb1c3
- A changes-requested review with only a body is invisible: the pull's API, its reviews list and a repeat review request all say nothing (#18184) 1b94cba
- Rewrap comments to the gate's width (#18221) 69561aa
- Migrations: the connection kind widening is a named rebuild (#18221) dec74d2
5 earlier comments · 2 events
A person can now add a Minecraft name to their connections next to their emails. It shows as not proven until the game proves it, its uses start off, and only one account can prove a given name. The proof reuses the link the game door already had (!forge link <code> in src/games/chat.ts), so it doesn't have to wait for #18189.
What changed
- Core (
src/core/identities.ts): added theminecraftkind, stored lowercased (3–16 letters, digits or underscores) with no code.addMinecraftadds the name, unproven.proveMinecraftproves it.lookupnow takes a kind, and still answers only for a proven connection whose use is on.proveEmailnow only matches email rows, so a Minecraft row can't be "confirmed" with a code (that answers 404).
- Proof: when the game door links a player to an account, the same link now proves that account's Minecraft connection by that name. In
src/actions/identities.ts,addMinecraftConnectionreuseslinksOffromgames/chat.ts, so a name the account already linked in game is proven as soon as it's added. - Same rule as email: a second account may add a name someone else proved, and gets the same answer as for any new name. The link can never prove it there: the existing proven-once unique index blocks it.
- API:
POST /api/v1/connections {minecraft}adds a name. The lookup also accepts{minecraft, use}next to{email, use}. Listing and removing use the existing routes. - Both doors:
- Settings: the page gets an "Add the name" form (
POST /settings/identities/minecraft, same-origin, route marked open, added to the lazy route list). An unproven name shows "Minecraft · not proven yet" and says how to prove it in game. - Terminal: the screen gets
m. - Both say the same words (
MINECRAFT_PROOF). docs/features/account-identities.mddescribes it.
- Settings: the page gets an "Add the name" form (
- Rename: the page, the settings nav and both palettes now say "Proven identities" instead of "Proven emails". The palette id
proven-emailsstays. - Migration:
20261204120000-connection-minecraftcopies the table to widen itskindCHECK, the same wayestimate-donedoes.
Tests changed, and why
test/schema-additive.test.ts: the migration is listed inREBUILT, with the reason the release before it still works on the new table. That list is the repo's existing way to allow a CHECK widening.test/palette-roster.test.ts: its expected title follows the rename.test/identities-doors.test.ts: the header comment names the renamed page.- No existing assertion was weakened.
What I chose not to do
- Removing a game link on Settings › Minecraft does not unprove the connection.
- Feedback reports still name their reporter by email only.
- The duplicate-function hints the gate printed (
identityAddMinecraftvsidentityAdd,cleanMinecraftvsnormalizeCode) are near-misses with different checks, so I left them separate.
Checks
test/identities.test.tscovers: add, list as unproven, refuse a code or a use while unproven, prove through the game path, the lookup answering, a second account unable to prove the name, remove, and a name already linked being proven on add.test/identities-doors.test.tscovers the page form, escaping, the cross-origin refusal and the terminalm.bun x tsc --noEmitpasses. The gate has 0 failing rules. 98 test files I picked (identities, games chat, palette, route marks, schema, unused exports, module state, doors) pass with 1073 tests and 6 skipped.scripts/fast.tsnamed 3268 files because the migration reaches everything, so I didn't run the full suite; the forge's check does.
Try it: on the preview, open /settings/identities, add a name with "Add the name", and see it listed as "Minecraft · not proven yet". In the terminal, the "Proven identities" screen does the same with m.
[{"go":"/settings/identities","look":"the Proven identities section","expect":"an email form and an 'Add the name' form for a Minecraft name"},{"go":"/settings/identities","look":"after adding 'Some_Player'","expect":"a row 'some_player' with meta 'Minecraft · not proven yet' and the line saying how to prove it with !forge link <code>","ask":"Is it clear that the name is proven in game?"}]
🤖 Generated with Claude Code
<!-- look-pages 2ceb1c3983db --> Look pages for 2ceb1c3, from the gate:
look pages (none): "Looks: /settings/identities" is not a page of app.looks in forge.json; this pull changes src/web/pages/identities.ts, src/web/pages/origins.ts, src/web/palette_rows.ts but the forge could not trace the route of /, /admin/telemetry, /explore and 29 more (an inline or wrapped handler), so it could not infer a page; the reviewer decides. A "Looks: <path>" line naming the nearest page, or a "No look: <why>" line (10+ characters), says it
A Minecraft name is now a second kind of proven connection, alongside email. On /settings/identities, the "Add the name" form (and the terminal's m key) records a Minecraft name. The form checks the name and refuses requests from another origin. It also escapes the name when the page shows it. The new row reads "Minecraft · not proven yet" and says how to prove the name in game.
- Data:
src/core/identities.tsnow has aminecraftkind, cleaned bycleanMinecraft. Accepting it needs a widened connection kind, which is done by a named table rebuild in the new20261204120000-connection-minecraftmigration (with its pin file). - Page and terminal:
src/web/pages/identities.tsgains the add form and the unproven row.src/tui/screens/identities.tsshows the same thing, anddocs/features/account-identities.mdexplains how to use it. - Picture: there is none.
/settings/identitiesis not inapp.looks, and that list is at its 32-path limit, whichtest/forge-looks.test.tsenforces. The latest commit'sNo look:line says this instead of the earlierLooks: /settings/identities, which named a page the forge does not picture. The page is covered bytest/identities-doors.test.ts:118: the form's add, refusal and escaping, and the "not proven yet" row. - Left alone: the gate notes that
cleanMinecraftlooks likenormalizeCodeinsrc/billing/codes.ts, andidentityAddMinecraftlooks likeidentityAdd. Both pairs check different inputs, so I kept them apart.
The gate passes. The last commit only changes a message, so I did not rerun the type check or the tests for it.
Try it on the preview: sign in, open /settings/identities, add a Minecraft name with "Add the name", and check it is listed as "Minecraft · not proven yet".
[{"go":"/settings/identities","look":"the connections list and the Minecraft form","expect":"after adding a name with \"Add the name\", a row reads \"Minecraft · not proven yet\" with how to prove it in game"}]
🤖 Generated with Claude Code
I merged main into the branch so it lands cleanly again. In four files both sides had added something next to the same line, and each conflict keeps both:
docs/design/audit.md:main's new/settings/bringentry is in, and the/settings/identitiesentry keeps this branch's wording ("addresses and Minecraft names").src/games/chat.ts: the file imports bothproveMinecraft(this branch) andreadReceipt(main).src/http/settings_routes.ts: the identities import keepsidentityAddMinecraftbesidemain's new visitor-bring page imports.test/palette-roster.test.ts: in both rosters the palette row reads "Proven identities … emails and Minecraft names", followed bymain's new "Brought in" row.
Three migrations now share the timestamp 20261204120000: connection-minecraft from this branch, and tab-shared-apps and visitor-bring from main. The migration and schema tests pass with them sharing it, and the order is unchanged from before the merge.
bun x tsc --noEmit, bun scripts/gate.ts --explain (0 fail), bun scripts/design-lint.ts and 137 tests across 11 files pass. Those files cover migrations, the schema, the palette roster, identities, visitor bring, parity and the game doors. scripts/fast.ts named 3,273 test files for this merge, about 4.5 hours, so the full suite is left to the forge's check on this push.
🤖 Generated with Claude Code
A Minecraft name can now be kept on an account as a second kind of connection beside email (#18221). It is kept lowercased, needs no code, and shows as "not proven yet" until the game door links that player to the account. !forge link <code>, typed in game, proves the connection by that name. That is the same link that lets the player command the box. A name the account has already linked in game is proven as soon as it is added. One account proves a given name: a second account can keep it, but the link never proves it there. Its uses are off by default, as with email. The list, add and remove use the existing API routes, the Settings › Proven identities page and the terminal's "Proven identities" screen (m adds a name). The lookup accepts {minecraft, use} beside {email, use}. A named migration rebuilds the connection table so its kind can be email or minecraft.
Removing the game link unproves the connection. The name can pass to another player, so the proof can't last longer than the link it came from. unproveMinecraft in src/core/identities.ts clears proven_at and switches both uses off. It is called from both places that delete a game_link row in src/games/chat.ts:
unlink, used by Settings › Minecraft.- The game door dropping a link because the name now belongs to a player with a different UUID. That is exactly the case where the name has changed hands.
It does nothing while another box still links that player to the account, because that link still proves the name. That is the one way this goes beyond the review's request.
test/identities.test.ts has a new test: link on two boxes, prove, switch feedback on, unlink one (still proven), unlink the last (the lookup answers null, the uses are off). It fails with the chat.ts change reverted. docs/features/account-identities.md now says the proof lasts as long as the link, and the "unlinking does not unprove" line is gone. The API, Lookup and Doors bullets are wrapped to the file's width.
No door: the page, terminal and API already read proven or not from the same row, so nothing they show changes.
Checks: bun x tsc --noEmit and the gate are clean (0 fail; the 2 notes need no action). test/identities.test.ts, test/identities-doors.test.ts, test/game-chat.test.ts and test/unused-exports.test.ts pass (40 tests). bun scripts/fast.ts named nearly the whole suite because of the merge from main, so I picked these tests myself; the forge's check runs the rest.
🤖 Generated with Claude Code
A person can now add a Minecraft name to their connections next to their emails. It shows as not proven until the game proves it, its uses start off, and only one account can prove a given name. The proof reuses the link the game door already had (
!forge link <code>insrc/games/chat.ts), so it doesn't have to wait for #18189.What changed
src/core/identities.ts): added theminecraftkind, stored lowercased (3–16 letters, digits or underscores) with no code.addMinecraftadds the name, unproven.proveMinecraftproves it.lookupnow takes a kind, and still answers only for a proven connection whose use is on.proveEmailnow only matches email rows, so a Minecraft row can't be "confirmed" with a code (that answers 404).src/actions/identities.ts,addMinecraftConnectionreuseslinksOffromgames/chat.ts, so a name the account already linked in game is proven as soon as it's added.POST /api/v1/connections {minecraft}adds a name. The lookup also accepts{minecraft, use}next to{email, use}. Listing and removing use the existing routes.POST /settings/identities/minecraft, same-origin, route marked open, added to the lazy route list). An unproven name shows "Minecraft · not proven yet" and says how to prove it in game.m.MINECRAFT_PROOF).docs/features/account-identities.mddescribes it.proven-emailsstays.20261204120000-connection-minecraftcopies the table to widen itskindCHECK, the same wayestimate-donedoes.Tests changed, and why
test/schema-additive.test.ts: the migration is listed inREBUILT, with the reason the release before it still works on the new table. That list is the repo's existing way to allow a CHECK widening.test/palette-roster.test.ts: its expected title follows the rename.test/identities-doors.test.ts: the header comment names the renamed page.What I chose not to do
identityAddMinecraftvsidentityAdd,cleanMinecraftvsnormalizeCode) are near-misses with different checks, so I left them separate.Checks
test/identities.test.tscovers: add, list as unproven, refuse a code or a use while unproven, prove through the game path, the lookup answering, a second account unable to prove the name, remove, and a name already linked being proven on add.test/identities-doors.test.tscovers the page form, escaping, the cross-origin refusal and the terminalm.bun x tsc --noEmitpasses. The gate has 0 failing rules. 98 test files I picked (identities, games chat, palette, route marks, schema, unused exports, module state, doors) pass with 1073 tests and 6 skipped.scripts/fast.tsnamed 3268 files because the migration reaches everything, so I didn't run the full suite; the forge's check does.Try it: on the preview, open
/settings/identities, add a name with "Add the name", and see it listed as "Minecraft · not proven yet". In the terminal, the "Proven identities" screen does the same withm.🤖 Generated with Claude Code
Closes #18221