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
{{ message }}
Repository navigation
Inconsistent invalid-enum handling: InstrumentClass warns+defaults, Side/Action throw and kill the stream #35
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.
Activity
Fix STATISTICS decode corruption and related decoder bugs (#32-#35) (#36
tbeason commentedon Jun 10, 2026
Fixed in #36 (merged as 371301c).
Fix mislabeled CHANGELOG history for v0.1.4 / v0.1.5