Files
worldmonitor/scripts/seed-bundle-resilience-recovery.mjs
Elie Habib 24786882ae chore(railway): wire seed-sovereign-wealth into resilience-recovery bundle (#3319)
* chore(railway): add seed-sovereign-wealth to resilience-recovery bundle

Wires the seeder landed in #3305 into the existing Railway cron service
`seed-bundle-resilience-recovery`. One-line bundle entry; no new
Railway service (the bundle pattern amortizes cron cost across the
recovery-domain seeders).

Config matches the rest of the bundle:
- intervalMs: 30 * DAY (parity with CACHE_TTL_SECONDS=35d in the
  seeder + the quarterly manifest revision cadence)
- timeoutMs: 600_000 (longer than peers because Tier 3b does N per-fund
  Wikipedia article fetches for any fund missing from the list article;
  today Temasek is the only miss but leaving headroom)

After deploy, the next cron tick populates
`resilience:recovery:sovereign-wealth:v1`, which then unblocks the
follow-up PR that adds the scorer + dimension wiring.

* fix(tests): update resilience-recovery bundle test for 6th entry

Static-analysis test in tests/seed-bundle-resilience-recovery.test.mjs
was hardcoded to `5 entries` / `all 5 entries use 30 * DAY`. Adding
Sovereign-Wealth to the bundle (previous commit) made the count 6,
breaking both assertions.

Replaced hardcoded `5` with `EXPECTED_ENTRIES.length` so the next
addition only requires appending to the allow-list at the top of the
file (and the assertion message prompts the author to do that if the
count drifts). Also appended the Sovereign-Wealth entry to the
EXPECTED_ENTRIES list.

6566/6566 data-tier tests pass locally.
2026-04-23 08:19:04 +04:00

17 lines
1.8 KiB
JavaScript

#!/usr/bin/env node
import { runBundle, DAY } from './_bundle-runner.mjs';
await runBundle('resilience-recovery', [
{ label: 'Fiscal-Space', script: 'seed-recovery-fiscal-space.mjs', seedMetaKey: 'resilience:recovery:fiscal-space', canonicalKey: 'resilience:recovery:fiscal-space:v1', intervalMs: 30 * DAY, timeoutMs: 300_000 },
{ label: 'Reserve-Adequacy', script: 'seed-recovery-reserve-adequacy.mjs', seedMetaKey: 'resilience:recovery:reserve-adequacy', canonicalKey: 'resilience:recovery:reserve-adequacy:v1', intervalMs: 30 * DAY, timeoutMs: 300_000 },
{ label: 'External-Debt', script: 'seed-recovery-external-debt.mjs', seedMetaKey: 'resilience:recovery:external-debt', canonicalKey: 'resilience:recovery:external-debt:v1', intervalMs: 30 * DAY, timeoutMs: 300_000 },
{ label: 'Import-HHI', script: 'seed-recovery-import-hhi.mjs', seedMetaKey: 'resilience:recovery:import-hhi', canonicalKey: 'resilience:recovery:import-hhi:v1', intervalMs: 30 * DAY, timeoutMs: 1_800_000 },
{ label: 'Fuel-Stocks', script: 'seed-recovery-fuel-stocks.mjs', seedMetaKey: 'resilience:recovery:fuel-stocks', canonicalKey: 'resilience:recovery:fuel-stocks:v1', intervalMs: 30 * DAY, timeoutMs: 300_000 },
// PR 2 §3.4 — feeds the forthcoming `sovereignFiscalBuffer` dimension.
// 30-day interval matches the CACHE_TTL_SECONDS (35 days) in the seeder
// and the quarterly revision cadence documented in the manifest. Longer
// timeout than peers because Tier 3b (per-fund Wikipedia infobox) is N
// network round-trips per manifest fund the list article misses.
{ label: 'Sovereign-Wealth', script: 'seed-sovereign-wealth.mjs', seedMetaKey: 'resilience:recovery:sovereign-wealth', canonicalKey: 'resilience:recovery:sovereign-wealth:v1', intervalMs: 30 * DAY, timeoutMs: 600_000 },
]);