|
| 1 | +Toolbox Aid |
| 2 | +David Quesenberry |
| 3 | +04/06/2026 |
| 4 | +BUILD_PR_DEBUG_SURFACES_NETWORK_PROMOTION.md |
| 5 | + |
1 | 6 | # BUILD_PR_DEBUG_SURFACES_NETWORK_PROMOTION |
2 | 7 |
|
3 | | -## Purpose |
4 | | -Translate the approved promotion plan into an executable build package describing the exact target structure, ownership map, migration order, validation checklist, and rollback rules for promoting network debug surfaces. |
| 8 | +## Build Summary |
| 9 | +Define the implementation shape for promoting reusable network debug capabilities into a shared `engine/debug/network` layer while keeping sample scenarios and adapters project-owned. |
| 10 | + |
| 11 | +## Workflow Discipline |
| 12 | +PLAN_PR -> BUILD_PR -> APPLY_PR |
| 13 | + |
| 14 | +## Scope |
| 15 | +- create reusable network debug modules under `engine/debug/network` |
| 16 | +- keep engine core unchanged in this slice |
| 17 | +- keep data flow read-only for providers/panels/dashboard |
| 18 | +- preserve sample-level integration for Sample A/B/C |
5 | 19 |
|
6 | | -## Authoritative Target Structure |
| 20 | +## Target Structure |
7 | 21 | ```text |
8 | | -src/engine/debug/network/ |
| 22 | +engine/debug/network/ |
| 23 | + index.js |
| 24 | + shared/ |
| 25 | + networkDebugUtils.js |
9 | 26 | providers/ |
| 27 | + networkDebugProviderRegistry.js |
10 | 28 | panels/ |
| 29 | + networkDebugPanelRegistry.js |
11 | 30 | commands/ |
| 31 | + networkDebugCommandPackBridge.js |
| 32 | + bootstrap/ |
| 33 | + createNetworkDebugSurfaceIntegration.js |
12 | 34 | dashboard/ |
| 35 | + serverDashboardHost.js |
| 36 | + serverDashboardRegistry.js |
| 37 | + serverDashboardProviders.js |
| 38 | + serverDashboardRenderer.js |
13 | 39 | diagnostics/ |
14 | | - bootstrap/ |
| 40 | + divergenceDiagnosticsModel.js |
| 41 | + latencyDiagnosticsModel.js |
| 42 | + replicationDiagnosticsModel.js |
15 | 43 | ``` |
16 | 44 |
|
17 | | -## Minimal Core Contract Area |
18 | | -```text |
19 | | -src/engine/core/debug/ |
20 | | - NetworkDebugContracts.js |
21 | | - NetworkDebugRegistrationHooks.js |
22 | | - NetworkDebugGate.js |
23 | | -``` |
24 | | - |
25 | | -## Ownership Matrix |
26 | | -| Component | Destination | |
27 | | -|---|---| |
28 | | -| Shared network providers | engine/debug/network | |
29 | | -| Shared network panels | engine/debug/network | |
30 | | -| Shared network commands | engine/debug/network | |
31 | | -| Server dashboard host/registry/renderer | engine/debug/network/dashboard | |
32 | | -| Divergence/trace presentation helpers | engine/debug/network/diagnostics | |
33 | | -| Synthetic sample feeds | project/sample-owned | |
34 | | -| Scenario wiring | project/sample-owned | |
35 | | -| Reproduction docs | docs/pr + docs/roadmaps | |
36 | | -| Minimal registration/gating hooks | engine/core/debug | |
37 | | - |
38 | | -## Migration Order |
39 | | -1. Define minimal core contracts only. |
40 | | -2. Extract shared providers. |
41 | | -3. Extract shared panels/renderers. |
42 | | -4. Extract shared commands. |
43 | | -5. Extract dashboard foundation/enhancements. |
44 | | -6. Add bootstrap/composition layer. |
45 | | -7. Reconnect sample integrations through public registration. |
46 | | -8. Run full validation across samples/dashboard. |
47 | | - |
48 | | -## Guardrails |
49 | | -- No redesign during extraction. |
50 | | -- No runtime feature expansion. |
51 | | -- No server product UI work. |
52 | | -- No console-overlay-dashboard coupling. |
53 | | -- No sample-specific scenario logic in shared layers. |
| 45 | +## Ownership Model |
| 46 | +- shared reusable logic: `engine/debug/network` |
| 47 | +- sample-specific scenarios and local adapters: `games/network_sample_*` |
| 48 | +- engine core: no implementation changes in this promotion slice |
54 | 49 |
|
55 | | -## Validation Checklist |
56 | | -- Sample A passes. |
57 | | -- Sample B passes. |
58 | | -- Sample C passes. |
59 | | -- Dashboard renders and refreshes. |
60 | | -- Latency/trace/divergence outputs remain correct. |
61 | | -- Public command paths remain intact. |
62 | | -- Debug-only gating remains intact. |
| 50 | +## Validation Targets |
| 51 | +- network shared modules import successfully |
| 52 | +- Sample A/B/C debug plugins continue to expose providers/panels/commands |
| 53 | +- provider descriptors remain read-only |
| 54 | +- dashboard host/providers/renderer remain observational only |
63 | 55 |
|
64 | | -## Rollback Rule |
65 | | -If parity is broken, revert to sample-owned wiring and keep docs/history intact. |
| 56 | +## Apply Gate |
| 57 | +APPLY should wire sample plugin creation through shared network bootstrap and export the shared layer from `engine/debug/index.js` without changing combo-key behavior or core runtime contracts. |
0 commit comments