Skip to content

CLI telemetry tests fail when DO_NOT_TRACK=1 is set in the environment #2254

Closed

Description

@nc9

Problem

Several CLI telemetry tests clear NO_TELEMETRY before exercising telemetry, but not DO_NOT_TRACK. DO_NOT_TRACK=1 also turns telemetry off (see isTelemetryDisabled), so with it set in the environment, about 29 tests fail in updater.test.ts, telemetry.test.ts and the first-run telemetry tests. That's a common privacy setting in developer shells. Seen 2026-11-22 when an agent sandbox exported DO_NOT_TRACK=1; the same run passed 0-fail with env -u DO_NOT_TRACK.

Affected files (they delete NO_TELEMETRY but never touch DO_NOT_TRACK): apps/cli/tests/self/updater.test.ts, telemetry.test.ts, install-source.test.ts, path-setup.test.ts, apps/cli/tests/cli/setup-telemetry.test.ts. first-run-telemetry.test.ts already handles it.

Acceptance Criteria

  • Every test file that clears NO_TELEMETRY to exercise telemetry also clears DO_NOT_TRACK (and restores both afterwards), or uses one shared helper that resets every telemetry opt-out variable.
  • DO_NOT_TRACK=1 bun run scripts/test-suites.ts --run cli passes with 0 failures.
  • Tests that check the DO_NOT_TRACK opt-out itself still set it explicitly and still pass.

Activity

  1. added
    bug
    size: XS
    on Nov 22, 2026
  2. added theissue type on Nov 22, 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

    bugclisize: XS

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions