Skip to content

Commit 094aa7f

Browse files
author
DavidQ
committed
build(network-sample-b): implement host/client diagnostics sample with read-only debug panels and commands
1 parent c27ed1e commit 094aa7f

18 files changed

Lines changed: 1435 additions & 51 deletions

docs/dev/CODEX_COMMANDS.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
MODEL: GPT-5.4-codex
2-
REASONING: medium
2+
REASONING: high
33

44
COMMAND:
5-
Create PR_DEBUG_SURFACES_NETWORK_SERVER_CONTAINER_FULL
5+
Create PR_DEBUG_SURFACES_NETWORK_SAMPLE_B_FULL
66

77
PURPOSE:
8-
Implement Track UDocker containerization for the network server and dashboard.
8+
Implement Sample BHost / Client Diagnostics to simulate multi-role network behavior using the existing debug surface system.

docs/dev/COMMIT_COMMENT.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
build(network-dashboard): implement Track U containerization for Sample A server dashboard
1+
build(network-sample-b): implement host/client diagnostics sample with read-only debug panels and commands

docs/dev/NETWORK_SAMPLES_PLAN.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,12 @@ Track the staged network sample journey for debug surface support using a strict
2525

2626
# TRACK O — HOST / CLIENT SAMPLE
2727

28-
- [ ] Sample B — Host / Client Diagnostics
29-
- [ ] Host status panel data
30-
- [ ] Client status panel data
31-
- [ ] Authority / ownership visibility
32-
- [ ] Replication snapshot visibility
33-
- [ ] Divergence warning surface
28+
- [x] Sample B — Host / Client Diagnostics
29+
- [x] Host status panel data
30+
- [x] Client status panel data
31+
- [x] Authority / ownership visibility
32+
- [x] Replication snapshot visibility
33+
- [x] Divergence warning surface
3434

3535
---
3636

docs/dev/NEXT_COMMAND.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
PR_DEBUG_SURFACES_NETWORK_SAMPLE_B_FULL
1+
PR_DEBUG_SURFACES_NETWORK_SERVER_OPS_FULL
Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,15 @@
1-
Implemented PR_DEBUG_SURFACES_NETWORK_SERVER_CONTAINER_FULL (Track U).
1+
Implemented PR_DEBUG_SURFACES_NETWORK_SAMPLE_B_FULL.
22

33
Delivered:
4-
- Added container runtime artifacts for the Sample A dashboard server.
5-
- Added `games/network_sample_a/server/Dockerfile` with healthcheck and minimal runtime image.
6-
- Added `games/network_sample_a/.dockerignore` to keep context small and focused.
7-
- Added optional compose service at `games/network_sample_a/server/docker-compose.yml`.
8-
- Updated server access contract with opt-in `NETWORK_SAMPLE_A_ALLOW_REMOTE_WITH_KEY=1` for containerized browser access.
9-
- Updated server README with docker build/run, compose usage, env contract, port mapping, readiness, and logging expectations.
10-
- Updated Track U checklist to complete in `docs/dev/NETWORK_SAMPLES_PLAN.md`.
4+
- Added `games/network_sample_b` sample with host/client fake peer simulation.
5+
- Added read-only debug plugin panels for host status, client status, ownership/authority, and replication snapshots.
6+
- Added operator commands `network.connections` and `network.replication` (plus sample help listing).
7+
- Integrated Sample B into `games/index.html` under Level 11 with Debug Showcase consistency.
8+
- Added Sample B preview asset and standalone sample entry page.
9+
- Updated Track O checklist items to complete in `docs/dev/NETWORK_SAMPLES_PLAN.md`.
1110

1211
Scope preserved:
1312
- no engine/core changes
14-
- no orchestration stack work
15-
- no dashboard feature expansion outside container access compatibility
16-
- BIG_PICTURE_ROADMAP not modified
13+
- no real networking transport implementation
14+
- no server/dashboard changes
15+
- no required edits to BIG_PICTURE_ROADMAP.md

docs/dev/reports/file_tree.txt

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,17 @@
1-
docs/pr/PLAN_PR_DEBUG_SURFACES_NETWORK_SERVER_CONTAINER.md
2-
docs/pr/BUILD_PR_DEBUG_SURFACES_NETWORK_SERVER_CONTAINER.md
3-
docs/pr/APPLY_PR_DEBUG_SURFACES_NETWORK_SERVER_CONTAINER.md
1+
docs/pr/PLAN_PR_DEBUG_SURFACES_NETWORK_SAMPLE_B.md
2+
docs/pr/BUILD_PR_DEBUG_SURFACES_NETWORK_SAMPLE_B.md
3+
docs/pr/APPLY_PR_DEBUG_SURFACES_NETWORK_SAMPLE_B.md
44
docs/dev/CODEX_COMMANDS.md
55
docs/dev/COMMIT_COMMENT.txt
66
docs/dev/NEXT_COMMAND.txt
77
docs/dev/NETWORK_SAMPLES_PLAN.md
88
docs/dev/reports/change_summary.txt
99
docs/dev/reports/file_tree.txt
1010
docs/dev/reports/validation_checklist.txt
11-
games/network_sample_a/server/Dockerfile
12-
games/network_sample_a/.dockerignore
13-
games/network_sample_a/server/docker-compose.yml
14-
games/network_sample_a/server/networkSampleADashboardServer.mjs
15-
games/network_sample_a/server/README.md
11+
games/network_sample_b/index.html
12+
games/network_sample_b/main.js
13+
games/network_sample_b/game/FakeHostClientNetworkModel.js
14+
games/network_sample_b/game/NetworkSampleBScene.js
15+
games/network_sample_b/debug/networkSampleBDebug.js
16+
games/network_sample_b/assets/preview.svg
17+
games/index.html

docs/dev/reports/validation_checklist.txt

Lines changed: 19 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -3,26 +3,25 @@ Workflow
33
- [x] BUILD created
44
- [x] APPLY created
55

6-
Track U Implementation
7-
- [x] Dockerfile for server
8-
- [x] .dockerignore added for sample context
9-
- [x] Environment variable contract documented
10-
- [x] Local run command documented
11-
- [x] Compose-ready service definition added
12-
- [x] Port mapping rules documented
13-
- [x] Health/readiness check implemented
14-
- [x] Logging/output expectations documented
15-
- [x] Container debug notes documented
6+
Sample B Implementation
7+
- [x] host/client role simulation added
8+
- [x] multi-peer provider snapshot support added
9+
- [x] host status panel added
10+
- [x] client status panel added
11+
- [x] ownership/authority panel added
12+
- [x] replication snapshots panel added
13+
- [x] network.connections command added
14+
- [x] network.replication command added
15+
- [x] Sample B integrated in games/network_sample_b
16+
- [x] Sample B card added under Level 11 in games/index.html
1617

17-
Safety
18-
- [x] no engine changes
19-
- [x] no orchestration scope expansion
20-
- [x] Sample A dashboard behavior preserved
21-
- [x] BIG_PICTURE_ROADMAP.md unchanged
18+
Roadmap/Docs
19+
- [x] Track O items updated to [x] in docs/dev/NETWORK_SAMPLES_PLAN.md
20+
- [x] BIG_PICTURE_ROADMAP.md not modified
2221

2322
Validation Runs
24-
- [x] node --check games/network_sample_a/server/networkSampleADashboardServer.mjs
25-
- [x] local node server health endpoint returns 200
26-
- [x] local node server authorized metrics endpoint returns 200
27-
- [x] docker artifact syntax checked (Dockerfile + compose present)
28-
- [x] docker image build/run validation skipped in this environment (Docker CLI unavailable)
23+
- [x] node --check games/network_sample_b/main.js
24+
- [x] node --check games/network_sample_b/game/FakeHostClientNetworkModel.js
25+
- [x] node --check games/network_sample_b/game/NetworkSampleBScene.js
26+
- [x] node --check games/network_sample_b/debug/networkSampleBDebug.js
27+
- [x] static check of Level 11 card links for Sample B in games/index.html
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
Toolbox Aid
2+
David Quesenberry
3+
04/06/2026
4+
APPLY_PR_DEBUG_SURFACES_NETWORK_SAMPLE_B.md
5+
6+
# APPLY_PR_DEBUG_SURFACES_NETWORK_SAMPLE_B
7+
8+
## Apply Scope
9+
Apply Sample B host/client diagnostics implementation exactly as built.
10+
11+
## In Scope Files
12+
- `games/network_sample_b/index.html`
13+
- `games/network_sample_b/main.js`
14+
- `games/network_sample_b/game/FakeHostClientNetworkModel.js`
15+
- `games/network_sample_b/game/NetworkSampleBScene.js`
16+
- `games/network_sample_b/debug/networkSampleBDebug.js`
17+
- `games/network_sample_b/assets/preview.svg`
18+
- `games/index.html` (Level 11 card/list integration)
19+
- `docs/pr/PLAN_PR_DEBUG_SURFACES_NETWORK_SAMPLE_B.md`
20+
- `docs/pr/BUILD_PR_DEBUG_SURFACES_NETWORK_SAMPLE_B.md`
21+
- `docs/pr/APPLY_PR_DEBUG_SURFACES_NETWORK_SAMPLE_B.md`
22+
- `docs/dev/NETWORK_SAMPLES_PLAN.md` (Track O bracket updates)
23+
- docs/dev control/report files for this bundle
24+
25+
## Validation
26+
- `node --check` passes for all new/changed Sample B JS files.
27+
- Sample B debug plugin commands return structured output:
28+
- `network.connections`
29+
- `network.replication`
30+
- Sample B card appears under Level 11 in `games/index.html` with Play/Debug links.
31+
- Track O checklist is updated to `[x]`.
32+
- `BIG_PICTURE_ROADMAP.md` remains unchanged unless explicitly validated and updated.
33+
34+
## Output
35+
`<project folder>/tmp/PR_DEBUG_SURFACES_NETWORK_SAMPLE_B_FULL_bundle.zip`
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
Toolbox Aid
2+
David Quesenberry
3+
04/06/2026
4+
BUILD_PR_DEBUG_SURFACES_NETWORK_SAMPLE_B.md
5+
6+
# BUILD_PR_DEBUG_SURFACES_NETWORK_SAMPLE_B
7+
8+
## Build Summary
9+
Implemented Sample B host/client diagnostics using sample-owned fake peer simulation and existing debug surface infrastructure.
10+
11+
## Implemented
12+
1. Sample B runtime and simulation
13+
- `games/network_sample_b/game/FakeHostClientNetworkModel.js`
14+
- `games/network_sample_b/game/NetworkSampleBScene.js`
15+
- simulates host/client peers with deterministic connection transitions
16+
- captures peer-level latency, replication, tx/rx bytes, and ownership context
17+
18+
2. Debug plugin integration
19+
- `games/network_sample_b/debug/networkSampleBDebug.js`
20+
- read-only providers for peer, ownership, and replication snapshot data
21+
- panels:
22+
- host status
23+
- client status
24+
- ownership / authority
25+
- replication snapshots
26+
- commands:
27+
- `network.connections`
28+
- `network.replication`
29+
30+
3. Sample B entrypoint and page
31+
- `games/network_sample_b/main.js`
32+
- `games/network_sample_b/index.html`
33+
- follows existing debug showcase behavior: overlay hidden by default, combo-key driven toggle
34+
35+
4. Sample B preview asset
36+
- `games/network_sample_b/assets/preview.svg`
37+
38+
5. Games hub integration
39+
- updated `games/index.html` Level 11 playable section with Sample B card and Play/Debug links
40+
- updated Level 11 progression list with Sample B Debug Showcase label
41+
42+
6. Roadmap/checklist updates
43+
- updated Track O items in `docs/dev/NETWORK_SAMPLES_PLAN.md` to complete
44+
- no required changes to `docs/dev/BIG_PICTURE_ROADMAP.md`
45+
46+
## Scope Safety
47+
- no engine/core changes
48+
- no real networking transport work
49+
- no server/dashboard expansion
50+
- sample-driven and read-only diagnostics only
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
Toolbox Aid
2+
David Quesenberry
3+
04/06/2026
4+
PLAN_PR_DEBUG_SURFACES_NETWORK_SAMPLE_B.md
5+
6+
# PLAN_PR_DEBUG_SURFACES_NETWORK_SAMPLE_B
7+
8+
## Goal
9+
Implement Sample B host/client diagnostics as a sample-driven, read-only debug surface integration with no real networking and no engine changes.
10+
11+
## Workflow
12+
PLAN_PR -> BUILD_PR -> APPLY_PR
13+
14+
## In Scope
15+
- simulate host/client roles with multiple peers
16+
- extend sample provider data for peer snapshots
17+
- overlay panels:
18+
- host status
19+
- client status
20+
- ownership / authority
21+
- replication snapshots
22+
- commands:
23+
- network.connections
24+
- network.replication
25+
- integrate under `games/network_sample_b`
26+
- add Sample B entry to `games/index.html` under Level 11
27+
- update Track O checklist in `docs/dev/NETWORK_SAMPLES_PLAN.md`
28+
29+
## Out Of Scope
30+
- real networking sockets/WebRTC
31+
- engine/core API changes
32+
- server/dashboard changes
33+
34+
## Contracts
35+
- sample-owned implementation only (`games/network_sample_b`)
36+
- debug surfaces remain read-only and diagnostic
37+
- command outputs are deterministic and operator-readable
38+
- Sample A patterns are reused for boot flow and plugin structure
39+
40+
## Acceptance Criteria
41+
- Sample B opens and runs from `/games/network_sample_b/index.html`
42+
- host/client diagnostic panels render via existing debug surface runtime
43+
- `network.connections` command returns peer connection summary + per-peer lines
44+
- `network.replication` command returns host/client replication snapshot lines
45+
- Level 11 in `games/index.html` includes Sample B card and links
46+
- Track O items updated to `[.]` or `[x]`
47+
- `BIG_PICTURE_ROADMAP.md` unchanged unless explicitly validated for optional updates

0 commit comments

Comments
 (0)