From 75e770fb9559adeaf8701f1c147bcb3e4d1c119b Mon Sep 17 00:00:00 2001 From: NiveditJain Date: Thu, 9 Apr 2026 20:56:02 +0000 Subject: [PATCH] [luv-63] fix: disable PostHog telemetry in all CI jobs and test configs The build job ran next build which executes instrumentation.node.ts and sent real app_started events to PostHog. Three of four test matrix configs also lacked the disable flag. Add telemetry-disable flags to every CI job, and set the env var in both vitest configs so local test runs are also protected. Co-Authored-By: Claude Opus 4.6 --- .github/workflows/ci.yml | 18 +++++++++++++----- vitest.config.e2e.mts | 3 +++ vitest.config.mts | 3 +++ 3 files changed, 19 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 71cd9e56..fe89f865 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -13,6 +13,8 @@ concurrency: jobs: quality: runs-on: ubuntu-latest + env: + FAILPROOFAI_TELEMETRY_DISABLED: "1" steps: - uses: actions/checkout@v6 @@ -79,11 +81,12 @@ jobs: fail-fast: false matrix: env-config: - - { name: default, env: {} } - - { name: telemetry-disabled, env: { FAILPROOFAI_TELEMETRY_DISABLED: "1" } } - - { name: log-debug, env: { FAILPROOFAI_LOG_LEVEL: debug } } - - { name: hook-log-file, env: { FAILPROOFAI_HOOK_LOG_FILE: "1" } } - env: ${{ matrix.env-config.env }} + - { name: default, env: {} } + - { name: log-debug, env: { FAILPROOFAI_LOG_LEVEL: debug } } + - { name: hook-log-file, env: { FAILPROOFAI_HOOK_LOG_FILE: "1" } } + env: + FAILPROOFAI_TELEMETRY_DISABLED: "1" + NEXT_TELEMETRY_DISABLED: "1" steps: - uses: actions/checkout@v6 @@ -106,6 +109,7 @@ jobs: - name: Test (${{ matrix.env-config.name }}) uses: nick-fields/retry@v4 + env: ${{ matrix.env-config.env }} with: max_attempts: 3 timeout_minutes: 10 @@ -113,6 +117,9 @@ jobs: build: runs-on: ubuntu-latest + env: + FAILPROOFAI_TELEMETRY_DISABLED: "1" + NEXT_TELEMETRY_DISABLED: "1" steps: - uses: actions/checkout@v6 @@ -144,6 +151,7 @@ jobs: runs-on: ubuntu-latest env: FAILPROOFAI_TELEMETRY_DISABLED: "1" + NEXT_TELEMETRY_DISABLED: "1" steps: - uses: actions/checkout@v6 diff --git a/vitest.config.e2e.mts b/vitest.config.e2e.mts index e331e0c1..953ad132 100644 --- a/vitest.config.e2e.mts +++ b/vitest.config.e2e.mts @@ -17,5 +17,8 @@ export default defineConfig({ // forks pool: true process isolation — tests spawn subprocesses, // thread workers share globalThis which can interfere. pool: "forks", + env: { + FAILPROOFAI_TELEMETRY_DISABLED: "1", + }, }, }); diff --git a/vitest.config.mts b/vitest.config.mts index b942cfc5..4a8a47ed 100644 --- a/vitest.config.mts +++ b/vitest.config.mts @@ -16,5 +16,8 @@ export default defineConfig({ include: ["__tests__/**/*.test.{ts,tsx}"], exclude: ["__tests__/e2e/**"], css: false, + env: { + FAILPROOFAI_TELEMETRY_DISABLED: "1", + }, }, });