Line refs are against the registered v0.1.3 tarball. Minor / robustness.
Problem
Invalid enum bytes are handled inconsistently across the decoder:
InstrumentClass: warns and defaults — Unknown InstrumentClass value: 116, using OTHER as default (src/types.jl:667)
Side / Action: throw ArgumentError: invalid value for Enum Side: 136, killing the entire decode stream
Hit this while debugging the StatMsg misalignment (#1): once the stream desynced, the first bad Side/Action byte aborted everything, masking the real problem. A warn-and-default (or warn-and-skip-record using hd.length) policy for all enums would make the decoder degrade gracefully instead of failing the whole response on one bad byte, and would have made the root cause much easier to spot.
Suggested fix
Pick one policy (warn + sentinel value, or skip the record via hd.length) and apply it uniformly to Side, Action, InstrumentClass, and any other enum reads in the hot path.
Line refs are against the registered v0.1.3 tarball. Minor / robustness.
Problem
Invalid enum bytes are handled inconsistently across the decoder:
InstrumentClass: warns and defaults —Unknown InstrumentClass value: 116, using OTHER as default(src/types.jl:667)Side/Action: throwArgumentError: invalid value for Enum Side: 136, killing the entire decode streamHit this while debugging the StatMsg misalignment (#1): once the stream desynced, the first bad
Side/Actionbyte aborted everything, masking the real problem. A warn-and-default (or warn-and-skip-record usinghd.length) policy for all enums would make the decoder degrade gracefully instead of failing the whole response on one bad byte, and would have made the root cause much easier to spot.Suggested fix
Pick one policy (warn + sentinel value, or skip the record via
hd.length) and apply it uniformly toSide,Action,InstrumentClass, and any other enum reads in the hot path.