prerender-v0.12.0 — @harperfast/prerender
Sitemap entries are now filtered to prerender routes before any render target is created.
A sitemap is written for search engines: it lists every indexable URL on the site, which is routinely a superset of the paths the CDN forwards. Previously every <loc> became a RenderTarget × deviceTypes — the sitemap path applied no route filter at all, not even excludePathPatterns — and each one rendered on its interval into a cache key no read ever computes.
Sitemap.refresh now reports what it dropped:
{ "created": 1200, "updated": 0, "skipped": 40, "removed": [],
"filtered": { "passthrough": 3, "unclassified": 812 }, "deferred": 0 }Past sitemap.filteredWarnPercent (default 50%) a filtered share is logged as an error rather than info: filtering most of a sitemap almost always means ingress.routes is incomplete rather than that the sitemap is wrong, and a silent filter looks exactly like a healthy refresh while removing most of the render coverage.
deferred counts existing targets whose URL no longer classifies as prerender. Those are left untouched on purpose — the refresh unlinks a target that genuinely left the sitemap (sitemapUrl: null), but doing that to a filtered URL would leave its RenderSchedule row intact and the target rendering forever with nothing tracking it.
Notes
- This release stops the backlog growing; it does not shrink it. Targets already created keep rendering. Retiring them needs guardrails that belong to the schedule-repair sweep.
- A malformed
<loc>is now reported as invalid rather than as an unclassified routing gap — opposite diagnoses with opposite fixes. - Adds
routeClass.classifyUrl;queryAllowlistForis now a projection of it, so a caller needing both the class and the allowlist parses once and can't derive them from two disagreeing parses.
Recommended upgrade target
If your sitemaps are large, prefer 0.13.0 over this release once it lands (#43). This version adds per-row classification inside the sitemap prune loop, which slightly lengthens the window in which that loop holds pending writes across an open cursor — a shape Harper's long-transaction monitor aborts with a 422. 0.13.0 restructures those loops so no write is ever pending while a cursor is open.
Full detail: #42