Files
sql-server-query-ai/kb/Email collision check.md
T
ahmed mohammedandClaude Opus 4.7 8b42a0931c docs: karpathy-pattern wiki built from the spec, plan, design contract and decisions ledger
kb/ is its own wiki root: 34 pages across 7 categories, index.md catalog, log.md, AGENTS.md schema layer, and raw/ holding copies of README, the spec, the 13-task plan, the design master and the SDD ledger.

Every page cross-references 3 to 6 others and all 107 wikilinks resolve except two [["list"]] artefacts inside JSON snippets in the copied plan.

Kept separate from the repository root on purpose: its generated graph lands in kb/.ua/ instead of overwriting the code graph.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-09-22 12:14:05 +03:00

642 B

Decision: email collision check

Changing your email in settings wrote straight to a UNIQUE column. A collision surfaced as a raw constraint error inside a server action — the form looked like it did nothing.

changeEmail in lib/auth.ts now validates the address, compares it case-insensitively after trimming, and returns "That email already has an account." when another user owns it. It returns ok when the address is already yours.

A deferred neighbour: sessions are not revoked when the password changes, so a 30-day token survives a password rotation.

Related: First-run gate, Session cookie rules, SQLite schema.