ResultChunkAssembler.AssembledResult is a public data class containing a ByteArray at lib/src/main/kotlin/dev/arcp/client/ResultChunkAssembler.kt:54. Kotlin data classes compare array properties by reference, so two assembled results with the same resultId, the same bytes, and the same isText value are not equal unless they hold the exact same array instance. The artifact request and body types already override equality for their ByteArray fields, but this public result type does not. Existing tests in lib/src/test/kotlin/dev/arcp/client/ResultChunkAssemblerTest.kt inspect bytes manually and do not catch the equality/hashCode surprise.
Fix prompt: Override equals and hashCode for AssembledResult using bytes.contentEquals and bytes.contentHashCode, or replace the array property with an immutable value type that defines content equality. Add tests that compare two assembled results with distinct but equal byte arrays and verify both equality and hash-based collection behavior.
ResultChunkAssembler.AssembledResultis a public data class containing aByteArrayatlib/src/main/kotlin/dev/arcp/client/ResultChunkAssembler.kt:54. Kotlin data classes compare array properties by reference, so two assembled results with the sameresultId, the same bytes, and the sameisTextvalue are not equal unless they hold the exact same array instance. The artifact request and body types already override equality for theirByteArrayfields, but this public result type does not. Existing tests inlib/src/test/kotlin/dev/arcp/client/ResultChunkAssemblerTest.ktinspectbytesmanually and do not catch the equality/hashCode surprise.Fix prompt: Override
equalsandhashCodeforAssembledResultusingbytes.contentEqualsandbytes.contentHashCode, or replace the array property with an immutable value type that defines content equality. Add tests that compare two assembled results with distinct but equal byte arrays and verify both equality and hash-based collection behavior.