feat(cli): telemetry consent controls, redaction hardening, retry queue, www endpoint - #11
Open
outeredgelab-ankita wants to merge 1 commit into
Open
feat(cli): telemetry consent controls, redaction hardening, retry queue, www endpoint#11outeredgelab-ankita wants to merge 1 commit into
outeredgelab-ankita wants to merge 1 commit into
Conversation
…debug env - redaction: scrub KEY=secret credentials (incl. FOO_SECRET=), Bearer tokens, prefixed keys (ghp_/sk-/AKIA/xox…), more URL schemes; + a fuzz test - retry queue: failed sends persisted to ~/.config/chaibuilder/telemetry-queue.jsonl (capped 50) and drained + resent on the next run; transient/5xx retried, 4xx dropped - default endpoint → https://www.chaibuilder.com/in/cli/track (skips the 308 hop) - CHAIBUILDER_TELEMETRY_DEBUG echoes each event to stderr - remove the unused first-run notice dead code Telemetry stays anonymous with env-only opt-out (DO_NOT_TRACK / CHAIBUILDER_TELEMETRY_DISABLED); no notice or subcommand.
outeredgelab-ankita
force-pushed
the
feat/cli-telemetry-phase2
branch
from
July 23, 2026 08:38
37ab359 to
fa1b369
Compare
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.
Phase 2 of the CLI telemetry work (builds on #10). Everything here is CLI-only — no ingestion-endpoint or dashboard changes required.
Privacy & consent
telemetrysubcommand —chaibuilder-app telemetry status | enable | disable. Builds only a logger, so managing telemetry never itself sends an event or creates the anonymous id.telemetryDisabled()now also reads adisabledflag from~/.config/chaibuilder/telemetry.json(shared, merge-safetelemetry-configmodule), not just env vars.Robustness
redact()now scrubsKEY=secretcredentials (incl.FOO_SECRET=env forms),Bearertokens, prefixed keys (ghp_/sk-/AKIA/xox…), and more URL schemes; added a fuzz test. Input is bounded before redacting.~/.config/chaibuilder/telemetry-queue.jsonl(capped at 50) and are drained + resent on the next run. Transient failures (network/timeout/5xx) retry; permanent 4xx are dropped, not retried forever. Queued bodies are already redacted.Endpoint & debug
https://www.chaibuilder.com/in/cli/track, skipping thechaibuilder.com → www308 hop (verified: non-www 308→www, www responds directly).CHAIBUILDER_TELEMETRY_DEBUG— echoes each event to stderr.Not in this PR (out of scope / decisions)
1.7homepage source — N/A, the CLI has no remote homepage fetch (bundledDEFAULT_BLOCKSonly).3.1batching /3.3rate-limit /3.4geo — cbpl endpoint.4.xdashboards — PostHog UI.5.2/5.4CI e2e — needs a cli-e2e remote.1.6extra dimensions — needs a data-scope decision.3.5posthog-node — would bypass the server-side endpoint (not recommended).Testing
tscclean · 137 unit tests · build clean.telemetry status/enable/disable/helpwork, with no id/queue side effects.