fix: harden degraded source handling #85

Merged
MrSphay merged 1 commits from codex/fix-source-degradation-handling into codex/production-intelligence-terminal 2026-07-07 19:19:05 +00:00
Owner

Closes #84.

Summary:

  • Bounds GDELT API calls so optional geo enrichment cannot consume the full source budget.
  • Replaces OFAC full XML downloads with bounded snippet streaming for metadata/sample parsing.
  • Makes EPA RadNet degrade quickly when the current Envirofacts tables are unavailable or slow.
  • Retries BLS without BLS_API_KEY when the configured key is rejected, while surfacing a config warning.
  • Preserves degradation reasons in runSource timing/health for DAVE and /api/health.
  • Documents which remaining live problems are credential/account actions: ACLED 403, ADS-B key, Reddit OAuth, BLS key replacement/removal.

Verification:

  • node --check for changed source/orchestrator files
  • node --test test/source-resilience.test.mjs
  • node --test test/fetch-utils.test.mjs test/adsb.test.mjs test/reddit-source.test.mjs test/acled-source.test.mjs
  • Full npm run test reached 100/101 passing; the remaining local failure is Windows SQLite temp cleanup EPERM in test/intelligence-store.test.mjs, unrelated to these source changes and expected to run on the Ubuntu Gitea runner.
  • Live spot checks: OFAC and BLS returned quickly; EPA now returns explicit degraded 404 instead of timing out.
Closes #84. Summary: - Bounds GDELT API calls so optional geo enrichment cannot consume the full source budget. - Replaces OFAC full XML downloads with bounded snippet streaming for metadata/sample parsing. - Makes EPA RadNet degrade quickly when the current Envirofacts tables are unavailable or slow. - Retries BLS without `BLS_API_KEY` when the configured key is rejected, while surfacing a config warning. - Preserves degradation reasons in runSource timing/health for DAVE and `/api/health`. - Documents which remaining live problems are credential/account actions: ACLED 403, ADS-B key, Reddit OAuth, BLS key replacement/removal. Verification: - `node --check` for changed source/orchestrator files - `node --test test/source-resilience.test.mjs` - `node --test test/fetch-utils.test.mjs test/adsb.test.mjs test/reddit-source.test.mjs test/acled-source.test.mjs` - Full `npm run test` reached 100/101 passing; the remaining local failure is Windows SQLite temp cleanup `EPERM` in `test/intelligence-store.test.mjs`, unrelated to these source changes and expected to run on the Ubuntu Gitea runner. - Live spot checks: OFAC and BLS returned quickly; EPA now returns explicit degraded 404 instead of timing out.
MrSphay added 1 commit 2026-07-07 19:17:03 +00:00
fix: harden degraded source handling
All checks were successful
Codex Template Compliance / template-compliance (pull_request) Successful in 7s
Build / test-and-image (pull_request) Successful in 53s
62d9c680b7
MrSphay merged commit 831cae1729 into codex/production-intelligence-terminal 2026-07-07 19:19:05 +00:00
Sign in to join this conversation.