You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ProtocolAdminService.getOperationalStats() currently returns hard-coded zero values for total claims, total disputes, active admins, pending claims, and finalized claims, even though the admin dashboard presents these as operational statistics. This makes the dashboard misleading.
Technical scope
Implement the missing metrics using the authoritative database/read-model repositories and clearly define each metric's scope, status, chain/release binding, and freshness. Use bounded queries/aggregates rather than loading full tables. If a metric cannot be computed safely, return an explicit unavailable/stale state rather than zero. Keep on-chain protocol state sourced from finalized projections and distinguish it from operational database counts.
Required tests
Seeded fixtures produce exact counts for each metric and status bucket.
Pagination/aggregate queries remain bounded under large datasets.
Wrong chain/release or stale projection produces explicit unavailable/stale metadata.
Empty dataset returns a true zero only when the source is healthy and complete.
Authorization tests prevent public access to admin statistics.
Security and architecture constraints
Durable state must be consistent across restarts and replicas where the feature is user-, privacy-, security-, or operations-critical.
Fail closed when persistence, authorization, policy version, or source provenance cannot be verified.
Keep protocol authority in canonical contracts and finalized event projections.
Activity