fix: disable telemetry for non-interactive/CI runs unless opted in#209
Draft
bukinoshita wants to merge 3 commits into
Draft
fix: disable telemetry for non-interactive/CI runs unless opted in#209bukinoshita wants to merge 3 commits into
bukinoshita wants to merge 3 commits into
Conversation
In non-interactive sessions (CI, piped, no TTY), telemetry was silently sent to PostHog without any notice or consent. This posed a privacy and compliance risk for organizations running the CLI in automation. Now, when the session is non-interactive, trackCommand returns early unless RESEND_TELEMETRY_OPT_IN=1 is explicitly set. Interactive sessions continue to send telemetry as before (with the existing first-run notice). Closes BU-620 Co-authored-by: Bu Kinoshita <bukinoshita@users.noreply.github.com>
Member
Author
|
@cubic-dev-ai can you review? |
Contributor
@bukinoshita I have started the AI code review. It will take a few minutes to complete. |
Member
Author
|
@cursor fix conflicts |
|
The PR description was edited by cubic (automated summary). The conflicts are now resolved and pushed. The PR should be conflict-free. Resolved the merge conflicts in
I kept both sets of changes, updating our new tests to use |
Merge upstream changes (test() -> it() migration, symlink protection in temp file writing) with opt-in telemetry gating tests. Co-authored-by: Bu Kinoshita <bukinoshita@users.noreply.github.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.


Summary by cubic
Disable CLI telemetry in non-interactive and CI runs by default, unless
RESEND_TELEMETRY_OPT_IN=1is set. Interactive runs keep the existing behavior with the first-run notice. Addresses Linear BU-620.Bug Fixes
trackCommandwhen session is non-interactive and not opted in.--jsonruns as non-interactive.RESEND_TELEMETRY_OPT_IN=1.Migration
RESEND_TELEMETRY_OPT_IN=1to enable.DO_NOT_TRACKandRESEND_TELEMETRY_DISABLEDstill work.Written for commit 744d93b. Summary will update on new commits.