fix(health): enforce 1h+ TTL buffer across all seed jobs (#2072)

Full audit of seed TTL vs cron cadence. Rule: TTL >= cron_interval + 1h.

CRITICAL (TTL = cron, 0 buffer):
- seed-supply-chain-trade: tariffTrendsUs TRADE_TTL(6h) → TARIFF_TTL(8h)
- seed-supply-chain-trade: customsRevenue TRADE_TTL(6h) → CUSTOMS_TTL(24h)
- seed-sanctions-pressure: CACHE_TTL 12h → 15h (12h cron, 3h buffer)
- seed-usa-spending: CACHE_TTL 1h → 2h (1h cron, 1h buffer)

WARN (<1h buffer):
- seed-security-advisories: TTL 2h → 3h (1h cron, now 2h buffer)
- seed-token-panels: TTL 1h → 90min (30min cron, now 1h buffer)
- seed-etf-flows: TTL 1h → 90min (15min cron, now 75min buffer)
- seed-stablecoin-markets: TTL 1h → 90min (10min cron, now 80min buffer)
- seed-gulf-quotes: TTL 1h → 90min (10min cron, now 80min buffer)
- seed-crypto-quotes: TTL 1h → 2h (5min cron, now 115min buffer)
- ais-relay CRYPTO_SEED_TTL: 1h → 2h
- ais-relay STABLECOIN_SEED_TTL: 1h → 2h
- ais-relay SECTORS_SEED_TTL: 1h → 2h
This commit is contained in:
Elie Habib
2026-03-22 22:55:06 +04:00
committed by GitHub
parent 75c1c8d39c
commit df29d59ff7
10 changed files with 14 additions and 13 deletions

View File

@@ -6,7 +6,7 @@ loadEnvFile(import.meta.url);
const CANONICAL_KEY = 'intelligence:advisories:v1';
const BOOTSTRAP_KEY = 'intelligence:advisories-bootstrap:v1';
const TTL = 7200; // 120min (2x cron interval; ensures data outlives maxStaleMin:120)
const TTL = 10800; // 180min — 2h buffer over 1h cron cadence (was 120min = exactly 1h buffer)
const ALLOWED_DOMAINS = new Set(loadSharedConfig('rss-allowed-domains.json'));