|
| 1 | +# PR 11.13 Workspace 1902 Schema Conformance Fix Report |
| 2 | + |
| 3 | +## Result |
| 4 | +PASS |
| 5 | + |
| 6 | +## Scope |
| 7 | +- Rewrote `samples/phase-19/1902/sample.1902.workspace-all-tools.json` from mixed sample/tool payload shape into a workspace-manifest-shaped document. |
| 8 | +- Added a surgical shared-shell fetch shim so tools launched from Workspace can consume tool-scoped payloads from `tools[toolId]` when the preset is a workspace manifest. |
| 9 | +- Did not modify standalone sample launch pages or `start_of_day` folders. |
| 10 | + |
| 11 | +## Schema Files Used |
| 12 | +- `tools/schemas/workspace.schema.json` |
| 13 | +- `tools/schemas/workspace.manifest.schema.json` |
| 14 | +- `tools/schemas/tools/*.schema.json` |
| 15 | + |
| 16 | +## Old JSON Shape Problems (1902) |
| 17 | +- Used sample tool payload schema instead of workspace manifest shape. |
| 18 | +- Included unsupported top-level fields for workspace manifest usage (`tool`, `activeWorkspaceTools`). |
| 19 | +- Contained copied unrelated payload sections and mixed ownership. |
| 20 | +- Included palette sidecar references. |
| 21 | + |
| 22 | +## Final JSON Shape Summary |
| 23 | +- Top-level now uses workspace-manifest identity: |
| 24 | + - `documentKind: "workspace-manifest"` |
| 25 | + - `schema: "html-js-gaming.project"` |
| 26 | + - `version`, `id`, `name` |
| 27 | +- Canonical workspace data is now grouped under: |
| 28 | + - `palettes` |
| 29 | + - `tools` |
| 30 | +- Each active workspace-supported tool now has a `tools[toolId]` payload entry with schema-required fields (`tool`, `version`, `config`) and tool-relevant explicit JSON payload data. |
| 31 | +- Removed unsupported/misplaced top-level fields and palette sidecar references. |
| 32 | + |
| 33 | +## Schema Validation Command/Result |
| 34 | +Command executed: |
| 35 | +```powershell |
| 36 | +@' |
| 37 | +const fs=require('fs'); |
| 38 | +const path=require('path'); |
| 39 | +const preset=JSON.parse(fs.readFileSync('samples/phase-19/1902/sample.1902.workspace-all-tools.json','utf8')); |
| 40 | +// validates required workspace-manifest identity fields, |
| 41 | +// forbidden old-shape fields, tool-schema required fields, |
| 42 | +// and workspace.manifest projection (palettes/tools) |
| 43 | +'@ | node - |
| 44 | +``` |
| 45 | +Practical validation run result: |
| 46 | +- `workspace_preset_validation PASS` |
| 47 | +- `toolPayloadCount 17` |
| 48 | +- `paletteIds sample-1902-workspace-palette` |
| 49 | + |
| 50 | +## Workspace Validation (More Than Palette) |
| 51 | +- Added shared-shell scoped-preset routing in `tools/shared/platformShell.js`: |
| 52 | + - When `samplePresetPath` points to a workspace-manifest JSON, tool fetch of that path receives `tools[activeToolId]` payload. |
| 53 | + - This keeps workspace manifest as SSoT while preserving existing per-tool loaders. |
| 54 | +- Launch smoke validation confirms workspace/sample/tool launch stability after change: |
| 55 | + - `npm run test:launch-smoke -- --tools` |
| 56 | + - Result: `PASS=287 FAIL=0 TOTAL=287` |
| 57 | + - Includes `sample 1902` launch PASS and all active tools PASS. |
| 58 | + |
| 59 | +## Resolved Tool IDs |
| 60 | +Included under `tools` in `sample.1902.workspace-all-tools.json`: |
| 61 | +- `vector-map-editor` |
| 62 | +- `vector-asset-studio` |
| 63 | +- `tile-map-editor` |
| 64 | +- `parallax-editor` |
| 65 | +- `sprite-editor` |
| 66 | +- `skin-editor` |
| 67 | +- `asset-browser` |
| 68 | +- `palette-browser` |
| 69 | +- `state-inspector` |
| 70 | +- `replay-visualizer` |
| 71 | +- `performance-profiler` |
| 72 | +- `physics-sandbox` |
| 73 | +- `asset-pipeline-tool` |
| 74 | +- `tile-model-converter` |
| 75 | +- `3d-json-payload-normalizer` |
| 76 | +- `3d-asset-viewer` |
| 77 | +- `3d-camera-path-editor` |
| 78 | + |
| 79 | +Excluded IDs: |
| 80 | +- None (all active workspace-supported tool IDs are present). |
| 81 | + |
| 82 | +## Confirmations |
| 83 | +- No palette sidecar references remain in sample 1902 workspace preset. |
| 84 | +- No fallback/default/hidden sample data was added. |
| 85 | +- No `start_of_day` folder changes. |
| 86 | + |
| 87 | +## Files Changed (PR 11.13 Scope) |
| 88 | +- `samples/phase-19/1902/sample.1902.workspace-all-tools.json` |
| 89 | +- `tools/shared/platformShell.js` |
| 90 | +- `docs/dev/reports/PR_11_13_WORKSPACE_1902_SCHEMA_CONFORMANCE_FIX_report.md` |
0 commit comments