fix(telemetry): honor telemetry.enabled in global config - #1513
Conversation
Honor the documented global config opt-out while preserving environment and CI overrides. Keep runtime-managed telemetry identity fields intact and apply the same privacy setting to update checks. AI: agentic
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (3)
🚧 Files skipped from review as they are similar to previous changes (3)
📝 WalkthroughWalkthroughChangesThe PR adds global Telemetry configuration and opt-out flow
Estimated code review effort: 3 (Moderate) | ~25 minutes Sequence Diagram(s)sequenceDiagram
participant CLI as OpenSpec CLI
participant Telemetry as telemetry/index.ts
participant Config as global configuration
participant Network as telemetry endpoint
CLI->>Telemetry: evaluate telemetry status
Telemetry->>Config: read telemetry.enabled
Telemetry->>Network: send telemetry when enabled
Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
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 @.changeset/telemetry-enabled-config.md:
- Line 5: Update the changeset text to document that telemetry.enabled=false
disables anonymous telemetry and openspec update version checks, while an unset
value leaves telemetry enabled; also state that environment and CI opt-outs take
precedence.
🪄 Autofix
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: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: 80d5e7eb-9fa1-4ef3-83d2-dbc3590f5d1c
📒 Files selected for processing (15)
.changeset/telemetry-enabled-config.mdREADME.mddocs/cli.mdsrc/core/config-schema.tssrc/core/global-config.tssrc/core/version-check.tssrc/telemetry/config.tssrc/telemetry/index.tssrc/utils/ci.tstest/commands/config.test.tstest/core/config-schema.test.tstest/core/version-check.test.tstest/telemetry/config.test.tstest/telemetry/index.test.tstest/utils/ci.test.ts
Document the full opt-out behavior in the changeset and describe the new test helper so automated documentation coverage meets the project threshold. AI: agentic
Bring the pull request up to date with upstream before final validation. AI: agentic
alfred-openspec
left a comment
There was a problem hiding this comment.
Approved at exact head b776e34. The documented config opt-out now works end to end, preserves telemetry identity fields, and keeps environment/CI privacy signals authoritative; a fresh install/build/lint, all 242 focused tests, the full 3,806-test suite, and a real CLI round-trip pass.
|
@clay-good Would you be able to provide the second approval for this PR please? |
Summary
Background
The CLI docs have advertised openspec config set telemetry.enabled false, but runtime rejects telemetry as an unknown top-level key. Related reports #895 and #754 also show that a persistent opt-out was expected but remained unimplemented.
A persisted setting is particularly useful where shell environment variables may not propagate to indirect CLI invocations, such as IDE integrations. That environment distinction is plausible but has not been tested or confirmed.
Closes #1512
Test plan
AI assistance
Generated with Augment Agent using GPT-5.6 by OpenAI; reviewed by a GPT-5.6 Sol validation subagent.
Summary by CodeRabbit
New Features
openspec config set telemetry.enabled falseas a telemetry opt-out option.Documentation
Tests