Real-time global intelligence dashboard. AI-powered news aggregation, geopolitical monitoring, and infrastructure tracking in a unified situational awareness interface
[codex] Unify CII risk weight source of truth (#3926)
* fix(cii): unify risk weight source of truth
* fix(cii): keep methodology version stable
* test(cii): close drift-guard gaps surfaced by greptile
- Add SERVER_TIER1_COUNTRIES import from
server/worldmonitor/intelligence/v1/_shared.ts and assert its keys
equal shared CII_COUNTRY_WEIGHTS keys. computeCIIScores iterates the
server's TIER1_COUNTRIES (not the frontend copy), and that map was
previously not covered by any drift guard — adding a country to the
shared table without updating server _shared.ts would have silently
skipped scoring for the new country (greptile P2).
- Remove the two tautological deepEqual checks on BASELINE_RISK and
EVENT_MULTIPLIER key sets. Both maps are { ...CII_BASELINE_RISK } /
{ ...CII_EVENT_MULTIPLIER } spreads of the shared module derived
from CII_COUNTRY_WEIGHTS via Object.fromEntries — the assertions
compared a set to itself and could never fail. The per-country
assert.equal loop below already enforces the real invariant
(greptile P2). E
Elie Habib committed
1ab1a39e654fbbb80f4b2031e2f4270601a8dcbf
Parent: 526f916
Committed by GitHub <noreply@github.com>
on 5/27/2026, 3:20:45 PM