Repository navigation
refactor: consolidate exact boolean coercion - #99750
Conversation
|
Codex review: needs maintainer review before merge. Reviewed July 3, 2026, 10:19 PM ET / 02:19 UTC. Summary PR surface: Source -32, Tests +83, Config +8, Other +2. Total +61 across 19 files. Reproducibility: not applicable. this is a refactor PR rather than a bug report. For the previous PR-specific resolver defect, source inspection now shows the subpath in the native and workspace aliases, and the completed checks that previously failed were passing at final inspection. Review metrics: 1 noteworthy metric.
Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Risk before merge
Maintainer options:
Next step before merge
Security Review detailsBest possible solution: Let the remaining exact-head CI finish, then merge the narrow consolidation if maintainers accept the refactor-only cleanup. Do we have a high-confidence way to reproduce the issue? Not applicable; this is a refactor PR rather than a bug report. For the previous PR-specific resolver defect, source inspection now shows the subpath in the native and workspace aliases, and the completed checks that previously failed were passing at final inspection. Is this the best way to solve the issue? Yes, subject to CI completion; centralizing the exact boolean contract in normalization-core is the narrow maintainable layer. Broader truthy/falsy parsers remain separate, so this avoids changing caller-specific policy. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against a1063aa4c83f. Label changesLabel changes:
Label justifications:
Evidence reviewedPR surface: Source -32, Tests +83, Config +8, Other +2. Total +61 across 19 files. View PR surface stats
What I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
|
|
CI repair pushed at Failure classification for exact-head run
Repair:
Fresh proof:
GitHub CI is now refreshing on exact head Follow-up exact-head compact repairThe replacement run exposed the remaining branch-caused layer: Jiti/native plugin loading still lacked the new normalization subpath in its canonical workspace and internal-core alias maps. All three failures had the same Fixed in
Focused proof:
A fresh exact-head ClawSweeper review is already running, so no duplicate re-review command was posted. No merge or automerge action was taken. |
* refactor: consolidate exact boolean parsing * test: fix normalization subpath resolution * fix: resolve normalization boolean subpath
What Problem This Solves
OpenClaw had several copies of the same exact boolean coercion contract across core and plugin-facing paths. Keeping those copies synchronized made it easy for trimming, case folding, invalid-value handling, or caller defaults to drift.
Why This Change Was Made
Adds a dependency-free
@openclaw/normalization-core/boolean-coercionsubpath for the exact shared contract: booleans pass through, trimmed case-insensitivetrue/falsestrings parse, and unsupported inputs returnundefined. The existing plugin SDK record reader delegates to it, and exact-compatible core/WhatsApp callers migrate while environment reads, defaults, fallback policy, numeric or broader truthy tokens, and domain enums remain with their owners.User Impact
No user-visible behavior changes. Maintainers and plugin consumers keep the same accepted inputs and defaults through one canonical parser, reducing future drift.
Evidence
node scripts/run-vitest.mjs packages/normalization-core/src/boolean-coercion.test.ts src/agents/tools/media-tool-shared.test.ts src/cron/normalize.test.ts src/cron/service/store.test.ts src/memory-host-sdk/dreaming.test.ts extensions/whatsapp/src/channel-react-action.test.ts test/scripts/prepare-extension-package-boundary-artifacts.test.ts— 6 shards, 145 tests passed on the rebased head.pnpm --filter @openclaw/normalization-core build— emitted the new ESM and declaration subpath.node scripts/check-extension-package-tsc-boundary.mjs --mode=compile— all 117 plugin package boundaries passed.pnpm build— full package, runtime postbuild, plugin SDK declaration, and UI build passed.check:changed:tbx_01kwnceqwa5zfvcr53wrhr2the— typecheck, lint, guards, and import-cycle checks passed..agents/skills/autoreview/scripts/autoreview --mode branch --base origin/main --prompt-file /tmp/boolean-coercion-autoreview-final.md --stream-engine-output— clean, no accepted/actionable findings.