M2: extraction quality — fallback extractors, thin-content detection, result cache

- extractor: trafilatura (precision) -> trafilatura (recall) -> readability-lxml
  fallback chain; longest result wins; 'thin' flag below 200 chars
- orchestrator: Redis-backed scrape-result cache keyed by URL (cache hit skips
  render entirely); thin/empty results are never cached
- /health reports orchestrator Redis reachability

Verified: HN + synthetic thin/empty/boilerplate pages; cache hit path via fakeredis.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
User 2026-07-05 22:05:04 -07:00
parent e2b329b2bb
commit 56e7fa16dd
8 changed files with 156 additions and 32 deletions

View file

@ -7,9 +7,12 @@ services:
RENDERER_URL: http://renderer:8002
EXTRACTOR_URL: http://extractor:8003
SEARCHER_URL: http://searcher:8001
REDIS_URL: redis://redis:6379
EXTRACT_CACHE_TTL: ${EXTRACT_CACHE_TTL:-3600}
depends_on:
- renderer
- extractor
- redis
healthcheck:
test: ["CMD", "python", "-c", "import urllib.request; urllib.request.urlopen('http://localhost:8000/health')"]
interval: 30s