feat(tracking): honor DO_NOT_TRACK and COMFY_NO_TELEMETRY env vars#463
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughAdds an env-var gate: ChangesEnvironment Variable Telemetry Opt-Out
🚥 Pre-merge checks | ✅ 2✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
✨ Simplify code
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 |
Codecov Report✅ All modified and coverable lines are covered by tests. @@ Coverage Diff @@
## main #463 +/- ##
==========================================
+ Coverage 83.22% 83.25% +0.02%
==========================================
Files 45 45
Lines 6791 6801 +10
==========================================
+ Hits 5652 5662 +10
Misses 1139 1139
🚀 New features to boost your workflow:
|
Short-circuits both the consent prompt and the per-event dispatch when either variable is set to a non-empty, non-zero value, per the consoledonottrack.com spec. Suppresses the non-TTY auto-enable path so no anonymous user_id is persisted before consent. Signed-off-by: Alexander Piskun <bigcat88@icloud.com>
5b014ff to
2c73b8d
Compare
…nto the run/ package + single-client architecture Upstream (dffa5c1..a392f55) carried five telemetry/tracking commits; most of #461/#463 was already on this branch, so the merge mainly ports #465 and #468 into our architecture: - PostHog dual-send + lifecycle events (#461): already present in our tracking.py (_dispatch fan-out) and cmdline.py run lifecycle; conflicts resolved to our superset (keeps _ensure_user_id(persist=), submit_feedback, submit_agent_review, _consent_enabled). - DO_NOT_TRACK / COMFY_NO_TELEMETRY (#463): already present; kept ours. - cli: event prefix (#465): took upstream's POSTHOG_EVENT_PREFIX in tracking.py PostHogProvider.capture + upstream's prefix tests in tests/comfy_cli/test_tracking_providers.py. - Comfy-Usage-Source header (#468): run.py was deleted here, so the header + extra_data.comfy_usage_source landed in comfy_cli/command/run/execution.py (WorkflowExecution.queue) and comfy_cli/comfy_client.py (Client._request header on every local/cloud request, submit_prompt extra_data); generate/client.py auto-merged upstream's header. Adapted tests/comfy_cli/cloud/test_client.py extra_data assertions accordingly. - SOC2 unreviewed-merge detector (#464) + pytest.yml codecov bump: taken from upstream as-is. - uv.lock: took upstream then regenerated with `uv lock` (posthog already a dependency here). - Upstream's non-TTY auto-consent assertion in test_tracking.py kept at our deliberate behavior (non-interactive sessions do NOT auto-enable tracking). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
DO_NOT_TRACK(https://consoledonottrack.com/) andCOMFY_NO_TELEMETRYper consoledonottrack semantics: any value other than empty or0opts outuser_idpersistencetrack_event()defense-in-depth so no provider is dispatched