Skip to content

Port 9 skipped @Test functions in ChatViewModelTests.swift #2381

@alexey-pelykh

Description

@alexey-pelykh

Context

apps/shared/RemoteClawKit/Tests/RemoteClawKitTests/ChatViewModelTests.swift currently omits 9 test functions that were added to the upstream counterpart during the v2026.3.11 cycle. Protocol-conformance methods and state-tracking fields were ported so the transport is a complete test double, but the new @Test functions themselves were not.

Reasons they were skipped (initial port)

  • Fork's test file lacks helper infrastructure present upstream: historyPayload, loadAndWaitBootstrap, sendUserMessage, emitExternalFinal, makeViewModel, sessionEntry, modelChoice, CallbackBox, AsyncGate.
  • Fork uses different type shapes: RemoteClawChatSessionsDefaults and RemoteClawChatSessionEntry lack a contextTokens field that upstream added. Porting requires either extending the fork types with contextTokens or adapting the tests to work without it.

Scope

  1. Decide: extend fork types with contextTokens, or adapt tests to omit context-tokens assertions
  2. Port helper infrastructure (adapted as needed)
  3. Port the 9 @Test functions using the adapted helpers
  4. Verify Swift tests pass on macOS CI

Acceptance criteria

  • Decision recorded (extend types vs adapt tests)
  • All 9 @Test functions present and passing in the fork's test file
  • Helper infrastructure in fork's test file matches the patterns used by the ported tests
  • No regressions in the existing ChatViewModel tests

Out of scope

  • Redesigning the test architecture
  • Porting upstream tests beyond these 9

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions