This happened twice in the first month. A redeploy would go out without the affiliate env vars being re-applied. The site looked identical to a working version at a glance. Clicking around would eventually reveal the missing CTA, but only if you happened to land on the right page type.
I wrote scripts/check-affiliates.mjs to make that check fast and explicit.
What the script does
The script checks three sites in sequence. For each site, it:
Fetches /sitemap-index.xml to find the sub-sitemap for detail pages






