|
| 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