## Phase 159: Neith Engine Online Subsystem & Replication — Unreal OSS / Iris / Pixel Streaming / Unity NGO + Entities + Transport / Mirror / Photon / GameSparks / Nakama Parity

Closes the engine-networking depth gap. Phase 42 references online subsystem
with ~5 tasks. Phase 72.2 covers dedicated servers at a high level. Phase 137
covers platform-level services (matchmaking / lobbies) from a storefront angle.
None deliver a **deep gameplay-network replication protocol**, distance-based
relevancy, rollback / prediction, pixel-streaming fan-out, and service mesh
comparable to Unreal's Iris or Unity's Netcode-for-Entities stacks.

Sovereign replacement for Unreal Online Subsystem (EOS / Steam / PSN / Xbox /
Null backends), Unreal Iris replication (UE5.5+), Unreal Pixel Streaming, Unity
NGO + Netcode for Entities + Transport, Mirror / FishNet, Photon Fusion /
Quantum / Realtime, GameSparks, Nakama, Colyseus, PlayFab Multiplayer,
AccelByte, Epic Online Services game-services layer (not storefront portion —
that is Phase 137).

---

### 159.1 @neith/oss-abstraction — Online Subsystem Abstraction

- [x] **159.1.1** Platform-agnostic `IOnlineSubsystem` interface
- [x] **159.1.2** Backend plug-ins: Steam / PSN / Xbox Live / Nintendo / Apple
      Game Center / Google Play Games / EOS
- [x] **159.1.3** Null backend for offline / single-player
- [x] **159.1.4** Sovereign Oshun backend (first-party)
- [x] **159.1.5** LAN backend with mDNS discovery
- [x] **159.1.6** Feature-capability flags per backend
- [x] **159.1.7** Async future / promise-based API
- [x] **159.1.8** Cross-platform entitlements sync
- [x] **159.1.9** Account-link (one cross-platform identity)
- [x] **159.1.10** Compliance gate (age / region / privacy)
- [x] **159.1.11** Error taxonomy with localisation
- [x] **159.1.12** Hot-swap backend at runtime (dev → live)
- [x] **159.1.13** Sandboxed per-title environment
- [x] **159.1.14** Backend regression test matrix
- [x] **159.1.15** Telemetry per backend call

---

### 159.2 @neith/oss-identity — Identity, Auth & Friends

- [x] **159.2.1** Multi-platform identity per user
- [x] **159.2.2** Stable player id across devices
- [x] **159.2.3** OAuth / OpenID / console-SDK bridging
- [x] **159.2.4** Passkey / WebAuthn sign-in
- [x] **159.2.5** Anonymous / guest identity with upgrade path
- [x] **159.2.6** Display name + avatar service
- [x] **159.2.7** Friends list read / write / watch-changes
- [x] **159.2.8** Presence updates (in-game activity rich-presence)
- [x] **159.2.9** Block / mute / report list sync
- [x] **159.2.10** Cross-play toggle policy

---

### 159.3 @neith/oss-matchmaking — Matchmaking, Lobby & Party

- [x] **159.3.1** Lobby create / browse / join / kick / leave
- [x] **159.3.2** Lobby attributes + search-key indexing
- [x] **159.3.3** Invite flow with deep-link
- [x] **159.3.4** Party service (persistent across games)
- [x] **159.3.5** Ready / countdown / vote-start
- [x] **159.3.6** Matchmaking ticket API
- [x] **159.3.7** Skill rating (TrueSkill2 / OpenSkill / Glicko2)
- [x] **159.3.8** Hopper / queue configuration
- [x] **159.3.9** Region routing with latency heuristic
- [x] **159.3.10** Match-quality scoring + relax-over-time
- [x] **159.3.11** Role / class balance constraints
- [x] **159.3.12** Backfill for mid-match join
- [x] **159.3.13** Party-vs-solo queue isolation
- [x] **159.3.14** Smurf / bot detection heuristic
- [x] **159.3.15** Fair-pair cross-play matching rules

---

### 159.4 @neith/oss-session — Session & Game-Server Lifecycle

- [x] **159.4.1** Session object (map / mode / limits / metadata)
- [x] **159.4.2** Dedicated server allocator
- [x] **159.4.3** Container (K8s / Nomad) game-server fleet (Agones-class)
- [x] **159.4.4** Peer-to-peer (listen server) with NAT traversal
- [x] **159.4.5** Relay fallback for unroutable peers
- [x] **159.4.6** Session state (warmup / live / post-match / closed)
- [x] **159.4.7** Player slot reserve / release
- [x] **159.4.8** Player ban list per session
- [x] **159.4.9** Host migration for listen-server
- [x] **159.4.10** Session archive / replay metadata

---

### 159.5 @neith/oss-replication — Replication Graph & Iris-Class Protocol

- [x] **159.5.1** Entity / object replication API
- [x] **159.5.2** Property replication with RepNotify
- [x] **159.5.3** Fast-array serialisation (delta-struct)
- [x] **159.5.4** RepLayout auto-generation at build time
- [x] **159.5.5** Condition-based replication (on owner / sim proxy / etc.)
- [x] **159.5.6** Replication graph nodes (spatial / grid / dormancy)
- [x] **159.5.7** Distance-based relevancy with LOD
- [x] **159.5.8** Dormancy / awake transitions
- [x] **159.5.9** Priority + bandwidth budget per connection
- [x] **159.5.10** Partial / differential update frames
- [x] **159.5.11** Iris-class filter / group / pre-poll / post-process
- [x] **159.5.12** ECS entity replication (Phase 42 ECS integration)
- [x] **159.5.13** Subobject + component replication
- [x] **159.5.14** Dynamic spawn / destroy replication
- [x] **159.5.15** Replication authority transfer
- [x] **159.5.16** Quantised replication (vector half, rotator byte)
- [x] **159.5.17** Actor channel open / close
- [x] **159.5.18** Network GUID assignment
- [x] **159.5.19** Late-joiner full state sync
- [x] **159.5.20** Replay-system-compatible replication stream

---

### 159.6 @neith/oss-rpc — Remote Procedure Call

- [x] **159.6.1** Client / server / multicast RPC
- [x] **159.6.2** Reliable / unreliable classification
- [x] **159.6.3** Validation callback (server authority)
- [x] **159.6.4** Rate-limit RPC
- [x] **159.6.5** Compression with schema
- [x] **159.6.6** Automatic batching
- [x] **159.6.7** RPC owner filter
- [x] **159.6.8** Async response RPC
- [x] **159.6.9** Versioned RPC for rolling updates
- [x] **159.6.10** RPC tracing + metrics

---

### 159.7 @neith/oss-prediction — Client Prediction, Rollback & Interpolation

- [x] **159.7.1** Client-side prediction buffer
- [x] **159.7.2** Server reconciliation with authoritative snapshot
- [x] **159.7.3** Input sequencing + resimulation
- [x] **159.7.4** Movement component with network smoothing
- [x] **159.7.5** GGPO-class rollback (deterministic)
- [x] **159.7.6** Lockstep / deterministic RTS sim
- [x] **159.7.7** Interpolation buffer (lag-compensation)
- [x] **159.7.8** Extrapolation with hit-mask
- [x] **159.7.9** Lag-compensated hit detection
- [x] **159.7.10** Tick-rate negotiation
- [x] **159.7.11** Client-authoritative + server-reconcile option
- [x] **159.7.12** Delta-time decoupling from tick-rate
- [x] **159.7.13** Snapshot compression with XOR / bit-packing
- [x] **159.7.14** Deterministic fixed-point option
- [x] **159.7.15** Cross-platform determinism tests

---

### 159.8 @neith/oss-transport — Transport, NAT & Security

- [x] **159.8.1** UDP transport with reliability layer (ENet / QUIC / custom)
- [x] **159.8.2** WebRTC data-channel transport
- [x] **159.8.3** WebTransport / QUIC for web clients
- [x] **159.8.4** WebSocket transport (TCP fallback)
- [x] **159.8.5** STUN / TURN servers (sovereign)
- [x] **159.8.6** NAT type detection
- [x] **159.8.7** UPnP / NAT-PMP / PCP port open
- [x] **159.8.8** Hole punching (cone / symmetric)
- [x] **159.8.9** DTLS / QUIC encryption
- [x] **159.8.10** MTU discovery + fragmentation
- [x] **159.8.11** Congestion control (BBR / Cubic / sovereign)
- [x] **159.8.12** Packet pacing and FEC
- [x] **159.8.13** Traffic shaping per connection
- [x] **159.8.14** DDoS mitigation hook
- [x] **159.8.15** Replay-proof sequence numbers

---

### 159.9 @neith/oss-voice — Voice Chat & Proximity Audio

- [x] **159.9.1** Opus codec voice with bitrate adaptation
- [x] **159.9.2** Spatial / proximity voice in-world
- [x] **159.9.3** Team / channel voice
- [x] **159.9.4** Push-to-talk + voice activation
- [x] **159.9.5** Echo cancellation (AEC) + noise suppression
- [x] **159.9.6** Real-time captions + translation
- [x] **159.9.7** Voice transcription for moderation
- [x] **159.9.8** Mute / block / kick per user
- [x] **159.9.9** Vivox-compat API for porting existing code
- [x] **159.9.10** Cross-platform voice (console ↔ PC ↔ mobile)

---

### 159.10 @neith/oss-presence — Presence, Stats, Leaderboards, Achievements

- [x] **159.10.1** Presence rich status text + icon + deep-link
- [x] **159.10.2** Stats (key-value) per title
- [x] **159.10.3** Leaderboards (global / friends / daily / seasonal)
- [x] **159.10.4** Achievements + progress tracking
- [x] **159.10.5** Trophies / platform-native unlock
- [x] **159.10.6** Challenges + quest service
- [x] **159.10.7** Cloud save with conflict resolution
- [x] **159.10.8** Inventory service (items / currency)
- [x] **159.10.9** Entitlements service (ownership check)
- [x] **159.10.10** Party rich presence
- [x] **159.10.11** Friend-of-friend discovery
- [x] **159.10.12** Social graph query
- [x] **159.10.13** Cross-title entitlement
- [x] **159.10.14** Read-your-writes consistency
- [x] **159.10.15** Federation between Oshun OSS and EOS / Steam / PSN / Xbox

---

### 159.11 @neith/oss-replay — Replay & Spectator

- [x] **159.11.1** Record replication stream to file
- [x] **159.11.2** Scrub / fast-forward / reverse playback
- [x] **159.11.3** Free-fly spectator camera
- [x] **159.11.4** Director camera with AI-cam cut suggestions
- [x] **159.11.5** Spectator-only late-join
- [x] **159.11.6** Observer-role with delayed feed (pro esports)
- [x] **159.11.7** Kill-cam + instant replay clip
- [x] **159.11.8** Replay compression + de-duplication
- [x] **159.11.9** Replay upload to cloud (sovereign) + share-link
- [x] **159.11.10** Replay format version migration

---

### 159.12 @neith/oss-pixel — Pixel Streaming & Cloud Game Output

- [x] **159.12.1** WebRTC video / audio fan-out from host
- [x] **159.12.2** H.264 / H.265 / AV1 hardware encoder path
- [x] **159.12.3** Multi-bitrate adaptive streaming
- [x] **159.12.4** Ultra-low-latency (< 100 ms) pipeline
- [x] **159.12.5** Input (keyboard / mouse / gamepad / touch) upstream
- [x] **159.12.6** Multi-viewer fan-out with SFU
- [x] **159.12.7** Share-link / temporary room
- [x] **159.12.8** Browser-only client (no install)
- [x] **159.12.9** Mobile PWA client
- [x] **159.12.10** Cross-reference Phase 140 cloud-gaming platform
- [x] **159.12.11** Pixel-stream auth / entitlement gate
- [x] **159.12.12** Fleet scaling for concurrent streams
- [x] **159.12.13** Per-stream resource accounting
- [x] **159.12.14** Session hand-off between GPU nodes
- [x] **159.12.15** Embed API for iframe / Electron hosting

---

### 159.13 @neith/oss-anti-cheat — Server-Authoritative Guards

- [x] **159.13.1** Server-side movement validation
- [x] **159.13.2** Hit-validation replay
- [x] **159.13.3** Rate-limiter per verb
- [x] **159.13.4** Cross-reference with Phase 137 anti-cheat
- [x] **159.13.5** Anomaly scorer per session
- [x] **159.13.6** Replay-based post-match cheat review
- [x] **159.13.7** Signed client binaries required
- [x] **159.13.8** Memory-integrity ping
- [x] **159.13.9** Packet signature validation
- [x] **159.13.10** Auto-kick + shadow-pool

---

### 159.14 @neith/oss-observability — Net Telemetry & Profiler

- [x] **159.14.1** RTT, jitter, loss per connection
- [x] **159.14.2** Bandwidth in / out per actor
- [x] **159.14.3** Replication outgoing byte breakdown
- [x] **159.14.4** Top-property / top-actor hotspots
- [x] **159.14.5** Packet capture dump
- [x] **159.14.6** Integration with Phase 160 Insights-class profiler
- [x] **159.14.7** Real-time web dashboard per match
- [x] **159.14.8** Time-series long-term metrics
- [x] **159.14.9** SLO for multiplayer quality
- [x] **159.14.10** Regression alerting on build-level net-cost

---

### 159.15 Testing & Validation

- [x] **159.15.1** 128-player soak stress-test
- [x] **159.15.2** Cross-region RTT budget conformance
- [x] **159.15.3** Packet-loss 10 % resilience test
- [x] **159.15.4** NAT-type matrix connectivity test
- [x] **159.15.5** Rollback-determinism 100k-tick test
- [x] **159.15.6** Pixel-stream 60 FPS 4K latency test
- [x] **159.15.7** Host-migration correctness test
- [x] **159.15.8** Backend failover drill
- [x] **159.15.9** Security / fuzzing corpus
- [x] **159.15.10** Dogfood vs Phase 79 open-world, Phase 77 MMO
