Skip to content

Commit f18284f

Browse files
author
DavidQ
committed
Remove advanced index barrel exports - PR_26140_077-remove-advanced-index-barrels
1 parent ba92328 commit f18284f

6 files changed

Lines changed: 50 additions & 38 deletions

File tree

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# PR_26140_077 Advanced Index Barrel Removal Report
2+
3+
## Scope
4+
- Removed the remaining targeted internal advanced barrels:
5+
- `src/advanced/promotion/index.js`
6+
- `src/advanced/state/index.js`
7+
- Replaced active imports from `src/advanced/state/index.js` with direct canonical module imports.
8+
- No schema files were changed.
9+
- No sample JSON files were changed.
10+
- No sample/game entry `index.js` files were removed.
11+
- No replacement pass-through barrels or shims were created.
12+
13+
## Import Updates
14+
- `tests/world/WorldGameStateAuthoritativeScore.test.mjs` now imports state constants, system creation, and registration directly from their owning modules.
15+
- `tests/world/WorldGameStateAuthoritativeHandoff.test.mjs` now imports state constants, system creation, and registration directly from their owning modules.
16+
- `src/shared/state/contracts.js` had a stale reference to the previously removed `src/shared/contracts/index.js`; focused advanced/state validation exposed it. This was repaired with direct exports from `sharedStateContracts.js` and `replayContracts.js` only.
17+
18+
## Validation
19+
- PASS: `node --check src/shared/state/contracts.js`
20+
- PASS: `node --check tests/world/WorldGameStateAuthoritativeScore.test.mjs`
21+
- PASS: `node --check tests/world/WorldGameStateAuthoritativeHandoff.test.mjs`
22+
- PASS: `rg -n "advanced/(promotion|state)/index\.js" --glob "*.js" --glob "*.mjs" --glob "!docs/dev/reports/**" --glob "!tests/results/**"` returned no active references.
23+
- PASS: `Test-Path src/advanced/promotion/index.js; Test-Path src/advanced/state/index.js` returned `False` for both targeted barrels.
24+
- PASS: focused `WorldGameStateAuthoritativeScore` test run.
25+
- PASS: focused `WorldGameStateAuthoritativeHandoff` test run.
26+
- PASS: `npm run test:workspace-v2` passed 59 tests.
27+
28+
## Affected Advanced/State Tests
29+
- `tests/world/WorldGameStateAuthoritativeScore.test.mjs`
30+
- `tests/world/WorldGameStateAuthoritativeHandoff.test.mjs`
31+
32+
## Full Samples Smoke Test
33+
- Skipped. This PR is import-only cleanup plus one stale direct-import repair; it does not broadly impact the sample loader/framework.
34+
35+
## Manual Validation Notes
36+
- Confirm the two targeted advanced barrel files no longer exist.
37+
- Confirm code search shows no active imports from the targeted advanced barrels.
38+
- Confirm Workspace Manager V2 still passes its standard validation gate.

src/advanced/promotion/index.js

Lines changed: 0 additions & 8 deletions
This file was deleted.

src/advanced/state/index.js

Lines changed: 0 additions & 18 deletions
This file was deleted.

src/shared/state/contracts.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,13 @@ export {
99
SHARED_PROMOTION_CONTRACT_VERSION,
1010
SHARED_PROMOTION_MODES,
1111
SHARED_STATE_KEYS,
12-
isSharedPromotionMode,
12+
isSharedPromotionMode
13+
} from "../contracts/sharedStateContracts.js";
14+
export {
1315
SHARED_REPLAY_MODEL_CONTRACT_ID,
1416
SHARED_REPLAY_MODEL_CONTRACT_VERSION,
1517
SHARED_REPLAY_TIMELINE_CONTRACT_ID,
1618
SHARED_REPLAY_TIMELINE_CONTRACT_VERSION,
1719
SHARED_REPLAY_TIMELINE_DEFAULT_WINDOW_FRAMES,
18-
SHARED_REPLAY_TIMELINE_KEYS,
19-
} from "../contracts/index.js";
20+
SHARED_REPLAY_TIMELINE_KEYS
21+
} from "../contracts/replayContracts.js";

tests/world/WorldGameStateAuthoritativeHandoff.test.mjs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ WorldGameStateAuthoritativeHandoff.test.mjs
77
import assert from 'node:assert/strict';
88
import {
99
WORLD_GAME_STATE_EVENT_TYPES,
10-
WORLD_GAME_STATE_FEATURE_GATES,
11-
createWorldGameStateSystem,
12-
registerWorldGameStateSystem
13-
} from '../../src/advanced/state/index.js';
10+
WORLD_GAME_STATE_FEATURE_GATES
11+
} from '../../src/advanced/state/constants.js';
12+
import { createWorldGameStateSystem } from '../../src/advanced/state/createWorldGameStateSystem.js';
13+
import { registerWorldGameStateSystem } from '../../src/advanced/state/integration/registerWorldGameStateSystem.js';
1414

1515
function createEventPipeline() {
1616
const listenersByType = new Map();

tests/world/WorldGameStateAuthoritativeScore.test.mjs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,9 @@ David Quesenberry
55
WorldGameStateAuthoritativeScore.test.mjs
66
*/
77
import assert from 'node:assert/strict';
8-
import {
9-
WORLD_GAME_STATE_FEATURE_GATES,
10-
createWorldGameStateSystem,
11-
registerWorldGameStateSystem
12-
} from '../../src/advanced/state/index.js';
8+
import { WORLD_GAME_STATE_FEATURE_GATES } from '../../src/advanced/state/constants.js';
9+
import { createWorldGameStateSystem } from '../../src/advanced/state/createWorldGameStateSystem.js';
10+
import { registerWorldGameStateSystem } from '../../src/advanced/state/integration/registerWorldGameStateSystem.js';
1311

1412
function createEventPipeline() {
1513
const listenersByType = new Map();

0 commit comments

Comments
 (0)