|
| 1 | +# Level 10.6I Tool Load Expected vs Actual Classification Report |
| 2 | + |
| 3 | +## Files changed |
| 4 | + |
| 5 | +- `tools/shared/toolLoadDiagnostics.js` |
| 6 | +- `docs/dev/reports/level_10_6i_tool_load_expected_vs_actual_classification_report.md` |
| 7 | +- `docs/dev/reports/launch_smoke_report.md` (test-generated output refresh) |
| 8 | + |
| 9 | +## Diagnostic events added or updated |
| 10 | + |
| 11 | +- Existing boundaries preserved with compact `expected` + `actual` blocks attached: |
| 12 | + - `[tool-load:request]` |
| 13 | + - `[tool-load:fetch]` |
| 14 | + - `[tool-load:loaded]` |
| 15 | + - `[tool-load:warning]` |
| 16 | +- New boundary added: |
| 17 | + - `[tool-load:classification]` |
| 18 | + |
| 19 | +Classification values emitted exactly from shared diagnostics: |
| 20 | + |
| 21 | +- `missing` |
| 22 | +- `wrong-path` |
| 23 | +- `wrong-shape` |
| 24 | +- `success` |
| 25 | + |
| 26 | +Expected block fields emitted per dependency: |
| 27 | + |
| 28 | +- `dependencyId` |
| 29 | +- `expectedPathKey` |
| 30 | +- `expectedPath` |
| 31 | +- `expectedSchema` |
| 32 | +- `expectedTopLevelShape` |
| 33 | +- `requiredFields` |
| 34 | +- `requiredArrayFields` |
| 35 | + |
| 36 | +Actual block fields emitted per dependency: |
| 37 | + |
| 38 | +- `requestedPath` |
| 39 | +- `fetchUrl` |
| 40 | +- `httpStatus` |
| 41 | +- `loadedSchema` |
| 42 | +- `topLevelKeys` |
| 43 | +- `fieldPresence` |
| 44 | +- `arrayCounts` |
| 45 | + |
| 46 | +## Palette dependency classification behavior |
| 47 | + |
| 48 | +Palette expectation is now classified explicitly even when palette was never requested/fetched/loaded. |
| 49 | + |
| 50 | +Observed classification event for sample `0219` (`sprite-editor`): |
| 51 | + |
| 52 | +```js |
| 53 | +{ |
| 54 | + classification: "missing", |
| 55 | + expected: { |
| 56 | + dependencyId: "palette", |
| 57 | + expectedPathKey: "palettePath", |
| 58 | + expectedSchema: "html-js-gaming.palette", |
| 59 | + expectedTopLevelShape: ["schema", "version", "name", "swatches"] |
| 60 | + }, |
| 61 | + actual: { |
| 62 | + requestedPath: "", |
| 63 | + fetchUrl: "", |
| 64 | + loadedSchema: "", |
| 65 | + topLevelKeys: [] |
| 66 | + }, |
| 67 | + note: "Expected palette dependency was not requested, not fetched, and not loaded." |
| 68 | +} |
| 69 | +``` |
| 70 | + |
| 71 | +## Test command output summary |
| 72 | + |
| 73 | +1. `npm run test:launch-smoke:games` |
| 74 | + - Result: PASS |
| 75 | + - Summary: `PASS=12`, `FAIL=0`, `TOTAL=12` |
| 76 | + |
| 77 | +2. `npm run test:sample-standalone:data-flow` |
| 78 | + - Result: PASS |
| 79 | + - Summary arrays all empty: |
| 80 | + - `schemaFailures: []` |
| 81 | + - `contractFailures: []` |
| 82 | + - `roundtripPathFailures: []` |
| 83 | + - `genericFailures: []` |
| 84 | + |
| 85 | +## Manual browser-console validation notes |
| 86 | + |
| 87 | +Manual launch performed for: |
| 88 | + |
| 89 | +- `tools/Sprite Editor/index.html?sampleId=0219&samplePresetPath=/samples/phase-02/0219/sample.0219.sprite-editor.json` |
| 90 | + |
| 91 | +Observed console prefixes: |
| 92 | + |
| 93 | +- `[tool-load:request]` |
| 94 | +- `[tool-load:fetch]` |
| 95 | +- `[tool-load:loaded]` |
| 96 | +- `[tool-load:warning]` |
| 97 | +- `[tool-load:error]` |
| 98 | +- `[tool-load:classification]` |
| 99 | + |
| 100 | +Observed classification outcomes: |
| 101 | + |
| 102 | +1. Palette dependency classified as `missing` with note: expected palette was not requested/fetched/loaded. |
| 103 | +2. Sprite dependency classified as `wrong-shape` with: |
| 104 | + - `expected.dependencyId = "sprite-project"` |
| 105 | + - `expected.expectedPath = "/samples/phase-02/0219/sample.0219.sprite-editor.json"` |
| 106 | + - `actual.topLevelKeys = ["$schema", "tool", "version", "config"]` |
| 107 | + - `expected.contractMatch = false` |
| 108 | + |
| 109 | +Scope guardrails held for this BUILD: |
| 110 | + |
| 111 | +- diagnostics-only change |
| 112 | +- no palette normalization |
| 113 | +- no fallback data |
| 114 | +- no hardcoded asset paths |
| 115 | +- no start_of_day changes |
0 commit comments