# V2 Live Ops Analytics

This runbook covers `TODOS.phase-72.72.12.2.14`: live ops analytics for event
participation rates, season pass completion rates, and hotfix effectiveness.

The service package is `@v2/live-ops-analytics-service` at
`apps/v2/live-ops-analytics-service/`. Its contract is
`V2/ue/Content/V2/LiveOps/LiveOpsAnalytics_V2_Contract.json`, and the focused
gate is `V2/ue/Tools/check-v2-live-ops-analytics.py`.

## Runtime Contract

Primary APIs:

- `buildV2LiveOpsAnalyticsSurface`
- `summarizeV2EventParticipation`
- `summarizeV2SeasonPassCompletion`
- `summarizeV2HotfixEffectiveness`

Service endpoints:

- `GET /v2/live-ops/analytics/events/{eventId}/participation`
- `GET /v2/live-ops/analytics/season-pass/{seasonId}/completion`
- `GET /v2/live-ops/analytics/hotfixes/{hotfixId}/effectiveness`

Metric families:

- `event-participation`
- `season-pass-completion`
- `hotfix-effectiveness`

## Metric Rules

Event participation metrics are generated from eligible, participating,
completed, and reward-claim account counts. The service rejects impossible
relationships such as participating accounts exceeding eligible accounts.

Season pass completion metrics are generated from total, active, completed,
premium-completed, average tier, and max tier aggregates. The completion rate is
computed from completed accounts divided by active accounts, while premium
completion and average-tier completion rates are published beside it.

Hotfix effectiveness is generated from before/after incident counts, crash
rates, regression failure counts, and impacted-account counts. The effectiveness
score averages those reductions, and `hotfixEffective` is true only when the
post-hotfix telemetry does not regress across any tracked dimension.

The surface is server-authoritative, uses aggregate telemetry only, and keeps
`requiresClientPatch: false`.

## Required Gates

- `live-ops-analytics-package`
- `live-ops-analytics-event-participation`
- `live-ops-analytics-season-pass-completion`
- `live-ops-analytics-hotfix-effectiveness`
- `live-ops-analytics-validation`
- `live-ops-analytics-ci-wired`

## Verification

```sh
pnpm --filter @v2/live-ops-analytics-service test
pnpm --filter @v2/live-ops-analytics-service typecheck
pnpm --filter @v2/live-ops-analytics-service lint
pnpm --filter @v2/live-ops-analytics-service build
python3 V2/ue/Tools/check-v2-live-ops-analytics.py
```
