Skip to content

Kotlin publishes resp_seq and result on a command response; Swift publishes neither #894

Closed

Description

@ryanbr

Found by the #891 fixture in #893.

Framing.decodeCommandResponseWhoop5 (Kotlin) sets three fields from every COMMAND_RESPONSE:

resp_cmd @10   resp_seq @11   result @12  → FAILURE(0)/SUCCESS(1)/PENDING(2)/UNSUPPORTED(3)

decodeWhoop5CommandResponse (Swift) sets only resp_cmd. resp_seq and result appear nowhere in Packages/WhoopProtocol — not on the 5/MG path and not on the 4.0 one. The three real MG frames in #893 decode result=SUCCESS(1) on Android and produce no result field at all on Apple, from identical bytes.

Why it is worth closing

The result code is the diagnostic for a probe reply — it is the entire evidence column in #891, and UNSUPPORTED(3) is how the MG haptics rejection was identified in #48. Consequences today:

Whoop4ResponseResultTest.kt records that Kotlin closed the 4.0 half of this deliberately; the Swift side was not part of that change.

Scope

Publish both fields on both families in the Swift interpreter, matching the Kotlin key names and label strings exactly ("SUCCESS(1)", not "SUCCESS"), then assert them on the #893 fixtures so the two suites agree on the same bytes. Worth checking whether adding two entries to the field map disturbs any byte-map consumer or field-count assertion before landing.

Optional follow-on once the field exists: collapse the three probe-local resultLabel helpers onto it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions