Skip to content

Commit 01500f0

Browse files
author
DavidQ
committed
Remove internal barrel guard baseline debt - PR_26140_080-remove-internal-barrel-guard-baseline-debt
1 parent 1970ee0 commit 01500f0

35 files changed

Lines changed: 133 additions & 341 deletions
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
# PR_26140_080 Internal Barrel Baseline Debt Removal Report
2+
3+
## Scope
4+
- Removed the 35 existing entries from `tools/dev/checkInternalBarrelGuard.baseline.json`.
5+
- Replaced active imports from remaining internal index barrels with direct canonical imports.
6+
- Moved `src/engine/components/index.js` implementation to `src/engine/components/Components.js`.
7+
- Removed these internal barrel/pass-through files:
8+
- `src/engine/components/index.js`
9+
- `src/engine/combat/index.js`
10+
- `src/engine/prefabs/index.js`
11+
- `src/engine/debug/standard/threeD/legacySummarySurface.js`
12+
- `src/shared/state/contracts.js`
13+
- `src/shared/state/publicSelectors.js`
14+
- `tools/shared/stringUtils.js`
15+
- Updated shared tests that still imported from `src/shared/**/index.js`.
16+
- Updated `tests/runtime/Phase19OverlayExpansionFramework.test.mjs` stale shared index assertions and added the established Node browser-root import hook so the focused test runs under Node.
17+
- No sample/game entry `index.js` files were removed.
18+
- No schema files were changed.
19+
- No sample JSON files were changed.
20+
- No replacement pass-through files were created.
21+
22+
## Import Ownership Changes
23+
- Component helpers now resolve through `src/engine/components/Components.js`.
24+
- Combat helpers now resolve through `src/engine/combat/Combat.js`.
25+
- Prefab helpers now resolve through `src/engine/prefabs/PrefabFactory.js`.
26+
- Shared state internals now import contract constants directly from `src/shared/contracts/sharedStateContracts.js`.
27+
- Tool vector text sanitization now imports `trimSafe` directly from `src/shared/string/strings.js`.
28+
29+
## Guardrail Result
30+
- `npm run check:internal-barrel-guard` now reports:
31+
- `baseline_expected=0`
32+
- `baseline_resolved=0`
33+
- `new_violations=0`
34+
35+
## Validation
36+
- PASS: targeted `node --check` for all changed existing `.js` and `.mjs` files.
37+
- PASS: targeted import-resolution validation confirmed import targets exist for 26 changed JS/MJS files.
38+
- PASS: `npm run check:internal-barrel-guard`.
39+
- PASS: `tests/combat/Combat.test.mjs`.
40+
- PASS: `tests/shared/SharedFoundationCombinedPass.test.mjs`.
41+
- PASS: `tests/shared/SharedNumberStringIdCloseout.test.mjs`.
42+
- PASS: `tests/shared/GetStateVariantClassification.test.mjs`.
43+
- PASS: `tests/runtime/Phase19OverlayExpansionFramework.test.mjs`.
44+
- PASS: `npm run test:workspace-v2` passed 59 tests.
45+
- PASS: schema/sample JSON audit found no changed schema files and no changed sample JSON files.
46+
47+
## Full Samples Smoke Test
48+
- Skipped. This PR changes import ownership and removes internal barrels; targeted syntax/import checks, affected node tests, and Workspace V2 validation covered the requested scope without broadly changing sample loader behavior.
49+
50+
## Manual Validation Notes
51+
- Run `npm run check:internal-barrel-guard` and confirm zero baseline/new violations.
52+
- Code search should find no active imports from the removed internal barrels.
53+
- Confirm the removed files remain deleted and sample/game entry `index.js` files remain intact.

samples/phase-01/0116/ECSMovementSystemScene.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 { createTransform, createSize, createVelocity, createRenderable } from '/src/engine/components/index.js';
11+
import { createTransform, createSize, createVelocity, createRenderable } from '/src/engine/components/Components.js';
1212
import { drawSceneFrame } from '/src/engine/debug/DebugPanel.js';
1313
import { moveEntities } from '/src/engine/systems/MovementSystem.js';
1414
import { bounceEntitiesHorizontallyInBounds } from '/src/engine/systems/BounceSystem.js';

samples/phase-01/0117/ECSInputSystemScene.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import {
1515
createSpeed,
1616
createInputControlled,
1717
createRenderable,
18-
} from '/src/engine/components/index.js';
18+
} from '/src/engine/components/Components.js';
1919
import { drawSceneFrame } from '/src/engine/debug/DebugPanel.js';
2020
import { applyInputControl } from '/src/engine/systems/InputControlSystem.js';
2121
import { moveEntities } from '/src/engine/systems/MovementSystem.js';

samples/phase-01/0118/ECSCollisionSystemScene.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ import {
1717
createCollider,
1818
createSolid,
1919
createRenderable,
20-
} from '/src/engine/components/index.js';
20+
} from '/src/engine/components/Components.js';
2121
import { drawSceneFrame } from '/src/engine/debug/DebugPanel.js';
2222
import { applyInputControl } from '/src/engine/systems/InputControlSystem.js';
2323
import { moveEntities } from '/src/engine/systems/MovementSystem.js';

samples/phase-01/0120/ECSSceneWorldScene.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ import {
1717
createCollider,
1818
createSolid,
1919
createRenderable,
20-
} from '/src/engine/components/index.js';
20+
} from '/src/engine/components/Components.js';
2121
import { drawSceneFrame } from '/src/engine/debug/DebugPanel.js';
2222
import { drawValidationPanel, validateWorldEntities } from '/src/engine/debug/Validation.js';
2323
import { applyInputControl } from '/src/engine/systems/InputControlSystem.js';

samples/phase-01/0121/UIOverlayScene.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import {
1515
createSpeed,
1616
createInputControlled,
1717
createRenderable,
18-
} from '/src/engine/components/index.js';
18+
} from '/src/engine/components/Components.js';
1919
import { drawSceneFrame, drawPanel } from '/src/engine/debug/DebugPanel.js';
2020
import { applyInputControl } from '/src/engine/systems/InputControlSystem.js';
2121
import { moveEntities } from '/src/engine/systems/MovementSystem.js';

samples/phase-01/0122/EntityLifecycleScene.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ import {
1717
createLifetime,
1818
createRenderable,
1919
createTag,
20-
} from '/src/engine/components/index.js';
20+
} from '/src/engine/components/Components.js';
2121
import { drawSceneFrame, drawPanel } from '/src/engine/debug/DebugPanel.js';
2222
import { applyInputControl } from '/src/engine/systems/InputControlSystem.js';
2323
import { moveEntities } from '/src/engine/systems/MovementSystem.js';

samples/phase-01/0123/DebugStatsScene.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import {
1313
createSize,
1414
createVelocity,
1515
createRenderable,
16-
} from '/src/engine/components/index.js';
16+
} from '/src/engine/components/Components.js';
1717
import { drawSceneFrame, drawPanel } from '/src/engine/debug/DebugPanel.js';
1818
import StatsTracker from '/src/engine/debug/StatsTracker.js';
1919
import { moveEntities } from '/src/engine/systems/MovementSystem.js';

samples/phase-01/0124/DataDrivenWorldScene.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import {
1515
createSpeed,
1616
createInputControlled,
1717
createCollider,
18-
} from '/src/engine/components/index.js';
18+
} from '/src/engine/components/Components.js';
1919
import { drawSceneFrame, drawPanel } from '/src/engine/debug/DebugPanel.js';
2020
import { drawValidationPanel, validateWorldEntities } from '/src/engine/debug/Validation.js';
2121
import { applyInputControl } from '/src/engine/systems/InputControlSystem.js';

samples/phase-02/0216/PrefabSystemScene.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import {
1313
createEnemyPrefab,
1414
createPickupPrefab,
1515
createProjectilePrefab,
16-
} from '/src/engine/prefabs/index.js';
16+
} from '/src/engine/prefabs/PrefabFactory.js';
1717
import { renderSpriteReadyEntities } from '/src/engine/rendering/SpriteRenderSystem.js';
1818

1919
const theme = new Theme(ThemeTokens);

0 commit comments

Comments
 (0)