Skip to content

build(telemetry): link Sentry conditionally and document privacy model#323

Merged
provencher merged 1 commit into
mainfrom
cameroncooke/sentry-01-build-plumbing
Jul 2, 2026
Merged

build(telemetry): link Sentry conditionally and document privacy model#323
provencher merged 1 commit into
mainfrom
cameroncooke/sentry-01-build-plumbing

Conversation

@cameroncooke

@cameroncooke cameroncooke commented Jun 29, 2026

Copy link
Copy Markdown
Collaborator

Summary

Establishes the opt-in build gate for Sentry telemetry and the privacy documentation. Adds no runtime behavior on its own — it only makes telemetry possible to compile in, and inert by default.

Stack: 1/10 · base main · Refs GH-183

What this changes

  • Package.swift: reads REPOPROMPT_ENABLE_SENTRY at manifest-eval time; only when =1 does it add the sentry-cocoa dependency and define REPOPROMPT_SENTRY_ENABLED. Pins sentry-cocoa 9.17.1 (Package.resolved).
  • AppBundle/Info.plist.template: adds an empty RepoPromptSentryDSN slot.
  • ThirdPartyLicenses/* + swiftpm_notice_guardrails.sh: registers sentry-cocoa's MIT license so the notice guardrail passes.
  • docs/privacy/telemetry.md: the human-readable privacy contract.

Business rules

  • Telemetry is OFF by default. DEBUG, self-compiled, locally-signed, and ad-hoc builds never link the SDK; the #if REPOPROMPT_SENTRY_ENABLED blocks in later PRs compile to nothing.
  • Only official Developer ID release builds set REPOPROMPT_ENABLE_SENTRY=1.
  • The DSN slot ships empty; it is populated only by the release pipeline (PR 10).

Key decisions

  • Conditional dependency, not always-link-then-gate-at-runtime. This makes the SDK structurally absent from any non-telemetry build — privacy by construction, not by configuration.
  • Hoisted the dependency/settings arrays into mutable vars so the if sentryEnabled { … } block is the single, auditable opt-in point.

Test plan

  • swift build (no flag) resolves and builds with the SDK absent.
  • REPOPROMPT_ENABLE_SENTRY=1 swift build links sentry-cocoa from cache. ✅ verified (rc=0).

Add an opt-in REPOPROMPT_ENABLE_SENTRY build gate that links sentry-cocoa and defines REPOPROMPT_SENTRY_ENABLED, register the sentry-cocoa license, add the DSN Info.plist slot, and document the telemetry privacy model. Refs GH-183
@cameroncooke cameroncooke force-pushed the cameroncooke/sentry-01-build-plumbing branch from d17e5a0 to 531da8a Compare June 29, 2026 21:40
@cameroncooke cameroncooke marked this pull request as ready for review June 30, 2026 01:06
@provencher provencher merged commit d691b1f into main Jul 2, 2026
4 checks passed
@baron baron mentioned this pull request Jul 3, 2026
9 tasks
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.

2 participants