Files
corescope-rx/test
efitenandClaude Opus 5 e099f3cf93 fix: measure the truncation boundary in wire bytes, not code units
The 139-byte threshold is derived from the firmware's byte budget, but it was
compared against csv.length, which counts UTF-16 code units. RegionMap's
is_name_char accepts every byte >= 0x80, so accented region names are legal and
cost more bytes than code units — meaning a CSV at or past the boundary could
decode to fewer than 139 units and store truncated: false as fact. That is the
same under-flagging the threshold fix was written to close.

Export TRUNCATION_WARN_BYTES so the tests assert against the constant instead of
a copy; the stale 160 in an existing assertion is what let this drift unnoticed.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-18 17:20:14 +02:00
..