# V3 Music Sync Drift Validation

Canonical source: `libs/oshun/analytics/src/v3-music-sync-drift-budget.ts`

Evidence artifact: `V3/validation/music-sync-drift-validation.json`

Manifest version: `v3-music-sync-drift-budget.v1`

The Saraswati Stadium-tier music gate validates cross-attendee drift for the
Sequencer + MetaSound concert path. The deterministic load simulation exercises
4,096 attendees across the native UE, Pixel Streaming, and Tier-2 fallback
cohorts, with 24 sync checkpoints per song across the two-song launch-night
fixture.

| Cohort            | Attendees | Samples | p50 drift | p95 drift | p99 drift | Max drift |
| ----------------- | --------- | ------- | --------- | --------- | --------- | --------- |
| `native_ue`       | 256       | 12,288  | 10 ms     | 14 ms     | 15 ms     | 15 ms     |
| `pixel_streaming` | 768       | 36,864  | 13 ms     | 17 ms     | 18 ms     | 18 ms     |
| `tier2_fallback`  | 3,072     | 147,456 | 15 ms     | 19 ms     | 20 ms     | 20 ms     |
| **All attendees** | 4,096     | 196,608 | 14 ms     | 19 ms     | 20 ms     | 20 ms     |

The gate is anchored to `apps/v3/saraswati-service/src/per_song_execution.rs`,
where `simulate_stadium_music_sync_drift` validates the 4,096-attendee Stadium
mix, active `metasound.play` with `ntp-style-concert-clock`, monotonic drift
percentiles, and p95 drift at or below 25 ms. It also stays connected to the
Sequencer compiler and Tier-2 cue-forwarding path so the same MusicSync cue
track drives native, Pixel Streaming, and fallback clients.

`pnpm verify:v3 music-sync-drift` fails closed when the Stadium attendee mix is
missing, the p95 budget is weakened, the sample count no longer equals attendees
x songs x checkpoints, the MetaSound NTP clock is inactive, any Sequencer cue is
missed, cross-attendee p95 exceeds 25 ms, any cohort p95 exceeds 25 ms,
percentiles are inconsistent, or the verifier/source wiring is missing.
