rates/backend
jtricerolph ea240b3f96 Add stale-scrape health alerting (email + in-app banner)
Silent scraper breakage (200-with-empty-body) went unnoticed for 16 days
because nothing flagged it. Now, after each daily direct scrape, a health
check compares every enabled competitor's freshest captured rate against a
staleness threshold (default 5 days, config: scrape_health_stale_days).

State lives in a new direct_scrape_health table so we alert on transitions
only — one email when a competitor goes stale, one when it recovers, never a
daily repeat. Email uses the stack's shared SMTP integration via
central_settings (recipient: scrape_health_alert_email, else SMTP reply_to/
from) — no new mail secrets in this app. The current stale set also drives an
in-app warning banner on the Direct Rates page (GET /direct/health), with an
on-demand re-check endpoint (POST /direct/health/check).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-08-13 15:44:03 +00:00
..
api Add stale-scrape health alerting (email + in-app banner) 2026-08-13 15:44:03 +00:00
jobs Add stale-scrape health alerting (email + in-app banner) 2026-08-13 15:44:03 +00:00
services Add stale-scrape health alerting (email + in-app banner) 2026-08-13 15:44:03 +00:00
auth.py
database.py
Dockerfile Revert Firefox: root cause was broken DataImpulse nodes not fingerprinting 2026-07-10 09:54:50 +00:00
main.py Add Power BI reporting endpoints — flat tabular data via API key auth 2026-07-14 17:27:50 +00:00
migrate_direct_data.py
requirements.txt
scheduler.py Add configurable 30-day NewBook rate rescrape on 2/4/6/12h intervals 2026-07-15 09:44:18 +00:00
schema.sql Add stale-scrape health alerting (email + in-app banner) 2026-08-13 15:44:03 +00:00