chore: opt the repository out of its own CLI telemetry - #328
Merged
Conversation
Test suites spawn the built CLI with the production PostHog token and an inherited environment, so every `init`/`check` they launch was recorded as adoption. Disable telemetry in the vitest env, the `pnpm cli` script, and the workflows that run the CLI directly.
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.
The repository's own runs of the built CLI no longer report telemetry. The vitest config sets
TASKLESS_TELEMETRY_DISABLEDandDO_NOT_TRACKfor every test worker, so the child processes the suites spawn inherit the opt-out; thepnpm cliscript (and through itpnpm lint) sets the same variable; and the two workflows that execute the CLI directly,validateanddemo-rule, set it at the workflow level.Until now most suites spawned
dist/index.jswith the production PostHog token and an inherited environment, so everyinitandchecka test launched posted a realcli_runstamped with the package version. On 2026-09-08 the "CLI Invocations by Command" chart showedinitat 8,673 andcheckat 8,415, a ratio no shipped path can produce, sincechecknever launchesinit. Most check suites spawninit -d <tmp>in setup andcheckonce per case, and the daily shape tracked the Validate run count. To confirm that reading against the existing data, break the chart down bycior byghOwner, which is[unknown]for a temp-dir fixture.The per-file opt-outs in
detect.test.tsandinfo.test.tsstay, since they document a hermeticity requirement for those commands rather than a metrics concern. Runs of the CLI outside these entry points, such asnode packages/cli/dist/index.jsby hand, still report; that is a per-shellDO_NOT_TRACK=1for whoever wants it. Nothing here ships in the package, so there is no changeset.