Skip to content

macOS: make release-health telemetry outcome-based and build-attributable #10425

Closed

Description

@Git-on-my-level

Summary

Make macOS release health telemetry outcome-based, build-attributable, and safe to use for release decisions. Today several high-volume desktop signals are intermediate lifecycle events or ambiguous terminal states, so they can resemble a user-visible regression when the product path is healthy.

This is deliberately an observability contract issue. It does not change realtime provider behavior, PTT UX, release promotion policy, or the root-cause fixes tracked by #10420.

Evidence

Read-only production checks on 2026-07-23:

  • 0.12.113: ptt_audio_capture_silent_turn was initially interpreted as a PTT no-transcript regression. Source inspection shows floatingBarPTTEnded emits hadTranscript=false for deliberately discarded near-silent/too-fast input as well as actual non-transcript terminal paths. The metric is not a PTT-success/failure denominator.
  • 0.12.115 early cohort: 255 active macOS users; 3 silent-turn users and zero PTT watchdog incidents. This is compatible with healthy PTT, but the shipped telemetry cannot quantify end-to-end PTT success.
  • 0.12.115: fallback_triggered reported area=other, reason=capability_mismatch for 32/255 users. Recovered and degraded outcomes are both present under that ambiguous area, so the aggregate fallback rate does not represent customer-visible failure.
  • Expected realtime idle teardown generated 1,200 events across 188 users in the same cohort. This is lifecycle noise and should not share an error/release-health rollup with failures.
  • Warm realtime_token_mint_failed events still occur (3/255 users, backend_transient), and a small realtime-hub exhausted cohort exists. They need terminal recovery/outcome linkage before being interpreted as user-impact rates.
  • Sentry lacks reliable macOS build/version attribution for correlating native errors to a release cohort.

Scope

1. Define bounded terminal-outcome contracts

Add or standardize privacy-safe, bounded telemetry for:

  • PTT: attempt → capture classification → committed/discarded → transcript/agent terminal outcome.
  • Realtime session/token mint: trigger phase (warm vs active), provider/result class, recovery attempted, recovered/degraded/exhausted terminal outcome.
  • Fallback: a non-other owning area, bounded reason, and a terminal outcome that cannot mix recovery with exhaustion.

The contract must explicitly distinguish user cancellation/short tap/quiet discard from failed capture and from a completed interaction. It must not emit transcript text, audio, prompt content, or free-form local errors.

2. Separate expected lifecycle noise

Classify expected idle teardown, planned session rotation, and other normal lifecycle transitions separately from actionable error telemetry. They may remain observable, but must not inflate error-rate or release-health panels.

3. Restore release attribution

Attach macOS app_version / app_build / release identity to native error reporting (including Sentry), and ensure PostHog release-health events retain comparable identity. Use bounded tags/fields only; do not add user content or free-form error payloads.

4. Publish a release-health metric specification

Document the exact numerator, denominator, time window, minimum cohort, missing-data behavior, and release-comparison rule for PTT, realtime, fallback, updater, crash, recording, and memory indicators. Intermediate events must not be rendered as customer failures.

Acceptance criteria

  • PTT has a production-queryable terminal outcome funnel with a documented success denominator; short/quiet/user-cancelled input cannot be counted as an unexplained no-transcript failure.
  • Realtime token-mint and fallback telemetry distinguish warm-up from active interaction and recovered/degraded/exhausted outcomes.
  • fallback_triggered has an owned bounded area; area=other is either eliminated for known paths or explicitly tracked as an instrumentation defect.
  • Expected idle teardown/session rotation is excluded from error and release-regression rollups while remaining separately inspectable.
  • Native Sentry events can be filtered by macOS app version/build/release without exposing private content.
  • A versioned release-health query/dashboard specification defines denominators, windows, minimum samples, and unknown/missing-data treatment.
  • Focused unit/contract tests prevent schema regressions and prove no raw transcript/audio/free-form local errors enter analytics or Sentry tags.
  • The resulting dashboard can explain why 0.12.113 PTT and 0.12.115 fallback signals are or are not customer-visible regressions without source-code archaeology.

Boundaries / related work

Activity

  1. added
    enhancement
    p2
    on Jul 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    analyticsdesktopenhancementmacOSp2stability

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions