|
| 1 | +# BUILD_PR_LEVEL_12_9_NETWORK_USAGE_SAMPLE_STANDARDIZATION |
| 2 | + |
| 3 | +## Build Scope |
| 4 | +Standardize network-usage sample imports against the normalized network structure while keeping sample behavior unchanged. |
| 5 | + |
| 6 | +## One PR Purpose Only |
| 7 | +Network usage sample standardization only. |
| 8 | + |
| 9 | +## Source Standard |
| 10 | +Use the normalized network structure as the standard: |
| 11 | +- `src/engine/network/transport/` |
| 12 | +- `src/engine/network/session/` |
| 13 | +- `src/engine/network/server/` |
| 14 | +- `src/engine/network/client/` |
| 15 | +- `src/engine/network/replication/` |
| 16 | +- `src/engine/network/bootstrap/` |
| 17 | +- `src/engine/network/debug/` |
| 18 | + |
| 19 | +## Import Policy |
| 20 | +All targeted sample scenes must consume the network API through: |
| 21 | +- `src/engine/network/index.js` |
| 22 | + |
| 23 | +Do not import network internals through deep sample-facing paths unless `index.js` already re-exports them. |
| 24 | +If required, update `src/engine/network/index.js` export coverage to preserve sample behavior without changing sample runtime logic. |
| 25 | + |
| 26 | +## Targets |
| 27 | +- `samples/phase-13/1301/NetworkingLayerScene.js` |
| 28 | +- `samples/phase-13/1302/StateSyncReplicationScene.js` |
| 29 | +- `samples/phase-13/1304/ClientPredictionReconciliationScene.js` |
| 30 | +- `samples/phase-13/1305/SerializationSystemScene.js` |
| 31 | +- `samples/phase-13/1306/NetworkDebugOverlayScene.js` |
| 32 | +- `samples/phase-13/1307/RemoteEntityInterpolationScene.js` |
| 33 | +- `samples/phase-13/1308/LobbySessionSystemScene.js` |
| 34 | +- `samples/phase-13/1310/HostServerBootstrapScene.js` |
| 35 | +- `samples/phase-13/1311/InterestManagementScene.js` |
| 36 | +- `samples/phase-13/1312/LagPacketLossSimulationScene.js` |
| 37 | +- `samples/phase-13/1314/ChatPresenceLayerScene.js` |
| 38 | +- `samples/phase-13/1315/RollbackReplayDiagnosticsScene.js` |
| 39 | + |
| 40 | +## Required Implementation Rules |
| 41 | +1. Lock sample network imports to `src/engine/network/index.js` |
| 42 | +2. Remove deep or legacy flat-path usage where present |
| 43 | +3. Keep scene behavior, controls, timing, outputs, and runtime logic exactly as-is |
| 44 | +4. Normalize sample metadata/docs path references only where needed for structural accuracy |
| 45 | +5. Do not expand features |
| 46 | +6. Do not rewrite scene logic beyond import/path normalization |
| 47 | + |
| 48 | +## Testable PR Requirement |
| 49 | +This PR must remain testable and must not be commit-only. |
| 50 | + |
| 51 | +## Validation Plan |
| 52 | +### Import / Path Resolution |
| 53 | +- confirm all target sample files resolve network imports through `src/engine/network/index.js` |
| 54 | +- confirm no stale deep/legacy flat imports remain in the targeted sample set |
| 55 | + |
| 56 | +### Runtime Smoke |
| 57 | +- network runtime smoke boot |
| 58 | +- transport/session lifecycle smoke |
| 59 | +- authoritative runtime boot smoke |
| 60 | +- replication/apply smoke |
| 61 | + |
| 62 | +### Regression Protection |
| 63 | +- focused 2D regression smoke |
| 64 | +- no sample behavior drift in targeted phase-13 scenes |
| 65 | + |
| 66 | +## Roadmap Rule |
| 67 | +Update: |
| 68 | +`docs/dev/roadmaps/MASTER_ROADMAP_HIGH_LEVEL.md` |
| 69 | + |
| 70 | +Allowed: |
| 71 | +- status markers only: `[ ]` `[.]` `[x]` |
| 72 | + |
| 73 | +Forbidden: |
| 74 | +- wording edits |
| 75 | +- structure edits |
| 76 | +- additions |
| 77 | +- deletions |
| 78 | + |
| 79 | +## Marker Progress |
| 80 | +- planning step: no marker change |
| 81 | +- BUILD/APPLY: marker-only updates based strictly on execution-backed evidence |
| 82 | + |
| 83 | +## Acceptance Criteria |
| 84 | +- all targeted samples use the standardized network import policy |
| 85 | +- no targeted sample behavior changes |
| 86 | +- runtime smoke validations pass |
| 87 | +- focused 2D regression smoke passes |
| 88 | +- roadmap updated by marker only if execution-backed validation succeeds |
0 commit comments