fix(trigger): stop prod runs failing on backfill + transient upstreams - #14
fix(trigger): stop prod runs failing on backfill + transient upstreams#14timothygithinji wants to merge 2 commits into
Conversation
Three independent failure classes seen in prod trigger runs: - scrape-portal: a Rightmove backfill page past the result set returns HTML with no __NEXT_DATA__, which threw and killed the whole run — discarding listings already collected from earlier pages. Treat an unparseable page past page 0 as a soft pagination-stop; page 0 still throws (genuine block → retry). - enrich-epc: the gov EPC register intermittently serves an HTTP 500 HTML page; searchEpcCerts threw and exhausted retries. Skip the round on 5xx/no-status (re-runs on cadence); genuine 4xx still throws. - enrich-ai / enrich-broadband: neon-http masks DB failures as a generic "Failed query: <sql>" with the cause stripped. Surface err.cause in the shared upsert and enrich-ai onFailure, and widen these two tasks' retry backoff (5x, 2s..30s) so a transient Neon blip isn't burned through in the global 3x/1s default's ~6s window.
ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Free Run ID: 📒 Files selected for processing (6)
WalkthroughThis PR enhances resilience across the enrichment and scraping pipeline by adding task-level retry policies, conditional error handling for transient upstream failures, and detailed diagnostic logging to distinguish transient server errors from permanent configuration/client errors. ChangesEnrichment pipeline resilience improvements
🎯 2 (Simple) | ⏱️ ~12 minutes Note 🎁 Summarized by CodeRabbit FreeYour organization is on the Free plan. CodeRabbit will generate a high-level summary and a walkthrough for each pull request. For a comprehensive line-by-line review, please upgrade your subscription to CodeRabbit Pro by visiting https://app.coderabbit.ai/login. Comment |
Summary
Fixes three independent failure classes seen in recent prod Trigger runs. Already deployed to prod as version 20260605.1.
scrape-portal(the real bug): a Rightmove backfill page past the result set returns HTML with no__NEXT_DATA__, which threw and killed the whole run — discarding listings already collected from earlier pages. Now an unparseable page past page 0 is a soft pagination-stop (keep what we have,break); page 0 still throws (genuine block → retry).enrich-epc: the gov EPC register intermittently serves an HTTP 500 HTML page;searchEpcCertsthrew and exhausted retries. Now skips the round on 5xx / no-status (re-runs on cadence); genuine 4xx still throws so real misconfig stays loud.enrich-ai/enrich-broadband: neon-http masks DB failures as a genericFailed query: <sql>with the cause stripped. Now surfaceserr.causein the shared upsert andenrich-aionFailure, and widens these two tasks' retry backoff (5×, 2s..30s) so a transient Neon blip isn't burned through in the global 3×/1s default's ~6s window.Notes
.trigger/local build state.Verification
tsc --noEmitcleanbiome checkon changed files — only pre-existing warningsSummary by CodeRabbit
Release Notes