The debugging packet looks harmless until you open the attachment. The question is why an importer counts one product twice. The file contains a month of inventory, supplier details, and notes copied from an internal system. An AI assistant might need the parsing rule and a strange field value. It has been handed the business around them.
That is a hypothetical handoff, but the decision it exposes is practical. Before asking a model to diagnose a failure, build an example that still fails after the private content is gone. A shorter attachment is useful only if it retains the behavior you need explained. Removing the trigger can make a packet look clean while leaving the assistant with the wrong problem.
For this case, the packet starts entirely from invented data. There is no customer export to anonymize and no production incident behind the measurements. The example is a tiny inventory file with three columns: SKU, name, and quantity. Its one product has the invented SKU C-303, quantity two, and a name containing both an accented character and a newline.
The name is “Café mug” followed by a line break and “blue.” Double quotes enclose that entire field. On screen, the header occupies one physical line and the product occupies two more. The intended result is one logical record, with the accent and the embedded newline preserved in the product name. Counting visible lines gives a different answer.
The deliberately faulty counter uses len(text.splitlines()) - 1. It splits the text at line boundaries and subtracts one for the header. With this fixture, it reports two data lines. That arithmetic is correct about the lines it counted. The mistake is treating each of those lines as a complete inventory record without interpreting the field’s quotation marks.
Python’s CSV documentation provides the relevant contract. A reader interprets rows using the selected CSV dialect; DictReader maps their fields to dictionary keys and, by default, takes those keys from the first row. The documentation also specifies opening file objects with newline='' so the CSV module can handle newlines itself. Those details are enough to build a focused comparison.
In the local check, the fixture is written as UTF-8 and opened with that encoding and the documented newline setting. DictReader returns one record. Its name is checked against the complete expected string, including the accent and line break. A count of one would be weak evidence if the parser quietly discarded half the product name to achieve it.
This run used Python 3.12.10 and its standard library. The faulty counter reported two; the parser returned one and preserved the expected fields. These are results from a disposable synthetic example. They do not establish that a particular production importer uses this counter, or that replacing its parser would fix an incident. The packet demonstrates a specific failure mechanism that a maintainer can inspect.
The accented character deserves a separate check because a model could easily seize on it as the explanation. Replacing “Café” with “Cafe” leaves the faulty count at two. Keeping the accent but replacing the embedded newline with a space brings that count to one. In this example, the newline exposes the counting mistake; the accent remains part of the fidelity check.
That distinction changes the request you give the assistant. “Fix the Unicode bug” already commits to a diagnosis the evidence does not support. “Explain why this counter reports two records for the attached one-record fixture” leaves room for the demonstrated cause. Supply the expected name and count as well as the actual count, so a proposed repair has something concrete to satisfy.
Reduction needs the same discipline. A second invented fixture adds a warehouse-note column containing the words “invented note.” The faulty counter still reports two, and the CSV reader still returns one record. Removing that extra column preserves the contrast. This is evidence that the added column is unnecessary for this reproduction, not a claim that warehouse metadata can never affect an importer.
The resulting packet contains the three-column fixture, the counter, the parser comparison, the expected result, and the local runtime version. It also contains the two control fixtures and the command python3 check.py. Running that command checks the failure and the comparisons together. The printed result records the actual runtime, so someone repeating it can distinguish their environment from the one reported here.
A compact packet should still explain how to read its failure. In this one, the baseline result of two is expected evidence of the defect; it is not a successful import. The comparison result of one must come with the exact preserved name and quantity. A reviewer should be able to tell whether the defect disappeared because the implementation changed or because someone simplified away the troublesome newline.
Before any sharing, inspect the entire packet as a recipient would receive it. Open the fixture, the script, and the captured output. Check filenames, comments, copied diagnostics, and attached archives as well as the visible example. A carefully invented row does little good if the accompanying traceback includes an internal hostname, a token, or an account-specific path that the task does not need.
A useful removal checklist asks four questions. Is every sample value invented or otherwise permitted for this destination? Does each included field help reproduce or interpret the failure? Have unrelated identifiers, credentials, URLs, and account metadata been removed from all attachments? Does the final packet still produce the observed failure with the stated command? An unexplained answer keeps the packet local.
These questions are a review procedure, not a certification that arbitrary data has become anonymous. For a real incident, the maintainer must determine whether the synthetic case reproduces the relevant behavior of the real system. If it does not, report that gap and continue investigating within the permitted environment. More authentic data is not automatically the right next attachment.
The destination is another human decision. Permission to inspect an internal failure does not tell the assistant which external service may receive its evidence. The person responsible for the data should select the permitted destination after reviewing the finished packet. In this case, the reproduction checks ran locally with invented inputs; no external debugging service analyzed a private export.
The assistant can now receive a narrow job: explain the demonstrated mismatch, propose a bounded correction, and show that one logical record retains its full name. The maintainer keeps the original incident context and decides whether the explanation applies. Useful debugging evidence is the smallest packet that preserves the question and its testable answer. Keep the quoted newline. Leave the business data out.
Use Python’s CSV documentation to check the parsing contract before reducing your next import reproduction.
If this was useful, forward it to one engineer who needs less noise in their feed.


