Skip to content

Commit f0fb325

Browse files
author
DavidQ
committed
BUILD_PR_NETWORK_SAMPLES_RELOCATION_FROM_GAMES_TO_SAMPLES
Relocated network_sample_a, network_sample_b, and network_sample_c from games/ to phase-13 samples. - moved to samples/phase-13_network-concepts/1316-1318 - preserved behavior at new locations - added sample index tiles for 1316, 1317, 1318 - removed old games/network_sample_* folders & BUILD_PR_NETWORK_SAMPLES_RELOCATION_FROM_GAMES_TO_SAMPLES_v3 Corrected Phase 13 destination path and enforced: - proper directory placement - samples/index tile updates - removal from games/index.html
1 parent 8b87eb1 commit f0fb325

35 files changed

Lines changed: 123 additions & 155 deletions

docs/dev/CODEX_COMMANDS.md

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,14 @@ MODEL: GPT-5.4
22
REASONING: high
33

44
COMMAND:
5-
Execute BUILD_PR_GAMES_PACMANFULLAI_FULL_FOLDER_MIGRATION exactly as written.
5+
Execute BUILD_PR_NETWORK_SAMPLES_RELOCATION_FROM_GAMES_TO_SAMPLES (v3)
66

77
Rules:
8-
- Use template → _next → migrate → promote → cleanup
9-
- Work only in the PacmanFullAI lane
10-
- Correct folder placement by responsibility
11-
- Do not modify unrelated games
12-
- Do not refactor engine/shared broadly
13-
- Fail fast instead of guessing
8+
- Use EXACT destination path:
9+
samples/Phase 13 - Network Concepts, Latency & Simulation (1301-1315)/
10+
- Move (not copy)
11+
- Add tiles to samples/index
12+
- Remove entries from games/index.html
13+
- Remove original folders
14+
- Do NOT touch unrelated files
15+
- Fail fast on ambiguity

docs/dev/COMMIT_COMMENT.txt

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
1-
APPLY_PR_GAMES_PACMANFULLAI_FULL_FOLDER_MIGRATION
1+
BUILD_PR_NETWORK_SAMPLES_RELOCATION_FROM_GAMES_TO_SAMPLES_v3
22

3-
Accepted full PacmanFullAI migration.
4-
5-
- canonical validated
6-
- _next removed
7-
- pipeline confirmed
3+
Corrected Phase 13 destination path and enforced:
4+
- proper directory placement
5+
- samples/index tile updates
6+
- removal from games/index.html

docs/dev/NEXT_COMMAND.txt

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1 @@
1-
Create BUILD_PR_NETWORK_SAMPLES_RELOCATION_FROM_GAMES_TO_SAMPLES
2-
3-
Scope:
4-
- move network_sample_a, network_sample_b, network_sample_c from games/ to samples/
5-
- preserve behavior
6-
- keep one migration lane for network samples
1+
Create APPLY_PR_NETWORK_SAMPLES_RELOCATION_FROM_GAMES_TO_SAMPLES
Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
1-
Validation Checklist — APPLY PacmanFullAI Migration
1+
[ ] Correct Phase 13 directory used
2+
[ ] network_sample_a → 1316
3+
[ ] network_sample_b → 1317
4+
[ ] network_sample_c → 1318
5+
[ ] samples/index updated
6+
[ ] games/index cleaned
7+
[ ] old folders removed
8+
[ ] behavior preserved
29

3-
[x] Runs from canonical
4-
[x] Canvas visible
5-
[x] No console errors
6-
[x] PacmanFullAI_next removed
7-
[x] No unrelated changes
8-
9-
Status: PASS
10+
Status: PENDING
Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
# BUILD PR — Network Samples Relocation From Games To Samples (v3 CORRECTED PATH)
2+
3+
## Purpose
4+
Move network samples from games → samples using the correct Phase 13 directory,
5+
update samples index, and remove from games index.
6+
7+
## CORRECT DESTINATION (REQUIRED)
8+
All network samples MUST be placed under:
9+
10+
samples/Phase 13 - Network Concepts, Latency & Simulation (1301-1315)/
11+
12+
## Exact Mapping
13+
- games/network_sample_a →
14+
samples/Phase 13 - Network Concepts, Latency & Simulation (1301-1315)/1316-network-sample-a/
15+
16+
- games/network_sample_b →
17+
samples/Phase 13 - Network Concepts, Latency & Simulation (1301-1315)/1317-network-sample-b/
18+
19+
- games/network_sample_c →
20+
samples/Phase 13 - Network Concepts, Latency & Simulation (1301-1315)/1318-network-sample-c/
21+
22+
## Required Steps
23+
24+
1. MOVE (not copy)
25+
Move all files/folders from:
26+
- games/network_sample_a
27+
- games/network_sample_b
28+
- games/network_sample_c
29+
30+
into the corrected Phase 13 path above.
31+
32+
2. PRESERVE BEHAVIOR
33+
- Fix only relative paths required due to relocation
34+
- Do NOT refactor logic
35+
36+
3. UPDATE samples/index
37+
Add tiles for:
38+
- 1316 — Network Sample A
39+
- 1317 — Network Sample B
40+
- 1318 — Network Sample C
41+
42+
Each tile must launch the correct relocated entrypoint.
43+
44+
4. UPDATE games/index.html
45+
- REMOVE all references to:
46+
- network_sample_a
47+
- network_sample_b
48+
- network_sample_c
49+
50+
5. CLEANUP
51+
- Remove original folders:
52+
- games/network_sample_a
53+
- games/network_sample_b
54+
- games/network_sample_c
55+
56+
## Rules
57+
- Do NOT modify other games
58+
- Do NOT change template
59+
- Do NOT refactor engine/shared
60+
- Fail fast if pathing is unclear
61+
62+
## Acceptance Criteria
63+
- All three samples exist in corrected Phase 13 directory
64+
- samples/index tiles work (1316–1318)
65+
- games/index.html no longer references network samples
66+
- Original folders removed
67+
- Behavior preserved
68+
69+
## Output
70+
<project folder>/tmp/BUILD_PR_NETWORK_SAMPLES_RELOCATION_FROM_GAMES_TO_SAMPLES_delta.zip

games/index.html

Lines changed: 0 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -239,45 +239,6 @@ <h3>Level 6 - AI Systems</h3>
239239
</a>
240240
</div>
241241

242-
<section class="playableLevel">
243-
<h3>Level 11 - Network Games</h3>
244-
<p>This level focuses on network concepts, latency, and simulation readiness while keeping the first validation path local, observable, and safe to debug. Network Samples A through C align to Phase 13 - Network Concepts, Latency &amp; Simulation (1301-1315).</p>
245-
<div class="grid">
246-
<div class="card">
247-
<img class="thumb" src="/games/network_sample_a/assets/preview.svg" alt="Network Sample A gameplay preview" />
248-
<div class="cardBody">
249-
<div class="tagRow"><span class="badge playable">Playable Now</span><span class="badge debug-showcase">Debug Showcase</span></div>
250-
<div class="cardTitle">Network Sample A - Local Loopback / Fake Network</div>
251-
<div class="cardDesc">Local loopback network simulation that exposes connection state, synthetic latency, replication-style updates, and trace events through the debug surface platform.</div>
252-
<div class="showcaseCardMeta">Play: <a href="/games/network_sample_a/index.html">/games/network_sample_a/index.html</a> | Debug Mode: <a href="/games/network_sample_a/index.html?debug=1">/games/network_sample_a/index.html?debug=1</a></div>
253-
<div class="showcaseCardMeta">Docs: <a href="/docs/release/debug_showcase_tour.md">Debug Tour</a>, <a href="/docs/release/debug_showcase_getting_started.md">Getting Started</a>.</div>
254-
<div class="showcaseCardMeta">Onboarding: Open Play first to confirm baseline loopback behavior, then open Debug Mode to inspect connection state, RTT, and trace events intentionally.</div>
255-
</div>
256-
</div>
257-
<div class="card">
258-
<img class="thumb" src="/games/network_sample_b/assets/preview.svg" alt="Network Sample B gameplay preview" />
259-
<div class="cardBody">
260-
<div class="tagRow"><span class="badge playable">Playable Now</span><span class="badge debug-showcase">Debug Showcase</span></div>
261-
<div class="cardTitle">Network Sample B - Host / Client Diagnostics</div>
262-
<div class="cardDesc">Host/client diagnostics simulation with multi-peer provider snapshots, ownership/authority visibility, and replication-focused debug command surfaces.</div>
263-
<div class="showcaseCardMeta">Play: <a href="/games/network_sample_b/index.html">/games/network_sample_b/index.html</a> | Debug Mode: <a href="/games/network_sample_b/index.html?debug=1">/games/network_sample_b/index.html?debug=1</a></div>
264-
<div class="showcaseCardMeta">Docs: <a href="/docs/release/debug_showcase_tour.md">Debug Tour</a>, <a href="/docs/release/debug_showcase_getting_started.md">Getting Started</a>.</div>
265-
<div class="showcaseCardMeta">Onboarding: Start in Play to verify host/client baseline flow, then open Debug Mode for peer connection, authority, and replication inspection.</div>
266-
</div>
267-
</div>
268-
<div class="card">
269-
<img class="thumb" src="/games/network_sample_c/assets/preview.svg" alt="Network Sample C gameplay preview" />
270-
<div class="cardBody">
271-
<div class="tagRow"><span class="badge playable">Playable Now</span><span class="badge debug-showcase">Debug Showcase</span></div>
272-
<div class="cardTitle">Network Sample C - Divergence / Trace Validation</div>
273-
<div class="cardDesc">Deterministic divergence validation sample with trace sequencing, mismatch explanation notes, reproduction guidance, and checklist-driven validation flow.</div>
274-
<div class="showcaseCardMeta">Play: <a href="/games/network_sample_c/index.html">/games/network_sample_c/index.html</a> | Debug Mode: <a href="/games/network_sample_c/index.html?debug=1">/games/network_sample_c/index.html?debug=1</a></div>
275-
<div class="showcaseCardMeta">Docs: <a href="/docs/release/debug_showcase_tour.md">Debug Tour</a>, <a href="/docs/release/debug_showcase_getting_started.md">Getting Started</a>.</div>
276-
<div class="showcaseCardMeta">Onboarding: Open Play first to confirm deterministic baseline sequencing, then open Debug Mode for divergence, trace, and validation inspection.</div>
277-
</div>
278-
</div>
279-
</div>
280-
</section>
281242
</section>
282243

283244
<section class="section">
@@ -402,9 +363,6 @@ <h3>Level 10 - Full Systems</h3>
402363
<h3>Level 11 - Network Games</h3>
403364
<p></p>
404365
<ul>
405-
<li>Network Sample A <span class="inline-status">(Debug Showcase)</span></li>
406-
<li>Network Sample B <span class="inline-status">(Debug Showcase)</span></li>
407-
<li>Network Sample C <span class="inline-status">(Debug Showcase)</span></li>
408366
<li>Tic Tac Toe</li>
409367
<li>Connect Four</li>
410368
<li>Othello</li>

games/network_sample_a/.dockerignore renamed to samples/Phase 13 - Network Concepts, Latency & Simulation (1301-1315)/1316-network-sample-a/.dockerignore

File renamed without changes.

games/network_sample_a/assets/preview.svg renamed to samples/Phase 13 - Network Concepts, Latency & Simulation (1301-1315)/1316-network-sample-a/assets/preview.svg

File renamed without changes.

games/network_sample_a/debug/networkSampleADebug.js renamed to samples/Phase 13 - Network Concepts, Latency & Simulation (1301-1315)/1316-network-sample-a/debug/networkSampleADebug.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import {
1212
commandLinesForTrace,
1313
getCommandSnapshot,
1414
toNetworkSnapshot
15-
} from "../../../src/shared/utils/networkDebugUtils.js";
15+
} from "../../../../src/shared/utils/networkDebugUtils.js";
1616

1717
const NETWORK_SAMPLE_KEY = "networkSampleA";
1818

games/network_sample_a/game/FakeLoopbackNetworkModel.js renamed to samples/Phase 13 - Network Concepts, Latency & Simulation (1301-1315)/1316-network-sample-a/game/FakeLoopbackNetworkModel.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ FakeLoopbackNetworkModel.js
66
*/
77

88
import { clamp } from '/src/engine/utils/math.js';
9-
import { asPositiveNumber } from '../../../src/shared/utils/numberUtils.js';
9+
import { asPositiveNumber } from '../../../../src/shared/utils/numberUtils.js';
1010

1111
const MAX_TRACE_EVENTS = 80;
1212

0 commit comments

Comments
 (0)