rspace-online/backlog/tasks/task-148 - Concentration-al...

1.9 KiB

id title status assignee created_date labels dependencies references priority
TASK-148 Concentration alerts for space admins To Do
2026-04-16 18:56
governance
encryptid
power-indices
notifications
TASK-144
src/encryptid/power-indices.ts
src/encryptid/trust-engine.ts
src/encryptid/server.ts
medium

Description

Alert space admins when power concentration exceeds healthy thresholds.

What

The power indices engine already computes Gini coefficient and HHI per space+authority every 5 minutes. Surface warnings when:

  • HHI > 0.25 (highly concentrated — fewer than ~4 effective voters)
  • Gini > 0.6 (severe inequality — top players hold most power)
  • Single player Banzhaf > 0.5 (near-dictator — one person controls majority)

Primitive: Concentration Monitor

  • New function checkConcentrationAlerts(spaceSlug) in power-indices.ts
  • Called after computeSpacePowerIndices() in trust engine cycle
  • When threshold crossed: create notification via existing createNotification() for space admins
  • Notification: category='system', event_type='power_concentration_warning'
  • Debounce: only alert once per 24h per space+authority (store last_alert_at in power_indices or separate field)

Implementation

  • src/encryptid/power-indices.ts: Add checkConcentrationAlerts() function
  • src/encryptid/trust-engine.ts: Call after power index computation
  • Uses existing notification system — zero new infrastructure
  • ~40 lines, zero new files, zero new tables

Acceptance Criteria

  • #1 Alert when HHI > 0.25, Gini > 0.6, or single-player Banzhaf > 0.5
  • #2 Notification sent to space admins via existing notification system
  • #3 24h debounce per space+authority to avoid spam
  • #4 Notification includes specific metric + suggestion (e.g. 'encourage more delegation diversity')