chore(cli/telemetry): clean up audited events#5234
Open
pamelachia wants to merge 9 commits into
Open
Conversation
Coverage Report for CI Build 25746590455Coverage decreased (-0.007%) to 63.734%Details
Uncovered ChangesNo uncovered changes found. Coverage Regressions17 previously-covered lines in 4 files lost coverage.
Coverage Stats
💛 - Coveralls |
Identity-attachment can be checked by joining cli_login_completed against the auth database; the property is dead weight unless a wave of stitch failures hits, and the audit's identity-graph framing didn't justify a per-event boolean.
…i-telemetry-events-5-audited-5
avallete
approved these changes
May 12, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
CLI telemetry audit cleanup from GROWTH-797. Removes one over-firing
cli_upgrade_suggestedsite, aligns thecli_stack_startedcapture pattern with the rest of the codebase, and documents an early-return invariant onTrackUpgradeSuggestedso future audits don't misread the SSO update flow as a double-fire.Changes
cli_upgrade_suggestedno longer fires on the read-onlyvanity-subdomains checkcommand (kept onactivate, the actual gated action). User still sees the billing-URL hint.cli_stack_startedcapture simplified to_ = phtelemetry.FromContext(ctx).Capture(...), matchingcmd/root.go.Service.canSend()already handles nil receivers.internal/sso/update/update.goPUT branch + docstring onTrackUpgradeSuggestedexplaining that GET-fail and PUT-fail are mutually exclusive via early-return, so at most one event fires per command invocation. Deleting one site without the other undercounts gated users.Testing
Tested locally in
apps/cli-go:go test ./internal/login/... ./internal/telemetry/... ./internal/start/... ./internal/sso/... ./internal/vanity_subdomains/... -count=1— all pass.cli_stack_startedgroup/event assertion atinternal/start/start_test.go:248-253still passes after the nil-guard removal.go vet ./...andgo build ./...clean.Post-merge verification on PostHog:
cli_upgrade_suggestedvolume onfeature_key = 'vanity_subdomain'should drop (was firing on bothcheckandactivate; now onlyactivate).Linear