Baseline and classification
Minimal reproduction
Import this CSV while mapping both title columns to title:
ID,标题,标题
dup,first,second
Both executions succeed and persist title=second; the first value is silently discarded.
The same ambiguity can occur when distinct source headers map to the same destination field.
Decision needed / current behavior
- Safer expected behavior: reject duplicate effective destination headers/keys before writes, with a request-level or row-independent mapping error.
- Actual:
parseCsvToRows assigns object keys in order, so later values silently overwrite earlier ones.
Impact
Malformed files or ambiguous mapping can cause silent data loss while the import summary reports success.
Evidence and exclusions
- Source:
packages/rest/src/import-prepare.ts, CSV header mapping/object assignment.
- Quoted commas, BOM, CRLF, escaped quotes, and ordinary mappings passed QA.
- Because no public duplicate-header contract was found, this issue requests an explicit validation decision rather than labeling existing behavior a regression.
Required regression tests
- Duplicate raw headers.
- Two distinct raw headers mapped to one destination field.
- Error occurs before any row is written and identifies the conflicting columns/field.
Baseline and classification
98874656ffc50ce1531af52346228ffcdda73fba.2a71f4825). No exact duplicate issue was found.Minimal reproduction
Import this CSV while mapping both title columns to
title:Both executions succeed and persist
title=second; the first value is silently discarded.The same ambiguity can occur when distinct source headers map to the same destination field.
Decision needed / current behavior
parseCsvToRowsassigns object keys in order, so later values silently overwrite earlier ones.Impact
Malformed files or ambiguous mapping can cause silent data loss while the import summary reports success.
Evidence and exclusions
packages/rest/src/import-prepare.ts, CSV header mapping/object assignment.Required regression tests