fix(seed): mark seeded test users as email-verified #163

Merged
chihlasm merged 1 commits from fix/seed-test-users-verified into main 2026-05-07 18:42:33 +00:00
Owner

Summary

Test fixtures (admin@resolutionflow.example.com and the three siblings) hit require_verified_email_after_grace once they age past 7 days, walling them out of protected routes. They were never going to receive a real verification email — they're seed fixtures.

Fix: stamp users.email_verified_at = now on insert; on re-run, backfill the column for existing rows where it's null. Idempotent.

Already ran on this dev DB — all four test users now have email_verified_at set.

Test plan

  • docker exec resolutionflow_backend python -m scripts.seed_test_users runs cleanly and prints email_verified_at backfilled if null for existing rows.
  • SELECT email, email_verified_at FROM users WHERE email LIKE '%@resolutionflow.example.com' returns non-null for all four.
  • Log in as admin@resolutionflow.example.com and confirm dashboard renders without the verification wall.

🤖 Generated with Claude Code

## Summary Test fixtures (`admin@resolutionflow.example.com` and the three siblings) hit `require_verified_email_after_grace` once they age past 7 days, walling them out of protected routes. They were never going to receive a real verification email — they're seed fixtures. Fix: stamp `users.email_verified_at = now` on insert; on re-run, backfill the column for existing rows where it's null. Idempotent. Already ran on this dev DB — all four test users now have `email_verified_at` set. ## Test plan - [x] `docker exec resolutionflow_backend python -m scripts.seed_test_users` runs cleanly and prints `email_verified_at backfilled if null` for existing rows. - [x] `SELECT email, email_verified_at FROM users WHERE email LIKE '%@resolutionflow.example.com'` returns non-null for all four. - [ ] Log in as `admin@resolutionflow.example.com` and confirm dashboard renders without the verification wall. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
chihlasm added 1 commit 2026-05-07 06:11:33 +00:00
fix(seed): mark seeded test users as email-verified
All checks were successful
Mirror to GitHub / mirror (push) Successful in 5s
CI / frontend (pull_request) Successful in 5m14s
CI / e2e (pull_request) Successful in 10m26s
CI / backend (pull_request) Successful in 10m45s
0c64e9ad62
Stamps users.email_verified_at = now on insert for the four shared
test fixtures (admin/pro/teamadmin/engineer @resolutionflow.example.com),
and backfills existing rows on re-run when the column is null. Without
this, fixtures get walled by require_verified_email_after_grace once
their created_at ages past 7 days.

Re-run with: docker exec resolutionflow_backend python -m scripts.seed_test_users

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
chihlasm merged commit dad5e1f546 into main 2026-05-07 18:42:33 +00:00
Sign in to join this conversation.