|
| 1 | +Toolbox Aid |
| 2 | +David Quesenberry |
| 3 | +04/06/2026 |
| 4 | +PLAN_PR_DEBUG_SURFACES_NETWORK_PROMOTION.md |
| 5 | + |
| 6 | +# PLAN_PR_DEBUG_SURFACES_NETWORK_PROMOTION |
| 7 | + |
| 8 | +## Purpose |
| 9 | +Define a docs-first promotion path for proven network debug capabilities into reusable ownership, while keeping engine core limited to minimal contracts/hooks and preserving sample-owned scenario logic. |
| 10 | + |
| 11 | +## Workflow Discipline |
| 12 | +PLAN_PR -> BUILD_PR -> APPLY_PR |
| 13 | + |
| 14 | +## PR Scope |
| 15 | +This PLAN PR is documentation only. It does not move implementation code. |
| 16 | + |
| 17 | +## Goals |
| 18 | +- promote reusable network debug capability into shared ownership under `engine/debug/network` |
| 19 | +- keep engine core contract-only for minimal debug hooks/interfaces |
| 20 | +- keep sample-specific scenarios, feeds, and local adapters project-owned |
| 21 | +- preserve read-only data flow and debug-only access behavior |
| 22 | +- preserve console/overlay decoupling from dashboard internals |
| 23 | + |
| 24 | +## Non-Goals |
| 25 | +- no engine core implementation changes |
| 26 | +- no runtime transport/protocol changes |
| 27 | +- no dashboard feature expansion beyond proven debug scope |
| 28 | +- no sample scenario promotion into shared layer |
| 29 | +- no containerization/deployment changes |
| 30 | + |
| 31 | +## Target Structure (Promotion Direction) |
| 32 | +```text |
| 33 | +engine/ |
| 34 | + core/ |
| 35 | + debug/ |
| 36 | + NetworkDebugContracts.js |
| 37 | + NetworkDebugRegistrationHooks.js |
| 38 | + NetworkDebugGateHooks.js |
| 39 | + debug/ |
| 40 | + network/ |
| 41 | + bootstrap/ |
| 42 | + createNetworkDebugSurfaceIntegration.js |
| 43 | + providers/ |
| 44 | + networkDebugProviderRegistry.js |
| 45 | + networkDebugSnapshotNormalizer.js |
| 46 | + panels/ |
| 47 | + networkDebugPanelRegistry.js |
| 48 | + networkDebugPanelRenderer.js |
| 49 | + commands/ |
| 50 | + networkDebugCommandPackBridge.js |
| 51 | + dashboard/ |
| 52 | + serverDashboardHost.js |
| 53 | + serverDashboardRegistry.js |
| 54 | + serverDashboardProviders.js |
| 55 | + serverDashboardRenderer.js |
| 56 | + diagnostics/ |
| 57 | + divergenceDiagnosticsModel.js |
| 58 | + latencyDiagnosticsModel.js |
| 59 | + replicationDiagnosticsModel.js |
| 60 | +
|
| 61 | +tools/ |
| 62 | + dev/ |
| 63 | + server-dashboard/ |
| 64 | + (project-owned docs/integration notes and optional local adapters) |
| 65 | +
|
| 66 | +games/ |
| 67 | + network_sample_*/ |
| 68 | + (sample-specific scenarios, synthetic feeds, local adapters remain here) |
| 69 | +``` |
| 70 | + |
| 71 | +## Ownership Matrix |
| 72 | +| Area | Owner | Scope | |
| 73 | +|---|---|---| |
| 74 | +| Minimal contracts/hooks | `engine/core/debug` | registration hooks, environment gating, narrow interfaces only | |
| 75 | +| Reusable network debug implementation | `engine/debug/network` | shared providers/panels/commands/dashboard foundation/diagnostics helpers | |
| 76 | +| Sample scenarios and synthetic feeds | project/sample folders | Sample A/B/C deterministic scenarios and local adapters | |
| 77 | +| Tool-local helper glue | `tools/dev` + project | temporary adapters, local stubs, project-specific sections | |
| 78 | +| Engine core UI behavior | not allowed | core must not own console/overlay/dashboard rendering policy | |
| 79 | + |
| 80 | +## Migration Phases |
| 81 | +1. Proven Capability Inventory |
| 82 | +Identify stable network debug pieces already validated in sample flow (panels, providers, commands, dashboard foundation). |
| 83 | + |
| 84 | +2. Shared-vs-Local Split |
| 85 | +Tag each artifact as shared (`engine/debug/network`) or local (sample/project/tool) with explicit non-promotion exclusions. |
| 86 | + |
| 87 | +3. Contract Freeze |
| 88 | +Define minimal core hook contracts required for shared registration/gating. Keep contracts narrow and implementation-free. |
| 89 | + |
| 90 | +4. Shared Layer Assembly |
| 91 | +Define extraction map into `engine/debug/network` for providers, panels, command bridge, dashboard foundation, and diagnostics helpers. |
| 92 | + |
| 93 | +5. Sample Rebind Strategy |
| 94 | +Define sample-level adapter rewiring to consume shared components while retaining local scenarios/feeds. |
| 95 | + |
| 96 | +6. Promotion Readiness Review |
| 97 | +Run validation matrix and risk controls before BUILD/APPLY execution. |
| 98 | + |
| 99 | +## Validation Strategy |
| 100 | +### Functional Parity |
| 101 | +- Sample A/B/C panels/providers/commands remain behavior-compatible after promotion path definition. |
| 102 | + |
| 103 | +### Boundary Validation |
| 104 | +- shared layer consumes public selectors/events only |
| 105 | +- no private runtime mutation hooks introduced |
| 106 | +- dashboard remains independent from console/overlay internals |
| 107 | + |
| 108 | +### Data Flow Validation |
| 109 | +- provider-to-renderer path remains read-only |
| 110 | +- dashboard/diagnostics views remain observational only |
| 111 | + |
| 112 | +### Gating Validation |
| 113 | +- debug-only access contracts remain explicit |
| 114 | +- combo key behavior is unaffected by network promotion design |
| 115 | + |
| 116 | +## Risk Controls |
| 117 | +### Risk: over-promoting sample-specific logic |
| 118 | +Control: require explicit ownership matrix tagging with non-promote list. |
| 119 | + |
| 120 | +### Risk: core-layer scope creep |
| 121 | +Control: permit only minimal contract/hook surface in `engine/core/debug`. |
| 122 | + |
| 123 | +### Risk: coupling dashboard with console/overlay internals |
| 124 | +Control: keep dashboard host/registry/providers/renderer isolated in `engine/debug/network/dashboard`. |
| 125 | + |
| 126 | +### Risk: migration regressions across samples |
| 127 | +Control: phase-gated validation matrix with sample parity checks before APPLY. |
| 128 | + |
| 129 | +## Rollout Notes |
| 130 | +- execute promotion incrementally by subsystem (providers -> panels -> commands -> dashboard -> diagnostics) |
| 131 | +- keep one PR per purpose in BUILD/APPLY sequence |
| 132 | +- preserve rollback checkpoints by phase |
| 133 | +- treat Sample C divergence/trace as proving consumer, not shared implementation source |
| 134 | + |
| 135 | +## Next Command |
| 136 | +`BUILD_PR_DEBUG_SURFACES_NETWORK_PROMOTION` |
0 commit comments