Skip to content

chore(cli/telemetry): clean up audited events#5234

Open
pamelachia wants to merge 9 commits into
developfrom
pamela/growth-797-supabasecli-clean-up-cli-telemetry-events-5-audited-5
Open

chore(cli/telemetry): clean up audited events#5234
pamelachia wants to merge 9 commits into
developfrom
pamela/growth-797-supabasecli-clean-up-cli-telemetry-events-5-audited-5

Conversation

@pamelachia
Copy link
Copy Markdown
Contributor

@pamelachia pamelachia commented May 11, 2026

Summary

CLI telemetry audit cleanup from GROWTH-797. Removes one over-firing cli_upgrade_suggested site, aligns the cli_stack_started capture pattern with the rest of the codebase, and documents an early-return invariant on TrackUpgradeSuggested so future audits don't misread the SSO update flow as a double-fire.

Changes

  • cli_upgrade_suggested no longer fires on the read-only vanity-subdomains check command (kept on activate, the actual gated action). User still sees the billing-URL hint.
  • cli_stack_started capture simplified to _ = phtelemetry.FromContext(ctx).Capture(...), matching cmd/root.go. Service.canSend() already handles nil receivers.
  • Comment on internal/sso/update/update.go PUT branch + docstring on TrackUpgradeSuggested explaining 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_started group/event assertion at internal/start/start_test.go:248-253 still passes after the nil-guard removal.
  • go vet ./... and go build ./... clean.

Post-merge verification on PostHog:

  • cli_upgrade_suggested volume on feature_key = 'vanity_subdomain' should drop (was firing on both check and activate; now only activate).

Linear

  • fixes GROWTH-797

@pamelachia pamelachia requested a review from a team as a code owner May 11, 2026 18:17
@pamelachia pamelachia self-assigned this May 11, 2026
@coveralls
Copy link
Copy Markdown

coveralls commented May 11, 2026

Coverage Report for CI Build 25746590455

Coverage decreased (-0.007%) to 63.734%

Details

  • Coverage decreased (-0.007%) from the base build.
  • Patch coverage: No coverable lines changed in this PR.
  • 17 coverage regressions across 4 files.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

17 previously-covered lines in 4 files lost coverage.

File Lines Losing Coverage Coverage
internal/start/start.go 8 64.66%
internal/utils/git.go 5 57.14%
internal/sso/update/update.go 2 51.19%
internal/storage/rm/rm.go 2 80.61%

Coverage Stats

Coverage Status
Relevant Lines: 15676
Covered Lines: 9991
Line Coverage: 63.73%
Coverage Strength: 7.06 hits per line

💛 - Coveralls

pamelachia and others added 3 commits May 12, 2026 02:32
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants