VAYULearn
Colour theme
Investigate a failure
VAYU Learn

Data Architecture & Reliability

I Ran 9 Broken Pipelines Through VAYU. Here’s Exactly What It Said.

No summaries. No cherry-picking the good parts out of context. This is the actual output, unedited, from a live AI pipeline debugger —…

Data Architecture & ReliabilitySpark & PySparkKafka & StreamingAirflow & OrchestrationSQL & Databases

No summaries. No cherry-picking the good parts out of context. This is the actual output, unedited, from a live AI pipeline debugger — including the two times I found real bugs in my own tool while writing this post, and the one time it correctly said “I don’t know.”

If you’ve used ChatGPT to debug a stack trace before, you know the pattern: paste the error, get back 400 words of “there are several possible causes,” pick one, try it, it doesn’t work, ask again. That’s not debugging. That’s guessing with extra steps.

Here’s what happens when you don’t let the model guess.


1. Airflow — dynamic task mapping, wrong type

Code:

with DAG("dynamic_ingest", start_date=datetime(2024, 1, 1), schedule=None) as dag:
filenames = "file1.csv,file2.csv,file3.csv" # should be a list
process = PythonOperator.partial(
task_id="process_file",
python_callable=process_file,
).expand(op_kwargs={"filename": filenames})

Log:

airflow.exceptions.AirflowException: expand() got an unexpected value type for op_kwargs: <class 'str'>. Expected a list or dict of lists.

VAYU - 9.4 seconds, HIGH confidence:

Root cause: filenames is assigned a raw comma-separated string instead of a Python list, and passed directly into .expand(op_kwargs={"filename": filenames}). Airflow's dynamic task mapping requires the expanded argument to be a list of values, not a string.
# AFTER
filenames = ["file1.csv", "file2.csv", "file3.csv"]
process = PythonOperator.partial(
task_id="process_file",
python_callable=process_file,
).expand(op_kwargs=[{"filename": f} for f in filenames])

Why it failed: .expand(op_kwargs=...) requires a list of dicts, one per mapped task instance. It received a plain string, which Airflow can't iterate over as mapping input.

Cascade note: Because this error is raised at DAG parse time, no task instances are created — the entire DAG fails to load until fixed.

No hedging. No “you might want to check.” The exact line, the exact fix, the exact reason.


2. Same DAG, one fix later — a new bug shows up

This is the part generic tools can’t do at all: continuity. I clicked “New error from this fix” and pasted the next failure that came from applying VAYU’s own suggestion.

Code:

filenames = []  # now correctly a list, but empty
process = PythonOperator.partial(
task_id="process_file",
python_callable=process_file,
).expand(op_kwargs={"filename": filenames})

Log:

downstream_task: state=upstream_failed
0 mapped task instances created for process_file

VAYU flagged it as RELATED TO PRIOR FIX automatically:

filenames is an empty list, causing expand() to create zero mapped task instances. This is a direct consequence of the previous fix: the fix correctly changed the type to a list, but the variable was reset to [] instead of being populated with the intended filenames.

It didn’t just diagnose the new error in isolation — it connected it back to the fix it gave two minutes earlier and said so explicitly. That’s context most tools throw away the moment you close the tab.


3. Spark — a job that “succeeded” and quietly deleted everything

This is the scariest bug class in data engineering: no crash, no traceback, just wrong output that looks fine until someone downstream notices the numbers are off.

Code:

df = spark.read.option("mode", "DROPMALFORMED").json("s3://bucket/events/")
print(df.count())
df.write.mode("overwrite").parquet("s3://bucket/clean/")

“Log” (there wasn’t one — just a description of what happened):

Expected ~1.2M records based on source file sizes.
df.count() returned 0.
No exception raised. Job marked SUCCESS.

VAYU - MEDIUM confidence, REQUIRES REVIEW:

Root cause: DROPMALFORMED mode silently discards all rows that fail to parse, and since no exception is raised, the job completes successfully with an empty DataFrame when the input JSON is malformed or schema-incompatible.
Assumption (stated explicitly): The exact malformation type is not visible from the provided logs.

The fix wasn’t just “change the mode” — it rebuilt the job to fail loudly instead of silently:

df = (
spark.read
.option("mode", "PERMISSIVE")
.option("columnNameOfCorruptRecord", "_corrupt_record")
.json("s3://bucket/events/")
)

bad_records = df.filter(col("_corrupt_record").isNotNull())
good_records = df.filter(col("_corrupt_record").isNull()).drop("_corrupt_record")

EXPECTED_MIN = 1_000_000
if good_records.count() < EXPECTED_MIN:
raise ValueError(f"Record count below threshold. Aborting write.")

Cascade note: s3://bucket/clean/ now contains zero records. Any downstream jobs reading from that path may have already written corrupted or zeroed-out outputs — those jobs must be identified and re-run.

Notice the confidence dropped to MEDIUM here, correctly — there was no stack trace, just described behavior, and the model said so instead of pretending certainty it didn’t have.


4. Kafka — a rebalance storm with a hidden timing bug

Code:

consumer = KafkaConsumer(
'orders', bootstrap_servers=['kafka:9092'], group_id='order-processor',
max_poll_interval_ms=300000, enable_auto_commit=False,
)
for msg in consumer:
process_order(msg.value) # can take 6-8 minutes on large batches
consumer.commit()

Log:

kafka.errors.CommitFailedException: Commit cannot be completed since the group has already rebalanced...

VAYU:

process_order() takes 6-8 minutes (360-480 seconds) but max_poll_interval_ms is set to 300000ms (5 minutes), so the consumer is evicted from the group before commit() is called.
consumer = KafkaConsumer(
'orders', bootstrap_servers=['kafka:9092'], group_id='order-processor',
max_poll_interval_ms=600000,
session_timeout_ms=30000,
heartbeat_interval_ms=10000,
enable_auto_commit=False,
max_poll_records=1,
)

Cascade note — the part that actually matters in production:

After eviction, the broker reassigns the partition to another consumer, which will re-poll and reprocess the same message — if process_order() is not idempotent, this causes duplicate order processing.

That’s not a generic “consider idempotency” line. It’s specific to this config and this failure path.


5. SQL — a running total that’s silently wrong for every customer but the first

No exception here either — just numbers that are quietly incorrect.

Code:

SELECT
customer_id,
order_date,
amount,
SUM(amount) OVER (ORDER BY order_date) AS running_total
FROM orders;

Observed vs. expected (no crash, just wrong output):

Expected: running_total resets per customer_id.
Actual:
customer_id | order_date | amount | running_total
101 | 2024-01-01 | 50 | 50
101 | 2024-01-05 | 30 | 80
102 | 2024-01-02 | 20 | 100 <- should be 20
102 | 2024-01-06 | 40 | 140 <- should be 60

VAYU — 8.4 seconds, HIGH confidence:

Root cause: The window function SUM(amount) OVER (ORDER BY order_date) is missing a PARTITION BY customer_id clause, causing the running total to accumulate across all customers globally instead of resetting per customer.
Evidence: running_total for customer 102 shows 100 (cumulative from customer 101's rows) instead of 20.
-- BEFORE
SELECT
customer_id,
order_date,
amount,
SUM(amount) OVER (ORDER BY order_date) AS running_total
FROM orders;

-- AFTER
SELECT
customer_id,
order_date,
amount,
SUM(amount) OVER (
PARTITION BY customer_id
ORDER BY order_date
) AS running_total
FROM orders;

Why it failed: Without PARTITION BY, the window frame spans the entire result set ordered by order_date, so each row's running_total includes all prior rows across every customer.

Cascade note: Any downstream report, dashboard, or aggregation consuming running_total from this query will have inflated values for every customer beyond the first one in date order — those results must be recomputed after applying the fix.

Clean BEFORE/AFTER split this time, correctly separated. The first time I ran this exact test, the parser choked on SQL’s -- comment style and dumped both blocks into one jumbled mess. Found it, fixed it, re-ran it — this is the corrected output.


6. Python — the pandas mutation that silently does nothing

Code:

df = pd.read_csv("accounts.csv")
df[df['status'] == 'active']['flag'] = True
print(df['flag'].sum()) # expected >0, got 0

Log:

SettingWithCopyWarning: A value is trying to be set on a copy of a slice from a DataFrame.
AssertionError: expected flag_count > 0, got 0

VAYU — HIGH confidence:

Root cause: Chained indexing df[df['status'] == 'active']['flag'] = True creates a temporary copy of the filtered DataFrame; the assignment is applied to that throwaway copy, leaving the original df unchanged.
# AFTER
df.loc[df['status'] == 'active', 'flag'] = True

Prevention: Enable pd.options.mode.copy_on_write = True (pandas 2.0+) or enforce a lint rule that flags chained indexing at CI time.

One line. No paragraph explaining what pandas is.


7. The honesty test

I deliberately gave it almost nothing — no code, and a log line that isn’t even a real error:

Task failed. See Airflow UI for details.

Every generic LLM I’ve tried will still generate a confident-sounding paragraph here.

VAYU’s actual response:

⚠ VAYU doesn’t have enough evidence here to confidently diagnose this.
Evidence: The only log line given is a UI placeholder message, not a stack trace. No code was supplied to map it to. Assumption: NONE — there is nothing to infer from. Root cause: Cannot be determined. No code and no meaningful error logs have been provided.

Confidence: LOW. Outcome flagged as insufficient evidence — an actual banner on screen saying so, not a buried caveat.

This is the whole point of the project. A wrong answer stated with total confidence is worse than no answer. Getting an AI system to actually say “I don’t know” instead of filling the gap with something plausible-sounding is harder than it looks, and it’s the one thing that matters most in production, where a confidently wrong fix costs more time than no fix at all.


8. It catches you pasting a password

password = "sup3rSecretPass123"
conn = psycopg2.connect(host="db.prod.internal", user="app", password=password)

Before this ever reached the model, VAYU flagged it:

⚠ POSSIBLE CREDENTIAL DETECTED — A pattern matching generic password assignment was found in your code and sent for diagnosis. Review this session before sharing it further.

Worth being precise about what this does and doesn’t promise: this is a warn-not-block pattern (a placeholder-looking password shows up in real debugging code too, so blocking it outright would get in the way constantly), so the diagnosis still ran. An unambiguous, structurally-certain credential — an actual AWS key, a private key block — gets hard-blocked before it ever reaches the model at all. That’s the next example.


9. It refuses to even look at a real AWS key

aws_access_key_id = "AKIAABCDEFGHIJKLMNOP"
s3_client = boto3.client('s3', aws_access_key_id=aws_access_key_id)

VAYU’s response - before Claude ever sees the code:

⛔ High-confidence secrets were found in your code or logs. Please remove them before analyzing.(matched: aws access key id)

No diagnosis attempted. No API call made. The key’s structure alone (AKIA prefix) is unambiguous enough to hard-block outright — and it now tells you exactly what tripped it, instead of a dead-end generic error. The first time I ran this test, this exact case just said "Analysis failed. Try again." with no indication of what happened or why. Same bug class as the SQL one above — found it live, fixed it, this is the corrected behavior.


What this isn’t

It’s not finished. It’s not polished in every corner. Two of the nine tests above actually surfaced real bugs while I was putting this post together — one in how SQL fixes got formatted, one in how the frontend surfaced a security block’s error message. Both are fixed now, and the re-run results are above. I’m mentioning it not to bury it in a changelog somewhere, but because it’s the honest version of what “still in progress” actually looks like — not a disclaimer, an actual thing that happened this week.

Nobody outside my own testing has used this yet. That’s exactly why I’m posting it now instead of waiting until it feels “ready.” I’d rather find out what breaks from someone who isn’t me.

If you debug Airflow, Spark, Kafka, SQL, or Python pipelines for a living — try it at vayufix.com and break it.Paste your ugliest real error, the one that doesn’t have a clean Stack Overflow answer. Tell me exactly where it gets it wrong. That feedback is worth more to me right now than any amount of praise.


Built by a data engineer, for data engineers, still very much in progress.