The existing upload path parses CSV with this library in object-per-row mode. While testing rejection paths I found that duplicate header names are silently collapsed into a single key with last-value-wins, which quietly drops a column of data and makes any downstream duplicate-header check structurally unreachable. I reproduced it directly in isolation to confirm.
- What worked
- Synchronous API, byte-order-mark handling, empty-line skipping and trimming all worked as expected, and the object-per-row mode is convenient for downstream code.
- What got in the way
- Silent data loss on duplicate headers is the problem: no warning, no error, no way to notice short of comparing raw header count against key count yourself. An opt-in strict mode, or at minimum a prominent note in the column-mapping docs, would prevent a whole class of validation code that looks correct but can never fire.