fix(swf): move manifest next to its loader so Railway ships it (#3344)

PR #3336 fixed the yaml dep but the next Railway tick crashed with
`ENOENT: no such file or directory, open '/docs/methodology/swf-classification-manifest.yaml'`.

Root cause: the loader at scripts/shared/swf-manifest-loader.mjs
resolved `../../docs/methodology/swf-classification-manifest.yaml`,
which works in a full repo checkout but lands at `/docs/...` (outside
`/app`) in the Railway recovery-bundle container. That service has
rootDirectory=scripts/ in the dashboard, so NIXPACKS only copies
`scripts/` into the image — `docs/` is never shipped.

Fix: move the YAML to scripts/shared/swf-classification-manifest.yaml,
alongside its loader. MANIFEST_PATH becomes `./swf-classification-manifest.yaml`
so the file is always adjacent to the code that reads it, regardless
of rootDirectory.

Tests: 53/53 SWF tests still pass; biome clean on changed files.
This commit is contained in:
Elie Habib
2026-04-23 19:47:10 +04:00
committed by GitHub
parent 9c3c7e8657
commit 53c50f4ba9
4 changed files with 12 additions and 4 deletions

View File

@@ -962,7 +962,7 @@ export const INDICATOR_REGISTRY: IndicatorSpec[] = [
{
id: 'recoverySovereignWealthEffectiveMonths',
dimension: 'sovereignFiscalBuffer',
description: 'Sovereign-wealth fiscal-buffer signal per plan §3.4. Seeded from Wikipedia SWF list + per-fund article infoboxes (CC-BY-SA), haircut by the classification manifest (docs/methodology/swf-classification-manifest.yaml): effectiveMonths = rawSwfMonths × access × liquidity × transparency, summed across a country\'s manifest funds. Scorer applies a saturating transform score = 100 × (1 exp(effectiveMonths / 12)).',
description: 'Sovereign-wealth fiscal-buffer signal per plan §3.4. Seeded from Wikipedia SWF list + per-fund article infoboxes (CC-BY-SA), haircut by the classification manifest (scripts/shared/swf-classification-manifest.yaml): effectiveMonths = rawSwfMonths × access × liquidity × transparency, summed across a country\'s manifest funds. Scorer applies a saturating transform score = 100 × (1 exp(effectiveMonths / 12)).',
direction: 'higherBetter',
goalposts: { worst: 0, best: 60 },
weight: 1.0,