AI Audit Evidence, Part 7: A Status Is Not a Receipt
We build a runtime that lets AI agents take real write actions inside enterprise systems: create a record, send a request to another service. Every action carries permissions, approvals, and a record someone can review a
We build a runtime that lets AI agents take real write actions inside enterprise systems: create a record, send a request to another service. Every action carries permissions, approvals, and a record someone can review afterwards.
After an authorization is revoked, it can hand over three layers of record: what allowed the request, whether the in-flight call stopped, and whether the effect that already landed at the target is still there. This piece is about the third — reconciliation.
An audit needs to know whether the write happened at all. "It did not" and "it did, and was later erased" are different things; when they cannot be told apart, the record writes two events as one sentence — a status is not a receipt.
An outbound write times out. The request may have reached the target, or not; the claim sits at claimed. The answer can only come from the target: one read-only query, "did you execute this key". Yes, and the row settles; no, and the row is released, so a retry is allowed; anything else stays unknown.
Our documentation calls this evidence — read-only, one row per ask, append-only, silence is never an answer. The problem with that description came from a reader.
1. Two questions, and we can answer one
"That gap between 'is it there now' and 'was this key ever accepted' is exactly where a reversal at the target becomes indistinguishable from a request that never arrived."
The reader is more precise than the documentation. The probe sends "did you execute this key", but the only thing that can come back is "does this object exist now". For something still present the answers coincide; for something that was there and was later deleted or reversed, they come apart — status says "not there", a receipt says "accepted".
The probe sends one GET, does not retry, and counts only an explicit "not executed" as an answer; everything else is unknown. That stops silence from being read as "it never ran". What it does not stop: "not there now" was never a statement about the past.
Two histories, one reading: never arrived, and landed then reversed, both become not_executed and release the claim
Figure 21 - One query, two histories
2. Is reconciliation for closing a row, or for producing a record?
One reading is disposal: a stuck row needs an ending, and any answer that lets us close it will do. It says "not there now", we close the row, a retry is allowed.
The other is evidence: not how the row ends but whether the write happened, in a form a third party can review. Under this reading, "not there now" says nothing about the past.
We wrote half of each. The mechanism is disposal — one GET, one sample. The documentation is evidence — that is what it is called. The mismatch is not in the code: we did not notice the two were different.
Disposal pays visibly: an effect reversed at the target reads here as "never arrived". Evidence pays where we have no control: the receipt has to be kept by the target. The key is already shared, minted with the write, so a receipt is cheap — cheap is not the same as present.
3. A counterexample: one real event read as "never happened"
An agent issues a refund. It times out. An hour later the automatic re-ask goes out, the target answers not_executed, the claim becomes released with releaseReason set to target_status_not_executed, and a retry is allowed.
If that refund did reach the target and was reversed forty minutes later — a manual correction, a batch reconciliation, a retention rule — the next query returns not_executed again. In our ledger the two events are identical: one that never arrived, one that arrived and was erased.
The path keeps moving. released permits a re-claim; the retry clears releaseReason and increments attempts. The claim now describes the second attempt only, and the first — asked about, told it did not run — survives as a few rows in the lookup table. Nobody reading the claim can tell an unreproducible judgement happened here. And if the target does not deduplicate by the key, that retry is a real double write.
4. A receipt would not settle it either
The reader's suggestion is clear: an append-only list of accepted keys with timestamps on the target side would close the gap. We agree.
It answers "was it ever accepted", not "is it still there". Receipt says accepted, status says not there: it happened and was later reversed. Does the row record "executed", or "executed and since reversed"? The first is true and incomplete; the second needs us to know about a reversal that may never have passed through us. Only a receipt saying the key was never accepted closes the row cleanly.
The boundary is harder: a receipt covers only writes that carry the key. Another integration, a batch job, a person editing the record back — any of them can make the effect disappear without a trace. Necessary, not sufficient.
And the word itself. not_executed from a target can mean "we are certain this key was never accepted" or "we do not have it right now". The first is causal; the second is one read, and the target's read path may be eventually consistent or cached. We treat both as the first — and the probe asks once, without retrying, so a read that has not caught up becomes the final word.
5. The gap, and the question behind it
The first thing we intend to do is small: label each evidence row with the kind of reading it is — current state or receipt. Today it has no such field: reason is filled only when the conclusion is unknown, and is null for a real answer, so both real answers look identical. The table exists so that "never asked" and "asked and got no answer" are not the same reading; that reasoning was not applied to the second axis.
That is a gap, not an implementation. Column, migration, write path and read surface are all still to do.
With the column in place, the real problem is still there. We record our own sampling of the target, not the target's history. Each query is one sample of the current state; stacked up they reconstruct what the target said, and when. Not one of those samples is history, so none can answer "was this key ever accepted". Only the system holding the history can, and we neither control it nor should answer for it.
And there is a narrower limit. A flip is only visible if one sample lands inside the window when the effect still existed. Our cadence is hours: something created and reversed within ten minutes reads not_executed at every sample. Timestamps make the record honest about what we saw; they cannot make it complete about what happened.
So the question is not whether to add a column:
If the third layer can only deliver "we asked, and this is what the target said at the time", does it deserve to be called reconciliation? Or was it always a log of readings — and the answer the audit needs was never in it?
Closing
The implementation described here comes from the open-source project KeelBase:
https://github.com/rain6fish/KeelBase
Drafted with an AI assistant. The system, the positions and the mistakes are mine.
Originally published by Dev.to Security. Aggregated on AIWithGhost for educational purposes — full credit and traffic to the original publisher.