Repository navigation
the sitemap expiry guard never fired, because the rows have no status - #2790
Merged
Merged
Conversation
…#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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Cherry-pick from dev (#2789). This commit only.
The production deploy of #2788 failed its sitemap smoke gate:
bridge-execution-latencyandbridge-realized-costrender noindex and were listed in the sitemap.isExpiredBenchguards against exactly that and readb.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, whichmaterialize/load.tswrites 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.