fix(tests): reorder initializer arguments so the shared-kit test module compiles#101372
Conversation
|
Codex review: needs maintainer review before merge. Reviewed July 7, 2026, 1:22 AM ET / 05:22 UTC. Summary PR surface: Other 0. Total 0 across 2 files. Reproducibility: yes. by source inspection: Swift requires labeled arguments in declaration order, and current main passes 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:
Risk before merge
Maintainer options:
Next step before merge
Security Review detailsBest possible solution: Land the narrow test-only reorder after normal exact-head or merge-ref checks; no product, config, or API change is needed. Do we have a high-confidence way to reproduce the issue? Yes by source inspection: Swift requires labeled arguments in declaration order, and current main passes Is this the best way to solve the issue? Yes. Reordering the three test call sites is the narrowest maintainable fix because the current constructor declarations are internally consistent and no overload or API change is needed. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 01d6ea1f0e87. Label changesLabel changes:
Label justifications:
Evidence reviewedPR surface: Other 0. Total 0 across 2 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
|
|
Merged via squash.
|
What Problem This Solves
swift test --package-path apps/shared/OpenClawKitfails to compile on currentmainwith three "argument X must precede argument Y" errors inChatContextUsageTests.swift(2) andChatViewModelSessionDeletionTests.swift(1), blocking every local shared-kit test run.Why This Change Was Made
Two recently landed test files call labeled initializers with arguments out of declaration order (
totalTokensFreshaftercontextTokensonOpenClawChatSessionEntry;transportafteractiveAgentIdonOpenClawChatViewModel), which Swift rejects. Hosted CI does not compile the shared-kit test module on macOS, so it slipped through — the same gap as #100903 earlier today. The fix reorders the arguments at the three call sites; no behavior change.User Impact
None at runtime — test-only compile fix restoring local
swift testfor the shared package.Evidence
origin/main(exact messages in the diff context).swift test --package-path apps/shared/OpenClawKit --filter "ChatContextUsageTests|ChatViewModelSessionDeletionTests"— 11/11 pass in 2 suites; module compiles.