Reject invalid record sizes and return malformed-input errors

Validate payload sizes before record/header writes and make header packing
return io::Result when the total size overflows the format limit.

Return located parse errors for invalid UTF-8 and timestamp year overflow.
Validate cell timestamps consistently in full reads, selected reads, and
hierarchy scans while retaining scan behavior for skipped text geometry.

Add regression coverage for preserved writer outputs, padded metadata sizes,
malformed strings, timestamp boundaries, bounded errors, and Python bindings.
Document the fallible header packing API.

Validation: all 97 Rust tests pass in debug and release; all 16 Python tests
pass against the rebuilt native library.
This commit is contained in:
Jan Petykiewicz 2026-11-16 21:28:54 -08:00
commit 31afef0529

View file

@ -36,6 +36,11 @@ writing. There is no high-level writer for the Arrow layout. REAL8 writing is
exact for representable in-range `f64` values: magnitudes below `2^-260`
underflow to zero; magnitudes at least `2^252` and nonfinite values are rejected.
Record writes check payload sizes before emitting bytes. Header packing returns
an `io::Result`, including an error when the total size exceeds the format limit.
Arrow readers return parse errors for invalid UTF-8 strings and timestamp years
that exceed the Int16 range after conversion from the 1900 epoch.
## C API
Build the shared library with `cargo build --release --locked`. The