Context
Part of the dual-rail revenue epic. With consumption metered once (#6314 ledger, #7660 units) and settled on either rail, the operator needs one internal view answering "what did the loop earn, on which rail, and is settlement healthy" — otherwise revenue reporting fragments into rail-specific queries that disagree (the system already has a history of two-sources-two-numbers bugs; revenue must not repeat it).
Requirements
- An internal, operator-only reporting surface aggregating per period: consumption (compute-units) by tenant, settlement outcomes by rail (settled/pending/failed with the shared failure taxonomy from the conformance harness), and rail mix — all derived from the rental ledger + settlement-interface records, no parallel bookkeeping tables.
- Reconciliation is first-class: the report surfaces consumption-vs-settlement gaps (unsettled consumption, settlement without matching consumption) as explicit categories rather than silently netting them.
- Access and privacy: operator-tier only; per-tenant identity limited to what ops needs (tenant key, not GitHub PII beyond it); nothing from this surface is ever published to public stats (structural separation from the
public-stats path, not a filter).
- Rail-native amounts render only alongside their rail; cross-rail totals exist solely in compute-units (converting rails into a single currency figure is pricing/finance territory — out of scope, per the epic's no-pricing constraint).
- Export path (CSV/JSON) for the operator, consistent with the config-as-code/ops conventions.
Deliverables
- The reporting queries + operator surface (or CLI/endpoint per ops convention) + export.
- Tests: aggregation correctness against fixture ledgers (both rails, mixed states), reconciliation-gap categorization, access denial below operator tier, public-stats separation assertion.
Expected outcome
One trustworthy answer to "what did the loop earn this week," with settlement health and gaps visible instead of implied.
Context
Part of the dual-rail revenue epic. With consumption metered once (#6314 ledger, #7660 units) and settled on either rail, the operator needs one internal view answering "what did the loop earn, on which rail, and is settlement healthy" — otherwise revenue reporting fragments into rail-specific queries that disagree (the system already has a history of two-sources-two-numbers bugs; revenue must not repeat it).
Requirements
public-statspath, not a filter).Deliverables
Expected outcome
One trustworthy answer to "what did the loop earn this week," with settlement health and gaps visible instead of implied.