Repository navigation
fix(telemetry): resolve #78 conflicts with status semantics and fix lint - #79
Open
digitallysavvy wants to merge 4 commits into
Open
digitallysavvy wants to merge 4 commits into
digitallysavvy wants to merge 4 commits into
Conversation
Bring in eabbef7 (preserve status semantics and clarify disclosure). Conflicts resolved by keeping the shared telemetryStatus helper and giving it the new semantics for all three call sites: enabled is the effective value (telemetryAllowed(preference)), savedPreference is the saved preference, captureActive is enabled && transportConfigured. Shell passes the startup preference (already updated by enable/disable); MCP passes currentTelemetryPreference(). Disclosure, env_help and comment wording follow codex/cli-analytics. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The value returned by waitAnalyticsEvents was overwritten by the following read(), which golangci-lint's ineffassign flags. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to #78. This PR fixes #78's merge conflict with
codex/cli-analyticsand its golangci-lint failure. Merging it intochore/cli-analytics-simplifymakes #78 mergeable again.Merge of
codex/cli-analytics(eabbef7)I merged
origin/codex/cli-analyticsinto #78's branch rather than rebasing, so #78's history stays as it is. Four files conflicted:commands.goandmcp.go(telemetry status): I kept refactor(telemetry): simplify analytics plumbing and close reporting gaps #78's sharedtelemetryStatus(action, configPath, preference)helper. It now produces the status fields from eabbef7 fortelemetry status,enable,disableand the MCPagora.telemetry.statustool:enabled: the effective value,telemetryAllowed(preference). That is the saved preference with runtime opt-outs (DO_NOT_TRACK,AGORA_TELEMETRY_ENABLED=0,AGORA_SENTRY_ENABLED=0) applied.savedPreference: the saved preference itself.captureActive:enabled && transportConfigured.transportConfigured,configPath,doNotTrack: unchanged.Each call site passes the same preference it used before:
statuspassesa.cfg.TelemetryEnabled.enableanddisablepassa.cfg.TelemetryEnabledafter saving it, which equals the value just saved.currentTelemetryPreference(), which re-reads the config file.For every path, these match eabbef7's values: eabbef7's
analyticsEnabled()andpreference && !analyticsOptedOut()are bothtelemetryAllowed(...)after refactor(telemetry): simplify analytics plumbing and close reporting gaps #78's refactor.telemetry.go: the comment uses eabbef7's wording and keeps refactor(telemetry): simplify analytics plumbing and close reporting gaps #78's note that both sinks share thetelemetryAllowedgate.telemetry_notice.go: the import block is the union of both sides. The disclosure text is eabbef7's.These came from eabbef7 as-is, with no conflicts:
mcp serveno longer prints the stderr notice.initializereturns the disclosure ininstructionswhen a collector is configured.env_helpwording,CHANGELOG.md,docs/automation.mdanddocs/telemetry.mdchanges.Lint fix
internal/cli/analytics_test.go:382: ineffassign flagged that the result ofwaitAnalyticsEventswas immediately overwritten byread(). The test now waits without assigning, then reads once. golangci-lint finds no other issues.Extra test
TestMCPTelemetryStatusReportsEffectiveAndSavedPreferencechecks the MCP status tool'senabled,savedPreference,captureActive,transportConfiguredanddoNotTrackvalues, with and withoutDO_NOT_TRACK. eabbef7's shell tests already cover the shell paths.Validation
go build ./... && go vet ./... && go test -count=1 ./...: passGOOS=windows go vet ./...: passgofmt -l .: clean./scripts/check-error-codes.sh: OKgo run ./cmd/gendocs -check: up to datego.mod:GOOS=linux: 0 issuesGOOS=windows: 0 issuespollpackage. That is a toolchain mismatch, not a problem in this repo.git merge-tree --write-tree origin/codex/cli-analytics HEAD: no conflictsgit merge-tree --write-tree origin/chore/cli-analytics-simplify HEAD: no conflicts🤖 Generated with Claude Code