Appearance
012 — Verification timing (env-configurable)
Context
DNS verification needs a poll throttle and a deadline. Claims are more adversarial than first-time email setup, so the windows should be independently tunable. Hardcoded constants force redeploys for ops changes.
Decision
Three Worker env vars (milliseconds, positive integers; invalid/missing → defaults):
| Var | Default | Used for |
|---|---|---|
DNS_POLL_INTERVAL_MS | 5 minutes | Minimum spacing between DNS polls |
DOMAIN_VERIFICATION_WINDOW_MS | 6 hours | Normal user_domains verification from verification_started_at |
CLAIM_VERIFICATION_WINDOW_MS | 6 hours | Claim expires_at and claim expiry cron |
Wrangler cron remains */5 * * * *; the poll interval is the app-level throttle.
Consequences
- Domain and claim deadlines can diverge in production without code changes.
- Cron and
domains.verifyshare the same timing helpers so client and background paths stay aligned.