|
| 1 | +# BUILD_PR_LEVEL_10_2C_MANIFEST_PAYLOAD_EXPECTATION_TESTS_AND_CLEANUP |
| 2 | + |
| 3 | +## Objective |
| 4 | +Fix the gap exposed by review: tests validate load/open state, but not expected manifest payload. |
| 5 | + |
| 6 | +## Current Bad Example |
| 7 | +Bouncing-ball manifest contains: |
| 8 | +- `lineage` |
| 9 | +- `sources` |
| 10 | +- `assets` |
| 11 | +- `sourcePath` |
| 12 | +- references to old JSON |
| 13 | +- copied legacy catalog data |
| 14 | + |
| 15 | +These should not be present in the final clean manifest model. |
| 16 | + |
| 17 | +## Direct Answers / Final Rules |
| 18 | + |
| 19 | +### 1. `lineage` |
| 20 | +Delete it from game manifests. |
| 21 | + |
| 22 | +Reason: |
| 23 | +- It is migration history/debug metadata. |
| 24 | +- It is not runtime/tool data. |
| 25 | +- It creates legacy dependency noise. |
| 26 | + |
| 27 | +### 2. `sources` |
| 28 | +Delete it from game manifests. |
| 29 | + |
| 30 | +Reason: |
| 31 | +- It points to old external JSON sources. |
| 32 | +- Final manifest should not be a reference map. |
| 33 | + |
| 34 | +### 3. `assets` |
| 35 | +Delete generic root `assets`. |
| 36 | + |
| 37 | +Reason: |
| 38 | +- It is a copied catalog/index. |
| 39 | +- It duplicates tool-owned data. |
| 40 | +- External media file references belong only under `tools["asset-browser"].assets`. |
| 41 | + |
| 42 | +### 4. Asteroids vector data |
| 43 | +Asteroids ships/asteroids/title vectors must be actual Vector Asset Studio data under: |
| 44 | + |
| 45 | +```json |
| 46 | +tools["vector-asset-studio"].vectors |
| 47 | +``` |
| 48 | + |
| 49 | +Workspace Manager should show Vector Asset Studio with a selected/available asset, not `Asset: none`. |
| 50 | + |
| 51 | +### 5. `sprite-editor` |
| 52 | +Remove from Asteroids if Asteroids has only vector assets. |
| 53 | + |
| 54 | +### 6. `tile-map-editor` |
| 55 | +Remove from Asteroids if Asteroids does not use tile maps. |
| 56 | + |
| 57 | +### 7. `parallax-editor` |
| 58 | +Remove from Asteroids if Asteroids does not use parallax. |
| 59 | + |
| 60 | +### 8. `libraries` |
| 61 | +Delete if it is only an index/reference list. |
| 62 | + |
| 63 | +Keep only if it contains actual tool-owned reusable data that the tool requires. For Asteroids vector data, prefer actual entries in `vectors`, not a separate reference library. |
| 64 | + |
| 65 | +## Clean Manifest Model |
| 66 | + |
| 67 | +Allowed root fields: |
| 68 | +- `schema` |
| 69 | +- `version` |
| 70 | +- `game` |
| 71 | +- `launch` only if still intentionally used |
| 72 | +- `tools` |
| 73 | + |
| 74 | +Disallowed root fields: |
| 75 | +- `lineage` |
| 76 | +- `sources` |
| 77 | +- generic `assets` |
| 78 | +- copied legacy catalog data |
| 79 | +- root `palette` |
| 80 | +- root `palettes` |
| 81 | + |
| 82 | +Allowed tool sections only when valid: |
| 83 | +- `palette-browser` |
| 84 | +- `primitive-skin-editor` |
| 85 | +- `asset-browser` |
| 86 | +- `vector-asset-studio` |
| 87 | +- `sprite-editor` only for sprite games/data |
| 88 | +- `tile-map-editor` only for tile games/data |
| 89 | +- `parallax-editor` only for parallax games/data |
| 90 | + |
| 91 | +## Required Test |
| 92 | +Add or update a manifest payload expectation test. |
| 93 | + |
| 94 | +Suggested file: |
| 95 | + |
| 96 | +```text |
| 97 | +tests/runtime/GameManifestPayloadExpectations.test.mjs |
| 98 | +``` |
| 99 | + |
| 100 | +The test must validate: |
| 101 | + |
| 102 | +### For all games |
| 103 | +- no root `lineage` |
| 104 | +- no root `sources` |
| 105 | +- no generic root `assets` |
| 106 | +- no `sourcePath` |
| 107 | +- no stale external JSON paths |
| 108 | +- no old `workspace.asset-catalog.json` |
| 109 | +- no old `tools.manifest.json` |
| 110 | +- every tool section has `schema`, `version`, `name`, `source` |
| 111 | +- exactly one palette at `tools["palette-browser"].palette` |
| 112 | +- no root `palette` |
| 113 | +- no root `palettes` |
| 114 | + |
| 115 | +### For Asteroids |
| 116 | +- has `tools["vector-asset-studio"].vectors` |
| 117 | +- vector count > 0 |
| 118 | +- does not have `sprite-editor` unless actual sprite data exists |
| 119 | +- does not have `tile-map-editor` unless actual tilemap data exists |
| 120 | +- does not have `parallax-editor` unless actual parallax data exists |
| 121 | +- does not have `libraries` unless actual non-reference library data is required |
| 122 | +- Workspace Manager must not show Vector Asset Studio `Asset: none` if vectors exist |
| 123 | + |
| 124 | +### For Bouncing-ball |
| 125 | +- no lineage/sources/assets |
| 126 | +- has `palette-browser.palette` |
| 127 | +- has `primitive-skin-editor.skins` |
| 128 | +- no stale references to external palette/skin JSON files |
| 129 | + |
| 130 | +## Required Cleanup |
| 131 | +Clean all game manifests to satisfy the above test. |
| 132 | + |
| 133 | +## Required Reports |
| 134 | +Create: |
| 135 | +- `docs/dev/reports/level_10_2c_manifest_payload_expectation_report.md` |
| 136 | +- `docs/dev/reports/level_10_2c_manifest_cleanup_report.md` |
| 137 | + |
| 138 | +## Acceptance |
| 139 | +- Tests fail on the old bad manifest shape. |
| 140 | +- Tests pass after cleanup. |
| 141 | +- Bouncing-ball has no `lineage`, `sources`, or generic `assets`. |
| 142 | +- Asteroids has Vector Asset Studio vectors and no invalid unused tool sections. |
| 143 | +- Workspace Manager asset presence test validates actual payload expectations. |
| 144 | +- No validators added. |
| 145 | +- No start_of_day changes. |
0 commit comments