AI-assisted engineering/AI-collaboration build

Fix import_contacts for quoted names and true line numbers

AI-collaboration buildMedium35 min

A contacts import mangles every name with a comma in it, and support cannot find the rows it rejects.

Your task

Fix import_contacts so it honors its contract. The assistant may help, and it may be wrong.

  • a field in double quotes may contain commas, as in "Lee, Ana"
  • columns come in any order; the header names them
  • blank lines are skipped, but they still count as lines
  • a row with an empty email is rejected and reported by its line number in the file
  • leave run_import alone; it is what the tests call

Hidden tests run at submit. Your prompts, runs and edits are the trace the critique reads.