Skip to content

fix(telemetry): require explicit opt-in for fatal reports - #127

Merged
ElbertePlinio merged 3 commits into
mainfrom
feat/98-telemetry-opt-in
Sep 7, 2026
Merged

ElbertePlinio merged 3 commits into
mainfrom
feat/98-telemetry-opt-in

Conversation

@ElbertePlinio

Copy link
Copy Markdown
Member

Refs #98. Implements the decided opt-in contract for the TypeScript CLI and MCP server only. This does not close #98 or change its support-matrix items.

Fatal reporting now requires PICKFORGE_TELEMETRY=1, true, or on, after trimming whitespace and ignoring case. Unset and every other value disable Sentry initialization and bypass capture/flush. Enabled reports retain redaction and disabled breadcrumbs/tracing. The existing compatibility helper honors PICKLAB_TELEMETRY for 0.4 only when the current name is unset, warning once per process. README, INSTALL.md, root --help and the release Changes bullet disclose fatal reporting, not product analytics.

The sourcemap step requires the SENTRY_AUTH_TOKEN secret and both SENTRY_ORG/SENTRY_PROJECT repository variables, passes them explicitly to sentry-cli, and prints a skip notice otherwise. No Sentry account, project, variables or secrets were changed. No live upload or stack-resolution verification was performed.

Telemetry checklist evidence for the lead to apply to #98; the issue itself was not edited:

  • Default is disabled
  • One explicit PICKFORGE_TELEMETRY=1 switch enables redacted fatal-error reporting
  • Legacy PICKLAB_TELEMETRY follows the 0.4 compatibility policy with one deprecation warning
  • Tests prove no Sentry initialization/network path at default, 0, false, or off
  • Tests prove only explicit enable values activate it and redaction remains intact
  • README/help/site disclose the exact behavior without implying anonymous product analytics. README/help are complete here; site changes remain separate.

Validation passed on f6a077c: bun install --frozen-lockfile, bun run typecheck, bun run lint, bun run test, bun run build, complexity-gate check --changed, and git diff --check. Tests: 114 files passed, 1,487 tests passed, four desktop tests skipped. Also passed PICKFORGE_REQUIRE_BROWSER=1 bun run test:coverage, without the CI-only no-sandbox concession. Coverage thresholds are unchanged; telemetry.ts has 100% statement, branch, function and line coverage. Local Bun was 1.3.14; the workflow pin is unchanged.

Manual built-artifact proof: launched the built CLI with --help, then the fatal session status nonexistent path, and the built MCP server with stdin closed. Removed both telemetry variables and every SENTRY_* variable from each child environment. A temporary Node ESM preload checked the real SDK's isInitialized() and getClient() at exit, and counted/blocked TCP socket connections, UDP sends and fetch calls. All three runs reported zero Sentry environment variables, no initialized client and zero network attempts. CLI help and MCP exited 0; the missing-session fatal path exited 1. This probes the built entrypoints with the real SDK, complementing unit assertions that init/capture/flush are never called when disabled.

The actual workflow shell block was tested locally with fake tar/npx commands and nonsecret sentinel values across all eight presence combinations. All seven incomplete combinations skipped before npx; the complete combination passed token, org, project and release explicitly. No external upload was attempted.

Independent final review found no blocking defects and reran the 27 telemetry tests successfully. Remaining limits: the site disclosure and support matrix belong to separate work, four desktop tests skipped locally, and live Sentry upload/stack resolution remains unverified. No merge, tag, release, workflow dispatch or publication was performed.

@ElbertePlinio
ElbertePlinio force-pushed the feat/98-telemetry-opt-in branch from 968e733 to c6996cd Compare September 7, 2026 21:48
@ElbertePlinio
ElbertePlinio merged commit c96f848 into main Sep 7, 2026
10 checks passed
@ElbertePlinio
ElbertePlinio deleted the feat/98-telemetry-opt-in branch September 7, 2026 22:06
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.

Align stable telemetry, support matrix, and public product contract

1 participant