Skip to content

fix(tests): restore shared-kit test module compilation after NSNull coalesce#100903

Merged
steipete merged 1 commit into
mainfrom
fix/shared-kit-tests-compile-nash
Jul 6, 2026
Merged

fix(tests): restore shared-kit test module compilation after NSNull coalesce#100903
steipete merged 1 commit into
mainfrom
fix/shared-kit-tests-compile-nash

Conversation

@steipete

@steipete steipete commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

What Problem This Solves

Fixes an issue where the shared OpenClawKit test module no longer compiles: swift test --package-path apps/shared/OpenClawKit fails with error: cannot convert value of type 'NSNull' to expected argument type 'String' at GatewayNodeSessionTests.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 and String? ?? NSNull has 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 test back on the shared package.

Evidence

  • Before: swift test --package-path apps/shared/OpenClawKit fails to compile at GatewayNodeSessionTests.swift:316 on a clean origin/main checkout.
  • After: swift test --package-path apps/shared/OpenClawKit --filter GatewayNodeSessionTests — 27/27 pass (module compiles, fixture behavior unchanged).

@openclaw-barnacle openclaw-barnacle Bot added size: XS maintainer Maintainer-authored PR labels Jul 6, 2026
@clawsweeper

clawsweeper Bot commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed July 6, 2026, 9:49 AM ET / 13:49 UTC.

Summary
The PR changes a shared OpenClawKit Swift test fixture to cast the NSNull() fallback as Any when paramsJSON is absent.

PR surface: Other 0. Total 0 across 1 file.

Reproducibility: yes. from source inspection: current main contains a Swift String? ?? NSNull() fixture expression that cannot type-check because the operands do not share a type. I did not run swift test because this review is read-only, but the PR body gives before/after commands and CI passed the relevant macOS Swift lane.

Review metrics: none identified.

Merge readiness
Overall: 🐚 platinum hermit
Proof: 🐚 platinum hermit
Patch quality: 🦞 diamond lobster
Result: ready for maintainer review.

Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch.

Rank-up moves:

  • none.

Next step before merge

  • No automated repair is needed; maintainers can handle the clean test-only PR through normal review and protected-label handling.

Security
Cleared: The diff changes one Swift test fixture expression and does not touch secrets, CI, dependencies, packaging, or runtime security boundaries.

Review details

Best 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 String? ?? NSNull() fixture expression that cannot type-check because the operands do not share a type. I did not run swift test because this review is read-only, but the PR body gives before/after commands and CI passed the relevant macOS Swift lane.

Is this the best way to solve the issue?

Yes; casting only the NSNull() fallback to Any is the narrowest maintainable fix for this heterogeneous JSON dictionary and preserves the intended JSON null fixture semantics.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against e35c7a3c95b2.

Label changes

Label changes:

  • add P2: This is a normal-priority developer test compilation regression with limited blast radius and no runtime user impact.
  • add proof: sufficient: Contributor real behavior proof is sufficient. The PR body includes before/after terminal validation for the shared OpenClawKit Swift test command, and live PR checks show the relevant macOS Swift CI lane passed at the current head.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🦞 diamond lobster.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (terminal): The PR body includes before/after terminal validation for the shared OpenClawKit Swift test command, and live PR checks show the relevant macOS Swift CI lane passed at the current head.

Label justifications:

  • P2: This is a normal-priority developer test compilation regression with limited blast radius and no runtime user impact.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🦞 diamond lobster.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (terminal): The PR body includes before/after terminal validation for the shared OpenClawKit Swift test command, and live PR checks show the relevant macOS Swift CI lane passed at the current head.
  • proof: sufficient: Contributor real behavior proof is sufficient. The PR body includes before/after terminal validation for the shared OpenClawKit Swift test command, and live PR checks show the relevant macOS Swift CI lane passed at the current head.
Evidence reviewed

PR surface:

Other 0. Total 0 across 1 file.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 0 0 0 0
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 1 1 1 0
Total 1 1 1 0

What I checked:

Likely related people:

What the crustacean ranks mean
  • 🦀 challenger crab: rare, exceptional readiness with strong proof, clean implementation, and convincing validation.
  • 🦞 diamond lobster: very strong readiness with only minor maintainer review expected.
  • 🐚 platinum hermit: good normal PR, likely mergeable with ordinary maintainer review.
  • 🦐 gold shrimp: useful signal, but proof or patch confidence is still limited.
  • 🦪 silver shellfish: thin signal; proof, validation, or implementation needs work.
  • 🧂 unranked krab: not merge-ready because proof is missing/unusable or there are serious correctness or safety concerns.
  • 🌊 off-meta tidepool: rating does not apply to this item.

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
  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. P2 Normal backlog priority with limited blast radius. labels Jul 6, 2026
@steipete
steipete merged commit 8af88e2 into main Jul 6, 2026
88 of 96 checks passed
@steipete
steipete deleted the fix/shared-kit-tests-compile-nash branch July 6, 2026 13:56
@steipete

steipete commented Jul 6, 2026

Copy link
Copy Markdown
Contributor Author

Merged via squash.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintainer Maintainer-authored PR P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: XS status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant