mirror of
https://github.com/koala73/worldmonitor.git
synced 2026-04-26 01:24:59 +02:00
feat(resilience): add score confidence intervals via batch Monte Carlo (#2877)
* feat(resilience): add score confidence intervals via batch Monte Carlo
Weekly cron perturbs domain weights ±10% across 100 draws per country,
stores p05/p95 in Redis. Score handler reads intervals and includes
them in the API response as ScoreInterval { p05, p95 }.
Proto field 14 (score_interval) added to GetResilienceScoreResponse.
* chore: regenerate proto types and OpenAPI docs for ScoreInterval
* fix(resilience): add seed-meta + lock + fix interval cache + percentile formula
1. Write seed-meta:resilience:intervals for health monitoring
2. Add distributed lock to prevent concurrent cron overlap
3. Move scoreInterval read outside 6h score cache boundary
4. Fix percentile index from floor to ceil-1 (nearest-rank)
* fix(health): add resilience:intervals to health + seed-health registries
* fix(seed): skip seed-meta on no-op runs + register intervals in health check
This commit is contained in:
@@ -132,6 +132,8 @@ components:
|
||||
format: double
|
||||
dataVersion:
|
||||
type: string
|
||||
scoreInterval:
|
||||
$ref: '#/components/schemas/ScoreInterval'
|
||||
ResilienceDomain:
|
||||
type: object
|
||||
properties:
|
||||
@@ -164,6 +166,15 @@ components:
|
||||
imputedWeight:
|
||||
type: number
|
||||
format: double
|
||||
ScoreInterval:
|
||||
type: object
|
||||
properties:
|
||||
p05:
|
||||
type: number
|
||||
format: double
|
||||
p95:
|
||||
type: number
|
||||
format: double
|
||||
GetResilienceRankingRequest:
|
||||
type: object
|
||||
GetResilienceRankingResponse:
|
||||
|
||||
Reference in New Issue
Block a user