Repository navigation
Description
Found during the local Tale fleet audit. P2 · confirmed parser defect.
Source: 44e0dcf254975286c0e9dea443b5cd1ca6b23347. No production testing or writes.
Standard spreadsheet CSV export can silently corrupt product names, prices and stock and fabricate a second product.
Reproduce:
- Create CSV using SheetJS sheet_to_csv with headers name,description,price,stock and one Widget row whose description is First line\nSecond line, price12, stock3.
- Import through Products → From your device (production parseCSVWithMapper + productMappers.record used in probe).
Expected: One Widget with the complete multiline description, price12 and stock3.
Observed: Parser returns two valid rows, no errors: Widget with description First line, price0,stock0; and a second product named Second line,12,3 with price0,stock0.
The assigned auditor and independent parent rerun both executed the production parser and import mappers with actual SheetJS-generated CSV/XLSX bytes. The browser file picker and database import were not exercised. The local Bun FileReader adapter only delivered File bytes to the existing callbacks.
Reproduction output:
{
"id": "CSV_MULTILINE",
"expected": {
"records": 1,
"name": "Widget",
"description": "First line\nSecond line",
"price": 12,
"stock": 3
},
"actual": {
"csv": "name,description,price,stock\nWidget,\"First line\nSecond line\",12,3",
"result": {
"data": [
{
"name": "Widget",
"description": "First line",
"stock": 0,
"price": 0,
"currency": "USD"
},
{
"name": "Second line,12,3",
"stock": 0,
"price": 0,
"currency": "USD"
}
],
"rows": [
2,
3
],
"errors": [],
"rowErrors": []
}
}
}Source locations:
Acceptance: Parse quoted CSV records across physical line boundaries; preserve embedded newline, comma and escaped quote content. This fixture must yield exactly one product with price12/stock3. Keep simple CSV controls passing.
Deduplication: #1308: Related historical incorrect-header mapping/NaN bug; this is valid quoted multiline CSV split by physical line, distinct current root.
Local evidence: tale-100-findings/settings-import-probe.ts and settings-import-parent-rerun.log in the audit notes.
Activity