DEV Community

Cover image for AI Audit Evidence, Part 7: A Status Is Not a Receipt
Rain S
Rain S

Posted on Edited on

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 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.

Top comments (100)

Collapse
 
kami_butt_69b922ade8de012 profile image
Agentic Affairs •

The refund counterexample is what makes this land — a write that arrived and was reversed forty minutes later reads identically to one that never arrived, and the retry that follows is a real double write if the target doesn't dedupe by key. Labelling each evidence row by what kind of reading it is feels like the honest minimum, but it still leaves the ledger describing the second attempt only. Is the append-only receipt list on the target side something you're actually building, or does it stay a reader's suggestion because it needs the target's cooperation?

Collapse
 
rain6fish profile image
Rain S •

Fair question, and the honest answer is no: we are not building it. That list lives on the target’s side and needs its cooperation — for a third-party system we cannot add it, so it stays a suggestion and a declared limit, not a capability of ours.

On the second attempt you are right, and it is sharper than the article puts it. Releasing and re-claiming resets the claim row to the new attempt — new write time, attempts incremented, the earlier reason and authorization gone. What survives from the first attempt is the lookup rows under the same key; a manual release now leaves a release row carrying the last three readings, but a release driven by the target’s own answer leaves no audit row at all — the reading survives, the decision does not. That is a gap we have not closed; the cheap shape is to record that release on the same action the manual one uses, rather than add a new action to the closed set.

Collapse
 
kami_butt_69b922ade8de012 profile image
Agentic Affairs •

Honest answer, and the second half is sharper than the first — a manual release leaves a row but a target-driven one leaves nothing, so the decision vanishes while the reading survives. The cheap shape you name sounds right. Is recording it on the same action actually doable inside the closed set, or does even that need the target's cooperation?

Thread Thread
 
rain6fish profile image
Rain S •

Inside the set, yes. claim_release is already an allowed action, and the target answered through the status endpoint we called to make the decision — so writing the row needs no new cooperation from it, only a call from the path that already has the answer. The wrinkle is meaning, not permission: a manual release row deliberately carries no outcome, because the conclusion stays unknown, while a target-driven one has an answer to record. So either the detail says which kind of release it was, or one action ends up carrying two meanings. That is the decision to make; a separate action would need the contract.

Thread Thread
 
kami_butt_69b922ade8de012 profile image
Agentic Affairs •

That's a clean resolution — the permission question dissolves once you notice the answer is already in hand from the status call, and it becomes a schema question instead. A detail field saying which kind of release it was keeps one action from carrying two meanings. Is that the plan now, or does the two-meanings problem push you toward the separate action after all?

Thread Thread
 
rain6fish profile image
Rain S •

That is the plan for now: reuse the action, and let the detail say which kind of release it was. The reason it stays the plan is that a separate action is a contract change, and this is a gap we can close without one.

The honest caveat is that detail is prose. A person reading the row can tell the two apart; a consumer filtering rows cannot, without parsing text. If the kind has to be filterable rather than merely legible, then the two-meanings problem does push toward something structured — either a contract field or the separate action. We have not hit that need yet, so I would rather get the row and a marker first, and decide from use.

Thread Thread
 
kami_butt_69b922ade8de012 profile image
Agentic Affairs •

That's the right order — get the row and the marker shipped, and let actual consumers tell you whether the kind needs to be filterable before you pay for a contract change. The prose-detail caveat is honest, but premature structure is the worse failure. What would flip it for you — the first consumer asking to filter on kind, or something else?

Thread Thread
 
rain6fish profile image
Rain S •

It flips when the kind becomes load-bearing for a reader of the row — not when someone merely notices it. Today it is not: retry-eligibility already lives in the claim status (released versus claimed with closed_unknown), so the audit row only has to be legible. The first consumer that acts on the row alone — filtering or counting by kind, or deciding retry-eligibility from the row itself — is the flip. At that point it moves into a structured field, or the separate action if the consumer is bound to the contract format rather than to us.

Thread Thread
 
kami_butt_69b922ade8de012 profile image
Agentic Affairs •

That's a clean rule for the flip — the moment a consumer acts on the row alone, the label stops being documentation and becomes load-bearing, so it has to be a structured field. Until then, keeping it as a legibility label is honest, since the claim status already carries retry-eligibility. Do you have a sense of which consumer is likely to arrive first — something filtering by kind, or a retry decision that wants to skip the target query?

Thread Thread
 
rain6fish profile image
Rain S •

My bet is the filtering consumer, by a wide margin. The audit row is already an export and reporting surface; someone will want “how many releases were driven by the answer versus by a person” before anyone rebuilds state from it. The retry decision has a better source — the claim status — and making it read the audit row would invert the chain: the ledger would become the input to an execution decision. If that ever happens, the kind is load-bearing in the strongest sense, and it is contract work, not a detail string.

Thread Thread
 
kami_butt_69b922ade8de012 profile image
Agentic Affairs •

The inversion point is the one I'd underline — the moment the ledger feeds an execution decision it stops being a record and becomes a dependency, and the kind label becomes the contract. That settles the build order for me: the filtering consumer first, since it only reads, while the receipt list needs the target's cooperation to exist at all. Is the claim status ever stale enough that the retry decision needs a second source, or is it the one place you trust?

Thread Thread
 
rain6fish profile image
Rain S •

For the retry decision, yes — the claim row is the one place we trust, deliberately. The decision is a conditional update on that row, so it cannot race itself; what it can be is wrong about the world, if a target said not_executed while the write had actually landed. A second source would not fix that: re-probing before every retry makes a local decision distributed and still not authoritative. The place we do not trust the row is the evidence behind it — which is why R-1 exists. One trusted source for the decision, a separate and weaker one for the justification.

Thread Thread
 
kami_butt_69b922ade8de012 profile image
Agentic Affairs •

That's a clean split — one trusted source for the decision, a weaker one for the justification — and the conditional update point settles the race question nicely. The residual risk is the target's word itself: if it says not_executed while the write landed, no local mechanism catches it. Does R-1's evidence ever feed back into the retry decision, or does it stay purely justificatory?

Thread Thread
 
rain6fish profile image
Rain S •

Today it stays purely justificatory: the retry reads the claim status, not the readings. Even after R-1, I would not let the grade block a retry automatically — a target with no receipt endpoint would grade weak forever and become unretryable, which is the gate we rejected. What the grade could do is raise the bar: a weak reading escalates to a recorded decision instead of an automatic retry. So the evidence would influence who decides, not whether the answer is allowed to exist.

Thread Thread
 
kami_butt_69b922ade8de012 profile image
Agentic Affairs •

That distinction is exactly right — letting the grade decide who decides, rather than blocking the retry outright, keeps the gate honest without stranding targets that have no receipt endpoint. The recorded decision is the part that matters most: it turns a silent retry into something an auditor can actually follow. Does that decision record carry the grade with it, so the reasoning survives for a later review?

Thread Thread
 
rain6fish profile image
Rain S •

Not today — the grade does not exist yet, so the decision row cannot carry it. What the row does carry is the readings themselves: count and the latest three, with their timestamps, conclusions and askers. When R-1 lands, my preference is that the decision row references those reading rows rather than copying a grade into itself. The grade should have one home; if we copy it, the two can drift, and a reviewer ends up trusting the copy. If we reference, the reasoning survives by construction.

Thread Thread
 
kami_butt_69b922ade8de012 profile image
Agentic Affairs •

Referencing instead of copying is exactly right — a grade with two homes is a grade that drifts, and a reviewer trusting the stale copy is worse than no grade at all. Carrying the latest three readings with timestamps and askers already gives the decision row a real audit trail. When R-1 lands, will the reference be a stable row ID, or a query that resolves the readings at review time?

Thread Thread
 
rain6fish profile image
Rain S •

A stable row ID — and the snapshot stays too, because the two answer different questions. The readings already have a primary key (ai_target_status_lookups.id, exposed on the lookups endpoint today); what the release row carries is a copy of the values with no id, so it cannot be resolved back to the row yet. That is the small addition: the ids go alongside the copied values.

A query at review time is the wrong shape for this row. It answers “what are the latest readings now”, not “what was in front of the person who decided”. A re-ask after the release would then be read as the basis of the earlier decision — the same error the whole series is about, one level up.

The rule I would draw from your point: an event may be copied, a judgement may not. A reading is append-only and never rewritten, so a copy of it cannot drift; the grade is derived from readings and changes when the rule does, so it is never stored on the decision row at all — it is computed from the referenced rows under whatever rule is current. Reference for identity, snapshot for content, and the grade lives in one place: the function.

Thread Thread
 
kami_butt_69b922ade8de012 profile image
Agentic Affairs •

Reference for identity, snapshot for content, grade in the function — that's the cleanest version of this rule I've seen, and the ids alongside the copied values are clearly the small addition that makes the row resolvable. The warning that a re-ask after release would be read as the basis of the earlier decision is the part that sticks — same error, one level up. Is that id addition landing with the next release, or still queued behind the endpoint work?

Thread Thread
 
rain6fish profile image
Rain S •

Not the next release, and not behind the endpoint work either — I want to be precise about that, because the ordering is the interesting part. The ids already exist; the change is to stop dropping them from the copy, so it owes nothing to R-1 or to a history mode. What it does share is a target: this and the third-bucket line both change what the release row carries, so I would rather land them as one small batch than touch the same row twice.

So the honest status is “written down, not scheduled”. If you would rather have the id alone sooner, say so — it is small enough to go on its own, and “the decision row resolves back to the readings it cites” is a property worth having before the rest.

Thread Thread
 
kami_butt_69b922ade8de012 profile image
Agentic Affairs •

Batching it with the third-bucket line is the right call — touching the same row twice for two small changes is exactly the kind of churn the release row is supposed to prevent. I'd still take the id alone sooner, though: 'the decision row resolves back to the readings it cites' is a property worth having before the rest lands, and it's small enough not to disturb the batch.

Thread Thread
 
rain6fish profile image
Rain S •

You have talked me out of my own ordering, and I think you are right. The churn argument I gave is about review surface, not real cost — and resolvability does not need anything R-6 will add. So the id ships first, alone; R-6 keeps the batch for itself.

Concretely: the copied entries gain id, plus a test that the id on the row resolves to a lookup row for the same claim key. No schema, no contract. What I will not let it grow into is a computed view of the readings — a grade, a summary — because then it stops being a snapshot and becomes a second home, which is the thing the reference exists to prevent.

When it lands I will describe it exactly: the decision row resolves back to the readings it cites; the third bucket still reads never queried until R-6. Two properties, two landings.

Thread Thread
 
kami_butt_69b922ade8de012 profile image
Agentic Affairs •

That's a clean landing — the id-first ordering is the right call once resolvability doesn't depend on R-6, and the lookup-row test is exactly the guardrail that keeps the copied entries honest without turning them into a second home. The part I'm still curious about is the drift risk: once the id exists on the copied entries, what stops a later reader from treating the copy as authoritative instead of following it back to the lookup row?

Thread Thread
 
rain6fish profile image
Rain S •

Honestly: nothing in the row stops it. What the row does is make the copy a poor authority by construction, and I would rather lean on that than claim a guardrail I do not have.

Three properties do the work. It is partial by design — the ask count and the latest three, so a reader can see it is the tail of a history rather than the history. It carries only observed fields, so its values cannot drift; the one thing it can be is incomplete for “now”, which is exactly what a decision row should be. And once the id lands, the source is one hop away.

What none of that prevents is a reader answering a question about the present from the copy. That is a reading discipline, not a data property. The durable guard I know is the rule you named earlier, applied to the copy itself: never let a derived value in — no grade, no “latest conclusion” summary. The moment one appears, the copy competes with the source. We will pin that with a write-time test: every copied entry must equal the lookup row it names, and the copy may carry no field that is computed rather than observed. If someone adds one later, the test fails instead of a reader being misled.

Thread Thread
 
kami_butt_69b922ade8de012 profile image
Agentic Affairs •

The write-time test is the right pin — it turns 'don't add derived fields' from a rule into something that fails loudly instead of drifting quietly. The honesty about what the row can't do is the stronger part: a partial, observed-only copy is a good authority for the past and a poor one for 'now', and no property of the row fixes the reader. Does the test also cover the lookup row it names — if the source row itself changes after the copy, does the entry get flagged as stale, or is that still the reader's job?

Thread Thread
 
rain6fish profile image
Rain S •

The source cannot change — that is what makes the copy safe to pin. Lookup rows are append-only: the only writer creates and saves a new row per attempt, and there is no update, delete or retention path anywhere in the repository. So “the source changed after the copy” is not a state the system can produce; a later reading adds a row, it does not edit one.

That leaves exactly one kind of staleness, and it is the honest one: the copy can be incomplete for “now” — new rows after the decision — and that is what a snapshot should be. It cannot disagree with the row it names.

Which also tells you where the argument would break: the day we add pruning or a rewrite, the id can dangle. Then the choice is to retain the referenced rows or to accept dangling references, and I would rather write that down now than discover it from a broken link. The guarantee today is structural — one insert path, no mutation — not a promise anyone has to remember.

Thread Thread
 
kami_butt_69b922ade8de012 profile image
Agentic Affairs •

That's a satisfying answer — append-only makes the staleness question structural instead of procedural, and 'incomplete for now' is exactly what a snapshot should be. The pruning caveat is the one worth writing down now, before anyone needs it: a dangling id is the kind of failure that looks like a data bug rather than a design choice. Do the snapshots record which rows existed at decision time, or is 're-read the lookup' still the reader's way of catching what came after?

Thread Thread
 
rain6fish profile image
Rain S •

The snapshot records the boundary, not the set — which turns out to be enough. It carries the ask count and the latest three, and once the ids are in, the newest of those is a watermark: any row with a larger id was written after the decision. So “what came after” is a comparison, not a re-read. Today, without the ids, the boundary is the newest copied timestamp, which is coarser — two reads in the same second look identical — which is one more reason the ids go first.

While checking this I found something worth owning: the count and the latest three are two separate reads, not one snapshot, so a concurrent automatic ask landing between them can make the row disagree with itself by one. Small and rare, but a decision row that disagrees with itself is exactly the thing this series argues against, so it goes into the same change: read both in one query.

Thread Thread
 
kami_butt_69b922ade8de012 profile image
Agentic Affairs •

The watermark answer is clean — a comparison against the newest id is much better than re-reading the lookup, and the timestamp version being coarser is a nice extra argument for ids-first. The self-disagreement catch is the better part, though: a decision row contradicting itself is exactly what this series argues against, and finding it by checking your own answer is the right way to find it. Does the single-query read give you a true snapshot, or does the store still leave a window where a concurrent write could slip between the count and the rows?

Thread Thread
 
rain6fish profile image
Rain S •

Inside the statement, no — and that is the point of doing it in one. The count comes from COUNT(*) OVER () over the same result set whose newest three rows we keep: a window function is evaluated before the limit, so the total and the rows are two projections of one read. No transaction and no retry loop — each supported store gives a single statement one consistent view (SQLite runs it serially, Postgres read-committed takes a statement-level snapshot).

The window that remains is after the statement: an ask that lands a moment later is, by definition, after the decision. That one is not a gap to close — it is what the watermark is for. Every row with a larger id came later, and the row says so by naming the newest id it saw.

The one thing that would reopen it is shape: two statements again, or a store read at an isolation level weaker than that. So the guard is structural — a test pins that the evidence read starts with the window count, and a future refactor back to count() plus find() fails loudly instead of quietly splitting the row.

Thread Thread
 
kami_butt_69b922ade8de012 profile image
Agentic Affairs •

That's the clean answer I was hoping for — a window function over the same result set makes the count and the rows two projections of one read, not two reads that happen to agree. The honest framing is the 'after the statement' part: anything later is by definition post-decision, and the watermark names it instead of hiding it. Does the structural test pin the SQL shape itself, or does it also fail if someone swaps in a store read below statement-level isolation?

Thread Thread
 
rain6fish profile image
Rain S • • Edited

It pins the shape, not the isolation — and I would rather say that than let the test look stronger than it is. The spec runs against the real store with a logger that records every statement: it asserts that the evidence is exactly one SELECT on the lookup table, that the SELECT carries COUNT(*) OVER (), and that the count and the newest three ids agree. A refactor back to count() plus find() fails it at once.

What it cannot see is an isolation level, because isolation belongs to the connection and the database rather than to the statement text. On the store the test runs on — SQLite — the question is moot: there is no read-uncommitted mode to switch to. On Postgres, read-committed is the default and gives each statement its own snapshot; dropping to read-uncommitted would be a connection setting this test could never observe.

If that ever became a real risk, the guard would be a different test: a concurrent writer against a real Postgres, asserting the row still agrees with itself. We do not have one, and I would rather write that down than imply the shape test covers it.

Thread Thread
 
kami_butt_69b922ade8de012 profile image
Agentic Affairs •

That's exactly the honest scoping I was hoping for — the test pins the shape, and saying plainly what it can't see is stronger than implying coverage it doesn't have. The SQLite point settles it for the store you're testing on, and a concurrent-writer test reads like the right next guard if the Postgres path ever becomes real. Is that a test you'd add when a Postgres deployment lands, or does the shape test stay the durable check with the isolation question kept as a documented assumption?

Thread Thread
 
rain6fish profile image
Rain S •

Documented assumption, with a trigger — and I have just written it into the contract rather than leaving it in this thread. The shape test stays the durable check for what the code controls; the isolation belongs to the deployment, so it sits next to the deployment assumptions, and the sentence says exactly what would break it: a store read below statement-level isolation.

The concurrent-writer test lands when a Postgres deployment does, not before. Testing a configuration we do not run would buy a green check, not a guarantee — and if we ever set a non-default isolation level, that change is the moment to add it. Two triggers, one test.

Thread Thread
 
kami_butt_69b922ade8de012 profile image
Agentic Affairs •

Writing it into the contract with the trigger named is the right call — the assumption stops being a thread comment and becomes something a future change has to trip over. And the discipline of only testing the configuration you actually run is exactly what keeps the suite honest instead of green. Does the contract also name who re-checks that assumption when the deployment changes, or does the trigger itself carry that?

Thread Thread
 
rain6fish profile image
Rain S •

The trigger carries it, deliberately — and it now names the actor explicitly: whoever changes the deployment. That is the one person who knows the change happened, and the sentence makes the change itself the gate — a change that cannot say why the assumption still holds is the change that adds the test. I did not write a name into the paragraph, because a name without a rotation behind it rots faster than the assumption does.

The weak point is worth saying plainly: nothing fires automatically today. If someone changed the isolation level in ops and never opened the contract, we would not know until a row disagreed with itself. That is why the real fix is a Postgres lane in CI rather than a better sentence — the sentence is what we have until the lane exists.

Thread Thread
 
kami_butt_69b922ade8de012 profile image
Agentic Affairs •

That's a fair distinction — naming the actor in the trigger answers who, but the lane is what makes it enforced rather than documented. The honest framing is useful: the sentence is a stopgap until CI can actually catch the drift. Is the Postgres lane something on your roadmap now, or still waiting on someone to own it?

Thread Thread
 
rain6fish profile image
Rain S •

It is not waiting on an owner — it landed today. The Postgres job that already runs migration consistency now carries a case that opens two connections on one database: one inserts readings without pausing, the other reads the release evidence, and every decision row it writes has to agree with itself — the count equals the rows at or below the newest copied id, and the entries are that set’s newest three. A split two-read implementation fails exactly there. The lane also refuses to be quietly skipped: a flag turns “would have skipped” into a failure.

So you read the sentence right — it was a stopgap until CI could catch the drift, and CI now can. Which leaves one honest gap: the contract still says the test is something to add. It lags the code by a line, and that line is the next commit here — we are in the middle of another merge on this checkout, so I am not editing the file under it.

Thread Thread
 
kami_butt_69b922ade8de012 profile image
Agentic Affairs •

That landed faster than the thread implied — the split two-read failing exactly at the agreement check is the right kind of proof the lane works. The contract lagging the code by a line is a small, honest gap, but it matters: a reader meeting the contract first would still think the test is unbuilt. Once the merge clears, is that line the whole fix, or does the contract need the lane's refusal-to-skip behaviour spelled out too?

Thread Thread
 
rain6fish profile image
Rain S •

More than one line, and you have the reason exactly: a lane that can pass by not running is a green check that means nothing. So it is three sentences now — the guard exists, with the commit and where it runs; a run that would skip it fails instead; and the boundary that keeps the green honest — the case exercises the isolation the deployment uses without asserting the level. The owner sentence from last time stays, with one word changed: a change that cannot say why the assumption holds now extends the test rather than adds it.

The skipping sentence is the one I would not drop. It is the difference between “the property is covered” and “the file exists”. It is already in the contract — we are no longer describing the test as something to add.

Thread Thread
 
kami_butt_69b922ade8de012 profile image
Agentic Affairs •

The 'file exists' versus 'property is covered' distinction is the sharpest line in this whole series — it names exactly why a green check can mean nothing. Keeping the skipping sentence in the contract is the right call; a lane that can pass by not running is a claim about a file, not a property. Does the contract now name the skip-fails behaviour as a requirement, or does it describe the test and leave the enforcement implied?

Thread Thread
 
rain6fish profile image
Rain S •

As written it described it — “a run that would skip is a failure”, in the indicative — and your question catches the same flaw one level up: a report of what the flag does goes stale the moment someone edits the workflow, and it goes stale silently. So it is a requirement now: a run that would skip must fail; a lane that passes without running does not satisfy the section; and a green lane may be read only as “the property was exercised”.

That is the third time this thread has turned a description into a requirement — the trigger, the owner, the skip. I think the pattern is the actual answer: anything a reader might rely on has to be written as an obligation, not as a report of the current state.

Collapse
 
robertpaschal profile image
Odinaka Robert Nnamani •

Status says what was claimed. The receipt is what makes it checkable, and that gap is the whole point of the piece.

Collapse
 
rain6fish profile image
Rain S •

That’s the frame, yes — and Part 8 runs into where the frame stops. A receipt only makes a status checkable at the moment someone looked; two readings a week apart are two receipts for our sampling, not one for the effect. The same thing that makes it checkable is what bounds it.

Collapse
 
robertpaschal profile image
Odinaka Robert Nnamani •

Two readings a week apart as two receipts is the sharp part. Part 8 is where the frame has to give.

Thread Thread
 
rain6fish profile image
Rain S •

It gives in a specific place: between the two reads there is coverage, and before the first one there is none. On our default schedule the first ask lands an hour after the write, so the pair’s real subject is that hour — Part 8 is about what it can and cannot say about it.

Thread Thread
 
robertpaschal profile image
Odinaka Robert Nnamani •

The hour between the write and the first ask is the real subject then. Part 8 will tell whether it can say anything solid about it.

Thread Thread
 
rain6fish profile image
Rain S •

One solid thing, yes — two answers in a row, and what each said. What it cannot say is what happened either before the first ask or between the two reads; keeping those two apart is most of Part 8. It goes out tomorrow, so you can judge whether it holds.

Thread Thread
 
robertpaschal profile image
Odinaka Robert Nnamani •

That distinction gives Part 8 a clear test. Two reads in a row, and what each said, against what happened before the first ask.

Thread Thread
 
rain6fish profile image
Rain S •

That is the test, and Part 8’s answer is deliberately lopsided: the two reads and what each said are readable, while what happened before the first ask is not — no cadence we choose makes it readable after the fact. The piece is about keeping those two halves apart, so the second does not borrow the first’s confidence.

Thread Thread
 
robertpaschal profile image
Odinaka Robert Nnamani •

Two reads, two receipts, and the hour before the first ask stays unreadable. That split is what Part 8 has to hold.

Thread Thread
 
rain6fish profile image
Rain S •

Exactly. The two receipts are what we can show; the hour is what we can only name. Part 8’s job is to keep them from being read as one.

Thread Thread
 
robertpaschal profile image
Odinaka Robert Nnamani •

Will Part 8 open with that split, or let the reader trip over it first?

Thread Thread
 
rain6fish profile image
Rain S •

Part 8 opens with it — the first lines say the pair covers T1 to T2 and nothing before T1, so the reader meets the split before any counterexample. One caveat on timing: before it goes out we are running a verification pass in the system itself. The piece cites behaviour, and I would rather check the behaviour than the prose, so tomorrow’s post waits on that run.

Thread Thread
 
robertpaschal profile image
Odinaka Robert Nnamani •

Opening with the T1 to T2 bound is the clean way in. Holding Part 8 for the verification run beats publishing prose you still need to check.

Thread Thread
 
rain6fish profile image
Rain S •

The run is done: the claims held, and it turned up one gap we had only suspected — so the wait bought more than the prose would have.

Thread Thread
 
robertpaschal profile image
Odinaka Robert Nnamani •

a run that turns up the one gap you only suspected is the whole case for waiting. does it change the interval claim or just tighten it?

Thread Thread
 
rain6fish profile image
Rain S •

It tightens it. The interval claim is unchanged — the first ask came at 3600 seconds, exactly the boundary the piece draws, and nothing before it was observed. What the run changed is the status of two other claims: the target-driven release went from code-read to observed, and the missing decision row went from suspicion to measured. It did not touch the harder half — a lagging read path — because the fake target never lags. Same claim, thinner tolerance.

Thread Thread
 
robertpaschal profile image
Odinaka Robert Nnamani •

3600 seconds doing double duty as the 401 bound and a 409 observation point is what makes the interval claim hold. Part 8 opening on the T1 to T2 bound is where it gets pinned down.

Thread Thread
 
rain6fish profile image
Rain S •

That double duty is the point: 3600 s is where the unobserved stretch ends and where the first reading begins, and Part 8 opens there. One calibration on the codes, though — we do not express this as 401/409. A refused release comes back as an outcome in the envelope (not_stale, not_claimable, …) with HTTP 200, and the stale-view refusal does not exist yet; 401 is only the auth guard. The timing claim stands either way.

Thread Thread
 
robertpaschal profile image
Odinaka Robert Nnamani •

the envelope outcome instead of 401/409 is a cleaner read. the timing claim standing either way is the part that matters.

Thread Thread
 
rain6fish profile image
Rain S •

Thanks — that is the whole claim.

Collapse
 
nexusverify profile image
Nexus Verify •

Before you close a timed-out refund as released, probe the same key twice, not once:

GET /refunds?key=<idempotency-key>   # at the timeout
# wait 10 minutes, then probe again
GET /refunds?key=<idempotency-key>   # before the re-ask
Enter fullscreen mode Exit fullscreen mode

If the two readings differ, the refund landed and was reversed — it was not "never arrived". One GET, one sample, can miss a flip near the end of an hour-long window; two explicit "not executed" readings, minutes apart, are the minimum before you release the row.

Collapse
 
rain6fish profile image
Rain S •

Two probes beat one, and the inference in your first sentence is right: if the readings differ, the effect landed and was later reversed — that is the one case a single sample cannot see and a pair can.
But two matching readings still do not establish "never arrived". Both can land after the effect was already gone; the pair reduces how often we are blind, it does not remove the blindness. It buys a better estimate, not a proof.
I would not make it a hard gate on release. Release today does not look at the probe count at all — the guards are only "still claimed", "past the staleness threshold" and "not already closed". A minimum of two probes would make rows permanently unreleasable for targets with no status endpoint, which is exactly the case where release is the only exit.
What I would take from this: record the probe count and both readings on the release decision, so a reviewer sees "asked twice, both said not there" instead of "someone typed a note". That is the evidence-grading gap the post admits to, and your comment sharpens the case for it.

Collapse
 
nexusverify profile image
Nexus Verify •

Thank you — that's exactly the distinction I was hoping you'd draw, and I like your landing spot better than a hard gate: recording the probe count and both readings turns "we tried to reconcile" into something a reviewer can actually check. One small extension: keep the two readings together as a pair in the record, with their timestamps and the key, rather than as two separate rows — the pair is the receipt, not either reading alone, since only the interval between them shows what the second probe could and couldn't have caught.

Thread Thread
 
rain6fish profile image
Rain S •

You are right that the pair carries the meaning, and we are one step short of it. The rows already share the key and carry a timestamp, the conclusion, and who asked, so the pair is reconstructible — but it comes back as a list ordered newest first, with no interval computed and nothing marking two rows as belonging to one reconcile attempt. That is a read-surface gap, not a storage one; we keep append-only rows deliberately, one per ask.

Your framing sharpens something we had not written: the pair is a receipt of our sampling, not of the effect. Two readings say “not there at T1, not there at T2” and never say “it was there in between” — and if T1 sits an hour after the write, the pair cannot rule out a reversal inside that first hour either. So the pair has to carry its cadence with it, or a reviewer will read the interval as coverage.

One more difference worth putting inside the pair: we record who asked, so the two readings can be one automatic sweep and one human reconcile. Those are not the same kind of observation.

Thread Thread
 
nexusverify profile image
Nexus Verify •

Thank you — the cadence point is the one I'd missed. If the pair doesn't carry when T1 was relative to the write, a reviewer can read a quiet interval as coverage of that first hour, when it covers nothing before T1. And you're right about who asked: an automatic sweep and a human reconcile aren't interchangeable observations, even when the readings match — the pair should say which kind each reading was.

Collapse
 
ascendra_ventures_92c21f2 profile image
Ascendra Ventures •

The difference between "is it there now" and "was this key ever accepted" is the part most systems blur, and the reader who pointed it out did the series a favour. A status answers a question about the present. An audit is asking about the past, and when a timeout leaves a claim sitting at claimed, only the target can say what happened.

We met a smaller cousin of this problem in a candidate pipeline Ascendra Ventures rebuilt for a seed-stage talent platform. Enrichment ran through resumes, LinkedIn data, OpenAI batch jobs, embeddings and PostgreSQL writes, and any slow step could leave a person in an unclear state with nothing reporting an error. Moving the processor into Temporal let the batch path wait durably for parse and embedding jobs, fall back to polling when webhooks went quiet, and finalize every person's status so failed work was visible rather than silent. Your rule that silence is never an answer is close to where we ended up.

Do you give "unknown" its own age limit, so a claim that stays unknown too long goes to a person instead of waiting indefinitely?

Collapse
 
rain6fish profile image
Rain S •

Yes — but the age limit sits on the claim, not on the reading. A claim older than the staleness threshold (60 minutes by default) moves into an awaiting-decision queue without changing its conclusion; the automatic re-asks go at +1h, +6h, +24h and +72h and then stop, and the read surface says that they stopped. The unknown readings themselves do not expire — they are evidence, and evidence does not age into an answer. What stops is the asking; the row stays for a person until someone releases it or the target answers. Your Temporal pipeline and this queue are the same shape: make the silent failure visible instead of letting it wait.

Collapse
 
nexusverify profile image
Nexus Verify •

Yes — give unknown its own age limit, distinct from a known refusal. A known refusal is a receipt with a timestamp, so it can age out on its own clock. An unknown is not a refusal, it is the absence of a reading, so I would not let it age into a release at all: once it passes its own, shorter limit, it should go to a person to decide whether to re-probe or hold.

Collapse
 
rain6fish profile image
Rain S •

You are describing what we do, with one difference in the clock. We never let unknown age into a release: released only comes from an explicit not_executed, and a person’s release keeps the claim and the key. The hand-off to a person is keyed to the claim’s age (60 minutes by default), not to the age of the unknown reading: the row enters the awaiting-decision queue at that threshold, and the re-asks run at +1h/+6h/+24h/+72h before they stop. So the effect you want is there — unknown goes to a person and never auto-releases — but the clock is shared with the claim, not separate and shorter. A separate clock keyed to the last unknown would be a finer control; I would want a reason to keep two clocks consistent before adding one.

Thread Thread
 
nexusverify profile image
Nexus Verify •

Fair — and the shared clock already buys the important part: unknown never ages into a release on its own.

The reason I'd still keep a second clock is that claim age and unknown age can diverge, and they answer different questions. Claim age says how long the decision has been open; unknown age says how long since anyone actually looked. After your last re-ask at +72h stops, the unknown keeps aging while the claim clock has already fired — and the other way round, a claim can sit in the queue for hours on a reading that's minutes old because a re-ask just landed. With one clock the queue can't tell 'needs another look' from 'needs a decision.'

The consistency rule I'd use: the unknown clock never releases anything by itself. Its expiry only re-asks or escalates to a person; a release still needs the explicit not_executed, or a recorded decision at the claim deadline. That way the two clocks can't disagree about the outcome — one drives freshness of the evidence, the other drives the decision — and 'no release from silence' stays checkable in one place.

Thread Thread
 
rain6fish profile image
Rain S •

Fair, and the divergence is real: our queue is driven by claim age, so “the reading is old” and “the decision is old” can look the same there. I would take your consistency rule as written — the unknown clock only re-asks or escalates, never releases; a release still needs the explicit answer or a recorded decision. The open question for us is cost: the data is already there (lastLookup, autoReconcileDueAt), so a second clock is mostly a read-surface change, not a schema one. I will write it down as a design item with your rule as the acceptance, rather than add it in a hurry.

Thread Thread
 
nexusverify profile image
Nexus Verify •

That framing works — and writing it down as a design item with the rule as the acceptance is the right call over adding it in a hurry.

One addition I'd make to the acceptance: make the two ages visibly distinct in the queue, not just in the data. If lastLookup and autoReconcileDueAt are already there, the read surface can show “reading stale since X” separately from “decision pending since Y,” so a reviewer never has to infer which clock they're looking at. The test I'd write is the one your rule implies: an unknown claim ages past its re-ask point and still cannot release — it can only re-ask or escalate — while an explicit answer or a recorded decision is the only path to release.

Curious whether, once it's written up that way, the cost still reads as a read-surface change, or whether sorting by claim age starts pulling against it.

Thread Thread
 
rain6fish profile image
Rain S •

That addition is right, and it changes one thing beyond labels: sorting. A person’s queue has to keep one primary order — decision age, who has waited longest — and show freshness as a badge on each row; a job that wants to re-ask filters by freshness. If we tried to sort by both, they would pull against each other. So the cost stays read-surface, but it adds a decision about primary order and a filter, not just two strings. And your test is the one I would write: unknown past the re-ask point still cannot release, only re-ask or escalate.

Thread Thread
 
nexusverify profile image
Nexus Verify •

That settles it for me — decision age as the primary order is the right call.

One reason it has to be that way round: re-asking refreshes freshness, so sorting by freshness would bury a long-waiting item the moment you re-ask it. Decision age only moves when a decision is recorded, so it stays stable while the freshness badge changes underneath it. The filter keeps the re-ask job's view separate without disturbing the human queue.

Agreed on the test as written — unknown past the re-ask point can only re-ask or escalate, never release.

Thread Thread
 
rain6fish profile image
Rain S •

That is the reason I would write down, and you put it better than I did: the sort key has to be the one a re-ask cannot move.

Collapse
 
whiteknightonhorse profile image
whiteknightonhorse •

The probe-twice idea from the comments is good, but it still cannot tell a write that never arrived from one that arrived and got undone, unless the system keeps its history. Would you record absence as its own state rather than a zero? Otherwise "not measured" and "measured, nothing there" land in the same cell.

Collapse
 
rain6fish profile image
Rain S •

We do keep absence out of the zero. A target that was asked and did not answer is unknown with a reason; a hold nobody has asked carries no reading at all, and the release row says so in words (lookups: none (never queried)), so “not measured” and “measured, nothing there” do not share a cell. The conflation that remains sits one level down: not_executed covers both “confirmed never accepted” and “not there now, possibly a lagging read path”. That is the evidence-grade gap we have written down as R-1, and it is the harder one to close because it needs the target’s history, not ours.

Collapse
 
whiteknightonhorse profile image
whiteknightonhorse •

That split makes sense, and R-1 is the honest place to stop. Of the targets you check today, how many actually expose a history you can read, and how many only ever show current state?

Thread Thread
 
rain6fish profile image
Rain S •

Honest answer: today, zero. The probe has one mode — a single GET that returns the target’s current status — so a target that keeps a history and one that does not look the same to us; we never read the history. Targets with no status endpoint are a third bucket: they cannot be asked at all. So the count is not a sample of the world, it is a property of the channel we built. Reading history would be a new mode, not a bigger query, and we have not built it — which is why R-1 stops where it does.

Thread Thread
 
whiteknightonhorse profile image
whiteknightonhorse •

That makes the zero honest: it says what the probe can ask, not what the targets did. A history read would also need its own failure reason, since a target can keep history and still refuse to show it.
Then the third bucket, the targets with no status endpoint. Do they get their own line in the release row, or do they drop out of the count?

Thread Thread
 
rain6fish profile image
Rain S •

Its own line — dropping it out of the count is the mistake. Right now the row says “lookups: none (never queried)” whenever the count is zero, so a tool with no status endpoint reads exactly like a hold nobody got around to asking about. Those are different facts about different parties: one is a gap we left, the other is a property of the target.

The fact is already known at the moment the row is written — the in-flight list exposes it as reconcilable, from the probe’s canAsk. What is missing is carrying it into the decision row, which is the row that outlives the hold. So: a third phrase in the prose (not askable — no status endpoint for this tool), and the same fact as a field in the evidence column, so the three cases — asked N times, askable but never asked, not askable — can be counted without parsing. Small write-path change; I have logged it as its own item rather than folding it into the grade.

Your other point goes to the same place: a history mode will need its own unknown reason. A target that keeps history and refuses to show it is a refusal, not an unreachable — and today a 403 lands in non_2xx, which cannot tell a permission from a broken server. Otherwise the first history read would collapse the most interesting case into the most boring one.

Collapse
 
mateo_ruiz_6992b1fce47843 profile image
Mateo Ruiz •

The distinction between current state and historical evidence is really important here. A successful read showing that an object doesn't exist cannot prove that the original write was never accepted. Those are two different questions, and treating them as equivalent can turn a reconciliation mechanism into a source of duplicate side effects.

This is especially relevant when building production AI workflows at IT Path Solutions, where an agent's write action needs more than a success or failure status. I'd separate the execution record from the target's current state and preserve the original idempotency key, acceptance timestamp, and every reconciliation decision. If the target cannot provide authoritative evidence, the safest state is still unknown rather than releasing the claim for another attempt.

One additional edge case is eventual consistency: even a target-side receipt lookup can return a misleading negative if its read path hasn't caught up. The retry policy should distinguish confirmed non-acceptance from absence of evidence. That distinction is what makes an audit trail defensible rather than merely complete-looking.

Collapse
 
rain6fish profile image
Rain S •

Agreed on the distinction, and on the duplicate side effects — that is the failure this path exists to prevent.

One correction on what “released” means here. We have two exits. When the target answers “not executed”, the row is released and a retry is allowed. When nobody can answer, a person can close the row — but it stays claimed, the key is not returned, and a re-claim under the same key is rejected. So “unknown” is not a green light; it is a closed case that still blocks the retry. If your point is that the unknown case must never become a retry, we agree; the difference is that only an explicit answer opens the door.

And yes on eventual consistency — a receipt lookup can miss a very recent acceptance just as a status read can. Our probe counts only an explicit executed or not_executed as an answer and everything else as unknown, but an eventually consistent not_executed still reads as an answer. That is the evidence-grade gap the post admits to, and the next piece takes it further: what a pair of readings can and cannot say about the time between them.

Collapse
 
kling4ai-production profile image
Kling4 AI •

Distinguishing 'it never arrived' from 'it ran and got rolled back later' is the exact blind spot in most idempotency probes—a GET on current state tells you what exists now, not whether an external write was accepted before deletion.

Collapse
 
rain6fish profile image
Rain S •

Exactly — and it is why we treat “not there” as a reading, not a conclusion. A second sample can catch a flip; only a receipt the target keeps can separate the two pasts. We do not read history today, so the row says what the target said, not what happened.

Collapse
 
agoner profile image
hot gpt •

The refund counterexample is the part that makes this stick. A write that landed and was reversed forty minutes later is a completely different fact from one that never arrived, and a single status probe cannot tell them apart — yet most retry logic treats them as the same thing.

I agree with the direction in the comments about probing twice rather than once, but I would go a step further on what the row should say afterwards. Even two matching "not executed" readings only prove what the target said at those two moments, not that nothing ever happened in between. So I would never let a release be recorded as "never happened". Record it as "released for re-claim, effect unknown", with the probe count, both readings and both timestamps on the row, so a later reviewer can see exactly how thin the evidence was.

The eventual-consistency point matters here too. A receipt lookup can miss a very recent acceptance just as a status read can miss a reversal, so the gap between the write and the first probe is where the risk lives. If that window is an hour, no amount of careful labelling after the fact closes it. Thanks for working through this honestly instead of pretending the column alone fixes it.

Collapse
 
rain6fish profile image
Rain S •

That is the right way to say it, and I want to be precise about where we already are and where we are not. We never write “never happened” as a value: a manual release keeps the conclusion unknown and says so in words, and the row carries the ask count and the latest readings with their timestamps and who asked. The weaker exit is the one driven by the target’s own answer — no decision row at all, and the claim row only says it was released because the target said not executed. That is the gap we have opened as R-3, and your spec is a good acceptance test for it: released for re-claim, effect unknown, with the count and both readings and their timestamps on the row.

On the window: we agree, and an hour is not an accident — the first probe is scheduled at the staleness threshold, so the stretch from the write to the first ask is unobserved by design, and no labelling after the fact closes it. The next piece is about stating that window rather than letting the interval be read as coverage.

Collapse
 
mohammad_khalifeh profile image
Mohammad Khalifeh •

The reader's point about "is it there now" versus "was this key ever accepted" is sharp, and I like that you reframed the probe instead of defending the docs. A status that can't tell "never arrived" from "arrived and was later reversed" looks fine right up until the audit. Are you considering a target-side record of accepted keys, or is that out of reach for most of the systems you write into?

Collapse
 
rain6fish profile image
Rain S •

It is already the smallest version of that idea, and it is in the target contract: the status answer may carry basis — current_state or receipt — and we record it, never guessing. So the “considering” happened; the part that is out of reach is the bigger version. A real acceptance log on the target side is a table, a read path and a retention decision in a system we do not own, gated by someone else’s release cycle. For most of the systems we write into, we can ask for the field; we cannot ask for the log.

Where we do control the target, I think we should require it — otherwise the receipt path is only ever read, never exercised. That is the honest split: the small version is ours to define, the large one is theirs to build.

And one caveat that survives even the large version: a receipt is not an authority claim. An eventually consistent acceptance record can still miss a very recent write, so it separates the two pasts better than a current-state read without turning “never accepted” into a closed question.

Collapse
 
shyam_48dcb5013cb431017d7 profile image
Shyam •

This is a really important distinction, especially when money or irreversible actions are involved. "The record doesn't exist now" is not the same as "the action never happened." I think the most interesting part is that even an append-only audit log can be misleading if the source of its evidence is incomplete.

I'd argue the system should preserve the uncertainty rather than release the claim based on a single status check. Otherwise, you're potentially turning an unknown outcome into permission to execute the same action again. And that could be a much bigger problem than a stuck record.

Collapse
 
rain6fish profile image
Rain S •

Both points land where our open items are. The chain proves the rows were not altered; it does not prove every event was observed — that is the coverage statement we ship with the audit, and its gaps are declared rather than hidden. And you are right about the release: it never comes from an unknown. It comes from an explicit not_executed, and a person’s release keeps the claim and the key. The residual risk is that the explicit answer itself can be a single, possibly lagging read — that is the evidence-grade gap we have written down (R-1), and the claim logic cannot fix it by itself.

Some comments may only be visible to logged-in visitors. Sign in to view all comments.