|
| 1 | +# PR_10_19_SAMPLES_0204_1413_1505_JSON_SSOT_FIX Report |
| 2 | + |
| 3 | +## Scope |
| 4 | +Implemented JSON source-of-truth alignment for samples `0204`, `1413`, and `1505`, and updated Asset Browser sample-preset ingestion so paired tools consume explicit JSON data from sample preset files. |
| 5 | + |
| 6 | +## Files Changed |
| 7 | + |
| 8 | +### Sample 0204 |
| 9 | +- `samples/phase-02/0204/AssetRegistryScene.js` |
| 10 | +- `samples/phase-02/0204/main.js` |
| 11 | +- `samples/phase-02/0204/sample.0204.asset-browser.json` |
| 12 | + |
| 13 | +### Sample 1413 |
| 14 | +- `samples/phase-14/1413/AssetImportPipelineScene.js` |
| 15 | +- `samples/phase-14/1413/main.js` |
| 16 | +- `samples/phase-14/1413/sample.1413.asset-browser.json` |
| 17 | +- `samples/phase-14/1413/sample.1413.asset-pipeline-tool.json` |
| 18 | + |
| 19 | +### Sample 1505 |
| 20 | +- `samples/phase-15/1505/AssetBrowserScene.js` |
| 21 | +- `samples/phase-15/1505/main.js` |
| 22 | +- `samples/phase-15/1505/sample.1505.asset-browser.json` |
| 23 | + |
| 24 | +### Shared Tool Handoff |
| 25 | +- `tools/Asset Browser/main.js` |
| 26 | + |
| 27 | +## Source-of-Truth Migration |
| 28 | + |
| 29 | +### 0204 |
| 30 | +- Old JS ownership: `sampleAssets` array inside `AssetRegistryScene.js`. |
| 31 | +- New JSON SSoT: `samples/phase-02/0204/sample.0204.asset-browser.json` under `config.assetCatalog.entries`. |
| 32 | +- Runtime change: sample scene now loads entries from explicit JSON and registers those entries. |
| 33 | +- Tool handoff change: Asset Browser now reads `samplePresetPath` JSON `config.assetCatalog.entries` directly. |
| 34 | + |
| 35 | +### 1413 |
| 36 | +- Old JS ownership: hardcoded import input `{ id: 'hero-sprite', source: 'drop-folder' }` in `AssetImportPipelineScene.js`. |
| 37 | +- New JSON SSoT: `samples/phase-14/1413/sample.1413.asset-pipeline-tool.json` under `config.sampleImportInput` (and aligned with `config.pipelinePayload`). |
| 38 | +- Runtime change: sample scene import action consumes explicit JSON-backed import input. |
| 39 | +- Paired tool alignment: Asset Pipeline Tool already loads the same sample preset path; sample and paired tool now use the same explicit preset source. |
| 40 | + |
| 41 | +### 1505 |
| 42 | +- Old JS ownership: hardcoded AssetBrowser constructor entries and hardcoded control selection IDs in sample JS. |
| 43 | +- New JSON SSoT: `samples/phase-15/1505/sample.1505.asset-browser.json` under `config.assetCatalog.entries`. |
| 44 | +- Runtime change: scene and control mapping load explicit JSON entries; no JS-local canonical asset list remains. |
| 45 | +- Paired tool alignment: Asset Browser preset path now supplies the same JSON-backed entries for tool-side catalog ingestion. |
| 46 | + |
| 47 | +## Validation |
| 48 | + |
| 49 | +### Commands |
| 50 | +1. `node --check samples/phase-02/0204/AssetRegistryScene.js` |
| 51 | +2. `node --check samples/phase-02/0204/main.js` |
| 52 | +3. `node --check samples/phase-14/1413/AssetImportPipelineScene.js` |
| 53 | +4. `node --check samples/phase-14/1413/main.js` |
| 54 | +5. `node --check samples/phase-15/1505/AssetBrowserScene.js` |
| 55 | +6. `node --check samples/phase-15/1505/main.js` |
| 56 | +7. `node --check tools/Asset Browser/main.js` |
| 57 | +8. `npm run test:launch-smoke -- --tools` |
| 58 | + |
| 59 | +### Results |
| 60 | +- `node --check`: PASS for all changed JavaScript files. |
| 61 | +- `launch-smoke -- --tools`: PASS (`PASS=286 FAIL=0 TOTAL=286`) including: |
| 62 | + - sample `0204`: PASS |
| 63 | + - sample `1413`: PASS |
| 64 | + - sample `1505`: PASS |
| 65 | + - tool `Asset Browser`: PASS |
| 66 | + - tool `Asset Pipeline Tool`: PASS |
| 67 | + |
| 68 | +### JSON Canonical Data Evidence |
| 69 | +- `samples/phase-02/0204/sample.0204.asset-browser.json` has `assetCatalog.entries` count: `3`. |
| 70 | +- `samples/phase-14/1413/sample.1413.asset-browser.json` has `assetCatalog.entries` count: `3`. |
| 71 | +- `samples/phase-15/1505/sample.1505.asset-browser.json` has `assetCatalog.entries` count: `2`. |
| 72 | +- `samples/phase-14/1413/sample.1413.asset-pipeline-tool.json` includes `sampleImportInput`. |
| 73 | + |
| 74 | +### Hardcoded Canonical Data Removal Check |
| 75 | +- Search for removed canonical literals in affected sample folders: `sampleAssets|hero-texture|menu-theme|hero-sprite|drop-folder`. |
| 76 | +- Result: `NO_MATCH`. |
| 77 | + |
| 78 | +## 0204 Sample Preview + Asset Browser / Import Hub Validation |
| 79 | +- 0204 sample runtime now loads registry entries from `sample.0204.asset-browser.json`. |
| 80 | +- Asset Browser now ingests approved entries from `samplePresetPath` `config.assetCatalog.entries`. |
| 81 | +- Empty/missing/invalid source messaging remains explicit and actionable in Asset Browser status/empty state text. |
| 82 | + |
| 83 | +## 1413 Sample Preview + Paired Tool Validation |
| 84 | +- 1413 sample import action now consumes explicit JSON `sampleImportInput`. |
| 85 | +- Asset Pipeline Tool consumes the same sample preset JSON path for tool payload loading. |
| 86 | +- Sample-visible import input and paired-tool payload source are aligned to explicit JSON. |
| 87 | + |
| 88 | +## 1505 Sample Preview + Paired Tool Validation |
| 89 | +- 1505 sample runtime and control selections now derive from JSON `assetCatalog.entries`. |
| 90 | +- Asset Browser tool-side load from sample preset now uses the same explicit JSON source. |
| 91 | + |
| 92 | +## Empty-State Preservation (No Explicit JSON) |
| 93 | +- For all affected sample runtime loaders, missing/invalid/empty JSON paths return empty arrays and explicit status messages. |
| 94 | +- Asset Browser `loadSamplePresetCatalogEntries` returns `loadedEmpty`, `sourceMissing`, `sourceInvalid`, or `sourceLoadFailure` with actionable next steps when no explicit JSON entries exist. |
| 95 | +- No fallback/default hidden sample data was added. |
| 96 | + |
| 97 | +## Guardrail Confirmation |
| 98 | +- No `start_of_day` folders were modified. |
| 99 | +- No fallback/default/hidden sample data was introduced. |
0 commit comments