|
| 1 | +# PR_26140_032 Shared Utils Phase 1 Report |
| 2 | + |
| 3 | +## Scope |
| 4 | + |
| 5 | +- Used `tmp/dupes_called.txt` as the extraction candidate source list. |
| 6 | +- Ignored `node_modules`, `tests/results`, `docs/dev/reports` snapshots, archived tools, generated/vendor bundles, and unrelated sample noise. |
| 7 | +- Kept Phase 1 limited to Object Vector runtime/rendering helpers covered by the requested validation path. |
| 8 | + |
| 9 | +## Extracted |
| 10 | + |
| 11 | +- Reused shared `isPlainObject` from `src/shared/utils/objectUtils.js` in: |
| 12 | + - `src/engine/rendering/ObjectVectorRuntimeAssetService.js` |
| 13 | +- Reused shared `deepClone` from `src/shared/utils/jsonUtils.js` as exact JSON clone in: |
| 14 | + - `src/engine/rendering/ObjectVectorRuntimeAssetService.js` |
| 15 | +- Reused shared `isRecord` from `src/shared/types/typeGuards.js` in: |
| 16 | + - `src/engine/rendering/ObjectVectorTransformService.js` |
| 17 | + |
| 18 | +## Skipped Candidates |
| 19 | + |
| 20 | +- `normalizePath`: skipped because current candidates differ on trimming, slash collapsing, leading/trailing slash removal, and fallback behavior. |
| 21 | +- `toFiniteNumber`: skipped gameplay/game-world candidates to avoid changing unrelated gameplay behavior without broader game validation. |
| 22 | +- `normalizePoints`: skipped Object Vector collision/vector-contract candidates because one preserves non-finite point entries through fallback conversion while the shared Asteroids helper filters non-finite points. |
| 23 | +- `clamp`, `normalizeText`, `asArray`: left for a later focused pass where each call site can be grouped by exact semantics and validated through the owning feature. |
| 24 | +- `clone` / `deepClone`: only changed exact JSON clone call sites in the Object Vector runtime asset service. |
| 25 | + |
| 26 | +## Validation |
| 27 | + |
| 28 | +- PASS `npm run build:manifest` |
| 29 | +- PASS `node tests/games/AsteroidsValidation.test.mjs` |
| 30 | +- PASS `node tests/games/AsteroidsPresentation.test.mjs` |
| 31 | +- PASS `node tests/tools/ObjectVectorStudioV2DeleteCleanup.test.mjs` |
| 32 | +- PASS `npx playwright test tests/playwright/tools/AsteroidsGameSceneCleanup.spec.mjs tests/playwright/tools/ObjectVectorStudioV2FirstClassToolStarter.spec.mjs tests/playwright/tools/CollisionInspectorV2.spec.mjs --project=playwright --workers=1 --reporter=list` |
| 33 | +- PASS `git diff --check` |
| 34 | +- PASS vendor/generated modification check: no `node_modules`, vendor, generated, bundled, archived, report snapshot, or test-result paths were modified. |
| 35 | + |
| 36 | +## Coverage |
| 37 | + |
| 38 | +- Playwright V8 coverage refreshed by the targeted Playwright run. |
| 39 | +- `docs/dev/reports/coverage_changed_js_guardrail.txt` reports: |
| 40 | + - `(80%) src/engine/rendering/ObjectVectorTransformService.js` |
| 41 | + - `(81%) src/engine/rendering/ObjectVectorRuntimeAssetService.js` |
| 42 | + - no changed runtime JS coverage warnings. |
| 43 | + |
| 44 | +## Notes |
| 45 | + |
| 46 | +- `docs/build/sample-manifest.json` was generated by `npm run build:manifest` and removed after validation. |
| 47 | +- Full samples smoke test skipped; this PR is scoped shared utility extraction with targeted runtime/tool validation. |
0 commit comments