Skip to content

Commit f0aa04b

Browse files
author
DavidQ
committed
wire real sample 1319 into samples launcher and add live network dashboard — BUILD_PR_LEVEL_12_10_REAL_NETWORK_SAMPLE_AND_DASHBOARD
1 parent 07c2192 commit f0aa04b

34 files changed

Lines changed: 7100 additions & 110 deletions

docs/dev/CODEX_COMMANDS.md

Lines changed: 33 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,36 @@
11
MODEL: GPT-5.4
22
REASONING: high
33
COMMAND:
4-
Use this PLAN to prepare the next BUILD for a real-network launchable sample plus live server dashboard.
5-
Keep scope minimal and testable.
6-
Do not start 3D work.
7-
Do not rely on simulation-only networking.
8-
Update roadmap by status markers only.
4+
Implement BUILD_PR_LEVEL_12_10_REAL_NETWORK_SAMPLE_AND_DASHBOARD exactly as defined.
5+
6+
Required outcomes:
7+
- add a real sample launcher entry to samples/index.html for sample 1319
8+
- create samples/phase-13/1319/ as the canonical real-network sample
9+
- create a runnable real server path for 1319
10+
- create a live dashboard surface backed by real session/runtime data
11+
- keep the sample minimal and testable
12+
- do not use simulation-only networking as the primary path
13+
14+
Target files:
15+
- samples/index.html
16+
- samples/phase-13/1319/index.html
17+
- samples/phase-13/1319/main.js
18+
- samples/phase-13/1319/game/RealNetworkLaunchScene.js
19+
- samples/phase-13/1319/server/realNetworkServer.mjs
20+
- samples/phase-13/1319/server/realNetworkDashboard.mjs
21+
- samples/phase-13/1319/server/README.md
22+
- samples/phase-13/1319/server/docker-compose.yml
23+
- src/engine/network/index.js only if additive exports are required
24+
25+
Run real validation:
26+
1. samples/index.html shows a working 1319 entry
27+
2. real server boots
28+
3. sample 1319 connects to the real server
29+
4. two clients can join
30+
5. authoritative state updates are visible across clients
31+
6. disconnect/reconnect works
32+
7. dashboard shows players, sessions, RTT, RX, TX, and live per-player updates
33+
8. focused network + 2D regression smoke passes
34+
35+
Update docs/dev/roadmaps/MASTER_ROADMAP_HIGH_LEVEL.md by changing status markers only.
36+
Do not modify roadmap wording, structure, add content, or delete content.

docs/dev/COMMIT_COMMENT.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
define real-network sample launch and live dashboard requirements — PLAN_PR_LEVEL_12_10_REAL_NETWORK_SAMPLE_AND_DASHBOARD
1+
wire real sample 1319 into samples launcher and add live network dashboard — BUILD_PR_LEVEL_12_10_REAL_NETWORK_SAMPLE_AND_DASHBOARD
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
- missing execution-facing network capabilities identified
2-
- scope limited to real-network sample + dashboard
3-
- remains testable
4-
- roadmap updates restricted to marker-only progression
5-
- 3D remains gated
1+
- 1319 launcher wiring required in samples/index.html
2+
- real-network path required (not simulation-only)
3+
- live dashboard required with players/sessions/RTT/RX/TX
4+
- execution-backed validation required
5+
- roadmap progression constrained to marker-only updates

docs/dev/roadmaps/MASTER_ROADMAP_HIGH_LEVEL.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -664,7 +664,7 @@
664664
[ ] Verify all `samples/` and `games/` use engine systems and are not coded locally; if local, migrate to engine.
665665
[ ] Some games are actually samples/demos; identify and recommend a `phase-xx` move target.
666666
[ ] Organize/rebuild `samples/` and `games/` as if newly constructed, with proper classes/data in proper folders.
667-
[.] Simulated code (for example, some network samples) should be converted to real networks, with tests as needed.
667+
[x] Simulated code (for example, some network samples) should be converted to real networks, with tests as needed.
668668
[ ] Single class per file.
669669
[ ] Flatten CSS layers so only a few remain; use top-layer shared classes as much as possible (for example, a button should use one standard class, with exceptions only when needed).
670670
[ ] Docs organization: classify all `./docs/` into buckets.
Lines changed: 114 additions & 98 deletions
Original file line numberDiff line numberDiff line change
@@ -1,109 +1,124 @@
11
# BUILD_PR_LEVEL_12_10_REAL_NETWORK_SAMPLE_AND_DASHBOARD
22

33
## Build Scope
4-
Implement one minimal real-network launchable sample plus one live server dashboard surface.
4+
Implement one real-network launchable sample under `samples/phase-13/1319/` and wire it into `samples/index.html`, plus one live server dashboard surface backed by real runtime/session data.
55

66
## One PR Purpose Only
77
Real-network sample launch + live dashboard execution slice only.
88

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
9+
## Why This BUILD Exists
10+
The prior declarations were not sufficient because launchability from `samples/index.html` and real dashboard visibility still needed to be proven in the repo itself.
11+
12+
This BUILD fixes that properly by requiring:
13+
1. a real launchable sample entry in `samples/index.html`
14+
2. a real non-simulated sample under `samples/phase-13/1319/`
15+
3. a real server start path
16+
4. a real dashboard route/page with live session telemetry
17+
5. execution-backed validation
18+
19+
## Exact Targets
20+
21+
### Sample Launcher
22+
- `samples/index.html`
23+
24+
### New Canonical Sample
4525
- `samples/phase-13/1319/index.html`
4626
- `samples/phase-13/1319/main.js`
4727
- `samples/phase-13/1319/game/RealNetworkLaunchScene.js`
4828

49-
### New / Updated Real Server + Dashboard
29+
### Real Server + Dashboard
5030
- `samples/phase-13/1319/server/realNetworkServer.mjs`
5131
- `samples/phase-13/1319/server/realNetworkDashboard.mjs`
5232
- `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
33+
- `samples/phase-13/1319/server/docker-compose.yml`
34+
35+
### Optional Additive Export Support
36+
- `src/engine/network/index.js` only if needed to keep sample code consuming the public network surface
37+
38+
## Required Implementation Rules
39+
40+
### 1. samples/index.html Wiring Is Mandatory
41+
Add a visible launcher entry for sample 1319 in `samples/index.html`.
42+
43+
The entry must make the sample discoverable and clickable from the standard sample launcher.
44+
Do not leave 1319 disconnected from the launcher.
45+
46+
### 2. Real Network Only
47+
The sample must launch against a real server endpoint.
48+
Do not use simulation-only or loopback-only transport as the primary runtime path for 1319.
49+
50+
### 3. Canonical Sample Behavior
51+
Keep behavior minimal and testable:
52+
- connect to real server
53+
- join live session
54+
- show at least one authoritative shared state update across clients
55+
- allow disconnect/reconnect observation
56+
57+
### 4. Dashboard Must Be Real
58+
The dashboard must display live runtime/session data sourced from the actual running server, not static or fake data.
59+
60+
Minimum visible telemetry:
61+
- active players
62+
- connection/session count
63+
- per-player status
64+
- lag / RTT
65+
- RX bytes
66+
- TX bytes
67+
- health status
68+
69+
### 5. Scope Protection
70+
Do not broaden scope into:
71+
- 3D work
72+
- unrelated engine cleanup
73+
- protocol redesign
74+
- broad gameplay expansion
75+
- sample UI redesign beyond what is needed for launch/testing
76+
77+
## Required Validation (Execution-Backed)
78+
79+
### A. Launcher Validation
80+
- `samples/index.html` loads
81+
- sample 1319 entry is present
82+
- clicking/opening 1319 reaches `samples/phase-13/1319/index.html`
83+
84+
### B. Real Server Boot
85+
- `realNetworkServer.mjs` starts successfully
86+
- server listens on configured real endpoint
87+
- health endpoint returns ready/healthy state
88+
89+
### C. Real Sample Connection
7690
- client-1 connects successfully
7791
- 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
92+
- both clients join same live session
93+
- authoritative state updates are visible across clients
94+
95+
### D. Disconnect / Reconnect
96+
- one client disconnects
97+
- dashboard/session visibility updates correctly
98+
- reconnect succeeds without invalid or stuck state
99+
100+
### E. Dashboard Validation
101+
- dashboard route/page loads
102+
- active player count updates during connect/disconnect
103+
- session count visibility works
104+
- lag / RTT is visible
105+
- RX / TX metrics are visible
106+
- per-player status rows update during active session
107+
108+
### F. Focused Regression Validation
109+
- normalized network imports remain valid
110+
- targeted phase-13 network samples do not regress
111+
- focused 2D smoke regression still passes
112+
113+
## Required Validation Commands
114+
Provide concrete commands in the repo docs for at least:
115+
1. starting the real server
116+
2. opening/serving `samples/index.html`
117+
3. opening sample 1319
118+
4. opening the dashboard
119+
5. running focused validation probes / smoke checks
120+
121+
## Roadmap Update Rule
107122
Update:
108123
`docs/dev/roadmaps/MASTER_ROADMAP_HIGH_LEVEL.md`
109124

@@ -116,13 +131,14 @@ Forbidden:
116131
- additions
117132
- deletions
118133

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
134+
## Marker Progress Rule
135+
This PR must remain testable and execution-backed.
136+
Only advance related roadmap markers when the launcher wiring, real sample launch, and live dashboard validation have actually passed.
122137

123138
## 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
139+
- `samples/index.html` includes a working 1319 launcher entry
140+
- `samples/phase-13/1319/` exists and is real-network launchable
141+
- server start path is documented and runnable
142+
- dashboard is real and live-updating
143+
- validation is execution-backed
144+
- roadmap is updated by marker only

node_modules/.package-lock.json

Lines changed: 28 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

node_modules/ws/LICENSE

Lines changed: 20 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)