SAAS LOTTERY REAL SYNC V4 - MOTO RACING
Build: 20260729-real-sync-v4-moto

ACTIVE SAME-DOMAIN ROUTES
- Authenticated SaaS API: /api-live-v4
- Public real draw feed: /draw-live-v4
- Health check: /real-sync-v4-check.php

MOTO RACING FIXES
- MotoRace_1M period and ten-bike result remain locked to the authoritative
  public draw feed. Local/admin/manual result overrides are not used.
- Public animation polling returns immediately and no longer waits for schema
  migration, result storage, or wallet settlement.
- The client finds the exact current issue anywhere in the ten-row provider
  history instead of assuming it is always the first row.
- A Moto result is accepted only when it is a complete permutation of 1-10.
- Missing or late history entries no longer throw premium/issue JavaScript
  errors during initial loading or mid-race refresh.
- Moto polling starts at 21 seconds so the official race canvas receives the
  real finishing order before the animation phase.

UNCHANGED CONTRACT
- WinGo, TrxWinGo, K3 and 5D continue to use the same real provider logic.
- Game history displays 10 rows per page and 50 pages.
- Authenticated API requests still persist provider results and settle bets.

DEPLOYMENT
1. Upload and extract the complete ZIP into the web root. Overwrite old files.
2. Keep the new api-live-v4 and draw-live-v4 directories.
3. Open /real-sync-v4-check.php and confirm:
   - provider.reachable = true
   - motoRace.reachable = true
   - motoRace.historyRows = 10
   - motoRace.rankIsPermutation = true
4. Clear CDN/server cache if enabled.
5. In the browser, hard refresh once or clear site data so real-sync-v4 loads.

Do not copy login tokens or credentials into PHP/config files.
