Files
Miguel Ángel 52a795575d feat(cli): align primitive funnel measurement (#3052)
* feat(cli): align primitive funnel measurement

* fix(cli): make primitive claims process-atomic

* fix(cli): keep primitive funnel terminals from losing events

Terminal funnel events took a durable single-use claim before they were
sent, but delivery was the fire-and-forget exit flush: a detached child
with no retry and no way to report failure. An unacknowledged send left
the claim spent on an event PostHog never received, so that step could
never be emitted again. Observed in a real install, where
primitive_preview_succeeded was claimed and never arrived.

The terminal path now awaits delivery and hands the claim back when the
batch is not acknowledged. That trades a permanent loss for a possible
duplicate, which is the cheaper failure: every funnel event carries a
stable event_id, so duplicates collapse downstream while a loss is
unrecoverable. Claims are also no longer spent while telemetry is
opted out.

Separately, funnel order is now carried by an explicit funnel_step
rather than inferred from timestamps. Auth completion and install start
are emitted back to back inside one command and land in the same
millisecond, so ordering by time resolved them arbitrarily and could
report an install beginning before the auth that authorized it.
2026-09-04 18:06:48 +00:00
..
2026-08-04 20:27:07 -07:00
2026-08-04 20:27:07 -07:00
2026-08-04 20:27:07 -07:00
2026-08-04 20:27:07 -07:00
2026-08-04 20:27:07 -07:00
2026-08-04 20:27:07 -07:00
2026-08-04 20:27:07 -07:00
2026-08-04 20:27:07 -07:00