# Approval gap — local deterministic experiment protocol Protocol version 1.0. Prepared internally on 2026-10-31 before the implementation and its first run. This is an internal protocol, not an externally preregistered study. The SHA-256 of this file is included in the result provenance. ## Question and scope Can an execution differ from the business action a person approved, including when the raw tool arguments have not changed? Which deliberately implemented controls distinguish these cases in a small reproducible model? One synthetic `send_offer` action resolves an offer, contact and attachment from local in-memory records. Default recipient is `buyer@customer.example`, amount is 48000 integer euro cents, and currency is EUR. The attachment is a clearly synthetic text document. No LLM, real customer data, network, SMTP, payment, third-party service or production system is used. A fake provider records accepted effects. The provider ledger is the evaluator's ground truth; the workflow cannot inspect it directly. This is an original fault-injection demonstration of three intentionally defined toy workflows. It is not a model benchmark, a representative survey, a vendor comparison or a measurement of how frequently these failures occur. ## Compared workflows - A, `boolean`: retain an approval boolean, then execute the current mutable arguments and currently resolved records. No attempt/result tracking or provider idempotency key. - B, `arguments`: additionally bind approval to the exact canonical JSON tool arguments. These contain `action`, `offer_id`, `recipient_ref`, `total_cents`, `currency` and `attachment_ref`. B does not bind the email or attachment bytes behind those references, recheck business state or track retries. - C, `resolved_and_guarded`: bind both the exact raw arguments and the resolved business effect, including actual email, subject, body, attachment filename and actual attachment-byte digest. Also bind relevant offer/contact versions and check current offer status, current approving person's authority and an explicit expiry. Preserve per-operation attempt/result state. Supply a stable operation key to a provider that supports durable deduplication. After an uncertain response from a provider without that contract, stop automatic retries and retain a manual-review state. The comparison is between these defined control bundles. B isolates argument binding from C's additional controls; it does not establish the separate causal contribution of every control in C. All variants use the same resolver, effect representation, fake provider implementation and event sequence. A and B intentionally do not use the provider's optional deduplication key. They are not claimed to represent any real product. ## Independent oracle and predefined cases Before the implementation, `expected.json` will specify each case's expected accepted-effect count, intent-matching count and returned result codes for A, B and C. The evaluator compares accepted effects with a separate immutable copy of what the approver actually reviewed. It must not ask C's policy function whether the effect was valid. A matching business payload does not imply current authority or freshness; those policy failures are separately labelled. Each case starts from a fresh fixture. The fixed virtual clock is 100 seconds for ordinary execution; approval was made at 0 and expires at 300. At exactly 300 the approval is expired. No wall-clock sleeps or random scheduling are used. | ID | Controlled event after initial review/approval unless stated | A effects | B effects | C effects | Intended distinction | | --- | --- | ---: | ---: | ---: | --- | | 01 | Valid unchanged action | 1 | 1 | 1 | Positive execution control | | 02 | No approval issued | 0 | 0 | 0 | Negative approval control | | 03 | `recipient_ref` changed to another synthetic contact | 1 | 0 | 0 | Raw argument change | | 04 | Attachment bytes replaced; reference and filename unchanged | 1 | 1 | 0 | Same arguments, different attachment | | 05 | `total_cents` changed from 48000 to 58000 | 1 | 0 | 0 | Raw financial term change | | 06 | Offer version advances and status becomes blocked | 1 | 1 | 0 | Same payload can be stale or disallowed | | 07 | Approving person's authority revoked | 1 | 1 | 0 | Previous approval is not a current permission check | | 08 | Clock reaches the exact expiry boundary | 1 | 1 | 0 | Defined expiry policy | | 09 | Same completed operation requested twice | 2 | 2 | 1 | Stored result avoids a new provider call | | 10 | Provider accepts, acknowledgement is lost, caller retries; provider supports durable idempotency | 2 | 2 | 1 | Stable key enables recovery without another accepted effect | | 11 | Same lost acknowledgement with a provider that has no idempotency contract | 2 | 2 | 1 | C records uncertainty and refuses blind retry; completion is not asserted | | 12 | Recipient reference edited, then shown again and freshly approved | 1 | 1 | 1 | Changed actions can be allowed after a real new review | | 13 | Email behind the same contact ID changes; raw arguments unchanged | 1 | 1 | 0 | Same arguments, different resolved recipient | Cases 03, 04, 05 and 13 produce effects that differ from the reviewed intent in any variant that accepts them. Cases 06–08 can produce an intent-matching payload while violating the independently defined current-state policy. Case 12's oracle is the newly reviewed action. Cases 09–11 use two calls with the same logical operation identifier. The fake provider's first accepted operation can lose its response; this is a partial failure at the acceptance/acknowledgement boundary, not a multi-service distributed transaction. ## Recording and assertions For each case and variant record raw argument digests, approved/current resolved-effect digests, result codes for every attempt, provider call count, accepted-effect count, each accepted effect's destination/amount/attachment digest, equality with reviewed intent, and final workflow state. Do not infer success from a returned message alone. In case 11 the evaluator knows one acceptance occurred; C correctly retains uncertainty because it does not have that knowledge. Assertions require exact per-case counts and codes from the independent fixture. Positive controls must complete. Retry cases must distinguish received acknowledgements from effects already accepted. The output contains no aggregate safety score, percentage, p-value, confidence interval or production failure-rate estimate. Run with Python's standard library only. Save the protocol, expected fixture and source SHA-256 values, Python version, fixed-input specification and output schema version. A repeat run should produce the same result bytes in the same Python environment. Repetition demonstrates reproducibility, not a larger statistical sample. ## Limits that accompany any published result Single process, single thread, fixed inputs, explicit event injection and in-memory state. There is no tested real concurrency, lock/transaction boundary, restart durability, distributed crash recovery, queue, external API, cryptographic credential protection, human comprehension, prompt injection resistance or model behaviour. Digests compare values; they do not prove who approved them or protect a writable approval store. The resolver and approval store are trusted within this model. C prepares the actual provider payload from the resolved values that it checks. A real integration must ensure it does not resolve mutable references again after that check. The experiment cannot prove that a production system closes all check/use races. The fake provider's idempotency behavior is an explicit modelling assumption, not a universal email-service feature. No exactly-once guarantee is established. A manual-review state does not itself reconcile or reverse a previously accepted effect. Provider acceptance here does not mean delivery to a mailbox or a person reading a message. The existing AI permissions article explains principles. This experiment should add a traceable concrete result: what was reviewed, what remained unchanged, what changed behind a reference, what the fake provider actually accepted, and which check made the difference. Appropriate Latvian framing is “Vai sistēma izpilda tieši to, ko cilvēks apstiprināja?” and “Pārbaudījām 13 iepriekš definētas situācijas vienā lokālā izmēģinājuma programmā.” Do not write “AI kļūdās X% gadījumu” or “pierādījām pilnīgu drošību”. ## Primary context, not a source of the experimental data - OWASP Transaction Authorization, meaningful action data and a final execution check: https://cheatsheetseries.owasp.org/cheatsheets/Transaction_Authorization_Cheat_Sheet.html - OWASP Authorization, checking current permissions for each request: https://cheatsheetseries.owasp.org/cheatsheets/Authorization_Cheat_Sheet.html - AWS Builders' Library, explicit request identifiers, parameter mismatch and the receiver's deduplication contract: https://aws.amazon.com/builders-library/making-retries-safe-with-idempotent-APIs/ - MITRE CWE-367, state changing between a check and its use: https://cwe.mitre.org/data/definitions/367.html These primary pages were read on 2026-10-31. The fixture choices, toy workflows, injected events and measured outputs are our own; the sources do not endorse or validate this implementation.