Public: anyone can read this; the crew can change it.

Connections: email_check.verified_at is read nowhere once #18222 lands, and is dropped when no release in play reads it #18327

opened this

Merged 5h 56m ago, live in production

Nothing in the code that decides whether an email is proven reads emailcheck.verifiedat any more. The column is kept rather than dropped, because the newest release, v0.7.744 (3eab8eb91), was cut before #18320.

Notes

opened this

Nothing in the code that decides whether an email is proven reads email_check.verified_at any more. The column is kept rather than dropped, because the newest release, v0.7.744 (3eab8eb91), was cut before #18320. That release still reads and writes it in emailVerified, markVerified, consumeLink (verified_at IS NULL) and issueRecovery (verified_at IS NOT NULL). Dropping it during a roll would break sign-in on the old process (#875). The migration can follow once a release cut after #18320 replaces v0.7.744.

What changed

  • #18320 had already moved the reads to the connection. In src/core/roles.ts, proven_identities.ts, accounts.ts and people_rows.ts, the query result was still named verified_at, even though its value now comes from provenEmailAt (the email connection's proven_at). Those names are now proven_at. grep -n verified_at src/core/verify.ts src/core/roles.ts finds nothing.
  • The link lookups needed no change: consumeLink, issueRecovery, recoveryOwner and spendRecovery already tell a used link from an unused one by whether the account has a proven email connection. No migration was added.

New tests in test/verify.test.ts

  • If the older release sets verified_at during a roll, that proves nothing: the sign-in check stays shut, the members list shows the person as unverified, and no recovery link is issued.
  • A used sign-in link cannot be used again, even after verified_at is cleared, and the members list still shows the email as proven.
  • A check that the five files above never name verified_at. This one fails without the change.

Checks

  • bun x tsc --noEmit passes, and bun scripts/gate.ts reports 0 failures.
  • scripts/fast.ts reached 3,969 test files, far over its time budget, so I picked 31 by hand (verify, identities, roles, people, accounts, the terminal's people screen, schema-additive). All 213 tests pass. The full suite runs on the forge's check.

No door: no page, action, route or MCP tool changed, only query result names and tests.

To try it: bun test test/verify.test.ts test/tui-people-verify.test.ts test/schema-additive.test.ts

🤖 Generated with Claude Code

Closes #18324

commented

Nothing in the code that decides whether an email is proven reads email_check.verified_at any more. The column is kept rather than dropped, because the newest release, v0.7.744 (3eab8eb91), was cut before #18320. That release still reads and writes it in emailVerified, markVerified, consumeLink (verified_at IS NULL) and issueRecovery (verified_at IS NOT NULL). Dropping it during a roll would break sign-in on the old process (#875). The migration can follow once a release cut after #18320 replaces v0.7.744.

What changed

  • #18320 had already moved the reads to the connection. In src/core/roles.ts, proven_identities.ts, accounts.ts and people_rows.ts, the query result was still named verified_at, even though its value now comes from provenEmailAt (the email connection's proven_at). Those names are now proven_at. grep -n verified_at src/core/verify.ts src/core/roles.ts finds nothing.
  • The link lookups needed no change: consumeLink, issueRecovery, recoveryOwner and spendRecovery already tell a used link from an unused one by whether the account has a proven email connection. No migration was added.

New tests in test/verify.test.ts

  • If the older release sets verified_at during a roll, that proves nothing: the sign-in check stays shut, the members list shows the person as unverified, and no recovery link is issued.
  • A used sign-in link cannot be used again, even after verified_at is cleared, and the members list still shows the email as proven.
  • A check that the five files above never name verified_at. This one fails without the change.

Checks

  • bun x tsc --noEmit passes, and bun scripts/gate.ts reports 0 failures.
  • scripts/fast.ts reached 3,969 test files, far over its time budget, so I picked 31 by hand (verify, identities, roles, people, accounts, the terminal's people screen, schema-additive). All 213 tests pass. The full suite runs on the forge's check.

No door: no page, action, route or MCP tool changed, only query result names and tests.

To try it: bun test test/verify.test.ts test/tui-people-verify.test.ts test/schema-additive.test.ts

🤖 Generated with Claude Code

Sign in to join this conversation.

Search
↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs