Skip to content

Commit 7fed1b7

Browse files
author
DavidQ
committed
No commit tonight; leave all PR_072 through PR_074 changes local for review - Classify PR 072 debug barrel validation failure before continuing - PR_26140_072-followup - Fix Phase 17 runtime test browser-root import resolution - PR_26140_072b-fix-phase17-browser-root-test-resolution
1 parent d7f7ae1 commit 7fed1b7

233 files changed

Lines changed: 466 additions & 454 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# PR_26140_072 Engine Debug Index Barrel Removal
2+
3+
## Summary
4+
- Removed active imports from the targeted debug index barrels:
5+
- `src/engine/debug/index.js`
6+
- `src/engine/debug/standard/threeD/index.js`
7+
- `src/engine/debug/network/index.js`
8+
- `src/engine/debug/inspectors/index.js`
9+
- Replaced debug barrel imports with direct canonical imports to the owning debug files.
10+
- Deleted the four targeted debug index barrel files after active imports were removed.
11+
- Kept changes import-only. No schema files, sample JSON, sample/game entry `index.js` files, Git commits, pushes, or GitHub PRs were created.
12+
13+
## Direct Import Mapping
14+
- Debug panels:
15+
- `drawSceneFrame`, `drawFrame`, `drawPanel` -> `src/engine/debug/DebugPanel.js`
16+
- stacked debug panel helpers -> `src/engine/debug/DebugOverlayLayout.js`
17+
- combat/debug overlay helpers -> their owning files under `src/engine/debug/`
18+
- Standard 3D debug:
19+
- provider registry and provider constants/helpers -> `src/engine/debug/standard/threeD/providers/*`
20+
- panel registry and panel constants/helpers -> `src/engine/debug/standard/threeD/panels/*`
21+
- presets/bootstrap helpers -> `src/engine/debug/standard/threeD/presets/*` and `bootstrap/*`
22+
- Network debug:
23+
- providers, panels, command packs, dashboard helpers, and diagnostics now import from their owning files under `src/engine/debug/network/`
24+
- Advanced inspectors:
25+
- registry, host, commands, bootstrap, presets, and view models now import from owning files under `src/engine/debug/inspectors/`
26+
27+
## Validation
28+
- PASS: debug barrel scan reports `NO_DEBUG_BARREL_IMPORTS`.
29+
- PASS: target deletion scan confirms all four targeted debug `index.js` files no longer exist.
30+
- PASS: no JSON files changed.
31+
- PASS: `node --check` passed for 226 changed existing JS/MJS files.
32+
- PASS: local import target validation passed for 226 changed existing JS/MJS files.
33+
- PASS: `npm run test:workspace-v2` passed 59/59 tests.
34+
- PASS: focused debug Node tests passed:
35+
- `tests/final/DebugObservabilityMaturity.test.mjs`
36+
- `tests/final/NetworkDebugAndServerDashboardCloseout.test.mjs`
37+
- `tests/tools/CameraDebugPanel.test.mjs`
38+
- `tests/tools/CollisionOverlaysDebugPanel.test.mjs`
39+
- `tests/tools/RenderPipelineStagesDebugPanel.test.mjs`
40+
- `tests/tools/SceneGraphInspectorDebugPanel.test.mjs`
41+
- `tests/tools/TransformInspectorDebugPanel.test.mjs`
42+
- FAIL: `tests/runtime/Phase17DebugOverlayBottomRightPosition.test.mjs`
43+
- Failure: Node could not resolve browser-root import `/src/engine/scene/Scene.js` from `samples/phase-17/1701/RaycastDemoScene.js`.
44+
- Error path: `C:\src\engine\scene\Scene.js`.
45+
- This surfaced during extra focused debug validation and appears related to existing Node execution of browser-root sample imports, not to debug barrel ownership.
46+
- STOPPED: per unattended workflow instruction, PR_26140_073 and PR_26140_074 were not started after this validation failure.
47+
- SKIPPED: full samples smoke test, per instruction.
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# PR_26140_072b Phase17 Browser-Root Test Resolution
2+
3+
## Scope
4+
- Fixed `tests/runtime/Phase17DebugOverlayBottomRightPosition.test.mjs` only.
5+
- Did not change sample runtime code.
6+
- Did not change `src/engine` runtime code.
7+
- Did not change schemas.
8+
- Did not touch sample JSON.
9+
- Did not run PR_26140_073.
10+
11+
## Change Summary
12+
- Added a Node `registerHooks` resolver in the Phase17 test for browser-root imports:
13+
- `/src/`
14+
- `/games/`
15+
- `/tools/`
16+
- `/samples/`
17+
- Converted the Phase17 sample imports from static imports to dynamic imports after the resolver is registered.
18+
- Added direct-run execution so `node tests/runtime/Phase17DebugOverlayBottomRightPosition.test.mjs` runs the assertions instead of only checking module load.
19+
20+
## Why
21+
The PR_26140_072 classification showed the test failed because Node resolved browser-root sample imports such as `/src/engine/scene/Scene.js` as filesystem-root paths like `C:\src\engine\scene\Scene.js`.
22+
23+
The main node test runner already registers equivalent browser-root aliases in `scripts/run-node-tests.mjs`. This PR applies that same import-resolution pattern locally to the focused Phase17 test so it can run directly under Node.
24+
25+
## PR_26140_072 Debug Barrel Cleanup Confirmation
26+
- Active-code scan found no remaining imports of:
27+
- `src/engine/debug/index.js`
28+
- `src/engine/debug/inspectors/index.js`
29+
- `src/engine/debug/network/index.js`
30+
- `src/engine/debug/standard/threeD/index.js`
31+
- The four targeted debug index barrel files remain deleted.
32+
33+
## Validation
34+
- PASS: `node tests/runtime/Phase17DebugOverlayBottomRightPosition.test.mjs`
35+
- PASS: `node --check tests/runtime/Phase17DebugOverlayBottomRightPosition.test.mjs`
36+
- PASS: `npm run test:workspace-v2`
37+
- 59 passed.
38+
- PASS: PR_26140_072 debug barrel cleanup confirmation.
39+
40+
## Not Run
41+
- PR_26140_073 was not run.
42+
- Full samples smoke test was not run.
43+
44+
## Delta ZIP
45+
- `tmp/PR_26140_072b-fix-phase17-browser-root-test-resolution_delta.zip`
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# PR_26140_072 Failure Classification
2+
3+
## Scope
4+
- Reviewed PR_26140_072 only.
5+
- Did not continue to PR_26140_073.
6+
- Did not change schemas.
7+
- Did not touch sample JSON.
8+
- Did not change runtime behavior.
9+
10+
## Classification
11+
`tests/runtime/Phase17DebugOverlayBottomRightPosition.test.mjs` is failing because Node does not resolve browser-root `/src/...` imports to the repository root.
12+
13+
This is unrelated validation debt exposed by the extra focused validation, not a PR_26140_072 debug import regression.
14+
15+
## Evidence
16+
- The test imports `samples/phase-17/1701/RaycastDemoScene.js`.
17+
- `samples/phase-17/1701/RaycastDemoScene.js` imports `Scene` with a browser-root path:
18+
- `import Scene from '/src/engine/scene/Scene.js';`
19+
- Running the test directly fails before any assertion:
20+
- `Error [ERR_MODULE_NOT_FOUND]: Cannot find module 'C:\src\engine\scene\Scene.js' imported from ...\samples\phase-17\1701\RaycastDemoScene.js`
21+
- Node resolves `/src/engine/scene/Scene.js` as `file:///C:/src/engine/scene/Scene.js`.
22+
- The PR_26140_072 diff for `samples/phase-17/1701/RaycastDemoScene.js` only replaced the debug barrel import:
23+
- from `/src/engine/debug/index.js`
24+
- to `/src/engine/debug/DebugOverlayLayout.js` and `/src/engine/debug/DebugPanel.js`
25+
- The thrown module-not-found error is for `/src/engine/scene/Scene.js`, not a removed debug barrel.
26+
27+
## Decision
28+
No import-only PR_26140_072 fix was applied.
29+
30+
Changing this test to support browser-root imports under Node would be a separate validation-harness concern. It would affect sample import resolution more broadly than the debug barrel removal and is outside the scoped PR_26140_072 cleanup.
31+
32+
## Validation
33+
- `npm run test:workspace-v2`
34+
- PASS: 59 passed.
35+
- Focused PR_26140_072 debug tests:
36+
- PASS: `node tests/final/DebugObservabilityMaturity.test.mjs`
37+
- PASS: `node tests/final/NetworkDebugAndServerDashboardCloseout.test.mjs`
38+
- PASS: `node tests/tools/CameraDebugPanel.test.mjs`
39+
- PASS: `node tests/tools/CollisionOverlaysDebugPanel.test.mjs`
40+
- PASS: `node tests/tools/RenderPipelineStagesDebugPanel.test.mjs`
41+
- PASS: `node tests/tools/SceneGraphInspectorDebugPanel.test.mjs`
42+
- PASS: `node tests/tools/TransformInspectorDebugPanel.test.mjs`
43+
- Focused Phase17 placement test:
44+
- FAIL: `node tests/runtime/Phase17DebugOverlayBottomRightPosition.test.mjs`
45+
- Reason: unrelated Node/browser-root import resolution for `/src/engine/scene/Scene.js`.
46+
47+
## Not Run
48+
- PR_26140_073 was not run.
49+
- Full samples smoke test was not run.

games/GravityWell/game/GravityWellScene.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ GravityWellScene.js
77
import Scene from '/src/engine/scene/Scene.js';
88
import { Theme } from '/src/engine/theme/Theme.js';
99
import { ThemeTokens } from '/src/engine/theme/ThemeTokens.js';
10-
import { drawPanel } from '/src/engine/debug/index.js';
10+
import { drawPanel } from '/src/engine/debug/DebugPanel.js';
1111
import { drawVectorShape } from '/src/engine/rendering/VectorDrawing.js';
1212
import ReplaySystem from '/src/engine/replay/ReplaySystem.js';
1313
import GravityWellWorld from './GravityWellWorld.js';

samples/phase-01/0115/ECSFoundationScene.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import Scene from '/src/engine/scene/Scene.js';
88
import { Theme } from '/src/engine/theme/Theme.js';
99
import { ThemeTokens } from '/src/engine/theme/ThemeTokens.js';
1010
import World from '/src/engine/ecs/World.js';
11-
import { drawSceneFrame } from '/src/engine/debug/index.js';
11+
import { drawSceneFrame } from '/src/engine/debug/DebugPanel.js';
1212

1313
const theme = new Theme(ThemeTokens);
1414

samples/phase-01/0116/ECSMovementSystemScene.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import { Theme } from '/src/engine/theme/Theme.js';
99
import { ThemeTokens } from '/src/engine/theme/ThemeTokens.js';
1010
import World from '/src/engine/ecs/World.js';
1111
import { createTransform, createSize, createVelocity, createRenderable } from '/src/engine/components/index.js';
12-
import { drawSceneFrame } from '/src/engine/debug/index.js';
12+
import { drawSceneFrame } from '/src/engine/debug/DebugPanel.js';
1313
import { moveEntities, bounceEntitiesHorizontallyInBounds, renderRectEntities } from '/src/engine/systems/index.js';
1414

1515
const theme = new Theme(ThemeTokens);

samples/phase-01/0117/ECSInputSystemScene.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import {
1616
createInputControlled,
1717
createRenderable,
1818
} from '/src/engine/components/index.js';
19-
import { drawSceneFrame } from '/src/engine/debug/index.js';
19+
import { drawSceneFrame } from '/src/engine/debug/DebugPanel.js';
2020
import { applyInputControl, moveEntities, clampEntitiesToBounds, renderRectEntities } from '/src/engine/systems/index.js';
2121

2222
const theme = new Theme(ThemeTokens);

samples/phase-01/0118/ECSCollisionSystemScene.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import {
1818
createSolid,
1919
createRenderable,
2020
} from '/src/engine/components/index.js';
21-
import { drawSceneFrame } from '/src/engine/debug/index.js';
21+
import { drawSceneFrame } from '/src/engine/debug/DebugPanel.js';
2222
import {
2323
applyInputControl,
2424
moveEntities,

samples/phase-01/0119/ECSRenderSystemScene.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import Scene from '/src/engine/scene/Scene.js';
88
import { Theme } from '/src/engine/theme/Theme.js';
99
import { ThemeTokens } from '/src/engine/theme/ThemeTokens.js';
1010
import World from '/src/engine/ecs/World.js';
11-
import { drawSceneFrame } from '/src/engine/debug/index.js';
11+
import { drawSceneFrame } from '/src/engine/debug/DebugPanel.js';
1212
import { renderRectEntities } from '/src/engine/systems/index.js';
1313

1414
const theme = new Theme(ThemeTokens);

samples/phase-01/0120/ECSSceneWorldScene.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@ import {
1818
createSolid,
1919
createRenderable,
2020
} from '/src/engine/components/index.js';
21-
import { drawSceneFrame, drawValidationPanel, validateWorldEntities } from '/src/engine/debug/index.js';
21+
import { drawSceneFrame } from '/src/engine/debug/DebugPanel.js';
22+
import { drawValidationPanel, validateWorldEntities } from '/src/engine/debug/Validation.js';
2223
import {
2324
applyInputControl,
2425
moveEntities,

0 commit comments

Comments
 (0)