Skip to content

Emit desktop_proactive_quota event for per-user, per-plan cap utilization #16

Description

@formed2forge

Symptom: Desktop Proactive AI cap utilization is only measurable at the request/journey level today, not per-user x per-plan. Redis rl: quota windows are live-only (no history retained); no Prometheus series carries remaining-quota or a plan label. What IS logged: omi_client_journey_* on the desktop_proactivity journey - 30d increase() shows macOS success 232707 / degraded 75769 / failure 269350 / quota_capped 75769 (13.1 percent of terminals); Windows success 114251 / degraded 15632 / failure 128675 / quota_capped 15632 (6.1 percent); combined quota_capped about 10.9 percent of all terminals. This confirms caps bind some real traffic, but per-user/per-plan 80-percent-of-cap utilization is not reconstructable from what's logged today.

Impact: Blocks validating proposed Proactive AI cap numbers for the new Plus/Max mobile+desktop tiers against real desktop utilization (pricing handoff, formed2forge/handoffs omi-pricing.md section 5 item 6, section 7, section 14).

Fix identified: emit a desktop_proactive_quota event (fields: operation, plan_id, limit, used, remaining, capped) from backend/routers/desktop_proactivity.py's _consume_quota function, on both success and 429 responses.

Evidence: production usage-distribution report (30-day window, 2026-07-29 to 2026-08-27) - Firestore/Prometheus queries and exact PromQL cited in the pricing handoff section 5.

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