CSV upload fails at scale
An AI agent wrote this Node.js endpoint to let users upload and parse a CSV of contacts. It worked in the demo with a 20-row file. What fails for real users with real files, and how would you harden it?
Implement
parse_contact_import(csv_text: str, max_rows: int) → list[list[str]]Examples
in
["name,email\nAda Lovelace,ada@example.com\nAlan Turing,alan@example.org\n",100]out[["ok","Ada Lovelace","ada@example.com"],["ok","Alan Turing","alan@example.org"]]in
["name,email\r\n\"Lovelace, Ada\",ada@example.com\r\nGrace Hopper,grace@navy.mil\r\n",100]out[["ok","Lovelace, Ada","ada@example.com"],["ok","Grace Hopper","grace@navy.mil"]]in
["name,email\nAda,ada@example.com\nBob,not-an-email\n",100]out[["ok","Ada","ada@example.com"],["bad_email","Bob","not-an-email"]]What a strong answer looks like
Treat the AI’s output as a draft to verify, not an answer to trust. Name the specific flaw and the input that triggers it, say how you’d catch it (tests, edge cases, reading critically), and how you’d re-prompt or decompose to get it right.
0:00 of about 17 min
Vibe & agentic: describe the solution in plain language (or narrate it) and the coach grades your approach.
Which questions mattered is sealed until you submit. Telling you now would just be handing over the edge cases.
Run or narrate your approach, then ask the coach.