|
| 1 | +# Tool Launch SSoT Data Layer Validation |
| 2 | + |
| 3 | +## Exact SSoT File Path |
| 4 | + |
| 5 | +- `tools/shared/toolLaunchSSoTData.js` |
| 6 | + |
| 7 | +## Changed Files |
| 8 | + |
| 9 | +- `tools/shared/toolLaunchSSoTData.js` |
| 10 | +- `tools/shared/toolLaunchSSoT.js` |
| 11 | +- `samples/index.render.js` |
| 12 | +- `games/index.render.js` |
| 13 | +- `docs/dev/reports/tool_launch_ssot_data_layer_validation.md` |
| 14 | + |
| 15 | +## List of Launch IDs |
| 16 | + |
| 17 | +Command output: |
| 18 | + |
| 19 | +```text |
| 20 | +launchIdsCount 18 |
| 21 | +launchIds [ |
| 22 | + 'tool.vector-map-editor', |
| 23 | + 'tool.vector-asset-studio', |
| 24 | + 'tool.tile-map-editor', |
| 25 | + 'tool.parallax-editor', |
| 26 | + 'tool.sprite-editor', |
| 27 | + 'tool.skin-editor', |
| 28 | + 'tool.asset-browser', |
| 29 | + 'tool.palette-browser', |
| 30 | + 'tool.state-inspector', |
| 31 | + 'tool.replay-visualizer', |
| 32 | + 'tool.performance-profiler', |
| 33 | + 'tool.physics-sandbox', |
| 34 | + 'tool.asset-pipeline-tool', |
| 35 | + 'tool.tile-model-converter', |
| 36 | + 'tool.3d-json-payload-normalizer', |
| 37 | + 'tool.3d-asset-viewer', |
| 38 | + 'tool.3d-camera-path-editor', |
| 39 | + 'workspace-manager.game-to-workspace' |
| 40 | +] |
| 41 | +``` |
| 42 | + |
| 43 | +Launch id structure is defined in SSoT data layer: |
| 44 | + |
| 45 | +- `tools/shared/toolLaunchSSoTData.js:55` |
| 46 | +- `tools/shared/toolLaunchSSoTData.js:65` |
| 47 | + |
| 48 | +## Proof Sample Actions Still Say `Open <tool>` |
| 49 | + |
| 50 | +- `samples/index.render.js:104` |
| 51 | + |
| 52 | +```text |
| 53 | +const label = `Open ${normalize(tool.displayName) || normalize(tool.name) || toolId}`; |
| 54 | +``` |
| 55 | + |
| 56 | +## Proof Game Actions Still Say `Open with Workspace Manager` |
| 57 | + |
| 58 | +- `games/index.render.js:263` |
| 59 | + |
| 60 | +```text |
| 61 | +Open with Workspace Manager |
| 62 | +``` |
| 63 | + |
| 64 | +## Proof Sample Target Paths Come From SSoT |
| 65 | + |
| 66 | +1. Sample launch resolution now reads launch metadata from SSoT data layer: |
| 67 | + |
| 68 | +- `tools/shared/toolLaunchSSoT.js:68` |
| 69 | +- `tools/shared/toolLaunchSSoT.js:72` |
| 70 | + |
| 71 | +2. Sample launch target path is defined in SSoT data layer as `targetPath`: |
| 72 | + |
| 73 | +- `tools/shared/toolLaunchSSoTData.js:53` |
| 74 | +- `tools/shared/toolLaunchSSoTData.js:57` |
| 75 | + |
| 76 | +3. Sample UI launch call passes source/type context and uses resolver: |
| 77 | + |
| 78 | +- `samples/index.render.js:92` |
| 79 | +- `samples/index.render.js:93` |
| 80 | +- `samples/index.render.js:94` |
| 81 | + |
| 82 | +Command output proof: |
| 83 | + |
| 84 | +```text |
| 85 | +sampleDefinition { |
| 86 | + launchDefinition: { |
| 87 | + launchId: 'tool.sprite-editor', |
| 88 | + displayName: 'Sprite Editor', |
| 89 | + targetPath: '/tools/Sprite%20Editor/index.html', |
| 90 | + allowedLaunchSources: [ 'samples', 'tools', 'workspace', 'internal' ], |
| 91 | + allowedLaunchTypes: [ 'sample-to-tool', 'tool-internal', 'workspace-internal' ] |
| 92 | + }, |
| 93 | + error: '' |
| 94 | +} |
| 95 | +sampleLaunch { |
| 96 | + href: '/tools/Sprite%20Editor/index.html?sampleId=1208&sampleTitle=Tool+Formatted+Tiles+Parallax', |
| 97 | + error: '' |
| 98 | +} |
| 99 | +``` |
| 100 | + |
| 101 | +## Proof Game Workspace Manager Target Path Comes From SSoT |
| 102 | + |
| 103 | +1. Game launch resolution now reads workspace launch metadata from SSoT data layer: |
| 104 | + |
| 105 | +- `tools/shared/toolLaunchSSoT.js:101` |
| 106 | +- `tools/shared/toolLaunchSSoT.js:105` |
| 107 | + |
| 108 | +2. Workspace Manager target path is defined in SSoT data layer as `targetPath`: |
| 109 | + |
| 110 | +- `tools/shared/toolLaunchSSoTData.js:67` |
| 111 | + |
| 112 | +3. Game UI launch call passes source/type context and uses resolver: |
| 113 | + |
| 114 | +- `games/index.render.js:148` |
| 115 | +- `games/index.render.js:149` |
| 116 | +- `games/index.render.js:150` |
| 117 | + |
| 118 | +Command output proof: |
| 119 | + |
| 120 | +```text |
| 121 | +gameDefinition { |
| 122 | + launchDefinition: { |
| 123 | + launchId: 'workspace-manager.game-to-workspace', |
| 124 | + displayName: 'Workspace Manager', |
| 125 | + targetPath: '/tools/Workspace%20Manager/index.html', |
| 126 | + allowedLaunchSources: [ 'games', 'workspace', 'internal' ], |
| 127 | + allowedLaunchTypes: [ 'game-to-workspace', 'workspace-internal' ] |
| 128 | + }, |
| 129 | + error: '' |
| 130 | +} |
| 131 | +gameLaunch { |
| 132 | + href: '/tools/Workspace%20Manager/index.html?gameId=2001&mount=game', |
| 133 | + error: '' |
| 134 | +} |
| 135 | +``` |
| 136 | + |
| 137 | +## Proof External Launch Memory Clear Remains Intact |
| 138 | + |
| 139 | +Code path remains: |
| 140 | + |
| 141 | +- `tools/shared/toolLaunchSSoT.js:121` |
| 142 | +- `tools/shared/toolLaunchSSoT.js:138` |
| 143 | +- `samples/index.render.js:539` |
| 144 | +- `games/index.render.js:419` |
| 145 | + |
| 146 | +Command output proof: |
| 147 | + |
| 148 | +```text |
| 149 | +clearResult true |
| 150 | +localAfterClear [ [ 'keep.one', 'x' ] ] |
| 151 | +sessionAfterClear [ [ 'keep.two', 'y' ] ] |
| 152 | +launchResult true |
| 153 | +assignCalls [ '/tools/Workspace%20Manager/index.html?gameId=2001&mount=game' ] |
| 154 | +localAfterLaunch [ [ 'keep.one', 'x' ] ] |
| 155 | +sessionAfterLaunch [ [ 'keep.two', 'y' ] ] |
| 156 | +``` |
| 157 | + |
| 158 | +## Proof Missing Target Does Not Fallback |
| 159 | + |
| 160 | +1. Missing/invalid SSoT launch target id does not route and returns visible error: |
| 161 | + |
| 162 | +```text |
| 163 | +missingSsotTarget { href: '', error: 'Tool "not-a-real-tool" is not registered.' } |
| 164 | +``` |
| 165 | + |
| 166 | +2. Invalid source/type for an SSoT launch id does not route and returns visible error: |
| 167 | + |
| 168 | +```text |
| 169 | +disallowedSource { |
| 170 | + href: '', |
| 171 | + error: 'Launch "workspace-manager.game-to-workspace" does not allow source "samples".' |
| 172 | +} |
| 173 | +``` |
| 174 | + |
| 175 | +3. Guard rails are explicit in SSoT data + resolver: |
| 176 | + |
| 177 | +- `tools/shared/toolLaunchSSoTData.js:100` |
| 178 | +- `tools/shared/toolLaunchSSoTData.js:121` |
| 179 | +- `tools/shared/toolLaunchSSoT.js:69` |
| 180 | +- `tools/shared/toolLaunchSSoT.js:102` |
| 181 | + |
| 182 | +## Static Validation |
| 183 | + |
| 184 | +Commands run: |
| 185 | + |
| 186 | +```bash |
| 187 | +node --check tools/shared/toolLaunchSSoTData.js |
| 188 | +node --check tools/shared/toolLaunchSSoT.js |
| 189 | +node --check samples/index.render.js |
| 190 | +node --check games/index.render.js |
| 191 | +``` |
| 192 | + |
| 193 | +All commands exited successfully. |
| 194 | + |
| 195 | +## Anti-Pattern Self-Check |
| 196 | + |
| 197 | +- One launch SSoT data layer added; no second launch-path source introduced in touched flow. |
| 198 | +- No fallback/default route/tool/workspace logic added. |
| 199 | +- No duplicate event listeners introduced. |
| 200 | +- No new globals/managers/factories/service layers introduced. |
| 201 | +- No unrelated cleanup or scope expansion. |
0 commit comments