Skip to content

chore: opt the repository out of its own CLI telemetry - #328

Merged
thecodedrift merged 1 commit into
mainfrom
chore/opt-out-own-telemetry
Sep 10, 2026
Merged

chore: opt the repository out of its own CLI telemetry#328
thecodedrift merged 1 commit into
mainfrom
chore/opt-out-own-telemetry

Conversation

@thecodedrift

Copy link
Copy Markdown
Member

The repository's own runs of the built CLI no longer report telemetry. The vitest config sets TASKLESS_TELEMETRY_DISABLED and DO_NOT_TRACK for every test worker, so the child processes the suites spawn inherit the opt-out; the pnpm cli script (and through it pnpm lint) sets the same variable; and the two workflows that execute the CLI directly, validate and demo-rule, set it at the workflow level.

Until now most suites spawned dist/index.js with the production PostHog token and an inherited environment, so every init and check a test launched posted a real cli_run stamped with the package version. On 2026-09-08 the "CLI Invocations by Command" chart showed init at 8,673 and check at 8,415, a ratio no shipped path can produce, since check never launches init. Most check suites spawn init -d <tmp> in setup and check once per case, and the daily shape tracked the Validate run count. To confirm that reading against the existing data, break the chart down by ci or by ghOwner, which is [unknown] for a temp-dir fixture.

The per-file opt-outs in detect.test.ts and info.test.ts stay, since they document a hermeticity requirement for those commands rather than a metrics concern. Runs of the CLI outside these entry points, such as node packages/cli/dist/index.js by hand, still report; that is a per-shell DO_NOT_TRACK=1 for whoever wants it. Nothing here ships in the package, so there is no changeset.

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.
@thecodedrift
thecodedrift marked this pull request as ready for review September 10, 2026 23:07
@thecodedrift
thecodedrift merged commit d5796b4 into main Sep 10, 2026
15 of 16 checks passed
@thecodedrift
thecodedrift deleted the chore/opt-out-own-telemetry branch September 10, 2026 23:07
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.

1 participant