Skip to content

C2: enable coordinator for service statuses and risk scores #16

@lspassos1

Description

@lspassos1

Parent: #14
Depends on: foundation slice from #14

Problem

The coordinator should not be enabled repo-wide. The first rollout needs a tiny allowlist of shared, parameter-stable keys with known fallback behavior so that leader/follower suppression can be observed without widening correctness risk.

Scope

  • enable generated cacheFill policy only for:
    • infra:service-statuses:v1 / serviceStatuses
    • risk:scores:sebuf:v1 / riskScoresLive
  • keep rollout policy in registry/datasets.ts, not in handlers
  • preserve existing stale/local fallback behavior in the handlers that consume those keys
  • add targeted regression tests proving timeout/null fallback still returns the expected stale/module-cache responses

Why these keys

  • serviceStatuses is a shared operational digest with existing module-cache fallback
  • riskScoresLive is a shared derived snapshot with existing stale/empty fallback semantics
  • neither key is highly parameterized or user-varying

Do not enable

  • summarize-article keys
  • tp:* travel keys
  • highly parameterized or user-scoped cache keys

Validation

  • node --test tests/redis-caching.test.mjs
  • targeted handler regression coverage for list-service-statuses
  • targeted handler regression coverage for get-risk-scores
  • npm run test:data

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions