mirror of
https://github.com/efiten/coredrive-rx.git
synced 2026-12-04 02:04:08 +00:00
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>