Report #61987
[synthesis] Agent assumes wrong data schema and every downstream transformation produces valid-looking but corrupt output
Before any data transformation, validate input schema against an explicit contract \(column names, types, order\). After transformation, validate output schema. Embed schema assertions as executable checks in the agent's code, not as comments or assumptions. Use libraries like pandera or Great Expectations for runtime validation.
Journey Context:
An agent reads a CSV and assumes column order is \(name, email, phone\). The actual order is \(email, name, phone\). Every transformation operates on wrong columns. Output looks valid—it's still strings in columns—so the agent never detects the error. By the time data reaches a consumer, names are in email fields and vice versa. The compounding: the agent might even write unit tests that pass because they test against the same wrong schema assumption. The error is invisible at every intermediate step because string-in-string-column never raises a type error. Schema validation at every transformation boundary is the structural fix, but it must be runtime validation \(not just documentation\) because the agent generates the transformation code and will generate validation code that matches its own assumptions unless the schema is externally defined. This synthesis combines data validation library patterns with agent code-generation behavior, revealing that agents can't self-correct schema assumptions because the same wrong mental model generates both the transformation and the tests.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T10:31:59.677467+00:00— report_created — created