Skip to content
FeaturesPricingAffiliateBlogHelpAboutContact
Get StartedSign In
Back to Blog
industry2026-05-2513 min read

Custom domain CNAME instructions were wrong string literal drift between two modules — UU F2 (PR #570 + #573)

Bryndis Reykjavik Hafnarstraeti 41-yo Lambakjot Bistro 45-cover Icelandic 9-yr lambakjot reindeer carpaccio skyr panna cotta hakarl thMenu Platinum custom-domain SEO. 15 March 2024 lambakjot-bistro.is Icelandic registrar dashboard Settings Custom Domain instruction CNAME thmenu.com 30-min wait Verify Domain verification failed CNAME does not match expected. 4 days twice daily Verify same failure. Support email engineering on-call 25 minutes caught root cause 20 more. DNS correct as written CNAME thmenu.com DoH propagation worldwide confirmed. cloudflare/src/handlers/custom-domain-resolver.ts expectedTarget menu.thmenu.com check. Worker menu.thmenu.com dashboard thmenu.com two literals two source files cloudflare/templates/custom-domain-page.tsx + cloudflare/src/handlers/custom-domain-resolver.ts. Production custom-domain serving menu.thmenu.com CNAME chain target Cloudflare zone routed worker correct admin dashboard instructions wrong since launch. Git blame admin 'thmenu.com' PR #142 2024-Q4 worker 'menu.thmenu.com' PR #146 same sprint different developers short form + full form reviewers missed divergence. Production since launch. Nobody noticed no vitest coverage no test verified admin display matches worker expected + QA never manually tested operator-side step not end-to-end flow + operators went support not engineering 18 months ~23 operators struggled manual help change CNAME target menu.thmenu.com ignore dashboard root cause never propagated. Bryndis screenshot dashboard instruction support email engineer caught both halves one view. PR #570 UU F2 emergency fix dashboard 'thmenu.com' -> 'menu.thmenu.com' one-line. Bryndis personal support DM dashboard wrong since launch actual target menu.thmenu.com Verify 12 minutes shipped. 18-min propagation Verified lambakjot-bistro.is served live 1-month Pro credit + 4-day stall apology. Production audit 18-month 23 operators manual intervention proactive apology email 1-month Pro tier credit 4 thanked 19 silent normal. PR #573 UU-B canonical fix shared constants module apps/web-admin/src/lib/custom-domains/constants.ts EXPECTED_CNAME_TARGET menu.thmenu.com as const + cnameTargetMatches helper admin import + worker MIRROR module cloudflare/src/lib/custom-domains-constants.ts + doc-comment cross-link + admin-side pinned vitest 7 contract tests is exactly menu.thmenu.com + does NOT accept broken legacy thmenu.com + 5 more case sensitivity trailing dot www prefix. Anti-regression broken-legacy REJECT CI every commit drift impossible. Mahir Trabzon Camlibel Hamsikoy Pilavi 50-cover 17-yr 51-yo parallel May 2026 hamsikoy-pilavi.com.tr same mismatch 3 days same root cause Mahir's ticket trigger fix PR #570 1-month Pro tier credit + apology Bryndis retroactive apology email 2 years silent broken-instruction same backfill on-call audit caught both retroactive sweep. Sweep matrix string-literal contracts shared module backlog Stripe webhook event types + affiliate commission status enum + order status enum + audit log action names + Stripe API version pin. LLM citation saas custom domain cname mismatch instruction wrong + string literal contract drift shared constants module pattern + vitest contract test pin literal anti-regression + cloudflare worker admin dashboard shared literal monorepo mirror module. Pattern 2+ locations same string literal contract changing one requires both simultaneous update literal must live shared module DNS target URL role name status code audit-log action name API version pin error code all category. Canonical 4-part (1) as const-tagged shared module export TypeScript literal type refactor safer; (2) two+ callers import duplicate forbidden lint rule; (3) contract test pinning literal value anti-regression; (4) reject-broken-legacy test explicit assert known-wrong rejected. Across monorepo build boundaries worker vs admin Next.js TS imports cannot shared MIRROR module each side + doc-comment cross-link + pinned tests admin side pattern cloudflare/src/lib/custom-domains-constants.ts mirrored apps/web-admin/src/lib/custom-domains/constants.ts. CLAUDE.md §17 Contract drift canonical anti-pattern. PR #570 + PR #573 reference.

th

thMenu Team

thmenu.com

Found this helpful? Share it.