<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/the-corruption-that-wasn-t-there-supmh9si0" -->

---
title: The Corruption That Wasn’t There | daily.dev
description: A case study walks through how an AI diagnostic agent (aiHelpDesk) fabricated a convincing but entirely false Postgres WAL corruption error while investigating...
canonical: https://daily.dev/posts/the-corruption-that-wasn-t-there-supmh9si0
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: The Corruption That Wasn’t There | daily.dev
og:description: A case study walks through how an AI diagnostic agent (aiHelpDesk) fabricated a convincing but entirely false Postgres WAL corruption error while investigating...
og:url: https://daily.dev/posts/the-corruption-that-wasn-t-there-supmh9si0
og:image: https://api.daily.dev/og/posts/sUpMh9si0.png
og:image:alt: The Corruption That Wasn’t There
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# The Corruption That Wasn’t There

**[ITNEXT](https://daily.dev/sources/itnext)** · 13 min read · 6 upvotes · 1 comments

## Summary

A case study walks through how an AI diagnostic agent (aiHelpDesk) fabricated a convincing but entirely false Postgres WAL corruption error while investigating a cleanly-shutdown replica container. The real logs showed a routine administrator-triggered shutdown, but the model's evidence field cited a fake 'terminating walreceiver due to timeout' error and an invented 'invalid record length' message that never appeared anywhere in the actual logs. The piece details the fourth layer of a fabrication-detection system, checkEvidenceProvenance, which does a substring check of quoted evidence against real recorded tool outputs rather than trusting a second model's judgment. SQL queries against the audit database (SQLite/Postgres) are shown to demonstrate how the discrepancy was traced. A softer, contrasting example is also given where a model merely paraphrased an empty result set ('No active connections found' vs actual '(0 rows)'), illustrating that not all flagged evidence mismatches are equally severe. The piece closes with promotion of aiHelpDesk's broader trust and certification framework.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://itnext.io/the-corruption-that-wasnt-there-138085295c1b>

## Questions this post answers

### How can I detect when an AI diagnostic agent fabricates evidence in its reasoning?

One approach is content provenance verification: for every hypothesis with a non-empty evidence field, pull the real tool_execution events recorded for that step and check whether the quoted text appears, after normalization, in the actual output. This is a plain substring check with no semantic judgment or second model vouching for the first, so it catches invented quotes even when the cited tool call genuinely occurred.

_Anyone building trust into AI-assisted incident response can follow this evidence-verification pattern discussed on daily.dev._

### What is an example of an AI agent inventing a fake Postgres error message?

An agent investigating a cleanly-shutdown replica claimed the walreceiver terminated due to a timeout and cited a fabricated line reading 'invalid record length at 0/B000000: expected at least 24, got 0.' The real logs showed the walreceiver terminated because of an administrator command during a routine clean shutdown, and neither quoted line ever appeared anywhere in the actual recorded output.

_Teams debugging AI-generated Postgres diagnostics can compare notes on fabrication risks like this via daily.dev._

### How do I distinguish a harmless AI paraphrase from a fabricated fact in agent-generated incident reports?

Both can look identical from the outside as a flagged, quoted claim, but only checking the underlying tool output reveals the difference. In one case a model paraphrased an empty query result '(0 rows)' into the sentence 'No active connections found,' a citation-style slip; in another it invented an entirely fictional WAL corruption error, a fabricated fact that could send an operator down the wrong remediation path.

_Developers weighing how much to trust AI-generated ops summaries can dig into cases like this on daily.dev._

## Community discussion

Top comments from developers on daily.dev.

**@trevorsuna** · 0 upvotes

> Checking quoted evidence against recorded tool output is a strong guardrail because it tests provenance instead of asking another model for an opinion. The tricky bit is normalization: harmless paraphrases need a softer path, while invented WAL errors should fail closed and preserve the exact trace for review.

## Similar posts on daily.dev

- [The Witness Was the Suspect: Why AI Audit Logs Can't Be Trusted](https://daily.dev/posts/the-witness-was-the-suspect-why-ai-audit-logs-can-t-be-trusted-qkcmhguoy) · DEV · 9 upvotes · 1 comments
- [AI-Based DB Replication Triage and Remediation. The Evaluation Story.](https://daily.dev/posts/ai-based-db-replication-triage-and-remediation-the-evaluation-story--izf0au4yn) · ITNEXT · 2 upvotes · 0 comments
- [Why every AI agent decision needs a receipt](https://daily.dev/posts/why-every-ai-agent-decision-needs-a-receipt-toqfrephk) · The New Stack · 1 upvotes · 0 comments
- [That Is Embarrassing: Why Frontier AI Still Makes Things Up, and What to Do About It](https://daily.dev/posts/that-is-embarrassing-why-frontier-ai-still-makes-things-up-and-what-to-do-about-it-y2kdfc0zu) · Towards Data Science · 1 upvotes · 0 comments
- [In comedy of errors, men accused of wiping gov databases turned to an AI tool](https://daily.dev/posts/in-comedy-of-errors-men-accused-of-wiping-gov-databases-turned-to-an-ai-tool-pmtdcshhs) · Ars Technica · 35 upvotes · 2 comments

---

Tags: [#ai-agents](https://daily.dev/tags/ai-agents), [#postgresql](https://daily.dev/tags/postgresql), [#observability](https://daily.dev/tags/observability), [#sqlite](https://daily.dev/tags/sqlite)

[View this post on daily.dev](https://daily.dev/posts/the-corruption-that-wasn-t-there-supmh9si0)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"The Corruption That Wasn’t There","url":"https://daily.dev/posts/the-corruption-that-wasn-t-there-supmh9si0","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/the-corruption-that-wasn-t-there-supmh9si0"},"datePublished":"2026-09-13T08:05:22.475Z","dateModified":"2026-09-13T08:06:44.162Z","description":"A case study walks through how an AI diagnostic agent (aiHelpDesk) fabricated a convincing but entirely false Postgres WAL corruption error while investigating...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/8eabad9a24d4a55c16ce93868c0f1b86?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/8eabad9a24d4a55c16ce93868c0f1b86?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"ITNEXT","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"ITNEXT","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/itnext2","url":"https://daily.dev/sources/itnext"},"commentCount":1,"discussionUrl":"https://daily.dev/posts/the-corruption-that-wasn-t-there-supmh9si0","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":6},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":1}],"keywords":"ai-agents,postgresql,observability,sqlite","timeRequired":"PT13M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"ITNEXT","item":"https://daily.dev/sources/itnext"},{"@type":"ListItem","position":3,"name":"The Corruption That Wasn’t There"}]}
{"@context":"https://schema.org","@type":"WebPage","@id":"https://daily.dev/posts/the-corruption-that-wasn-t-there-supmh9si0","comment":[{"@type":"Comment","text":"Checking quoted evidence against recorded tool output is a strong guardrail because it tests provenance instead of asking another model for an opinion. The tricky bit is normalization: harmless paraphrases need a softer path, while invented WAL errors should fail closed and preserve the exact trace for review.","datePublished":"2026-09-14T08:17:11.908Z","url":"https://daily.dev/posts/sUpMh9si0#c-ScdX2RYUq","author":{"@type":"Person","name":"Trevor Suna","url":"https://daily.dev/trevorsuna","image":"https://media.daily.dev/image/upload/s--dZ7gXxpp--/f_auto/v1784081551/avatars/avatar_EMoP47rpuw8DNjhp6R1b6?_a=BAMAMicg0"}}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/the-corruption-that-wasn-t-there-supmh9si0#faq","mainEntity":[{"@type":"Question","name":"How can I detect when an AI diagnostic agent fabricates evidence in its reasoning?","acceptedAnswer":{"@type":"Answer","text":"One approach is content provenance verification: for every hypothesis with a non-empty evidence field, pull the real tool_execution events recorded for that step and check whether the quoted text appears, after normalization, in the actual output. This is a plain substring check with no semantic judgment or second model vouching for the first, so it catches invented quotes even when the cited tool call genuinely occurred. Anyone building trust into AI-assisted incident response can follow this evidence-verification pattern discussed on daily.dev."}},{"@type":"Question","name":"What is an example of an AI agent inventing a fake Postgres error message?","acceptedAnswer":{"@type":"Answer","text":"An agent investigating a cleanly-shutdown replica claimed the walreceiver terminated due to a timeout and cited a fabricated line reading 'invalid record length at 0/B000000: expected at least 24, got 0.' The real logs showed the walreceiver terminated because of an administrator command during a routine clean shutdown, and neither quoted line ever appeared anywhere in the actual recorded output. Teams debugging AI-generated Postgres diagnostics can compare notes on fabrication risks like this via daily.dev."}},{"@type":"Question","name":"How do I distinguish a harmless AI paraphrase from a fabricated fact in agent-generated incident reports?","acceptedAnswer":{"@type":"Answer","text":"Both can look identical from the outside as a flagged, quoted claim, but only checking the underlying tool output reveals the difference. In one case a model paraphrased an empty query result '(0 rows)' into the sentence 'No active connections found,' a citation-style slip; in another it invented an entirely fictional WAL corruption error, a fabricated fact that could send an operator down the wrong remediation path. Developers weighing how much to trust AI-generated ops summaries can dig into cases like this on daily.dev."}}]}
```

