Skip to content

Commit 8d6e35b

Browse files
author
DavidQ
committed
BUILD PR: consolidate duplicate definitions and export consistency inside shared util files only.
1 parent d78589f commit 8d6e35b

7 files changed

Lines changed: 107 additions & 14 deletions

docs/dev/CODEX_COMMANDS.md

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,10 @@
11
MODEL: GPT-5.3-codex
22
REASONING: high
33
COMMAND:
4-
Execute docs/pr/BUILD_PR_SHARED_EXTRACTION_09_CLEAN_UNUSED_HELPER_IMPORTS_ADVANCED_ONLY.md exactly.
5-
6-
Edit ONLY:
7-
- src/advanced/promotion/createPromotionGate.js
8-
- src/advanced/state/createWorldGameStateSystem.js
9-
4+
Execute docs/pr/BUILD_PR_SHARED_EXTRACTION_10_SHARED_UTIL_CONSOLIDATION_CHECK.md exactly.
5+
Edit only these files:
6+
- src/shared/utils/numberUtils.js
7+
- src/shared/utils/objectUtils.js
8+
Fail fast if either file does not exist.
109
Do not expand scope.
11-
12-
Package to:
13-
<project folder>/tmp/BUILD_PR_SHARED_EXTRACTION_09_CLEAN_UNUSED_HELPER_IMPORTS_ADVANCED_ONLY_delta.zip
10+
Package the delta output to <project folder>/tmp/BUILD_PR_SHARED_EXTRACTION_10_SHARED_UTIL_CONSOLIDATION_CHECK_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: remove unused helper imports after shared extraction (advanced modules only).
1+
BUILD PR: consolidate duplicate definitions and export consistency inside shared util files only.

docs/dev/NEXT_COMMAND.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Next: continue executable BUILD chain
1+
Next: if clean, continue with the next executable BUILD. If blocked, capture the exact blocker and narrow further without changing PR purpose.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Cleanup pass for unused imports after extraction steps.
1+
Built the next executable shared-extraction step focused only on internal consistency of the shared utility files.

docs/dev/reports/file_tree.txt

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,11 @@
1-
docs only
1+
docs/
2+
pr/
3+
BUILD_PR_SHARED_EXTRACTION_10_SHARED_UTIL_CONSOLIDATION_CHECK.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
Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,8 @@
1-
Unused imports removed only.
1+
SESSION VALIDATION GATE
2+
- Bundle type: BUILD
3+
- One PR purpose only: yes
4+
- Exact target files listed: yes
5+
- Fail-fast rule explicit: yes
6+
- No consumer changes allowed: yes
7+
- No guessing: yes
8+
- ZIP repo-structured and execution-ready: yes
Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
# BUILD_PR_SHARED_EXTRACTION_10_SHARED_UTIL_CONSOLIDATION_CHECK
2+
3+
## Purpose
4+
Validate and enforce consistency inside the existing shared utility files only.
5+
6+
## Single PR Purpose
7+
Consolidate duplicate helper definitions and export consistency ONLY inside:
8+
9+
- `src/shared/utils/numberUtils.js`
10+
- `src/shared/utils/objectUtils.js`
11+
12+
Do not touch any consumer file.
13+
14+
## Exact Files Allowed
15+
Edit only these 2 files:
16+
17+
1. `src/shared/utils/numberUtils.js`
18+
2. `src/shared/utils/objectUtils.js`
19+
20+
Do not edit any other file.
21+
22+
## Exact Allowed Actions
23+
24+
### In `src/shared/utils/numberUtils.js`
25+
Allowed:
26+
- confirm `asFiniteNumber` is exported exactly once
27+
- confirm `asPositiveInteger` is exported exactly once
28+
- if duplicate definitions of either helper exist within this same file, remove duplicates and keep one canonical implementation
29+
- if both named exports and bottom export lists are present, make the minimum change needed so each helper is exported exactly once
30+
31+
Not allowed:
32+
- no renaming
33+
- no behavior changes
34+
- no new helper additions
35+
- no consumer/import updates
36+
37+
### In `src/shared/utils/objectUtils.js`
38+
Allowed:
39+
- confirm `isPlainObject` is exported exactly once
40+
- if duplicate definitions of `isPlainObject` exist within this same file, remove duplicates and keep one canonical implementation
41+
- if both named exports and bottom export lists are present, make the minimum change needed so the helper is exported exactly once
42+
43+
Not allowed:
44+
- no renaming
45+
- no behavior changes
46+
- no new helper additions
47+
- no consumer/import updates
48+
49+
## Fail-Fast Rule
50+
If either shared utility file does not exist:
51+
- stop
52+
- report blocker
53+
- make no changes
54+
- do not produce a delta ZIP
55+
56+
## Hard Constraints
57+
- do not edit any file other than the 2 listed above
58+
- do not change helper behavior
59+
- do not change import paths
60+
- do not touch advanced files
61+
- do not touch engine files
62+
- do not perform repo-wide cleanup
63+
- keep one PR purpose only
64+
65+
## Validation Checklist
66+
1. Confirm only the 2 listed files changed
67+
2. Confirm `src/shared/utils/numberUtils.js` exists
68+
3. Confirm `src/shared/utils/objectUtils.js` exists
69+
4. Confirm `asFiniteNumber` is exported exactly once from `src/shared/utils/numberUtils.js`
70+
5. Confirm `asPositiveInteger` is exported exactly once from `src/shared/utils/numberUtils.js`
71+
6. Confirm `isPlainObject` is exported exactly once from `src/shared/utils/objectUtils.js`
72+
7. Confirm no helper behavior was changed
73+
8. Confirm no consumer files were touched
74+
75+
## Non-Goals
76+
- no consumer cleanup
77+
- no import normalization
78+
- no new shared file creation
79+
- no refactor beyond duplicate-removal/export-consistency inside the 2 exact files

0 commit comments

Comments
 (0)