Commit Graph

5 Commits

Author SHA1 Message Date
open-design-crew[bot]
3b56272dfe [OPEND-5496][OPEND-5807] feat(tracking): cloud allowlist, per-user identity, and dual-write Tracert telemetry (#1130)
* [OPEND-5496] feat(cloud-tracking): add cloud allowlist, cloud_web channel, and monetization attribution

* test(studio): assert resolution gate attribution payload in AssetComposer

* fix(cloud-tracking): address Looper review (restore tests, rotate entry_id, deploy env, docs)

* fix(studio): pass native job.model.modelId for failure-gate attribution

* feat(tracking): add Tracert v0.6.0 dual reporting, canonical user identity, and env-only PostHog config

Integrate @powerformer/tracert@0.6.0 alongside existing PostHog telemetry for both Studio browser and cloud API server reporting while keeping self-hosted deployments strictly opt-in with zero hardcoded tokens.

- Add shared runtime tracking config validation and CSP-safe HTML injection so Studio hydrates tracking config in 0 RTT when enabled and skips downloading the lazy Tracert chunk when OPENMOTION_TRACERT_SPM_A is unset.
- Dual-write closed-schema Studio events and server-side account_sign_in_result across PostHog and Tracert using identical event_id and occurred_at values, keeping auto-collection plugins disabled and registering graceful TracertNode shutdown.
- Align browser and server user identity on AMR appUserId (falling back to local user.id only when self-hosted), attach workspace_id/workspace_role/plan_tier as user context, preserve anonymous device_id across passive signed-out reloads, and rotate identity on explicit sign-out.
- Remove hardcoded PostHog credentials in shared/tracking-config.json so standalone tracking is strictly env-driven.
- Allowlist only the SHA-256 digest of the SDK's default public Collector endpoint in bundled Studio JS assets in .github/scripts/motion-scan.mjs.

* fix(tracking): preserve equivalent Tracert init loads, clear expired SDK identity, and drain PostHog queues on shutdown

* fix(tracking): propagate render telemetryOptOut, isolate browser queue across identity changes, and wire production identity sync

* fix(tracking): isolate identity sync module and guard non-browser tracking init

---------

Co-authored-by: qiqi <qiqi@qiqideMBP.lan>
Co-authored-by: 罗高 <luogao@users.noreply.github.com>
2026-11-26 19:28:11 +08:00
open-design-crew[bot]
cd12830044 feat(tracking): complete Studio events and attribute host agents (#371)
Integrate the reviewed change after successful current-head CI and focused validation against the latest main.
2026-11-13 19:34:32 +08:00
罗高
f71dda66be fix(tracking): derive Studio events and recover configuration failures 2026-11-09 20:08:37 +08:00
罗高
73960818ed feat(tracking): enable collection by default with persistent opt-out and coarse GeoIP 2026-11-09 18:06:38 +08:00
罗高
0eacccd5ca feat(tracking): add opt-in shared MCP and Studio event reporting 2026-11-09 17:20:31 +08:00