Commit Graph

1 Commits

Author SHA1 Message Date
Víctor Falcón b0feeee257 feat(stats): weekly paywall stuck-cohort report to Discord
Add the stats:stuck-cohort-report command, scheduled weekly, that reports
the percentage of onboarded users stuck at the paywall: users with a
non-deleted banking connection but no valid subscription.

The percentage uses onboarded users (onboarded_at not null) as the
denominator, since that is the population that has reached the paywall.
Each run persists a weekly snapshot (date, onboarded_count, stuck_count,
stuck_pct) and compares against the most recent previous snapshot to
report the week-over-week delta in points and raw stuck count. The first
run reports current figures only.

The Discord payload follows the existing SendAiCohortReportCommand pattern
and posts to the shared services.discord.ai_cohort_webhook_url webhook.
2026-06-19 15:52:23 +02:00