You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Current implementation of ComposedPhysicalExtensionCodec is unsound. Approach relying on try_any may produce a wrong type by accident if types are simple enough.
This is not just theoretical issue, it happened in ballista codec, where encoded parquet file was decoded as csv instead of parquet. Type was encoded by the last encoded in the list but decoded by first encoder just by pure luck. ( I guess i don't have to mention how hard this was to debug)
In order to make current implementation sound we would need to capture which encoder in the list has been used and do a reverse lookup when we do decoding. We need to encode tuple (position, serialised_blob).
To Reproduce
I dont have a reproducer at the moment, i believe it could be done very simple
Expected behavior
It is expected that types can't be decoded by accident
Activity
Thearas commentedon Jul 30, 2025
take
refactor: dispatch chained codecs by identity, not by trial
docs: record codec chain dispatch in the FFI capsule protocol skill
docs: move codec dispatch rationale out of the skill and into the code
Make extension codecs composable (#1678)