Agent Guardrails and Secure Development

Keep approval attached to the actual write

The first write happened before the reply was lost

A person approved an inspection, but the object changes before execution. Preserve both the reviewed effect and the receiver’s knowledge of past writes.

BOTIE

The stored version advanced and a matching action receipt exists. Should the worker apply the proposal again?
The inputs we are comparing

Proposed action

Same in both cases

{
  "id": "action-7",
  "record": "job-7",
  "version": 2,
  "newValue": "scheduled"
}

Server approval record

Same in both cases

{
  "id": "action-7",
  "record": "job-7",
  "version": 2,
  "newValue": "scheduled",
  "approved": true,
  "expires": 100
}

Stored object

The approved state is still current

{
  "id": "job-7",
  "version": 2
}

The first write succeeded before its reply was lost

{
  "id": "job-7",
  "version": 3
}

Receiver ledger

The approved state is still current

[]

The first write succeeded before its reply was lost

[
  {
    "id": "action-7",
    "record": "job-7",
    "version": 2,
    "newValue": "scheduled"
  }
]

Current time

Same in both cases

50
Result for the approved state is still current
apply once atomically
Choose an explanation to test
A reused action ID names a different effect

This check uses the pieces from “Choose between a new write and reconciliation”.

BOTIE

The new proposal has valid matching approval, but the receiver already recorded the same action ID with newValue=cancelled. Predict the route without overwriting the receipt.
Proposed action
{
  "id": "a9",
  "record": "job9",
  "version": 4,
  "newValue": "scheduled"
}
Server approval record
{
  "id": "a9",
  "record": "job9",
  "version": 4,
  "newValue": "scheduled",
  "approved": true,
  "expires": 100
}
Stored object
{
  "id": "job9",
  "version": 4
}
Receiver ledger
[
  {
    "id": "a9",
    "record": "job9",
    "version": 4,
    "newValue": "cancelled"
  }
]
Current time
50

Use a number, text, or an array matching the requested result. For a matrix, put each row in brackets. Saving your prediction runs your current construction on these inputs and checks the earlier examples too.

Build a construction in the workspace above first. This case will test those pieces.

Which storage operation makes the version check, effect and receipt atomic?

A route calculation describes the decision; concurrency guarantees belong to the receiver implementation.

These are invented records and deterministic policy checks. The browser runs no agent, shell command, MCP server or network request. Passing these fixtures establishes only the stated policy behaviour.

Work through the Python challenges →
Continue the courseWhat Should Botie Pass to Another Agent? →
← A Valid Token for Which Service?