Commit Graph

7 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
Joey-nexu
32ad01e4f5 feat(tracking): measure video generation, editing and export by work (#557)
* feat(tracking): measure video generation, editing and export by work

* fix(tracking): count timeline insertions from Assets and synchronize export coverage

---------

Co-authored-by: joeylee12629-star <236967869+joeylee12629-star@users.noreply.github.com>
2026-11-18 14:17:26 +08:00
霜草
7d91cab729 feat: add north-star tracking evidence (#424)
* feat: add north-star tracking evidence

* fix(distribution): ship the tracking task ledger in packaged applications

phase1.ts and server.ts import tracking/task-ledger.ts, but the packaged
application file list never gained the new module, so npm artifacts failed
to load with ERR_MODULE_NOT_FOUND and the distribution lane failed.

Add the module to the positive distribution list so both profiles keep a
loadable application.

Generated-By: looper 0.16.2 (runner=fixer, agent=pi)

* fix(tracking): attribute worker evidence and ledger every accepted export

Queue snapshots, heartbeats and technical-export checks now pass the worker
entrypoint instead of inheriting the MCP tracker default. Host run failures and
cancellations read the recorded work-round mode, and a failure only reports a
failed run state after it actually closed the round.

Every accepted export is now ledgered inside the shared export entry, so the
Studio and legacy routes produce the same evidence as the MCP adapter, and an
unreadable ledger is recorded as a diagnostic instead of failing an export that
already started rendering. Repeating an identical terminal result keeps the
recorded terminal time, and quality-check version ids follow the public
version-id contract instead of requiring a v4 UUID.

Generated-By: looper 0.16.2 (runner=fixer, agent=pi)

* fix: correct instrumentation evidence semantics

* fix: preserve work round failure evidence

* fix: close interrupted exports with one terminal outcome

Preview delivery now needs the confirmed current version and the originating
round's fixed version, and preview evidence is emitted only after recordDisplay
passes its version guard, so a rejected display no longer claims an observation
and a delivery for the same run.

Technical export checks report cancelled or unfinished jobs as unreviewed
instead of error; only a completed job without a verification report stays an
error.

The export ledger entry for an interrupted export is now closed once with
outcome unknown, and the worker tick that owns that transition emits the
matching task_terminal evidence. A second tick or a status read sees the closed
record and claim nothing. The tracking README describes that reconciliation
path.

Generated-By: looper 0.16.2 (runner=fixer, agent=pi)

* fix: keep interrupted-export reconciliation out of live renders

The worker tick reconciled before taking the working-set guard, so a later tick
could close a job this process was still rendering, the local render was left
running, and the owning worker then stated a second task_terminal for the same
task. Reconciliation now runs only for a tick that does not own the render, it
aborts any local controller of a job it closes, and the claiming worker states
its terminal evidence through one helper that skips a job the reconciler already
closed as unknown.

Generated-By: looper 0.16.2 (runner=fixer, agent=pi)

* fix: state terminal evidence from the caller that reconciles an export

Coalesce interrupted-export reconciliation into one owner so every path that
closes a task also reports it: the read path now records the same
task_terminal evidence as the worker tick, keeps the ledger terminal time and
never restates the outcome on a later read. Stores carry the service tracker,
including project-scoped stores and the MCP read paths.

Generated-By: looper 0.16.2 (runner=fixer, agent=pi)

* fix: preserve provider preview schema

---------

Co-authored-by: qindong <qindong@qindongs-MBP.lan>
Co-authored-by: 罗高 <luogao@users.noreply.github.com>
Co-authored-by: qindong <qindong@qindongs-MacBook-Pro.local>
2026-11-16 19:09:57 +08:00
open-design-crew[bot]
beb4fcb065 feat(tracking): report the redesigned template library funnel (#374)
Integrate the reviewed change after successful current-head CI and focused validation against the latest main.
2026-11-13 19:41:56 +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
罗高
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