fix(tests): restore shared-kit test module compilation after NSNull coalesce#100903
Conversation
|
Codex review: needs maintainer review before merge. Reviewed July 6, 2026, 9:49 AM ET / 13:49 UTC. Summary PR surface: Other 0. Total 0 across 1 file. Reproducibility: yes. from source inspection: current main contains a Swift Review metrics: none identified. Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Next step before merge
Security Review detailsBest possible solution: Land the narrow test fixture cast so shared OpenClawKit tests compile without changing runtime wire behavior. Do we have a high-confidence way to reproduce the issue? Yes from source inspection: current main contains a Swift Is this the best way to solve the issue? Yes; casting only the AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against e35c7a3c95b2. Label changesLabel changes:
Label justifications:
Evidence reviewedPR surface: Other 0. Total 0 across 1 file. 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
|
|
Merged via squash.
|
What Problem This Solves
Fixes an issue where the shared OpenClawKit test module no longer compiles:
swift test --package-path apps/shared/OpenClawKitfails witherror: cannot convert value of type 'NSNull' to expected argument type 'String'atGatewayNodeSessionTests.swift:316, blocking every local shared-kit test run (any iOS/macOS chat work validates through this suite).Why This Change Was Made
paramsJSON ?? NSNull()cannot type-check —??needs both sides to unify andString? ?? NSNullhas no common type. Introduced in #100842 ("keep node invokes responsive during system.run"); hosted CI does not compile the shared-kit test module on macOS, so it slipped through. The fix is the standard idiom for heterogeneous JSON dictionaries:paramsJSON ?? (NSNull() as Any), preserving the intended "JSON null when params absent" wire fixture exactly.User Impact
None at runtime — test-only compile fix. Developers get
swift testback on the shared package.Evidence
swift test --package-path apps/shared/OpenClawKitfails to compile atGatewayNodeSessionTests.swift:316on a cleanorigin/maincheckout.swift test --package-path apps/shared/OpenClawKit --filter GatewayNodeSessionTests— 27/27 pass (module compiles, fixture behavior unchanged).