Demo · illustrative example

One bug. Two fixes. Two signed verdicts.

A tiny Python bug, a fix that passes the hidden test and a fix that doesn't. Below: what each verdict says, and how to check its signature without trusting us.

The code on this page is a made-up illustration. The two receipts are real: they are what resultbond demo --scenario pass and --scenario fail produce, signed with the public demo key. No client data, no real money.

1. The task

The job sheet says: return an empty collection instead of raising on a null upstream response. Today the function crashes.

def order_ids(client):
    """IDs of the open orders. The upstream API may answer null."""
    data = client.get("/orders?status=open")
    return [order["id"] for order in data]   # TypeError when data is None

Public test

public:regression:001

The agent sees it. Existing behaviour must keep working.

def test_ids_of_open_orders():
    assert order_ids(FakeClient([{"id": 7}, {"id": 9}])) == [7, 9]

Hidden test

hidden:fail-to-pass:001

The agent never sees it. It fails on today's code — that is checked before the job starts.

def test_null_upstream_gives_empty_list():
    assert order_ids(NullClient()) == []

2. Two patches

Patch A

PASS
     data = client.get("/orders?status=open")
+    if data is None:
+        return []
     return [order["id"] for order in data]

A null answer becomes an empty list. The hidden test passes, the public test still passes, three runs agree.

Patch B

FAIL
-    data = client.get("/orders?status=open")
-    return [order["id"] for order in data]
+    try:
+        data = client.get("/orders?status=open")
+        return [order["id"] for order in data]
+    except Exception:
+        return None

No more crash, so it looks fixed. But it returns None, not an empty list, and it hides every other error too. The hidden test catches it.

3. The signed verdicts

Main fields of each receipt's payload. Digests and the Ed25519 signature are in the full files.

PASS receipt

receipt-pass.json
{
  "receipt_version": "rb.proof-receipt.v0.3",
  "job_id": "partner:demo-marketplace/demo-bugfix-001",
  "policy_id": "rb.hidden-bugfix.v0.2",
  "outcome": "PASS",
  "reason_code": "ALL_CHECKS_PASS",
  "settlement": {
    "payment_action": "RELEASE_PAYMENT",
    "currency": "USDC",
    "payment_atomic": 250000000,
    "stipend_atomic": 0
  },
  "evaluator_key_id": "demo:evaluator:key-1",
  "issued_at": "2026-08-27T12:05:00.000000Z"
}

Payment is released to the agent.

FAIL receipt

receipt-fail.json
{
  "receipt_version": "rb.proof-receipt.v0.3",
  "job_id": "partner:demo-marketplace/demo-bugfix-001",
  "policy_id": "rb.hidden-bugfix.v0.2",
  "outcome": "FAIL",
  "reason_code": "HIDDEN_TEST_FAILURE",
  "settlement": {
    "payment_action": "REFUND_PAYMENT",
    "currency": "USDC",
    "payment_atomic": 250000000,
    "stipend_atomic": 25000000
  },
  "evaluator_key_id": "demo:evaluator:key-1",
  "issued_at": "2026-08-27T12:05:00.000000Z"
}

The buyer is refunded and gets a stipend for the failed attempt.

4. Check the signature yourself

  1. In the browser. Open /verify and press “PASS sample” or “FAIL sample”. The check runs locally; nothing is uploaded. Try “Tampered”: one changed number breaks the signature.
  2. With the Python CLI from this repository:
git clone https://github.com/valtris/resultbond-core && cd resultbond-core
pip install -e .
curl -sO https://resultbond.com/samples/receipt-pass.json
resultbond verify-receipt receipt-pass.json

The result says "valid": true and "trusted": false: the receipt is intact, but the demo key is public, so anyone could have signed it. Real receipts are signed with keys from ResultBond's published key set (--online). To accept the demo key on purpose, pin it:

resultbond verify-receipt receipt-pass.json \
  --trust demo:evaluator:key-1=7UkoxijRwsbq6QM4kFmVYSlZJzpcY_k2NsFGFKyHN9E

The same check in JavaScript, from the repository root:

node js/cli.mjs verify receipt-pass.json

Try it on your own bugs.

Shadow mode first: your agent, your bugs, nothing is paid.