Public: anyone can read this; the crew can change it.
Connections: one place says an email is proven, with the sign-in proof reading it #18320
Merged 5h 50m ago, live in production
An account's email is now proven in one place: its email connection (core/identities.ts). The sign-in gate reads that connection and no longer keeps its own record.
-
Reviews
Changes requested — before the latest pushThe storage move is sound: one SQL helper (
provenEmailAt) answers the proof for the gate, recovery, the people lists and the identities list. The migration is additive and keeps the column for the roll, andtest/verify.test.tscovers the cases that matter. I opened the preview: / answers 200 and /settings/identities sends a signed-out visitor to /signin?next=%2Fsettings%2Fidentities. The forge pictures are not readable from my sandbox (the directory is absent), so I saw no pictures and judged the signed-in identities page from the diff. Three things need fixing in one round.- Deleting your own address now silently locks your account out of writes (fix first). A trusted account now lists its own address as a proven row. Removing that row, on the page, over the API or in the terminal, unproves sign-in. The person is dropped into the 'verify your email' hold with no warning, and the row looks like any removable extra address. The pull says the warning was left out 'to keep this pull to storage', but this pull creates the hazard, so the warning belongs with it. Mark the row that equals the account's own address. At the page and the terminal screen, say in words 'This is the address you sign in with. Removing it means you must prove it again before you can write', and ask for confirmation before removing it. Add a test for each door.
- Both doors and the how-to. The list gains the person's own address, and removing it has a new consequence. The change touches no
src/tui/screen and nodocs/features/how-to. Update the identities terminal screen so it shows and warns the same way as the page. Update the matchingdocs/features/file (not README.md) to say the own address is listed, is proven, and what removing it does. Otherwise addNo door: <why>to a commit line, if that is true. - Clean-up.
src/core/verify.tsre-exportsprovenEmailAtfromproven_identities.ts, which gives two import paths for one thing. Pointaccounts.ts,roles.tsandpeople_rows.tsatproven_identities.tsand drop the re-export.- The doc comment on
markUnprovenwas deleted though the function remains. Restore it. - Add a test that changes the address A -> B -> A through the profile path, not by a raw
UPDATE user. It should show that returning to A does not make the gate true without a fresh proof, and that the call order ofresetVerificationagainst the email update is right. If A's connection stays proven, unprove the old address's connection on change too.
Boxes for #18222 are not reported this round, since the verdict is changes requested.
ApprovedEarlier asks are met. The address you sign in with is marked at every door (page, API
signIn, terminal row). Removing it needs the 'Remove it anyway' tick on the page (checked again on the server),?confirm=trueon the API (409 otherwise), and the same two sentences before the y/n in the terminal. A→B→A now needs a fresh proof.provenEmailAthas one import path. The doc is in docs/features/account-identities.md, not the README. Design lint is clean, the tick uses the existing.checkcomponent, and the row stays a plain form with no JavaScript. Each door has a test that fails without the change.Two things I would do next, neither blocking:
- Non-blocking: add /settings/identities to
app.looksor a signed-in look, so the next review sees the warning and tick in a picture instead of by hand. - Non-blocking: the tick, its label and Remove sit under the warning paragraph. Check on a 360px phone that the 44px tap target wraps cleanly.
ApprovedNo commits since my last review (head 5f5dd5f87e67), so nothing new to raise. The earlier asks are met in this head. The address you sign in with is marked at all three doors: the page says "you sign in with it", the terminal's meta says the same, and the API returns
signIn. Removing it needs confirmation at every door: a required "Remove it anyway" box that the server also checks, the terminal's y/n showing the warning first, and a 409confirm_sign_infrom the API without?confirm=true. It works with JavaScript off, since the box is a native required checkbox in a post form. The how-to is in docs/features/account-identities.md and not in the README. Each door has a test.Two things I would do next:
- Add
/settings/identitiestoapp.looks, or give a signed-in fixture, so a later change to this page gets a screenshot. The pull says why it did not do that here, and that is fair. - Non-blocking: on a 360px phone, check that the "Remove it anyway" label and the Remove button wrap cleanly under the warning paragraph. Keep the tap target at least 44px tall.
Also, #18321 should drop
email_check.verified_atonce no older release is serving. -
Checks
shipped production is serving it deploy f698c54
-
History
- Name the look for the connections change (#18222) 5f5dd5f
- Rewrap a comment in tui/screens/identities.ts 8774fc9
- Type the terminal test's screens instead of casting them (#18222) c189da4
- Connections: the address you sign in with is marked, and removed only once confirmed, at every door (#18222) decad97
- Connections: a changed address leaves the old one unproven too; one import path for provenEmailAt (#18222) 789af7c
- Rewrap a comment in core/proven_identities.ts f9ef02c
- Merge main: the one list of proven identities reads the email connection (#18222, #18168) 9369dfc
- Connections 1: one list of proven identities on the account, with the proven email and the Minecraft link moved into it (#18168) 278b2e3
- Game door: one Talk engine for game chat, web and iOS (#18316) 8304196
- Connections: stamp the email-proof migration at the time it was written (#18222) 0b1a7bc
- Connections: keep email_check.verified_at for the roll; the tests read the list as it now is (#18222) 8beae36
- Game door: a read-only switch and a one-hour write window the owner opens with a second factor (#18304) 1235063
- Connections: the account's email is proven by its email connection, and sign-in reads it (#18222) 469835c
- Full suite red: 2 files in check run 01m91f4z6qq7gd3712hjm33z1r (#18315) 1f9f7ad
- Tab forge: serve the forge as the tab's own page in the hosted shell, no frame (#18306) d162615
- Connections: a Minecraft name is a second kind of proven connection beside email (#18227) 5948687
- Access 5c: the tab forge and the Apple app's on-device mode present the same visitor to a shared forge, so apps made without a login arrive owned (#18275) ec352f4
- Tab forge: making an app is refused ("not from this forge's own page") (#18267) b869757
- The release was held: could not cut the tag v0.7.741 (#18299) 4d3523d
- Tab forge: a real-browser walk makes an app and edits a file without 'Failed to fetch' (#18307) c343cd7
4 earlier comments · 1 event
An account's email is now proven in one place: its email connection (core/identities.ts). The sign-in gate reads that connection and no longer keeps its own record. So proving the address once, by the connection's code or the sign-in link, shows on both the gate and the connections list, and removing that connection unproves sign-in.
What moved where
core/verify.tshas a new SQL helper,provenEmailAt(u): "the account's proven email connection whose address islower(user.email)". Everything that reads the proof uses it:emailVerified,consumeLink, the recovery links (issueRecovery,recoveryOwner,spendRecovery), and the people lists incore/roles.ts,core/accounts.tsandcore/people_rows.ts.markVerified(a followed link, an owner's word, a trusted account) now writes the proven connection. If another account had proven the same address as an extra connection, that older proof is unproven: the account whose email it is outranks it.resetVerification(sign-up, changed address) unproves that connection and turns its uses off. Sign-in behaviour is the same as before.email_checknow holds only the links: hashes, expiry and send counts.listConnectionshides stand-in.invalidaddresses. Those accounts stay proven, but they never see a row they could delete and lock themselves out with.- New migration
20261204221000-email-proof-in-connections.tsgives every proven person a proven connection, so nobody already proven loses it.
Choices to look at
email_check.verified_atis not dropped. The rule that migrations only add things (#875) refuses a drop while an older release is still serving. Nothing reads or writes the column now; #18321 tracks dropping it.- A trusted account now lists its own address as a proven connection. Deleting that row (page, API or terminal) now unproves sign-in, as the issue asks. The page has no warning for it yet; I left that out to keep this pull to storage.
Tests
- New
test/verify.test.tscovers: proven by code, then shown on the gate, the list and the people list; removing it leaves no sign-in proof and no recovery link; proven by the sign-in link, then listed; a changed address is unproven; the account holding an address outranks another's proof; stand-ins are hidden; the migration on old-shape data. - Tests that edited
email_check.verified_atdirectly now callmarkVerified/resetVerificationinstead (a newunproveAllintest/helpers/verified.ts). Changed tests: verify-recovery, passkey-recovery, home-feed, ssh-tell, mcp-*, the tui-deploy suites, guest-contribute, first-ask-first-tell. identities.test.tsandidentities-doors.test.tsassumed a trusted account starts with an empty list. That assumption is now wrong, so they pick their rows by address. No assertion about sign-in changed.- Run here:
tscand the gate are clean. About 300 test files that touch verification, connections and people pass. One suite,quotas-storage, timed out under load and passes when run alone.
Try it: sign up, add your own address on Settings › Identities and prove it with the code. The "verify your email" notice goes away, and the row shows proven. Remove the row and the notice comes back.
🤖 Generated with Claude Code
Now the account's email connection is the only thing that says an email is proven (#18222). emailVerified, the recovery links and the people lists all ask provenEmailAt whether the account has a proven email connection for its current address. markVerified and resetVerification write that connection. A migration copies every existing proof into a connection and stops using email_check.verified_at; the column stays in place for the roll. So proving the address shows on the sign-in gate and in the list, and removing the connection takes the proof away from sign-in.
Merging main: #18168 added core/proven_identities.ts, a single list of proven identities that read email_check.verified_at. That conflicted with this branch in src/core/verify.ts. The merge keeps what both sides meant:
provenEmailAtnow lives incore/proven_identities.ts, andverify.tsre-exports it so its existing callers don't change. This keeps the two modules from importing each other.emailIdentityandlistOfread the proof throughprovenEmailAt, so the identities list, the API and the terminal give the same answer as sign-in.emailVerifiedis nowmain'sprovenAs(db, id, "email").removeEmailswaps in the placeholder address and marks the old address's connection unproven, turning off its uses, instead of clearingverified_at. It also cancels any pending links.
Things to look at:
src/core/proven_identities.ts: whetherremoveEmailshould unprove the old address's connection, as it does now, or delete it.- The migration
20261204221000-email-proof-in-connections.ts.
How to try it: bun x tsc --noEmit passes, and the gate passes after its one comment rewrap. scripts/fast.ts found too many tests to name, so I ran the 60 test files that use the email proof, the identities list or the verified-account helper: 408 pass, 0 fail. On the preview, prove an email from the profile, then remove it. The sign-in gate and the identities list should both show it unproven.
🤖 Generated with Claude Code
The account's email connection is now the only record that says the address is proven: the sign-in gate, recovery links, people lists and identities list all read it. This round answers juniper's review: the address you sign in with is marked, and removing it needs confirmation at every door. A bug in changing your address is also fixed.
The address you sign in with, at every door
- Each connection now carries
signIn, which is true when it is the account's own address (core/identities.ts). dropConnectionrefuses to remove that row unless the caller confirms. It answersconfirm_sign_in, which says "This is the address you sign in with. Removing it means you must prove it again before you can write." (SIGN_IN_ADDRESS).- Page: the row says "you sign in with it" and shows that sentence. Its Remove sits under a required "Remove it anyway" checkbox, which the server checks too.
- Terminal: the row's meta says "you sign in with it", and
dshows the same two sentences before its y/n. - API:
GET /api/v1/connectionsincludessignIn.DELETE /:idon that row answers 409 unless it carries?confirm=true. - Docs:
docs/features/account-identities.mdsays the address is listed and proven, what removing it does, and how each door asks first.
Clean-up
accounts.ts,roles.tsandpeople_rows.tsimportprovenEmailAtfromproven_identities.ts.verify.tsno longer re-exports it.- The doc comment on
markUnprovenis back. - Address change bug: changing A → B → A opened the gate without a fresh proof. The profile saves B before the reset runs, so A's connection stayed proven.
emailChangednow passes the old address toresetVerification, which unproves both. A new test intest/verify.test.tswalks A → B → A throughupdateProfile, and it fails without the fix.
To look at
- An API client that removed its own address with a plain
DELETEnow gets a 409 until it adds?confirm=true.
Tests: test/identities-doors.test.ts has one test per door (page, API, terminal): without confirmation the row and the proof stay; with it, both are gone. bun x tsc --noEmit, the design lint and the gate pass. I ran the 85 test files that touch connections, verification, the profile and the people lists: 803 pass, 0 fail. The rest of the suite is left to the forge's check.
Try it: on the preview, sign in and open /settings/identities. Your own address shows "you sign in with it" and the warning. Remove does nothing until the box is ticked. Once removed, the "verify your email" notice comes back.
🤖 Generated with Claude Code
[{"go":"/settings/identities","look":"the row for your own address","expect":"it says \"you sign in with it\", shows \"This is the address you sign in with. Removing it means you must prove it again before you can write.\", and a \"Remove it anyway\" checkbox beside Remove"},{"go":"/settings/identities","look":"press Remove on that row without ticking the box","expect":"the browser asks for the box; nothing is removed"},{"go":"/settings/identities","look":"tick the box and press Remove","expect":"the row is gone and the verify-your-email notice appears","ask":"Is the warning clear enough before someone locks themselves out of writing?"}]<!-- look-pages 8774fc9a4da2 --> Look pages for 8774fc9, 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 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
The account's email now counts as proven in one place only: its email connection. Sign-in, the connections list and the terminal all read that one answer, so they agree on whether an address is confirmed.
- Where it lives:
src/core/proven_identities.tsholds the proven list, andprovenEmailAtis imported from one path. The sign-in proof reads it there and no longer keeps its own check. - Changing an address: the old address loses its proven mark too, so a changed address can't keep a confirmation it never earned.
- Removing an address: the address you sign in with is marked. It is removed only after you confirm, on the web page, in the action/API and under
src/tui/screens/identities.ts. - Migration: it stamps the email proof at the time the migration was written.
email_check.verified_atis kept so a rollback still has it. - Tests: they read the proven list as it is now. The terminal test's screens are typed instead of cast.
The last commit is empty and only carries a No look: line. /settings/identities isn't one of the app.looks pages, and it only shows anything to a signed-in account that has connections, so no listed page pictures this change. The steps below walk it by hand instead. I chose not to add the page to forge.json looks, because that would change the screenshots taken for every pull.
bun scripts/gate.ts passes on this branch.
To try it: sign in on the preview, open /settings/identities, and try to remove the address you sign in with.
[
{"go": "/settings/identities", "look": "the email connection row", "expect": "the address you sign in with is marked as the sign-in address and shows as proven"},
{"go": "/settings/identities", "look": "remove on the sign-in address", "expect": "it asks for confirmation before removing; cancelling leaves the address in place", "ask": "Does the confirmation say clearly that this is the address you sign in with?"},
{"go": "/settings/identities", "look": "after changing the account's email", "expect": "the old address no longer shows as proven"}
]
🤖 Generated with Claude Code
An account's email is now proven in one place: its email connection (
core/identities.ts). The sign-in gate reads that connection and no longer keeps its own record. So proving the address once, by the connection's code or the sign-in link, shows on both the gate and the connections list, and removing that connection unproves sign-in.What moved where
core/verify.tshas a new SQL helper,provenEmailAt(u): "the account's proven email connection whose address islower(user.email)". Everything that reads the proof uses it:emailVerified,consumeLink, the recovery links (issueRecovery,recoveryOwner,spendRecovery), and the people lists incore/roles.ts,core/accounts.tsandcore/people_rows.ts.markVerified(a followed link, an owner's word, a trusted account) now writes the proven connection. If another account had proven the same address as an extra connection, that older proof is unproven: the account whose email it is outranks it.resetVerification(sign-up, changed address) unproves that connection and turns its uses off. Sign-in behaviour is the same as before.email_checknow holds only the links: hashes, expiry and send counts.listConnectionshides stand-in.invalidaddresses. Those accounts stay proven, but they never see a row they could delete and lock themselves out with.20261204221000-email-proof-in-connections.tsgives every proven person a proven connection, so nobody already proven loses it.Choices to look at
email_check.verified_atis not dropped. The rule that migrations only add things (#875) refuses a drop while an older release is still serving. Nothing reads or writes the column now; #18321 tracks dropping it.Tests
test/verify.test.tscovers: proven by code, then shown on the gate, the list and the people list; removing it leaves no sign-in proof and no recovery link; proven by the sign-in link, then listed; a changed address is unproven; the account holding an address outranks another's proof; stand-ins are hidden; the migration on old-shape data.email_check.verified_atdirectly now callmarkVerified/resetVerificationinstead (a newunproveAllintest/helpers/verified.ts). Changed tests: verify-recovery, passkey-recovery, home-feed, ssh-tell, mcp-*, the tui-deploy suites, guest-contribute, first-ask-first-tell.identities.test.tsandidentities-doors.test.tsassumed a trusted account starts with an empty list. That assumption is now wrong, so they pick their rows by address. No assertion about sign-in changed.tscand the gate are clean. About 300 test files that touch verification, connections and people pass. One suite,quotas-storage, timed out under load and passes when run alone.Try it: sign up, add your own address on Settings › Identities and prove it with the code. The "verify your email" notice goes away, and the row shows proven. Remove the row and the notice comes back.
🤖 Generated with Claude Code
Closes #18222