Skip to content

fix: disable telemetry when send-statistics is false - #135

Open
nartsisss wants to merge 1 commit into
DeterminateSystems:mainfrom
nartsisss:fix/send-statistics-inverted
Open

fix: disable telemetry when send-statistics is false#135
nartsisss wants to merge 1 commit into
DeterminateSystems:mainfrom
nartsisss:fix/send-statistics-inverted

Conversation

@nartsisss

@nartsisss nartsisss commented Jul 31, 2026

Copy link
Copy Markdown

Fixes #134

Summary by CodeRabbit

  • Bug Fixes
    • Corrected the no-telemetry setting so telemetry is properly disabled when statistics are turned off.

@coderabbitai

coderabbitai Bot commented Jul 31, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

The action now assigns "true" to NIX_FLAKE_CHECKER_NO_TELEMETRY when sendStatistics is disabled.

Changes

Telemetry opt-out

Layer / File(s) Summary
Set the no-telemetry flag
src/index.ts
When statistics are disabled, the action sets NIX_FLAKE_CHECKER_NO_TELEMETRY to "true" instead of "false".

Estimated code review effort: 1 (Trivial) | ~2 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly describes the telemetry fix for send-statistics set to false.
Linked Issues check ✅ Passed The change sets NIX_FLAKE_CHECKER_NO_TELEMETRY to "true" when send-statistics is false, satisfying issue #134.
Out of Scope Changes check ✅ Passed The pull request changes only the telemetry environment value required by issue #134.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/index.ts`:
- Line 82: Update checkFlake() so process.env is spread into executionEnv before
the action-specific assignments, ensuring NIX_FLAKE_CHECKER_NO_TELEMETRY remains
"true" even when inherited environment variables define a conflicting value.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: cd15deb0-a23e-4446-9f6e-8338c69fa968

📥 Commits

Reviewing files that changed from the base of the PR and between de924ab and c441eba.

⛔ Files ignored due to path filters (2)
  • dist/index.js is excluded by !**/dist/**
  • dist/index.js.map is excluded by !**/dist/**, !**/*.map
📒 Files selected for processing (1)
  • src/index.ts

Comment thread src/index.ts

if (!this.sendStatistics) {
executionEnv.NIX_FLAKE_CHECKER_NO_TELEMETRY = "false";
executionEnv.NIX_FLAKE_CHECKER_NO_TELEMETRY = "true";

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔒 Security & Privacy | 🟠 Major | ⚡ Quick win

Ensure the action value cannot be overridden by process.env.

Line 82 sets the correct value. However, checkFlake() spreads process.env after executionEnv on Lines 55-56. An inherited NIX_FLAKE_CHECKER_NO_TELEMETRY="false" therefore overrides this assignment and keeps telemetry enabled.

Reverse the spread order so the action configuration has precedence:

Proposed fix
      env: {
-       ...executionEnv,
        ...process.env,
+       ...executionEnv,
      },
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/index.ts` at line 82, Update checkFlake() so process.env is spread into
executionEnv before the action-specific assignments, ensuring
NIX_FLAKE_CHECKER_NO_TELEMETRY remains "true" even when inherited environment
variables define a conflicting value.

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.

send-statistics: false still sends telemetry

1 participant