← all branches

feat/mrr-d3

needs attention
bdb56d2 · incrementalpre-PRreviewed 2026-08-07 18:03 UTC0H · 0M · 3L · 5I
The branch
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
The changes (whole branch)
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+36infra/posthog/dashboards.tf+3123infra/posthog/insights.tf+31389
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.
posthog-iac no-tests-needed terraform-only
github-ci· No GitHub API access on this runner — CI status not fetchedcoderabbit· No .coderabbit.yaml in repotests· No test suite for PostHog Terraform IaC

Findings · 10

correctness3

info

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.

info

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.

info

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

info

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

low

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.

info

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.

info

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

low

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').

low

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.

info

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.

History · 5 commits

  1. bdb56d2needs attentionincremental0H · 0M · 3L2026-08-07 18:03current
  2. 742255eneeds attentionincremental1H · 4M · 5L2026-08-07 17:50
  3. 9c481adsafeincremental0H · 0M · 1L2026-08-07 17:23
  4. cf2ce90needs attentionincremental0H · 1M · 2L2026-08-07 17:14
  5. fb7f6ffneeds attentionfull0H · 6M · 8L2026-08-07 16:46