feat(resilience): baseline vs stress scoring engine (#2821)

* feat(resilience): baseline vs stress scoring engine

Splits the resilience index into structural capacity (baselineScore)
and active disruption (stressScore) using the dimension type tags from
RESILIENCE_DIMENSION_TYPES (baseline/stress/mixed).

overallScore = baselineScore * (1 - stressFactor) where stressFactor
is clamped to [0, 0.5]. Mixed dimensions contribute to both scores.

Proto fields 10-12 added (baseline_score, stress_score, stress_factor).
Widget updated to display baseline/stress breakdown.
Cache keys bumped v4 -> v5 for atomic rollout.

* fix(resilience): bump history key to v2 for baseline/stress formula change

The overallScore formula changed from domain-weighted-sum to
baselineScore * (1 - stressFactor). Old history entries are
incomparable, causing fake change30d drops of -20 to -30 points.
Versioned history key starts a clean series.
This commit is contained in:
Elie Habib
2026-04-08 13:11:31 +04:00
committed by GitHub
parent 80b24d8686
commit f53c05599a
16 changed files with 210 additions and 31 deletions

View File

@@ -121,6 +121,15 @@ components:
imputationShare:
type: number
format: double
baselineScore:
type: number
format: double
stressScore:
type: number
format: double
stressFactor:
type: number
format: double
ResilienceDomain:
type: object
properties: