test(bench): add /map recall benchmark#191
Merged
Merged
Conversation
Measures /map URL-discovery recall against purpose-built scraper sandboxes (books.toscrape.com, quotes.toscrape.com) whose structure is fixed and known. Offline scorer self-check pins the observed baseline (~0.71 product recall at default maxDepth=2) from a recorded fixture, so scorer regressions fail loudly. Baseline finding: a clean, unprotected, sitemap-less static site still loses ~29% of products because discover_urls BFS is depth-gated and does not follow pagination chains past depth. Root cause + follow-up noted in MAP_RECALL.md.
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.
What
A reproducible benchmark for
/mapURL-discovery recall — turns "map keeps missing URLs" into a number.Ground truth = purpose-built scraper sandboxes with fixed, publicly-known structure (deterministic, unprotected, free):
Recall is the metric that matters: a raw count lies.
trendyol.comreturns ~5082 URLs but ~0 of the Turkish catalog (20/5082 products) — almost all/ar/+/bg/foreign-locale category sitemaps.Run
Baseline findings (hosted fastCRW, default maxDepth=2)
maxDepth5 and 10 → HTTP 502 on hosted (default depth 2 works) — can't raise depth to compensate.Root cause (follow-up, not fixed here)
crw-crawl/src/crawl.rs::discover_urlsruns a BFS gated bydepth < max_depth(default 2). Pagination is a chain (page-2 → page-3 → …), so depth-2 reaches ~page-3and everything deeper is lost. The fix is pagination-aware traversal (followrel=next/ numbered pages on a separate budget) rather than just bumping default depth — raising depth lengthens the crawl and worsens the gateway 502. Tracking separately.Scope
Bench tooling only — no product code touched. Offline
--selfcheckpins the ~0.71 baseline from a recorded fixture so scorer regressions fail loudly; the live run needs a local crw server.