docs/methodology/financial-system-exposure-flag-flip-runbook.md
This is the retroactive closeout runbook for financialSystemExposure activation tracked in #6511.
RESILIENCE_FIN_SYS_EXPOSURE_ENABLED=true is live in Vercel production as of 2026-08-12.false. CI and an operator rollback therefore use the flag-off, empty-data shape.Run these checks from a clean checkout with the production Upstash credentials available through the normal ignored environment files. Do not print credential values.
Confirm the three required seed envelopes and their seed-meta records are present and fresh:
seed-meta:economic:wb-external-debt
seed-meta:economic:bis-lbs
seed-meta:economic:fatf-listing
Confirm the health endpoint reports the three inputs as healthy. A missing, malformed, empty, or stale envelope is a stop condition.
Run the directional calibration gates for the sanctions cohort and the #6461 residual cases:
node --import tsx/esm --test \
tests/resilience-financial-system-exposure-calibration.test.mts \
tests/resilience-financial-system-exposure.test.mts
Confirm the source tree is clean. The capture records the exact harness commit and refuses to write an artifact from a dirty tracked tree.
The activation changes the formula and must not share numeric caches with the education-only state. Rotate all four current generations:
| Cache family | Before | Current |
|---|---|---|
| Score | v27 | v28 |
| Ranking | v27 | v28 |
| History | v21 | v22 |
| Intervals | v10 | v11 |
Verify every claimed file type, including both Markdown locales:
grep -rln "resilience:score:v27\|resilience:ranking:v27\|resilience:history:v21\|resilience:intervals:v10" \
--include='*.mjs' --include='*.ts' --include='*.js' --include='*.mts' \
--include='*.mdx' --include='*.md' . | grep -v node_modules
This command is a review aid. Historical bump chains and historical snapshots may retain old generations. The live code, health mirrors, tests, and current methodology tables must use v28, v22, and v11. The zh methodology table is hand-maintained.
After the cache-rotation commit is pushed or otherwise fixed in a clean checkout, run:
CAPTURE_DATE="$(date -u +%F)"
FIN_SYS_ACCEPTANCE_OUTPUT="docs/snapshots/resilience-financial-system-exposure-acceptance-${CAPTURE_DATE}.json" \
node --import tsx/esm scripts/dry-run-resilience-financial-system-exposure-flip.mjs
The harness reads the full sovereign universe and the required production Redis payloads once, then scores a flag-off counterfactual and a flag-on arm from the same inputs. It does not write Redis. It writes the artifact only when all required reads resolve and the acceptance gates pass:
0.85.60% of countries have absolute overall movement below 3 points.12 overall points.The artifact must include the harness commit, source-input digest, resolved Redis key count, current cache namespaces, per-country rows, representative countries, headline-eligibility changes, and any finance source-failure rows. Record broader source-health caveats from the capture logs in the closeout documentation; do not infer all-source health from a passing score gate.
If credentials are unavailable, a required Redis read is unresolved, or a gate fails, stop. Do not retry a claimed capture, fill missing rows, mix a different cohort, or commit a synthetic artifact. Record the blocker in the issue or release notes and keep the flag rollback available.
Validate the committed result:
node --import tsx/esm --test tests/resilience-financial-system-exposure-activation.test.mts
jq '{artifactType, measuredAt, universeSize, cacheNamespaces, acceptanceGates, productionState, representativeCountries}' \
"docs/snapshots/resilience-financial-system-exposure-acceptance-${CAPTURE_DATE}.json"
If the preflight, health, directional, or acceptance gate fails after activation:
RESILIENCE_FIN_SYS_EXPOSURE_ENABLED=false in the production environment.v28 namespaces remain isolated.Update the construct methodology with the artifact filename and measured gate values. Confirm the current health view and cache generations. Keep #6461 unchanged because #6515 already closed it. This runbook closes the operational protocol; it does not authorize a production merge or a flag change beyond the stated operator action.