Menu

#108 fix(deploy): filter non-HTML URLs from delta purge list

open
nobody
bug (2)
2026-05-17
2026-05-17
Anonymous
No

Originally created by: TheoV823

Problem

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.

Finding

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

Proposed fix

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.

Scope

  • Modify scripts/deploy_site.py URL-list construction (~line 267)
  • No site content changes
  • Can be combined with [#107] on a single fix/deploy-cf-purge-payload branch

See 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).

Related

Tickets: #107
Tickets: #46

Discussion


Log in to post a comment.

Auth0 Logo