mirror of
https://github.com/heygen-com/hyperframes.git
synced 2026-09-14 18:01:20 +08:00
52a795575d
* 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.