Skip to content

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):

VarDefaultUsed for
DNS_POLL_INTERVAL_MS5 minutesMinimum spacing between DNS polls
DOMAIN_VERIFICATION_WINDOW_MS6 hoursNormal user_domains verification from verification_started_at
CLAIM_VERIFICATION_WINDOW_MS6 hoursClaim 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.verify share the same timing helpers so client and background paths stay aligned.