Skip to content

Commit 5e4c288

Browse files
author
DavidQ
committed
PR_07_02_NETWORK_SIMULATION_BASELINE
1 parent 1f892d0 commit 5e4c288

13 files changed

Lines changed: 112 additions & 39 deletions

docs/dev/CODEX_COMMANDS.md

Lines changed: 10 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,21 @@
1-
PR Naming Rule:
2-
ALL PRs MUST follow:
3-
PR_<SECTION>_<STEP>_<SHORT_NAME>
4-
5-
Reject any PR name that does not follow this format.
6-
71
MODEL: GPT-5.4
8-
REASONING: high
2+
REASONING: medium
93

104
COMMAND:
11-
Implement PR_06_06_SAMPLE_ENGINE_DEPENDENCY_CLEANUP.
5+
Implement PR_07_02_NETWORK_SIMULATION_BASELINE.
126

137
Goal:
14-
Remove sample dependencies on non-public engine internals by standardizing samples onto approved public/shared surfaces only.
8+
Establish deterministic simulation baseline.
159

16-
Required steps:
17-
1. Produce docs/dev/reports/sample_dependency_scan.txt for non-public engine dependencies used by samples in scope.
18-
2. Produce docs/dev/reports/dependency_cleanup_map.txt with exact source -> approved target mapping.
19-
3. Update sample consumers in scope to approved public/shared surfaces only.
20-
4. Remove only the direct dependency violations resolved by this PR.
21-
5. Keep changes surgical.
10+
Steps:
11+
1. Define simulation tick model.
12+
2. Ensure deterministic update loop.
13+
3. Validate consistency.
2214

2315
Rules:
24-
- samples dependency cleanup only
25-
- no engine logic refactors
26-
- no API redesign
16+
- no networking
17+
- no latency modeling
2718
- no behavior changes
28-
- no broad cleanup
29-
30-
Validation:
31-
- impacted imports resolve
32-
- non-public engine dependency violations in scope removed
33-
- runtime/sample navigation not regressed
34-
- impacted tests/smoke pass
3519

3620
Return ZIP:
37-
<project folder>/tmp/PR_06_06_SAMPLE_ENGINE_DEPENDENCY_CLEANUP.zip
21+
<project folder>/tmp/PR_07_02_NETWORK_SIMULATION_BASELINE.zip

docs/dev/COMMIT_COMMENT.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
PR_06_06_SAMPLE_ENGINE_DEPENDENCY_CLEANUP
1+
PR_07_02_NETWORK_SIMULATION_BASELINE
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
PR_07_01_NETWORK_PHASE_STRUCTURE_VALIDATION
2+
3+
Scope
4+
- samples/phase-13
5+
- samples/index.html phase-13 entries
6+
7+
Checks performed
8+
1. Folder structure scan:
9+
- Found canonical directories 1301..1318 (18 total), no gaps.
10+
11+
2. Required entry files:
12+
- Every phase-13 sample directory contains index.html and main.js.
13+
14+
3. Naming validation:
15+
- For every sample 1301..1318, <title> and <h1> start with "Sample <id>".
16+
- No ID/title/header mismatches detected.
17+
18+
4. Navigation references:
19+
- samples/index.html contains links for 1301..1318 under Phase 13.
20+
- Link path format is canonical ./phase-13/<id>/index.html.
21+
22+
Inconsistencies found
23+
- None.
24+
25+
Fixes applied
26+
- No code or sample content changes required.
27+
28+
Validation
29+
- node tests/runtime/LaunchSmokeAllEntries.test.mjs (pass)
Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
[ ] sample_dependency_scan.txt generated
2-
[ ] dependency_cleanup_map.txt generated
3-
[ ] non-public engine dependencies removed in scope
4-
[ ] no behavior changes
5-
[ ] imports resolve
6-
[ ] impacted tests/smoke pass
1+
[ ] simulation tick model defined
2+
[ ] deterministic loop confirmed
3+
[ ] consistency validated
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# PR_07_01_NETWORK_PHASE_STRUCTURE_VALIDATION
2+
3+
## Purpose
4+
Validate and stabilize Phase 13 (Network Concepts / Latency / Simulation) structure.
5+
6+
## Scope
7+
- structure validation only
8+
- no behavior changes
9+
- no network logic implementation
10+
11+
## Tasks
12+
1. Verify all phase-13 samples follow canonical structure.
13+
2. Validate naming, numbering, and placement.
14+
3. Ensure index references are correct.
15+
4. Identify structural inconsistencies.
16+
17+
## Deliverables
18+
- docs/dev/reports/network_phase_scan.txt
19+
- docs/dev/reports/validation_checklist.txt
20+
21+
## Validation
22+
- all phase-13 samples resolve correctly
23+
- no broken links
24+
- structure consistent with other phases
25+
26+
## Output
27+
<project folder>/tmp/PR_07_01_NETWORK_PHASE_STRUCTURE_VALIDATION.zip
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# PR_07_02_NETWORK_SIMULATION_BASELINE
2+
3+
## Purpose
4+
Establish deterministic simulation baseline for Phase 13.
5+
6+
## Scope
7+
- simulation timing only
8+
- no networking
9+
- no latency modeling
10+
- no behavior changes
11+
12+
## Tasks
13+
1. Define simulation tick model.
14+
2. Ensure deterministic update loop.
15+
3. Validate consistent state progression.
16+
4. Identify timing inconsistencies.
17+
18+
## Deliverables
19+
- docs/dev/reports/simulation_tick_model.txt
20+
- docs/dev/reports/validation_checklist.txt
21+
22+
## Validation
23+
- deterministic update loop confirmed
24+
- consistent state progression across runs
25+
- no regressions
26+
27+
## Output
28+
<project folder>/tmp/PR_07_02_NETWORK_SIMULATION_BASELINE.zip

samples/phase-13/1303/main.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,11 @@ main.js
77
import Engine from '/src/engine/core/Engine.js';
88
import { Theme, ThemeTokens } from '/src/engine/theme/index.js';
99
import AsteroidsWorldSystemsScene from './AsteroidsWorldSystemsScene.js';
10+
import { SIMULATION_FIXED_STEP_MS } from '/samples/phase-13/_shared/simulationBaseline.js';
1011

1112
const theme = new Theme(ThemeTokens);
1213
theme.applyDocumentTheme();
1314
const canvas = document.getElementById('game');
14-
const engine = new Engine({ canvas, width: 960, height: 540, fixedStepMs: 1000 / 60 });
15+
const engine = new Engine({ canvas, width: 960, height: 540, fixedStepMs: SIMULATION_FIXED_STEP_MS });
1516
engine.setScene(new AsteroidsWorldSystemsScene());
1617
engine.start();

samples/phase-13/1309/main.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,11 @@ main.js
77
import Engine from '/src/engine/core/Engine.js';
88
import { Theme, ThemeTokens } from '/src/engine/theme/index.js';
99
import SpaceInvadersWorldSystemsScene from './SpaceInvadersWorldSystemsScene.js';
10+
import { SIMULATION_FIXED_STEP_MS } from '/samples/phase-13/_shared/simulationBaseline.js';
1011

1112
const theme = new Theme(ThemeTokens);
1213
theme.applyDocumentTheme();
1314
const canvas = document.getElementById('game');
14-
const engine = new Engine({ canvas, width: 960, height: 540, fixedStepMs: 1000 / 60 });
15+
const engine = new Engine({ canvas, width: 960, height: 540, fixedStepMs: SIMULATION_FIXED_STEP_MS });
1516
engine.setScene(new SpaceInvadersWorldSystemsScene());
1617
engine.start();

samples/phase-13/1313/main.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,11 @@ main.js
77
import Engine from '/src/engine/core/Engine.js';
88
import { Theme, ThemeTokens } from '/src/engine/theme/index.js';
99
import PacmanLiteWorldSystemsScene from './PacmanLiteWorldSystemsScene.js';
10+
import { SIMULATION_FIXED_STEP_MS } from '/samples/phase-13/_shared/simulationBaseline.js';
1011

1112
const theme = new Theme(ThemeTokens);
1213
theme.applyDocumentTheme();
1314
const canvas = document.getElementById('game');
14-
const engine = new Engine({ canvas, width: 960, height: 540, fixedStepMs: 1000 / 60 });
15+
const engine = new Engine({ canvas, width: 960, height: 540, fixedStepMs: SIMULATION_FIXED_STEP_MS });
1516
engine.setScene(new PacmanLiteWorldSystemsScene());
1617
engine.start();

samples/phase-13/1316/main.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import { resolveDebugConfig } from "../../_shared/debugConfigUtils.js";
1111
import { createSampleGameDevConsoleIntegration } from "../../../tools/dev/devConsoleIntegration.js";
1212
import { createNetworkSampleADebugPlugin } from "./debug/networkSampleADebug.js";
1313
import NetworkSampleAScene from "./game/NetworkSampleAScene.js";
14+
import { SIMULATION_FIXED_STEP_MS } from "/samples/phase-13/_shared/simulationBaseline.js";
1415

1516
const theme = new Theme(ThemeTokens);
1617

@@ -63,7 +64,7 @@ export function bootNetworkSampleA({
6364
canvas,
6465
width: 960,
6566
height: 720,
66-
fixedStepMs: 1000 / 60,
67+
fixedStepMs: SIMULATION_FIXED_STEP_MS,
6768
input
6869
});
6970

0 commit comments

Comments
 (0)