Repository navigation
fix(customers): canceled card trials churn, abandoned checkouts never started - #642
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the
|
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Maple review🟢 Confidence 10/10 · safe to merge. The Autumn abandoned checkouts now read as abandoned instead of started-then-canceled, a card trial canceled before converting counts as churn with no MRR lost, and a lead whose plans all ended unpaid stops getting signals. All three behaviors are pinned by map, compute and evaluate tests.
Fixed since the last review
|
…ted from the invoice (#632) * fix(customers): a plan that ended on a failed payment is past due, dated from the invoice An account whose paid plans ended was churned on the cancel date, even with its last invoice unpaid after failed attempts. It now reads past due while that invoice is open and churned from the invoice's date once it is voided or uncollectible. MRR ends at the failed invoice, existing movements and daily rows move back, and the payment-failed signal and health count it. * fix(customers): series facts carry the unpaid invoices field * fix(customers): unpaid ends read plan invoices only, and history is corrected on one basis A one-off invoice no longer decides whether a plan ended unpaid. A broken movement chain leaves recorded days alone, a rebuild keeps an account's MRR until its kept churn is moved so it is not removed twice, the payment-failed signal keeps the amount before a due date, and the ended-plan invoice read is narrowed. * fix(customers): a churn is announced once until the customer pays or resubscribes After a churn signal closes, the same churn no longer opens another. A new one needs an invoice paid or a paid plan started before the plans' latest end. Closed churn signals are kept past retention so this holds. * fix(customers): the history rebuild reads ended plans' invoices a chunk at a time * test(customers): type the failed invoice fixture as an invoice op * fix(customers): a backdated churn is announced from when the paid plan ended * fix(customers): canceled card trials churn, abandoned checkouts never started (#642) * fix(customers): a lead whose plans ended unpaid gets no more signals * fix(customers): a plan that paid keeps its account evaluated * fix(customers): a canceled card trial is a churn, an abandoned checkout never started * fix(customers): a plan reusing an abandoned checkout's id shows as started * test(customers): org-day fixtures drop the removed health columns
Stacked on #632.
Hazel treated every plan that ended without a payment the same way: the account stayed a
lead, showed "Started" and "Canceled", kept getting usage signals, and never got a churn signal.Abandoned checkouts
Canceled card trials
Signals
leadwhose plans all ended with no payment or card gets no more signals, apart from SLA ones.Verified with the Autumn map, ingest and pull tests,
evaluate,compute-loop,ingest,customers-rpc, and the backend and web typechecks. Main CI runs once this targetsmain.