Gemini 4 Hydrogen hit 43 silently on Excel, then a guardrail prompt dropped nearly 7%, totaling 40.
This series tests the silent bugs AI ships with confidence. Part 1 was an incremental SQL load that ran $1,339 low with zero errors. This time the artifact is a file: an 8-row Excel workbook with dirty rows baked in, and the question is what the model does with the rows it cannot cleanly use.
What I ran
Model: gemini-4-hydrogen-high via agy, one run per condition, temperature provider default because agy exposes no temperature flag. Prompts were pre-registered before any model call. The model wrote Python code from a text dump of the workbook and never opened the xlsx itself; the code then ran unedited on the real file (Python 3.12, pandas 2.1.4, openpyxl 3.1.2).
Both prompts embedded the same cell-by-cell dump of the workbook and ended with the same code-only instruction. With the dump included, each full prompt runs over 8,200 characters (8,276 and 8,487). The ask sentences, verbatim:
Default ask: “Write Python (pandas/openpyxl) code that reads dirty_test.xlsx and prints the total quantity by category.”
Guardrail addition, two sentences: “The file may contain dirty rows: blank categories, codes with type/encoding mismatches, interior header rows, and quantities stored as text. Handle those explicitly and report any rows you drop or cannot match.”
The file
Eight rows, five columns: item_code, item, category, quantity, unit_price. The hand-checked total is 43 (Widgets 26, Gadgets 14, and 3 on a blank-category row). The blank quantity is unknown, not zero, and excluded from the sum.
| item_code | category | quantity |
|---|---|---|
| 00123 | Widgets | 5 |
| 123 | Widgets | 7 |
| 12345 | Gadgets | 10 |
| (blank) | Gadgets | 4 |
| 123 | Widgets | 6 |
| 777 | Gadgets | (blank) |
| 888 | (blank) | 3 |
| 999 | Widgets | 8 |
The traps: 12345 stored as a number, 00123 and 123 as different items, full-width digits that look like 123, a blank quantity, and a blank category. Two more shapes ran as separate diagnostics: a merged-header variant file and interior header rows.
For context only, my earlier hand-written pandas benchmark on this file summed to 40, because a plain groupby drops the blank-category row. That 40 is the naive benchmark value. It is not Hydrogen’s default output.
Default run, no hint
Printed output, verbatim:
category
Gadgets 14.0
Widgets 26.0
NaN 3.0
Buckets sum to 43. Correct. The code used dropna=False, so the blank-category row stayed in the totals as a NaN bucket of 3.0. Reporting: none. The blank-quantity row (777) was never mentioned. On the merged-header diagnostic, the code crashed with KeyError: ‘quantity’, because the title row was read as the header. On the interior-header diagnostic, quantities were correct but the headers printed as a category bucket summing to 0.0, unexcluded and unreported.
Right answer, no receipt. Nothing in the output tells a reader that a blank-category row exists, that a quantity is missing, or that a slightly different file shape kills the code.
Guardrail run, report your drops
Printed output, verbatim (totals section):
Total quantity by category:
Gadgets: 14
Widgets: 26
Buckets sum to 40. Wrong. But the run reported its work: a dropped-rows report naming the blank-quantity row and the blank-category row (888, quantity 3) with raw data, so a reader can rebuild 43 as 40 plus the reported 3. It also normalized the full-width code to 123 with a printed notice, found the header row on the merged file without crashing, and excluded interior headers with a report.
Every detection the default missed, the guardrail caught. Then it dropped the blank-category row from its totals anyway, and the printed totals are wrong.
The inversion
The silent run was correct and the reported run was wrong, because detection and correct aggregation turned out to be separate outcomes in this test. “Report what you drop,” on its own, produced a documented wrong total.
Fair disclosure about my own prompt: it labeled blank categories as dirty rows and asked for drop reports without saying to bucket them. Dropping the row satisfied that wording. The underspecification is part of the result, not a footnote to hide. If your agent instructions say “handle dirty rows and report drops” and stop there, this is a measured example of what that sentence can produce.
Full-width digits, for the record: both runs counted that row’s quantity 6 in Widgets. The guardrail code normalized the code to 123; the default code did not. The task summed by category only, so codes were never keys and no join behavior was measured. Both runs also counted the blank-code row’s 4 units in Gadgets.
The fix: bucket and report
- Bucket blank categories. A blank category is a bucket with a name you choose, not a row to discard. In pandas that is groupby with dropna=False, or an explicit fillna on the category column before grouping.
- Report every drop. Rows you cannot use get named in the output with their raw values, so a reader can rebuild the true total from the report.
- Reconcile totals in CI. Compare row counts and quantity sums against a full rebuild on a schedule, and alert on any non-zero delta. The guardrail run’s report made 43 reconstructible; a reconcile step is what turns “reconstructible” into “checked”.
Bucket and report is one rule with a check attached. Reporting alone documented the loss. Bucketing alone would have hidden it. The pair, plus reconciliation, is the guardrail this test supports.
Caveats
One model, one run per condition. One run measures this sample, not a rate. No second model was run; the local Qwen leg was skipped because Ollama is not installed on the test machine.
The model worked from a text dump and never opened the xlsx. Merged-cell geometry survived only as row positions plus the merged range, full-width digits carried explicit codepoint metadata, and the model saw the merged variant in both conditions, so that shape was not fully blind. Interior headers do not exist in the primary workbook and were judged on a diagnostic file. The three item-code shapes can pass trivially in a category-sum task when codes are ignored.
Neither run printed a grand-total line. Every total in this post is the sum of printed buckets.
The source post below describes the seven dirty shapes. It is single-author, and the author discloses AI assistance in drafting from their own guide. The Hydrogen numbers above are our measurements on our file, not the source’s numbers.
Passes Every Test, part two. Part 3 tomorrow. Follow so you don’t miss it.
Sources
- Dirty-Excel source (single author, Nov 17, 2026, updated Nov 25, 2026; AI drafting disclosed): https://dev.to/thedaybreak0117/your-excel-tool-passed-its-test-your-data-is-still-wrong-2cjk
- Our AI test: Gemini 4 Hydrogen via agy, Dec 2, 2026, pre-registered prompts, code executed unedited on dirty_test.xlsx and the merged-header variant.
#dataengineering #ai #aiagents #dataengineer
This post started as an Instagram post →
- https://dev.to/thedaybreak0117/your-excel-tool-passed-its-test-your-data-is-still-wrong-2cjk
- https://www.instagram.com/reel/DggQspYJzsy/
- https://www.youtube.com/shorts/pF5IhL5FMQY
Numbers above trace to these sources. If one moved, tell us and we fix it.


Talk it through
Argue with us on Instagram.