Skip to content

the sitemap expiry guard never fired, because the rows have no status - #2790

Merged
Flotapponnier merged 1 commit into
mainfrom
cherry/sitemap-expiry-guard
Oct 2, 2026
Merged

Flotapponnier merged 1 commit into
mainfrom
cherry/sitemap-expiry-guard

Conversation

@Flotapponnier

Copy link
Copy Markdown
Collaborator

Cherry-pick from dev (#2789). This commit only.

The production deploy of #2788 failed its sitemap smoke gate: bridge-execution-latency and bridge-realized-cost render noindex and were listed in the sitemap.

isExpiredBench guards against exactly that and read b.status === "live". The only rows that reach it are the worker's sitemap rows — slug, lastRunAt, category, perChainSlugs, no status — so the comparison was false for every row and the guard did nothing from the day it was written. The RPC variant beside it has no status check, which is why chain pages expired correctly and nothing else did.

Those two benches carry lastRunAt: 1970-01-01, which materialize/load.ts writes deliberately when a freshness_timestamp_metric reports no run, "so say so rather than pretending".

An absent status now counts as live; the worker publishes the real status from here on. Seven tests pin it, including a row with no status at all.

Verified after the pick: 425 tests pass.

…#2789)

isExpiredBench exists to keep a page that renders noindex out of the
sitemap. It read `b.status === "live"`, and the only rows that ever reach
it are the sitemap rows the worker publishes: slug, lastRunAt, category,
perChainSlugs. No status. So the comparison was false for every row and
the guard did nothing from the day it was written.

The RPC variant beside it has no status check, which is exactly why chain
pages expired correctly and nothing else did. Its own comment describes
perp-asset-breadth sitting in the sitemap with index, follow and
month-old data "because every expiry check downstream was RPC-shaped":
the fix for that was this function, and it was inert.

Found because it blocked a deploy. bridge-execution-latency and
bridge-realized-cost render noindex, both were listed, and the sitemap
smoke gate failed the production deploy and tried to roll back. Their
lastRunAt is the Unix epoch, which materialize/load.ts writes
deliberately when a bench declares a freshness_timestamp_metric and
Prometheus reports no run at all, "so say so rather than pretending". A
56-year-old page must not be advertised to crawlers.

An absent status now counts as live. A draft bench has no business in the
sitemap either, so the default loses nothing, and the worker publishes
the real status from here on so the row carries the fact instead of
relying on a default.

Seven tests pin it, including the case that was broken: a row with no
status at all.
@Flotapponnier
Flotapponnier merged commit 0a42642 into main Oct 2, 2026
2 checks passed
@Flotapponnier
Flotapponnier deleted the cherry/sitemap-expiry-guard branch October 2, 2026 15:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant