|
| 1 | +# BUILD_PR_LEVEL_12_13_SAMPLE_1319_ROOT_TESTS_AND_PS_RUNBOOK |
| 2 | + |
| 3 | +## Purpose |
| 4 | +Normalize sample 1319 runtime test placement by moving executable `.mjs` files from the sample-local tests folder to repo-level `tests/`, and add a step-by-step PowerShell runbook for launching and validating sample 1319 from terminal. |
| 5 | + |
| 6 | +## One PR Purpose Only |
| 7 | +1319 runtime test relocation + PowerShell runbook only. |
| 8 | + |
| 9 | +## Current Confirmed Layout |
| 10 | +```text |
| 11 | +samples/phase-13/1319/ |
| 12 | + index.html |
| 13 | + main.js |
| 14 | + game/ |
| 15 | + RealNetworkLaunchScene.js |
| 16 | + server/ |
| 17 | + docker-compose.yml |
| 18 | + README.md |
| 19 | + tests/ |
| 20 | + realNetworkDashboard.mjs |
| 21 | + realNetworkServer.mjs |
| 22 | +``` |
| 23 | + |
| 24 | +## Required Fix |
| 25 | + |
| 26 | +### A. Move Executable Runtime Files To Repo-Level tests/ |
| 27 | +Move: |
| 28 | +- `tests/network-sample-1319/realNetworkServer.mjs` |
| 29 | +- `tests/network-sample-1319/realNetworkDashboard.mjs` |
| 30 | + |
| 31 | +To repo-level tests home: |
| 32 | +- `tests/network-sample-1319/realNetworkServer.mjs` |
| 33 | +- `tests/network-sample-1319/realNetworkDashboard.mjs` |
| 34 | + |
| 35 | +### B. Keep Sample Folder Clean |
| 36 | +After relocation: |
| 37 | +- `samples/phase-13/1319/server/` keeps config/docs only |
| 38 | +- sample-local tests folder should no longer contain executable runtime `.mjs` files |
| 39 | +- remove the sample-local tests folder if empty after move |
| 40 | + |
| 41 | +### C. Update All References |
| 42 | +Update all affected references, including: |
| 43 | +- sample 1319 docs/readme |
| 44 | +- docker or launch references if needed |
| 45 | +- any validation scripts or helper docs |
| 46 | +- any launcher/admin links that mention old sample-local test paths |
| 47 | + |
| 48 | +## Required Documentation Deliverable |
| 49 | +Add a step-by-step PowerShell runbook document for 1319. |
| 50 | + |
| 51 | +### Required path |
| 52 | +One of these repo docs locations is acceptable, prefer the first: |
| 53 | +- `docs/pr/NETWORK_SAMPLE_1319_POWERSHELL_RUNBOOK.md` |
| 54 | +or |
| 55 | +- `samples/phase-13/1319/server/NETWORK_SAMPLE_1319_POWERSHELL_RUNBOOK.md` |
| 56 | + |
| 57 | +Use the repo docs-first workflow and keep the runbook easy to follow. |
| 58 | + |
| 59 | +## Required Runbook Content |
| 60 | +The PowerShell runbook must include: |
| 61 | + |
| 62 | +### 1. Start the real server from repo root |
| 63 | +Use repo-level test path, not sample-local tests path. |
| 64 | +Example target command shape: |
| 65 | +- `node tests/network-sample-1319/realNetworkServer.mjs` |
| 66 | + |
| 67 | +### 2. Start a local static file host for samples |
| 68 | +From repo root using PowerShell-friendly steps. |
| 69 | +Example: |
| 70 | +- `python -m http.server 8080` |
| 71 | + |
| 72 | +### 3. Open sample launcher |
| 73 | +- `http://127.0.0.1:8080/samples/index.html` |
| 74 | + |
| 75 | +### 4. Open sample 1319 directly |
| 76 | +- `http://127.0.0.1:8080/samples/phase-13/1319/index.html` |
| 77 | + |
| 78 | +### 5. Open dashboard |
| 79 | +Document the dashboard URL backed by the real runtime. |
| 80 | + |
| 81 | +### 6. Validation steps |
| 82 | +Step-by-step user actions: |
| 83 | +- start server |
| 84 | +- open client 1 |
| 85 | +- open client 2 |
| 86 | +- verify connect/session |
| 87 | +- verify authoritative updates |
| 88 | +- disconnect/reconnect one client |
| 89 | +- verify dashboard player/session/RTT/RX/TX updates |
| 90 | + |
| 91 | +### 7. Docker section |
| 92 | +Keep docker-compose under: |
| 93 | +- `samples/phase-13/1319/server/docker-compose.yml` |
| 94 | + |
| 95 | +Document PowerShell commands for: |
| 96 | +- up --build |
| 97 | +- down |
| 98 | + |
| 99 | +### 8. Focused validation commands |
| 100 | +Document terminal commands from repo root for validation checks using the corrected repo-level runtime paths where needed. |
| 101 | + |
| 102 | +## Important Path Correction |
| 103 | +The old command: |
| 104 | +- `node tests/network-sample-1319/realNetworkServer.mjs` |
| 105 | + |
| 106 | +must be replaced with the new repo-level path. |
| 107 | + |
| 108 | +## Scope Rules |
| 109 | +- no logic changes unless strictly required for moved path resolution |
| 110 | +- no runtime behavior changes |
| 111 | +- no feature expansion |
| 112 | +- no 3D work |
| 113 | +- no broad sample cleanup beyond this relocation/documentation slice |
| 114 | + |
| 115 | +## Validation Requirements |
| 116 | + |
| 117 | +### Path Validation |
| 118 | +- no remaining references to sample-local runtime `.mjs` paths |
| 119 | +- repo-level test paths resolve correctly |
| 120 | + |
| 121 | +### Runtime Validation |
| 122 | +- `node tests/network-sample-1319/realNetworkServer.mjs` starts successfully |
| 123 | +- sample 1319 still connects correctly |
| 124 | +- dashboard still loads and updates |
| 125 | + |
| 126 | +### Regression Validation |
| 127 | +- `samples/index.html` still launches 1319 |
| 128 | +- no breakage to other samples from path/documentation changes |
| 129 | + |
| 130 | +## Roadmap Rule |
| 131 | +Update: |
| 132 | +`docs/dev/roadmaps/MASTER_ROADMAP_HIGH_LEVEL.md` |
| 133 | + |
| 134 | +Allowed: |
| 135 | +- status markers only: `[ ]` `[.]` `[x]` |
| 136 | + |
| 137 | +Forbidden: |
| 138 | +- wording edits |
| 139 | +- structure edits |
| 140 | +- additions |
| 141 | +- deletions |
| 142 | + |
| 143 | +## Acceptance Criteria |
| 144 | +- executable `.mjs` files moved to repo-level `tests/` |
| 145 | +- all references updated |
| 146 | +- PowerShell runbook added |
| 147 | +- sample 1319 still launches from `samples/index.html` |
| 148 | +- server and dashboard still run correctly |
| 149 | +- roadmap updated by marker only if execution-backed validation passes |
0 commit comments