Tests (scripts/test/auth.ts, wired into pre-push): 13 framework-free,
DB-free assertions on the security-critical primitives — X 1.0a ticket
mint/verify/tamper/expiry/empty-secret, the env guardrail (whitespace
corruption, half-set provider pairs, missing AUTH_SECRET), password hash
round-trip. First real src/ test coverage.
Email canary (api/crons/email-canary, daily 06:00 via fc-cron timer): sends
to EMAIL_CANARY_TO and logs the outcome to debug_logs, so Resend key-rot /
domain breakage surfaces within 24h instead of when a user can't reset.
It worked on first fire: caught that prod EMAIL_FROM was Resend's test
domain (onboarding@resend.dev) — so ALL email to real users was silently
failing. Fixed on the box to the verified domain
(noreply@fleetcrown.orangecat.ch); canary now green.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>