|
| 1 | +# PR_26180_OWNER_004-shared-validation-guard-fix |
| 2 | + |
| 3 | +Team: OWNER |
| 4 | + |
| 5 | +Branch: PR_26180_OWNER_004-shared-validation-guard-fix |
| 6 | + |
| 7 | +## Scope |
| 8 | + |
| 9 | +Fix the shared extraction guard regression in `toolbox/messages/messages.js` only. |
| 10 | + |
| 11 | +## Changes |
| 12 | + |
| 13 | +- Imported `isFiniteNumber` from `src/shared/number/numbers.js`. |
| 14 | +- Replaced two direct `Number.isFinite(...)` checks in Messages typewriter-speed handling with `isFiniteNumber(...)`. |
| 15 | +- Preserved the existing numeric conversion, fallback, and validation behavior. |
| 16 | + |
| 17 | +## Validation Results |
| 18 | + |
| 19 | +| Command | Result | Notes | |
| 20 | +| --- | --- | --- | |
| 21 | +| `node --check toolbox/messages/messages.js` | PASS | Syntax check passed | |
| 22 | +| `node dev/tools/toolbox-dev/checkSharedExtractionGuard.mjs` | PASS | Shared extraction guard passed against baseline | |
| 23 | +| `git diff --check` | PASS | No whitespace errors | |
| 24 | +| `npm test` | FAIL | Guard passed, then node test runner failed on unrelated missing module `src/engine/combat/Combat.js` imported by `dev/tests/combat/Combat.test.mjs` | |
| 25 | + |
| 26 | +## Shared Guard Result |
| 27 | + |
| 28 | +The original failure is fixed: |
| 29 | + |
| 30 | +- File: `toolbox/messages/messages.js` |
| 31 | +- Rule: `inline-helper-clone` |
| 32 | +- Match: `rule:number-is-finite-usage` |
| 33 | +- Previous unexpected count: 2 |
| 34 | +- Current guard status: PASS |
| 35 | + |
| 36 | +## NPM Test Blocker |
| 37 | + |
| 38 | +`npm test` passed the `pretest` shared extraction guard, then failed in the node test runner: |
| 39 | + |
| 40 | +```text |
| 41 | +Error [ERR_MODULE_NOT_FOUND]: Cannot find module 'src/engine/combat/Combat.js' imported from dev/tests/combat/Combat.test.mjs |
| 42 | +``` |
| 43 | + |
| 44 | +This PR does not change combat tests or engine combat files. |
| 45 | + |
| 46 | +## Merge / Baseline Status |
| 47 | + |
| 48 | +- PR merge: BLOCKED by `npm test` failure. |
| 49 | +- Baseline commit: NOT CREATED because the requested condition was `If PASS`. |
| 50 | + |
| 51 | +## ZIP |
| 52 | + |
| 53 | +- `dev/workspace/zips/PR_26180_OWNER_004-shared-validation-guard-fix_delta.zip` |
0 commit comments