Skip to content

Commit 7f32e33

Browse files
author
DavidQ
committed
BUILD PR: add minimal jsconfig @shared alias bootstrap and switch advanced shared imports only.
1 parent 27be571 commit 7f32e33

12 files changed

Lines changed: 165 additions & 63 deletions

docs/dev/CODEX_COMMANDS.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
MODEL: GPT-5.3-codex
22
REASONING: high
33
COMMAND:
4-
Execute docs/pr/BUILD_PR_SHARED_EXTRACTION_14_NETWORK_SAMPLE_C_IMPORT_CONSOLIDATION.md exactly.
4+
Execute docs/pr/BUILD_PR_SHARED_EXTRACTION_15B_ALIAS_CONFIG_BOOTSTRAP_JSCONFIG_ONLY.md exactly.
55
Edit only these files:
6-
- games/network_sample_c/game/ReconciliationLayerAdapter.js
7-
- games/network_sample_c/game/StateTimelineBuffer.js
6+
- jsconfig.json (new file)
7+
- src/advanced/promotion/createPromotionGate.js
8+
- src/advanced/state/createWorldGameStateSystem.js
9+
Fail fast if any required shared target file is missing.
810
Do not expand scope.
9-
Package the delta output to <project folder>/tmp/BUILD_PR_SHARED_EXTRACTION_14_NETWORK_SAMPLE_C_IMPORT_CONSOLIDATION_delta.zip
11+
Package the delta output to <project folder>/tmp/BUILD_PR_SHARED_EXTRACTION_15B_ALIAS_CONFIG_BOOTSTRAP_JSCONFIG_ONLY_delta.zip

docs/dev/COMMIT_COMMENT.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
BUILD PR: consolidate shared-helper imports in network_sample_c only.
1+
BUILD PR: add minimal jsconfig @shared alias bootstrap and switch advanced shared imports only.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Built the next executable step to consolidate duplicate shared-helper import lines inside network_sample_c only.
1+
Replaced the blocked alias BUILD with an execution-grade retry that explicitly creates a minimal jsconfig.json and switches only the two advanced files to @shared imports.

docs/dev/reports/file_tree.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
docs/
22
pr/
3-
BUILD_PR_SHARED_EXTRACTION_14_NETWORK_SAMPLE_C_IMPORT_CONSOLIDATION.md
3+
BUILD_PR_SHARED_EXTRACTION_15B_ALIAS_CONFIG_BOOTSTRAP_JSCONFIG_ONLY.md
44
dev/
55
codex_commands.md
66
commit_comment.txt
Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
SESSION VALIDATION GATE
22
- Bundle type: BUILD
33
- One PR purpose only: yes
4-
- Exact target files listed: yes
5-
- Exact allowed consolidation rules listed: yes
6-
- No path changes or logic changes allowed: yes
4+
- Exact files listed: yes
5+
- Exact new file content listed: yes
6+
- Prior failure cause addressed directly: yes
7+
- Fail-fast gate explicit: yes
78
- Scope minimized: yes
89
- ZIP repo-structured and execution-ready: yes
Lines changed: 122 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,122 @@
1+
# BUILD_PR_SHARED_EXTRACTION_15B_ALIAS_CONFIG_BOOTSTRAP_JSCONFIG_ONLY
2+
3+
## Purpose
4+
Unblock the alias-import proof point by adding one minimal repo config file that supports `@shared/*` path resolution for editor/tooling use, then switching the two advanced files to that alias.
5+
6+
## Single PR Purpose
7+
Create exactly one new config file:
8+
9+
- `jsconfig.json`
10+
11+
Then update only these 2 files to use `@shared/*` imports:
12+
13+
1. `src/advanced/promotion/createPromotionGate.js`
14+
2. `src/advanced/state/createWorldGameStateSystem.js`
15+
16+
This BUILD exists because the prior alias BUILD fail-fast stopped: no suitable existing config file from the allowed set was present.
17+
18+
## Exact Files Allowed
19+
Edit only these 3 files:
20+
21+
1. `jsconfig.json` **(new file)**
22+
2. `src/advanced/promotion/createPromotionGate.js`
23+
3. `src/advanced/state/createWorldGameStateSystem.js`
24+
25+
Do not edit any other file.
26+
27+
## Exact New File
28+
Create:
29+
30+
`jsconfig.json`
31+
32+
With exactly this content:
33+
34+
```json
35+
{
36+
"compilerOptions": {
37+
"baseUrl": ".",
38+
"paths": {
39+
"@shared/*": ["src/shared/*"]
40+
}
41+
}
42+
}
43+
```
44+
45+
Do not add any other alias.
46+
Do not add any other compiler options.
47+
Do not create tsconfig, vite, or webpack config in this PR.
48+
49+
## Exact Source Changes
50+
51+
### 1) `src/advanced/promotion/createPromotionGate.js`
52+
Replace only shared-helper relative imports with alias imports.
53+
54+
Target alias forms:
55+
```js
56+
import { asFiniteNumber } from '@shared/utils/numberUtils.js';
57+
import { asPositiveInteger } from '@shared/utils/numberUtils.js';
58+
import { isPlainObject } from '@shared/utils/objectUtils.js';
59+
import { createPromotionStateSnapshot } from '@shared/state/createPromotionStateSnapshot.js';
60+
```
61+
62+
Rules:
63+
- preserve existing imported specifiers
64+
- if imports from the same aliased module can be combined without changing behavior/style, minimum-edit combination is allowed
65+
- do not touch unrelated imports
66+
- do not change logic
67+
68+
### 2) `src/advanced/state/createWorldGameStateSystem.js`
69+
Replace only shared-helper relative imports with alias imports.
70+
71+
Target alias forms:
72+
```js
73+
import { asFiniteNumber } from '@shared/utils/numberUtils.js';
74+
import { asPositiveInteger } from '@shared/utils/numberUtils.js';
75+
import { isPlainObject } from '@shared/utils/objectUtils.js';
76+
import { createPromotionStateSnapshot } from '@shared/state/createPromotionStateSnapshot.js';
77+
```
78+
79+
Rules:
80+
- preserve existing imported specifiers
81+
- if imports from the same aliased module can be combined without changing behavior/style, minimum-edit combination is allowed
82+
- do not touch unrelated imports
83+
- do not change logic
84+
85+
## Fail-Fast Gate
86+
Before editing the 2 source files, confirm these shared targets exist:
87+
88+
- `src/shared/utils/numberUtils.js`
89+
- `src/shared/utils/objectUtils.js`
90+
- `src/shared/state/createPromotionStateSnapshot.js`
91+
92+
If any is missing:
93+
- stop
94+
- report blocker
95+
- make no changes
96+
- do not create a delta ZIP
97+
98+
## Hard Constraints
99+
- edit only the 3 listed files
100+
- no engine files
101+
- no sample files
102+
- no repo-wide alias rollout
103+
- no removal of `.js` extensions
104+
- no helper behavior changes
105+
- no extra config beyond the exact `jsconfig.json` content above
106+
- keep one PR purpose only
107+
108+
## Validation Checklist
109+
1. Confirm only the 3 listed files changed
110+
2. Confirm `jsconfig.json` exists and matches the exact content in this BUILD
111+
3. Confirm exactly 2 advanced files now import shared helpers via `@shared/...`
112+
4. Confirm no unrelated imports changed
113+
5. Confirm no logic changed
114+
6. Confirm no sample or engine file was touched
115+
116+
## Non-Goals
117+
- no repo-wide alias migration
118+
- no alias rollout to samples
119+
- no alias rollout to engine
120+
- no Vite/Webpack/TS config work
121+
- no path cleanup outside the 2 exact advanced files
122+
- no toolchain redesign

find_dupes.bat

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

jsconfig.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"compilerOptions": {
3+
"baseUrl": ".",
4+
"paths": {
5+
"@shared/*": ["src/shared/*"]
6+
}
7+
}
8+
}

src/advanced/promotion/createPromotionGate.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ David Quesenberry
55
createPromotionGate.js
66
*/
77

8-
import { asFiniteNumber, asPositiveInteger } from '../../shared/utils/numberUtils.js';
9-
import { isPlainObject } from '../../shared/utils/objectUtils.js';
10-
import { createPromotionStateSnapshot } from '../shared/state/createPromotionStateSnapshot.js';
8+
import { asFiniteNumber, asPositiveInteger } from '@shared/utils/numberUtils.js';
9+
import { isPlainObject } from '@shared/utils/objectUtils.js';
10+
import { createPromotionStateSnapshot } from '@shared/state/createPromotionStateSnapshot.js';
1111

1212
function normalizeCriteriaMap(input, requiredCriteria = []) {
1313
const normalized = {};

src/advanced/state/createWorldGameStateSystem.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@ import {
1818
createTransitionAppliedEvent,
1919
createTransitionRejectedEvent
2020
} from './events.js';
21-
import { createPromotionStateSnapshot } from '../../shared/state/createPromotionStateSnapshot.js';
22-
import { asFiniteNumber, asPositiveInteger } from '../../shared/utils/numberUtils.js';
23-
import { isPlainObject } from '../../shared/utils/objectUtils.js';
21+
import { createPromotionStateSnapshot } from '@shared/state/createPromotionStateSnapshot.js';
22+
import { asFiniteNumber, asPositiveInteger } from '@shared/utils/numberUtils.js';
23+
import { isPlainObject } from '@shared/utils/objectUtils.js';
2424
import {
2525
cloneDeep,
2626
createReadonlyClone,

0 commit comments

Comments
 (0)