{"slug": "ai-execution-governance-part-12-closing-an-unknown-is-not-a-verdict", "title": "AI Execution Governance, Part 12: Closing an Unknown Is Not a Verdict", "summary": "A developer building an AI execution-governance system described a design decision in which releasing an unresolved outbound write marks it `closed_unknown` while leaving its status at `claimed` and permanently spending its idempotency key, rather than returning the key for reuse. The author argues that returning the key would let a retry masquerade as a new call and risk a real double write, and that an expiry sweep only moves overdue rows to `awaiting_decision` without releasing them. Reconciliation re-asks the target at growing intervals (one, six, 24 and 72 hours) in batches of 25 rows, with each attempt recorded.", "body_md": "An outbound write times out. The claim sits at `claimed`, and nobody knows the outcome. Three weeks later a hundred of them have piled up, and someone clicks release.\n\nWhat comes back is not what they asked for: the disposition changes (`closed_unknown`), the status does not (still `claimed`), and the idempotency key stays occupied. They wanted the row gone and the key reusable. We did not do that.\n\nThis is not a defence of our choice. It is the disagreement laid out: what each path costs, which one we took, and what is still unsolved.\n\nAfter a timeout there are three ways forward: a late completion settles the row; a human asks the target one read-only question (reconcile); or a human decides to stop handling it (release). The first two remove the unknown, the third only stops working on it. Nobody argues about that part. The argument is whether the idempotency key goes back.\n\nIt is easy to read reconciliation as \"ask once and that is it\". Precisely: **one query per call**. As long as the claim is still `claimed` and not released, it can be asked again, and every attempt is stored with its time and conclusion. Nobody has to click for it either: once a hold is in the pending-decision queue, the system asks again every hour, with the gaps growing to one, six, twenty-four and seventy-two hours, then stops. Each pass asks at most twenty-five rows; the rest wait for the next hour. Whether it has stopped is written on the row.\n\nThe cleanup camp is direct: a claim is a resource, the outcome is not coming, so close it out, return the key and let the same call become a clean new call; the target's own idempotency handles duplicates. Queue TTLs and close-on-timeout are what most systems do.\n\nWe did not. This key does not prevent *duplicate execution*; it prevents the system from **quietly treating an old call as a new one**. Whether the target deduplicates is something we do not know — that is a bet across a trust boundary. The key is the one thing we can assert on our own side.\n\nWhere the two sides differ:\n\nAfter a release the row is still there. It moves from \"in flight\" to \"released\", it is still selectable by `decisionState`, and someone still has to look at it. The one thing the operator wanted — a shorter queue — is not delivered at all.\n\nAnd the key really does not come back: no path deletes the row and none returns it to a state where it can be reoccupied. Every release permanently spends one idempotency key. We accept that cost; we do not have a solution for it.\n\nThat is not a side effect. It is the net price. **We are selling \"stop handling it\"; they were buying \"make it stop appearing\".**\n\nBoth counterexamples are one step down from the code that exists.\n\n**A: release returns the key.** The next retry looks like a brand-new call and goes out. If the first one did reach the target, that is a real double write — and no record can tie it back to the first, because the key is gone. The release created the thing it exists to prevent.\n\n**B: the expiry sweep marks rows released.** A slow call may still be running; once it is marked, its late completion has no row to record itself into, and the claim stays at \"nobody knows\" forever, even after the evidence arrives. So the sweep decides nothing itself: every hour it moves overdue `open` rows to `awaiting_decision`, without changing the status, writing a conclusion or releasing anything. The asking is a separate path — the scheduled re-asks — and \"released\" still comes either from the target's answer or from a person.\n\nThe endpoint's shape follows from the same reasoning:\n\n``` php\nPOST /ai/tool-effects/claims/:id/release\n-> { outcome: \"released_unknown\", status: \"claimed\", decisionState: \"closed_unknown\" }\n```\n\n`status` staying `claimed` is not a typo. The status answers \"did this write produce a result\", and the answer is still no. Only the disposition changed.\n\nA release needs a note of 8 to 500 characters and may carry an external reference; the act writes one chained audit row with no outcome. The requirement came from a reader: **\"the queue is full\" is not a reason.** A release must point at something someone looked at, or it is indistinguishable from clicking the queue away.\n\nBut we only check the length. \"queue pressure\" is 14 characters and it passes. The system does not know whether the note points at evidence, or whether that evidence exists.\n\nThe system does not keep what was in front of the person when they pressed the button. The reference is free text they typed; the claim's state, whether the target could be queried, how often, what it answered — none of it is frozen with the decision.\n\nSo the auditability of a release reaches \"someone decided\". It does not reach \"the decision held up at the time\". And the whole justification for this path rests on \"it must point at evidence\" — if the evidence cannot be reviewed afterwards either, that sentence is closer to a formality.\n\nOne more thing is not closed: reconciliation presupposes that the target offers a status query. Targets that cannot answer (`target-status-unavailable`) cannot even be asked, and the scheduled re-asks do not fire at them at all; those rows never converge and the only way out is a release. **The volume of releases is set by a gap somewhere else.**\n\nSo the question worth arguing is not whether release should change the status. It is this:\n\n**If a release cannot be reviewed afterwards for whether it was justified, is it a decision or a formality?**\n\nWe do not have an answer. What we are sure of is the other direction: quietly ruling the row \"executed\" or \"not executed\" is worse — then not even the formality is left.\n\nThe implementation described here comes from the open-source project KeelBase:\n\n*Drafted with an AI assistant. The system, the positions and the mistakes are mine.*", "url": "https://wpnews.pro/news/ai-execution-governance-part-12-closing-an-unknown-is-not-a-verdict", "canonical_source": "https://dev.to/rain6fish/ai-execution-governance-part-12-closing-an-unknown-is-not-a-verdict-1mb7", "published_at": "2026-11-16 00:44:27+00:00", "updated_at": "2026-11-16 00:51:02.016529+00:00", "lang": "en", "topics": ["ai-agents", "ai-safety", "ai-infrastructure", "developer-tools"], "entities": [], "also_reported_by": [], "alternates": {"html": "https://wpnews.pro/news/ai-execution-governance-part-12-closing-an-unknown-is-not-a-verdict", "markdown": "https://wpnews.pro/news/ai-execution-governance-part-12-closing-an-unknown-is-not-a-verdict.md", "text": "https://wpnews.pro/news/ai-execution-governance-part-12-closing-an-unknown-is-not-a-verdict.txt", "jsonld": "https://wpnews.pro/news/ai-execution-governance-part-12-closing-an-unknown-is-not-a-verdict.jsonld"}}