Shipped
- Metered entity-usage invoicing -- the monthly entity-metering job now closes the loop on billing. After it computes each enterprise partner's peak entity count for the month, it issues a net-30 Stripe invoice for the per-entity charge (peak entities x the partner's monthly entity rate). Previously the charge was computed and stored but never collected.
- Idempotent monthly invoices -- entity-usage invoices are deduplicated by partner and usage month via a deterministic idempotency key plus a metadata search, so a job re-run or multi-node race never double-bills a partner for the same month.
Improved
- Invoicing gated on subscription status -- only partners in an active billing state (
ACTIVE,PAST_DUE,GRACE) with an email on file are invoiced. Trial and other non-billable partners still have their usage measured and stored, just not charged.
Fixed
- Account linking display -- the internal MIR self-link (a dogfood artifact present on every account) and enterprise/self partners no longer appear in the consumer account-linking UI. Users now see only the partners they have actually linked, and only partners that can legitimately be linked are offered.