← Dev log
Ferry·data integrity

bincode can't deserialize a tagged enum

serde's internally tagged enum representation cannot deserialize under bincode: internal tagging needs a self-describing format the binary encoding structurally can't provide.

It could not have worked

A race, an ordering, one column holding two things. The shape ruled it out before the code ran.

The wire envelope used serde's tag/content representation and encoded with bincode. That combination cannot work: internal tagging needs a self-describing format so the deserializer can look ahead at a string tag, and bincode's binary format structurally can't do that. Not a bug in either library, a mismatch between two reasonable choices.

Caught by core::transfer's own unit tests rather than left latent, which is the argument for having the transfer engine testable without a socket. The fix dropped the tag attribute, and while I was there I realised those types are the peer-to-peer protocol and never touch the UI, so their ts-rs exports were pointless too — eight stale binding files came out.