fix(telemetry): honor the onboarding opt-out in the live emit() path#230
Open
rylinjames wants to merge 1 commit into
Open
fix(telemetry): honor the onboarding opt-out in the live emit() path#230rylinjames wants to merge 1 commit into
rylinjames wants to merge 1 commit into
Conversation
Audit §3.11 / Part 1 #19 (Python side). The only live telemetry emitter (pro/license.load_license → telemetry.emit) checked only TETHER_NO_TELEMETRY. The onboarding "Enable anonymous telemetry?" answer and `tether config set telemetry off` write an onboarding telemetry_enabled flag that was honored ONLY by emit_free — which is dead code (zero call sites). So a user who explicitly answered "no" kept emitting. - emit() now also checks _is_telemetry_enabled_by_onboarding(); opting out via the first-run prompt / config actually stops the heartbeat. - _is_telemetry_enabled_by_onboarding() now honors TETHER_HOME (it hardcoded ~/.tether, disagreeing with the free-tier cache which already respects it). - README "no telemetry by default" was misleading: corrected to state the free CLI sends none and Pro sends an opt-out daily heartbeat (disable via TETHER_NO_TELEMETRY=1 or `tether config set telemetry off`). Tests: new emit-honors-onboarding-opt-out + opt-in cases; added an autouse fixture isolating TETHER_HOME so the emit tests are hermetic regardless of the developer's real ~/.tether/onboarding.json (latent flakiness this gate would otherwise expose). 16 pass; ruff clean. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.
Audit §3.11 / Part 1 #19 (Python side).
Problem
The only live telemetry emitter (
pro/license.load_license→telemetry.emit) checked onlyTETHER_NO_TELEMETRY. The onboarding "Enable anonymous telemetry?" answer andtether config set telemetry offwrite an onboardingtelemetry_enabledflag honored only byemit_free— which is dead code (zero call sites). So a user who explicitly answered "no" kept emitting.Fix
emit()now also checks_is_telemetry_enabled_by_onboarding()— opting out via the first-run prompt /tether config set telemetry offactually stops the heartbeat._is_telemetry_enabled_by_onboarding()now honorsTETHER_HOME(it hardcoded~/.tether, disagreeing with the free-tier cache which already respects it).TETHER_NO_TELEMETRY=1ortether config set telemetry off).Tests
New
emit-honors-onboarding-opt-out + opt-in cases. Added an autouse fixture isolatingTETHER_HOMEso the emit tests are hermetic regardless of the developer's real~/.tether/onboarding.json(a latent flakiness this gate would otherwise expose). 16 pass, ruff clean.Worker-side telemetry items (the
reflex_versionfield-drift rejection, IP storage in the contribution worker) are infra changes tracked separately.🤖 Generated with Claude Code