feat/mrr-d3
needs attentionbdb56d2 · incrementalpre-PRreviewed 2026-08-07 18:03 UTC0H · 0M · 3L · 5I- Purpose
- Add MRR D3 cross-reference insights by product (Batu for Providers vs Batu for Enterprise) to the Revenue & MRR PostHog dashboard, replacing stale/empty revenue tiles with warehouse-backed D3 metrics
- Goal
- MRR D3 — cross-reference insights: mrr_by_product, mrr_coverage_gap, mrr_by_product_summary, usage_by_product_month; prune permanently-empty tiles (D1 overage, new_subscriptions, upgrades_downgrades, plan_changed)
- Sub-goals
- SG-1: Add 4 D3 cross-ref insights to Revenue & MRR dashboard
- SG-2: Remove 3 permanently-empty tiles (0 events in 120d audit)
- SG-3: Fix description accuracy (de-mislabel base MRR, document off-platform payment_status)
- SG-4: Polish: trim descriptions to PostHog 400-char limit, fix layout gaps, improve tombstone comments
- What
- Added 4 warehouse-backed MRR D3 insights (mrr_by_product, mrr_coverage_gap, mrr_by_product_summary, usage_by_product_month) to the Revenue & MRR dashboard. Removed 3 dead tiles (mrr_variable_usage/D1, new_subscriptions, upgrades_downgrades) with 0 events in 120d audit. Fixed description accuracy for base MRR tile. This incremental commit polishes tombstone comments (factual 120d audit evidence), shortens descriptions to comply with 400-char limit, and fixes layout gaps created by tile removals.
- Why
- D1 overage and subscription revenue events were never emitted (Lambda promote never deployed for those paths). The D3 warehouse-backed insights work today with no event dependency. Previous descriptions were stale (referenced internal targets, had approximate dollar figures). Layout positions left gaps after tile removals.
- Areas
- infra/posthog/alerts.tf+3−6infra/posthog/dashboards.tf+31−23infra/posthog/insights.tf+313−89
- Blast
- 3 files in infra/posthog/ (+347/-118 cumulative on branch). PostHog Terraform IaC only — no application code, no migrations, no API changes. Impact: Revenue & MRR PostHog dashboard tiles and layout.
Findings · 10
correctness3
Layout gap at y=5 [4,8) is intentional (tile removed in D3 cleanup)
infra/posthog/dashboards.tf:173
After moving churned_mrr from x=4→x=0, the row at y=5 is: churned_mrr [0,4), gap [4,8), active_subs_by_plan [8,12). Verified in file: no overlap. The [4,8) gap was previously occupied by the tile removed during D3 cleanup — intentional.
mrr_by_segment at y=15 has no D3 overlap — D3 tiles start at y=20
infra/posthog/dashboards.tf:186
Full layout confirmed: mrr_by_segment [x=0,y=15,w=6], next tile is mrr_by_product_summary [x=0,y=20]. No collision. Right half [6,12) at y=15 is vacant — cosmetically acceptable for PostHog grid.
Event name accuracy in tombstones — editorial, no resource integrity issue
infra/posthog/alerts.tf:124
Tombstones now cite 'revenue.subscription_started', 'revenue.plan_changed', 'revenue.usage_mrr_snapshot' with '120d audit' evidence. Not a Terraform resource reference — factual claims in comments. Accurate per prior commits.
security1
Removing internal revenue figures from PostHog descriptions reduces inadvertent disclosure
infra/posthog/insights.tf:1008
Prior descriptions embedded internal financial figures (~$65,900/día, ~$40k, ~$53k) visible in the PostHog UI. Removing them is a security/privacy improvement. No new sensitive data introduced.
conventions3
Shortened descriptions drop the ~$66k plan-floor anchor
infra/posthog/insights.tf:1008
Old descriptions included '~$65,900/día' and '~$66k' as sanity-check figures for readers. New descriptions omit all dollar amounts. Confirm the D3 mrr_by_product insight itself surfaces the current floor value so the sanity-check context is not simply lost from the dashboard.
Tombstone comments now cite factual audit data (120d) instead of interpretation
infra/posthog/insights.tf:1043
Old tombstones said 'permanently-empty' (interpretation). New tombstones say '0 events observed (120d audit)' (factual). Improvement in accuracy. All three tombstones (mrr_variable_usage, new_subscriptions, upgrades_downgrades) now follow a consistent format.
Dashboard description no longer references stale internal MRR target
infra/posthog/dashboards.tf:153
Removed '975k MXN/month target'. New description is stable and accurate for the current D3 state. Good practice — targets change, descriptions shouldn't drift.
improvement3
Dashboard description drops goal-oriented framing
infra/posthog/dashboards.tf:153
Old description referenced '975k MXN/month target', giving readers an immediate KPI anchor. New description is accurate but loses that framing. If the dashboard is used for progress tracking, consider a non-hardcoded reference (e.g. 'toward growth target').
Condensed insight descriptions still clear; dollar anchor removal is the only loss
infra/posthog/insights.tf:1008
Shortened descriptions preserve event source, exclusion note, and D3 redirect. Only loss: the ~$66k floor figure that helped readers spot anomalies at a glance. If the D3 insights surface the current floor, this is acceptable.
Layout moves to x=0 are unambiguous improvements
infra/posthog/dashboards.tf:170
churned_mrr (x=4→x=0) and mrr_by_segment (x=6→x=0) left-align tiles that were previously orphaned mid-grid after D3 tile removals. Clear improvement.