|
| 1 | +# BUILD_PR_LEVEL_12_10_REAL_NETWORK_SAMPLE_AND_DASHBOARD |
| 2 | + |
| 3 | +## Build Scope |
| 4 | +Implement one minimal real-network launchable sample plus one live server dashboard surface. |
| 5 | + |
| 6 | +## One PR Purpose Only |
| 7 | +Real-network sample launch + live dashboard execution slice only. |
| 8 | + |
| 9 | +## Build Intent |
| 10 | +Deliver the smallest execution-backed, non-simulated network sample flow that is launchable and observable: |
| 11 | +1. real server endpoint |
| 12 | +2. real client connection path |
| 13 | +3. live session telemetry dashboard |
| 14 | + |
| 15 | +## Constraints |
| 16 | +- no 3D work |
| 17 | +- no feature expansion beyond launchability + observability |
| 18 | +- no simulation-only networking path |
| 19 | +- no protocol redesign beyond minimal needs for this launchable slice |
| 20 | + |
| 21 | +## Required Deliverables |
| 22 | + |
| 23 | +### A. Real-Network Launchable Sample |
| 24 | +- one canonical sample under `samples/phase-13/1319/` |
| 25 | +- browser/client path connects to a real server endpoint |
| 26 | +- at least two clients can join one live session |
| 27 | +- authoritative state update is visible across clients |
| 28 | +- disconnect/reconnect path is observable and stable |
| 29 | + |
| 30 | +### B. Live Server Dashboard |
| 31 | +- dashboard loads over HTTP |
| 32 | +- live values are sourced from real session/runtime data (not fake loopback feed) |
| 33 | +- minimum visible telemetry: |
| 34 | + - active players |
| 35 | + - connection/session count |
| 36 | + - per-player status |
| 37 | + - lag / RTT |
| 38 | + - RX bytes |
| 39 | + - TX bytes |
| 40 | + - health status |
| 41 | + |
| 42 | +## Exact Target Files |
| 43 | + |
| 44 | +### New / Updated Sample Runtime |
| 45 | +- `samples/phase-13/1319/index.html` |
| 46 | +- `samples/phase-13/1319/main.js` |
| 47 | +- `samples/phase-13/1319/game/RealNetworkLaunchScene.js` |
| 48 | + |
| 49 | +### New / Updated Real Server + Dashboard |
| 50 | +- `samples/phase-13/1319/server/realNetworkServer.mjs` |
| 51 | +- `samples/phase-13/1319/server/realNetworkDashboard.mjs` |
| 52 | +- `samples/phase-13/1319/server/README.md` |
| 53 | +- `samples/phase-13/1319/server/docker-compose.yml` (single-node local/live validation) |
| 54 | + |
| 55 | +### Optional Engine Export Adjustment (only if needed) |
| 56 | +- `src/engine/network/index.js` |
| 57 | + |
| 58 | +## Implementation Rules |
| 59 | +1. Do not use fake loopback/simulation as the primary network path for this sample. |
| 60 | +2. Keep behavior minimal and testable; avoid broad UI or gameplay additions. |
| 61 | +3. Reuse existing network contracts and layers where possible. |
| 62 | +4. Preserve existing engine/network API surfaces unless an additive export is required. |
| 63 | +5. Keep all changes scoped to this real-network sample + dashboard lane. |
| 64 | + |
| 65 | +## Validation Requirements (Execution-Backed) |
| 66 | + |
| 67 | +### 1. Import / Path Resolution |
| 68 | +- all new/updated sample and server modules load successfully |
| 69 | +- no broken imports in targeted files |
| 70 | + |
| 71 | +### 2. Real-Network Runtime Boot |
| 72 | +- server process starts and listens on configured real endpoint |
| 73 | +- health endpoint returns ready state |
| 74 | + |
| 75 | +### 3. Transport / Session Lifecycle |
| 76 | +- client-1 connects successfully |
| 77 | +- client-2 connects successfully |
| 78 | +- both clients transition to active session |
| 79 | +- one client disconnects and reconnects without invalid/stuck lifecycle state |
| 80 | + |
| 81 | +### 4. Authoritative Runtime |
| 82 | +- authoritative runtime starts and remains running during active session window |
| 83 | +- server accepts input and produces authoritative updates |
| 84 | + |
| 85 | +### 5. Replication / Apply |
| 86 | +- client receives authoritative updates |
| 87 | +- replicated state changes are visible for both connected clients |
| 88 | +- replication/apply path remains stable through reconnect step |
| 89 | + |
| 90 | +### 6. Live Dashboard Validation |
| 91 | +- dashboard route loads |
| 92 | +- player/session counts update during connect/disconnect |
| 93 | +- lag/RTT and RX/TX values are visible and change during traffic |
| 94 | +- per-player rows/status update during session lifecycle |
| 95 | + |
| 96 | +### 7. Focused 2D Regression Smoke |
| 97 | +- `tests/core/Engine2DCapabilityCombinedFoundation.test.mjs` |
| 98 | +- `tests/core/EngineCoreBoundaryBaseline.test.mjs` |
| 99 | +- `tests/games/AsteroidsValidation.test.mjs` |
| 100 | + |
| 101 | +## Required Validation Commands (minimum) |
| 102 | +- `node --input-type=module -` (import/path and lifecycle/replication smoke harness) |
| 103 | +- `node --input-type=module -` (live dashboard/telemetry probe harness) |
| 104 | +- `node --input-type=module -` (focused 2D regression harness) |
| 105 | + |
| 106 | +## Roadmap Rule |
| 107 | +Update: |
| 108 | +`docs/dev/roadmaps/MASTER_ROADMAP_HIGH_LEVEL.md` |
| 109 | + |
| 110 | +Allowed: |
| 111 | +- status markers only: `[ ]` `[.]` `[x]` |
| 112 | + |
| 113 | +Forbidden: |
| 114 | +- wording edits |
| 115 | +- structure edits |
| 116 | +- additions |
| 117 | +- deletions |
| 118 | + |
| 119 | +## Marker Progress |
| 120 | +- planning/prep can move related real-network conversion lane to in-progress |
| 121 | +- completion moves to complete only on full execution-backed validation pass |
| 122 | + |
| 123 | +## Acceptance Criteria |
| 124 | +- one real-network launchable sample exists and boots |
| 125 | +- one live dashboard exists and shows real session telemetry |
| 126 | +- simulation-only dependency is not the sample's primary network path |
| 127 | +- all required validation areas pass with execution evidence |
| 128 | +- no 3D work introduced |
0 commit comments