Originally created by: TheoV823
scripts/deploy_site.py:267 builds the Cloudflare purge URL list from all changed-file labels without filtering by file type. On 2026-05-17, commit b414819 changed site/sitemap.xml, which caused https://mnemehq.com/sitemap.xml to be included in the purge batch — the first time a non-directory URL appeared in a purge request. Cloudflare returned HTTP 400, rejecting the entire batch and leaving the wave 2 breadcrumb and sitemap changes stale on the edge.
Discovered during Task 3 of the post-launch cleanup runbook (2026-05-17). Deploy run 25990885821 failed; run 25990192981 (same day, earlier) succeeded with 10 HTML-directory-only URLs. The new variable between the two runs was sitemap.xml in the changed-file set.
Inferred purge list at time of failure:
https://mnemehq.com/concepts/
https://mnemehq.com/insights/ai-native-engineering-intent-debt/
https://mnemehq.com/insights/
https://mnemehq.com/sitemap.xml <- rejected
In scripts/deploy_site.py at the URL-list construction step (~line 267), filter label_to_url output to HTML-directory URLs only — drop labels that do not map to a clean trailing-slash URL (i.e., exclude sitemap.xml, robots.txt, og.png, llms.txt, and any other non-HTML asset). These assets can age out of cache or be handled in a separate purge-everything call.
Also: log the URL list before sending the request (even on failure) so future errors are self-diagnosing. See companion issue [#107] for the response-body logging fix.
scripts/deploy_site.py URL-list construction (~line 267)fix/deploy-cf-purge-payload branchSee also: [#46] (renamed site files in delta deploy) — distinct problem in the same file; keep scopes separate.
Discovered during post-launch cleanup runbook (2026-05-17).