|
| 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. |
0 commit comments