|
1 | 1 | # BUILD_PR_LEVEL_01_ENGINE_VECTOR_RESIDUE_CLEANUP |
2 | 2 |
|
3 | 3 | ## Purpose |
4 | | -Clean up the leftover `engine/vector/` residue now that the vector classes/content have already been moved elsewhere. |
5 | | - |
6 | | -## Problem |
7 | | -The old `engine/vector/` folder and remaining content still exist even though the intended classes were already moved. |
8 | | -That creates: |
9 | | -- stale ownership ambiguity |
10 | | -- legacy import risk |
11 | | -- false structure signals during section-1 closeout |
12 | | - |
13 | | -## Scope |
14 | | - |
15 | | -### A. Residue audit |
16 | | -Codex must inspect the remaining `engine/vector/` folder and classify each remaining item as one of: |
17 | | -- stale residue that should be removed |
18 | | -- still-owned content that must be moved to its correct current home |
19 | | -- compatibility surface that must remain temporarily but should be marked clearly |
20 | | - |
21 | | -### B. Cleanup rule |
22 | | -Preferred outcome: |
23 | | -- if the folder is only stale residue, remove it cleanly |
24 | | -- if it still contains real content, move that content to the correct modern home first |
25 | | -- do not leave `engine/vector/` as an ambiguous half-alive legacy boundary |
26 | | - |
27 | | -### C. Boundary truth |
28 | | -Use current boundary decisions already established or in-flight: |
29 | | -- rendering-owned vector drawing stays with rendering |
30 | | -- shared math/utility-owned vector math stays in shared math/utility |
31 | | -- engine should not keep a misleading old vector home if the real ownership moved |
32 | | - |
33 | | -### D. Import safety |
34 | | -- normalize any lingering imports that still point at `engine/vector/` |
35 | | -- keep validation green |
36 | | -- avoid broad churn outside this residue cleanup |
37 | | - |
38 | | -### E. Roadmap handling |
39 | | -- update roadmap status markers only if truthfully supported |
40 | | -- no roadmap text rewrite |
41 | | - |
42 | | -## Desired outcome |
43 | | -After this PR: |
44 | | -- `engine/vector/` is no longer a misleading leftover boundary |
45 | | -- any real remaining content is in the correct modern home |
46 | | -- legacy import risk is reduced |
47 | | -- section-1 residue is reduced further |
48 | | - |
49 | | -## Validation requirements |
50 | | -Codex must report: |
51 | | -- what remained inside `engine/vector/` |
52 | | -- what was removed vs moved |
53 | | -- any imports updated |
54 | | -- whether the old folder still exists after cleanup and why |
55 | | -- whether this helps close section 1 truthfully |
| 4 | +Remove the leftover `src/engine/vector/` boundary residue now that vector ownership is already normalized to: |
| 5 | +- rendering-owned vector drawing in `src/engine/rendering/` |
| 6 | +- shared math-owned vector math in `src/shared/math/` |
| 7 | + |
| 8 | +## Residue Audit |
| 9 | +Remaining items found in `src/engine/vector/` before cleanup: |
| 10 | +1. `src/engine/vector/index.js` |
| 11 | +- Classification: temporary compatibility surface (re-export only) |
| 12 | +- Reason: re-exported `transformPoints` and `drawVectorShape` from rendering and `vectorFromAngle` from shared math |
| 13 | + |
| 14 | +2. `src/engine/vector/VectorDrawing.js` |
| 15 | +- Classification: stale residue (re-export only) |
| 16 | +- Reason: no owned logic, only re-export to rendering |
| 17 | + |
| 18 | +3. `src/engine/vector/VectorMath.js` |
| 19 | +- Classification: stale residue (re-export only) |
| 20 | +- Reason: no owned logic, only re-export to shared math |
| 21 | + |
| 22 | +## Implementation |
| 23 | +1. Removed stale boundary folder: |
| 24 | +- deleted `src/engine/vector/index.js` |
| 25 | +- deleted `src/engine/vector/VectorDrawing.js` |
| 26 | +- deleted `src/engine/vector/VectorMath.js` |
| 27 | +- removed `src/engine/vector/` |
| 28 | + |
| 29 | +2. Normalized runtime/sample imports away from `engine/vector`: |
| 30 | +- `games/Asteroids/entities/Asteroid.js` |
| 31 | +- `games/Asteroids/entities/Ship.js` |
| 32 | +- `games/Asteroids/entities/Ufo.js` |
| 33 | +- `samples/phase-09/0901/VectorRenderingSystemScene.js` |
| 34 | +- `samples/phase-09/0902/PolygonCollisionScene.js` |
| 35 | +- `samples/phase-09/0903/PointInPolygonScene.js` |
| 36 | +- `samples/phase-09/0906/HybridCollisionScene.js` |
| 37 | + |
| 38 | +All moved from: |
| 39 | +- `'/src/engine/vector/index.js'` |
| 40 | + |
| 41 | +To: |
| 42 | +- `'/src/engine/rendering/index.js'` |
| 43 | + |
| 44 | +3. Normalized metadata/contract references to modern boundary: |
| 45 | +- updated `samples/metadata/samples.shared.boundaries.report.json` |
| 46 | +- updated `samples/metadata/samples.index.metadata.json` |
| 47 | +- updated `tools/shared/renderPipelineContract.js` (`vector-asset-studio` engine targets no longer include `engine/vector`) |
| 48 | + |
| 49 | +## Validation |
| 50 | +Executed focused validation for this PR: |
| 51 | +1. Boundary residue check |
| 52 | +- `src/engine/vector/` no longer exists |
| 53 | + |
| 54 | +2. Import/path ambiguity check |
| 55 | +- no remaining `engine/vector` references in `src`, `games`, `samples`, `tests`, `tools` JS/MJS/JSON surfaces |
| 56 | + |
| 57 | +3. Syntax checks (`node --check`) |
| 58 | +- touched JS/MJS files parse cleanly |
| 59 | + |
| 60 | +4. Focused runtime regression checks |
| 61 | +- `node tests/scenes/SceneManager.test.mjs` |
| 62 | +- `node tests/scenes/TransitionScene.test.mjs` |
| 63 | +- `node tests/scenes/AttractModeController.test.mjs` |
| 64 | +- `node tests/core/EngineSceneLifecycle.test.mjs` |
| 65 | +- `node tests/final/PlatformUxSystems.test.mjs` |
| 66 | + |
| 67 | +## Roadmap |
| 68 | +No roadmap status marker changes were required for this surgical residue cleanup. |
56 | 69 |
|
57 | 70 | ## Packaging |
58 | 71 | `<project folder>/tmp/BUILD_PR_LEVEL_01_ENGINE_VECTOR_RESIDUE_CLEANUP.zip` |
59 | | - |
60 | | -## Scope guard |
61 | | -- docs-first PR bundle |
62 | | -- Codex writes implementation |
63 | | -- no unrelated repo changes |
|
0 commit comments