Skip to content

Commit 1d63875

Browse files
author
DavidQ
committed
BUILD PR: normalize createPromotionStateSnapshot imports in promotion/state modules only.
1 parent c5756bc commit 1d63875

8 files changed

Lines changed: 100 additions & 35 deletions

docs/dev/CODEX_COMMANDS.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
11
MODEL: GPT-5.3-codex
22
REASONING: high
33
COMMAND:
4-
Execute docs/pr/BUILD_PR_SHARED_EXTRACTION_05_GETSTATE_PROMOTION_STATE_ONLY.md exactly.
5-
Edit only these files:
6-
- src/shared/state/createPromotionStateSnapshot.js
4+
Execute docs/pr/BUILD_PR_SHARED_EXTRACTION_06_PROMOTION_SNAPSHOT_IMPORT_NORMALIZATION.md exactly.
5+
6+
Edit ONLY:
77
- src/advanced/promotion/createPromotionGate.js
88
- src/advanced/state/createWorldGameStateSystem.js
9+
910
Do not expand scope.
10-
Package the delta output to <project folder>/tmp/BUILD_PR_SHARED_EXTRACTION_05_GETSTATE_PROMOTION_STATE_ONLY_delta.zip
11+
12+
Package output to:
13+
<project folder>/tmp/BUILD_PR_SHARED_EXTRACTION_06_PROMOTION_SNAPSHOT_IMPORT_NORMALIZATION_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: extract duplicated promotion-state getState snapshot into shared helper only.
1+
BUILD PR: normalize createPromotionStateSnapshot imports in promotion/state modules only.

docs/dev/NEXT_COMMAND.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Next: if clean, commit result and continue to the next executable BUILD. If blocked, capture the exact blocker and narrow further without changing PR purpose.
1+
Next: continue with next executable BUILD (no APPLY).
Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
1-
Built an execution-grade BUILD for the remaining getState-related work by narrowing to the only exact duplicated getState snapshot pattern identifiable without guessing.
2-
This BUILD centralizes the duplicated promotion-state snapshot logic only.
1+
Normalized import paths for shared promotion snapshot helper to prevent path drift.

docs/dev/reports/file_tree.txt

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1 @@
1-
docs/
2-
pr/
3-
BUILD_PR_SHARED_EXTRACTION_05_GETSTATE_PROMOTION_STATE_ONLY.md
4-
dev/
5-
codex_commands.md
6-
commit_comment.txt
7-
next_command.txt
8-
reports/
9-
change_summary.txt
10-
validation_checklist.txt
11-
file_tree.txt
1+
docs/pr + docs/dev
Lines changed: 4 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,5 @@
11
SESSION VALIDATION GATE
2-
- Bundle type: BUILD
3-
- One PR purpose only: yes
4-
- Exact target files listed: yes
5-
- Exact new file listed: yes
6-
- Exact source edits listed: yes
7-
- Vague repo-wide scan/refactor language avoided: yes
8-
- Scope minimized: yes
9-
- Start-of-day directories untouched: yes
10-
- Fake code claims avoided: yes
11-
- ZIP repo-structured and execution-ready: yes
12-
13-
BUILD-SPECIFIC CHECKS
14-
- Codex can execute without guessing: yes
15-
- Broad getState normalization intentionally excluded: yes
16-
- Validation steps explicit: yes
2+
- BUILD executable: yes
3+
- Exact files listed: yes
4+
- No guessing: yes
5+
- Scope minimal: yes
Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
# BUILD_PR_SHARED_EXTRACTION_06_PROMOTION_SNAPSHOT_IMPORT_NORMALIZATION
2+
3+
## Purpose
4+
Normalize imports for the newly introduced shared helper:
5+
createPromotionStateSnapshot
6+
7+
## Single PR Purpose
8+
Fix import paths ONLY for:
9+
- src/advanced/promotion/createPromotionGate.js
10+
- src/advanced/state/createWorldGameStateSystem.js
11+
12+
Ensure both use correct, stable relative paths.
13+
14+
## Exact Files Allowed
15+
Edit ONLY:
16+
17+
1. src/advanced/promotion/createPromotionGate.js
18+
2. src/advanced/state/createWorldGameStateSystem.js
19+
20+
## Exact Import Targets
21+
22+
### 1) createPromotionGate.js
23+
24+
Ensure EXACT import:
25+
26+
```js
27+
import { createPromotionStateSnapshot } from '../shared/state/createPromotionStateSnapshot.js';
28+
```
29+
30+
If incorrect:
31+
- replace existing import
32+
- do not duplicate import
33+
34+
---
35+
36+
### 2) createWorldGameStateSystem.js
37+
38+
Ensure EXACT import:
39+
40+
```js
41+
import { createPromotionStateSnapshot } from '../../shared/state/createPromotionStateSnapshot.js';
42+
```
43+
44+
If incorrect:
45+
- replace existing import
46+
- do not duplicate import
47+
48+
---
49+
50+
## Required Actions
51+
- remove any incorrect relative path
52+
- ensure only ONE import exists per file
53+
- do not modify any other imports
54+
55+
---
56+
57+
## Hard Constraints
58+
- DO NOT scan repo
59+
- DO NOT modify logic
60+
- DO NOT change function bodies
61+
- DO NOT modify other helpers
62+
- DO NOT normalize other imports
63+
- DO NOT touch getState behavior
64+
- DO NOT modify shared helper file
65+
66+
---
67+
68+
## Validation Checklist
69+
70+
1. Only 2 files changed
71+
2. Each file has exactly ONE import for:
72+
createPromotionStateSnapshot
73+
3. Import paths match EXACTLY:
74+
- '../shared/state/...'
75+
- '../../shared/state/...'
76+
4. No duplicate imports exist
77+
5. No logic changes made
78+
79+
---
80+
81+
## Non-Goals
82+
- no global import normalization
83+
- no absolute path migration
84+
- no helper changes

src/advanced/promotion/createPromotionGate.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ createPromotionGate.js
77

88
import { asFiniteNumber } from '../../shared/utils/numberUtils.js';
99
import { isPlainObject } from '../../shared/utils/objectUtils.js';
10-
import { createPromotionStateSnapshot } from '../../shared/state/createPromotionStateSnapshot.js';
10+
import { createPromotionStateSnapshot } from '../shared/state/createPromotionStateSnapshot.js';
1111

1212
function asPositiveInteger(value, fallback = 1) {
1313
const numeric = Math.floor(asFiniteNumber(value, fallback));

0 commit comments

Comments
 (0)