Skip to content

v1.2.0 — top-of-range compressed floats round-trip everywhere

Choose a tag to compare

@rowan-claude rowan-claude released this 23 Aug 14:17

Top-of-range compressed floats now survive the round trip in every declaration, and the vendored wire standard is back in step with the rest of the family.

STANDARD.md is re-vendored verbatim from serialize main and carries the 2026-08-23 amendment ruled by Glenn: the writer takes the floor, then clamps the resulting integer to max_integer_value. serialize.js was the last of the six runtimes on the pre-clamp copy.

Once max_integer_value reaches 2^23 the float32 ulp at the top of the range is 1, so floor(scaled + 0.5) could land one step above max_integer_value when max was written. That produced two distinct failures, both fixed here and both now pinned as tests:

  • [0, 8388609] at resolution 1 — the code fit the 24-bit field, so the write reported success and this library's own reader refused the packet with value_out_of_range.
  • [0, 16777215] at resolution 1 — the code needed 25 bits, the top bit was masked away, and max decoded as 0 with no error on either side.

Both writer entry points are covered, checked and production, each proven able to fail on its own.

No byte changes for any declaration outside [2^23, 2^24).