sitemaps: split per-letter sitemaps into two-char buckets #3768
All Vouch review confidence checks passed
Residual risk 0.20 = Change Risk (0.37) × (1 − Review Confidence (0.47)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.37 · 221 lines diff across 2 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.02 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Shallow Review Depth
shallow_review_depth
0.344
Diff Size
diff_size
0.323
Real PR Conversation Timeline
1 comments
"Review active on #3768"
general
weight: 0.35
GuillaumeGomez
Some of our per-letter sitemaps were over Google's 50k-URL limit:
shad ~64k URLs andr~52k, withcandaclose behind. Every crate adds two URLs (the crate root andall.html). We never got an alert because the check counted crates instead of URLs.This splits the sitemaps into smaller buckets, inspired by the folder layout of the crates.io index: single-character crate names go into bucket
1, and everything else is bucketed by the first two characters of the normalized crate name (ru,se,a-, …). The largest bucket is currentlyruwith ~13k URLs, so there's plenty of headroom. If we ever outgrow that, we can split further the same way the index does (se/rd).I checked the bucket logic against a dump of all ~394k crate names: every name lands in exactly one bucket.
Changes:
left(normalize_crate_name(name), 2), so the result doesn't depend on the DB collation.Fixes I found along the way:
\n(an escape inside a raw string) inside<urlset>.Deploy notes:
crates./-/sitemap/{letter}/sitemap.xmlURLs now return 404. Search engines pick up the new buckets from/sitemap.xml.