|
| 1 | +# PR_26140_071 Engine Domain Index Barrel Removal Phase 5 |
| 2 | + |
| 3 | +## Summary |
| 4 | +- Removed the targeted phase 5 engine domain barrel files: |
| 5 | + - `src/engine/physics/index.js` |
| 6 | + - `src/engine/rendering/index.js` |
| 7 | + - `src/engine/runtime/index.js` |
| 8 | + - `src/engine/scene/index.js` |
| 9 | + - `src/engine/tilemap/index.js` |
| 10 | + - `src/engine/world/index.js` |
| 11 | +- Replaced active static and dynamic imports from those barrels with direct canonical file imports. |
| 12 | +- Kept edits import-only for consumers. No runtime logic, sample JSON, game/sample entry removal, replacement barrels, or pass-through shims were added. |
| 13 | +- No edits were made under `src/engine/debug/**` or `src/engine/network/**`. |
| 14 | +- The only `src/engine/systems/**` edit is the clarified import-only update to `src/engine/systems/PhysicsSystem.js`. |
| 15 | +- `src/engine/core/index.js` remains untouched in this PR. |
| 16 | + |
| 17 | +## Direct Import Mapping |
| 18 | +- Physics: |
| 19 | + - `stepArcadeBody` -> `src/engine/physics/arcadeBody.js` |
| 20 | + - `applyDrag` -> `src/engine/physics/drag.js` |
| 21 | + - `integrateVelocity2D` -> `src/engine/physics/integration.js` |
| 22 | + - `integrateVelocity3D` -> `src/engine/physics/integration3d.js` |
| 23 | + - 3D collision helpers -> `src/engine/physics/collision3d.js` |
| 24 | + - `stepSceneBodies3D` -> `src/engine/physics/scene3d.js` |
| 25 | +- Rendering: |
| 26 | + - rendering service/classes -> their one-class files under `src/engine/rendering/` |
| 27 | + - sprite/layer/vector helpers -> their owning rendering system files |
| 28 | + - object-vector transform helpers -> `src/engine/rendering/OrientationTransform.js` |
| 29 | + - world-screen helpers -> `src/engine/rendering/WorldScreenTransform.js` |
| 30 | +- Runtime: |
| 31 | + - runtime service/classes -> their one-class files under `src/engine/runtime/` |
| 32 | + - `resolvePreferredFullscreenTarget` -> `src/engine/runtime/fullscreenBezel.js` |
| 33 | + - `resolveGameImageConventionPaths` -> `src/engine/runtime/gameImageConvention.js` |
| 34 | + - `createRuntimeMonitoringHooks` -> `src/engine/runtime/RuntimeMonitoringHooks.js` |
| 35 | +- Scene: |
| 36 | + - scene classes -> their one-class files under `src/engine/scene/` |
| 37 | + - `DEFAULT_ATTRACT_CONFIG` -> `src/engine/scene/AttractModeController.js` |
| 38 | +- Tilemap: |
| 39 | + - `Tilemap` -> `src/engine/tilemap/Tilemap.js` |
| 40 | + - tile render/collision/metadata helpers -> their owning tilemap files |
| 41 | +- World: |
| 42 | + - world service/classes -> their one-class files under `src/engine/world/` |
| 43 | + |
| 44 | +## Additional Import Validation Repair |
| 45 | +- `tests/playwright/tools/WorkspaceManagerV2.spec.mjs` had a dynamic import from `/src/engine/rendering/index.js`; it was updated to direct-import `ObjectVectorRuntimeAssetService.js`. |
| 46 | +- `tests/playwright/tools/CollisionInspectorV2.spec.mjs` had dynamic imports from `/src/engine/rendering/index.js`; they were updated to direct rendering files. |
| 47 | +- Because `CollisionInspectorV2.spec.mjs` was changed, local import-target validation also surfaced an older dynamic import from the removed collision barrel. It was updated to direct-import `src/engine/collision/objectVector.js` so changed-file import validation stays clean. |
| 48 | + |
| 49 | +## Validation |
| 50 | +- PASS: target barrel scan reports `NO_TARGET_BARREL_IMPORTS`. |
| 51 | +- PASS: target deletion scan confirms all six targeted `index.js` files no longer exist. |
| 52 | +- PASS: no JSON files changed. |
| 53 | +- PASS: no `src/engine/debug/**` or `src/engine/network/**` files changed. |
| 54 | +- PASS: only `src/engine/systems/PhysicsSystem.js` changed under `src/engine/systems/**`, matching the scope clarification. |
| 55 | +- PASS: `node --check` passed for 277 changed existing JS/MJS files. |
| 56 | +- PASS: local import target validation passed for 277 changed existing JS/MJS files. |
| 57 | +- PASS: `npm run test:workspace-v2` passed 59/59 tests after dynamic rendering imports in the Workspace Manager spec were normalized. |
| 58 | +- PASS: targeted affected domain tests passed: |
| 59 | + - `tests/core/Engine2DCapabilityCombinedFoundation.test.mjs` |
| 60 | + - `tests/core/Engine3DPhysicsHookIsolation.test.mjs` |
| 61 | + - `tests/core/EngineCoreBoundaryBaseline.test.mjs` |
| 62 | + - `tests/core/EngineFullscreen.test.mjs` |
| 63 | + - `tests/core/Section1FinalResidueStructure.test.mjs` |
| 64 | + - `tests/final/FinalSystems.test.mjs` |
| 65 | + - `tests/final/FullscreenService.test.mjs` |
| 66 | + - `tests/final/PlatformUxSystems.test.mjs` |
| 67 | + - `tests/render/Renderer.test.mjs` |
| 68 | + - `tests/runtime/RuntimeMonitoringHooks.test.mjs` |
| 69 | + - `tests/scenes/AttractModeController.test.mjs` |
| 70 | + - `tests/world/WorldSystems.test.mjs` |
| 71 | +- PASS: `npx playwright test tests/playwright/tools/CollisionInspectorV2.spec.mjs --project=playwright --workers=1 --reporter=list` passed 4/4 tests. |
| 72 | +- PASS: `git diff --check` exited 0. |
| 73 | +- SKIPPED: full samples smoke test, per PR instruction. |
| 74 | +- NOTE: an extra diagnostic run of `tests/games/AsteroidsPlatformDemo.test.mjs` surfaced an out-of-scope existing Node-only failure from browser-root `/src` imports inside `games/Asteroids/game/asteroidsObjectGeometryManifest.js`. That diagnostic is not part of the requested phase 5 validation and no Asteroids runtime imports were changed for it. |
0 commit comments