CapabilityNegotiation says the negotiated capability set is the intersection of client and runtime support, but negotiateBinaryEncoding violates that rule. At lib/src/main/kotlin/dev/arcp/runtime/CapabilityNegotiation.kt:64, the function computes the intersection and then returns listOf("base64") when the intersection is empty. If a client advertises only ["raw"] and the runtime advertises only ["base64"], the negotiated result still says base64, which is not supported by the client. No unit test currently covers binary encoding negotiation.
Fix prompt: Preserve the default ["base64"] for omitted/default capability blocks, but do not invent base64 when both sides explicitly advertise incompatible non-empty lists. Return an empty list or add a capability negotiation rejection for incompatible binary encodings, especially when binaryStreams or artifact support depends on an encoding. Add tests for matching encodings, default values, explicitly empty lists, and incompatible lists.
CapabilityNegotiationsays the negotiated capability set is the intersection of client and runtime support, butnegotiateBinaryEncodingviolates that rule. Atlib/src/main/kotlin/dev/arcp/runtime/CapabilityNegotiation.kt:64, the function computes the intersection and then returnslistOf("base64")when the intersection is empty. If a client advertises only["raw"]and the runtime advertises only["base64"], the negotiated result still saysbase64, which is not supported by the client. No unit test currently covers binary encoding negotiation.Fix prompt: Preserve the default
["base64"]for omitted/default capability blocks, but do not inventbase64when both sides explicitly advertise incompatible non-empty lists. Return an empty list or add a capability negotiation rejection for incompatible binary encodings, especially whenbinaryStreamsor artifact support depends on an encoding. Add tests for matching encodings, default values, explicitly empty lists, and incompatible lists.