{
  "v": "proto-2",
  "kind": "attesto.receipt",
  "subject": "flight-recorder-run",
  "issuedAt": "2026-10-30T09:20:23.311Z",
  "issuedBy": "attesto-flight-recorder@proto-2.1",
  "run": {
    "ref": "run-y75v86uhqr"
  },
  "verify": {
    "url": "https://stage.attesto.cloud/verify",
    "howTo": "Open https://stage.attesto.cloud/verify (or a saved copy of that page, offline) and drop this file in. Nothing is sent to us."
  },
  "claims": {
    "proves": "This record shows that these steps of the run happened in this order, no later than the times confirmed by the outside timekeeper, and that none was changed or removed afterwards. Each action names who allowed it: a rule, or a person.",
    "doesNotProve": "It does not prove that the AI's reasoning was right, who a person really is (names are typed, not checked), or anything that happened outside this record."
  },
  "limits": [
    "Refunds are simulated in this prototype: no money moved.",
    "Names are claims: the customer's name comes from the customer channel, and the approver typed their own name on the approval page. Nobody signed in.",
    "Privacy is not finished (DESIGN EL21): names are in this receipt in plain text, and a redacted copy that still checks is not possible yet. The batch log that the outside timekeepers see holds only fingerprints.",
    "Only actions routed through the flight recorder are covered."
  ],
  "witnesses": {
    "timekeepers": [
      {
        "id": "freetsa",
        "name": "FreeTSA",
        "rootSha256": "a6379e7cecc05faa3cbf076013d745e327bbbaa38c0b9af22469d4701d18aabc"
      }
    ],
    "bitcoin": "OpenTimestamps",
    "note": "1 outside timekeeper (FreeTSA) + Bitcoin (OpenTimestamps). A second independent timekeeper is planned."
  },
  "chain": {
    "hash": "sha256(canonicalJSON({ v, runId, seq, prev, type, at, who, tag, source, how, data }))",
    "genesis": "0000000000000000000000000000000000000000000000000000000000000000",
    "facts": [
      {
        "v": "proto-2",
        "runId": "run-y75v86uhqr",
        "seq": 1,
        "prev": "0000000000000000000000000000000000000000000000000000000000000000",
        "how": {
          "build": "attesto-flight-recorder@proto-2.0",
          "rules": "rules-v1#6ad3916fe682caed",
          "traceId": "a4bb1d4809693584"
        },
        "type": "request.received",
        "at": "2026-10-17T00:16:24.391Z",
        "who": {
          "kind": "customer",
          "id": "cust-ana",
          "name": "Ana Ruiz"
        },
        "tag": "claimed",
        "source": "customer message",
        "data": {
          "textHash": "be48d0c2db96f6730ebd94cbe5ed72a512cda2f83a68d3e8c5fe7bb9908e64d8"
        },
        "hash": "51f6cfee35873deb2ca6627ddcccf9a32a776a2fd1c97ee20cf17121d34dd19c"
      },
      {
        "v": "proto-2",
        "runId": "run-y75v86uhqr",
        "seq": 2,
        "prev": "51f6cfee35873deb2ca6627ddcccf9a32a776a2fd1c97ee20cf17121d34dd19c",
        "how": {
          "build": "attesto-flight-recorder@proto-2.0",
          "rules": "rules-v1#6ad3916fe682caed",
          "traceId": "a4bb1d4809693584",
          "agent": "Support agent@toy-0.1"
        },
        "type": "action.proposed",
        "at": "2026-10-17T00:16:24.750Z",
        "who": {
          "kind": "agent",
          "id": "agent:toy-support",
          "name": "Support agent",
          "version": "toy-0.1"
        },
        "tag": "claimed",
        "source": "agent proposal",
        "data": {
          "proposalId": "p-dmf93gn3fy",
          "action": {
            "kind": "refund",
            "orderId": "1175",
            "amountCents": 4000,
            "currency": "USD"
          },
          "reasonHash": "6e4afc2821d9a6e4769d264faad85fd439d6275a8b389f1b84db16492acf9579"
        },
        "hash": "c23ce6c9a5194d6a9c6481f8911c78a26ba957c96d7cf08e5f961262a0a8fda3"
      },
      {
        "v": "proto-2",
        "runId": "run-y75v86uhqr",
        "seq": 3,
        "prev": "c23ce6c9a5194d6a9c6481f8911c78a26ba957c96d7cf08e5f961262a0a8fda3",
        "how": {
          "build": "attesto-flight-recorder@proto-2.0",
          "rules": "rules-v1#6ad3916fe682caed",
          "traceId": "a4bb1d4809693584",
          "agent": "Support agent@toy-0.1"
        },
        "at": "2026-10-17T00:16:24.750Z",
        "who": {
          "kind": "rules",
          "id": "rules",
          "name": "Your rules"
        },
        "tag": "observed",
        "source": "decide()",
        "type": "action.allowed",
        "data": {
          "proposalId": "p-dmf93gn3fy",
          "rule": {
            "id": "small-refunds-ok",
            "name": "Refunds up to $100 are allowed"
          },
          "checked": [
            {
              "ruleId": "flagged-customer",
              "matched": false
            },
            {
              "ruleId": "one-refund-per-order",
              "matched": false
            },
            {
              "ruleId": "over-100-needs-person",
              "matched": false
            },
            {
              "ruleId": "small-refunds-ok",
              "matched": true
            }
          ]
        },
        "hash": "59d8772e7111c58cdc54d2343e30d5612a80f1396172a84d202078b2a131ecc9"
      },
      {
        "v": "proto-2",
        "runId": "run-y75v86uhqr",
        "seq": 4,
        "prev": "59d8772e7111c58cdc54d2343e30d5612a80f1396172a84d202078b2a131ecc9",
        "how": {
          "build": "attesto-flight-recorder@proto-2.0",
          "rules": "rules-v1#6ad3916fe682caed",
          "traceId": "a4bb1d4809693584"
        },
        "type": "action.done",
        "at": "2026-10-17T00:16:24.761Z",
        "who": {
          "kind": "system",
          "id": "simulated payments (prototype)",
          "name": "simulated payments (prototype)"
        },
        "tag": "observed",
        "source": "simulated payments (prototype)",
        "data": {
          "proposalId": "p-dmf93gn3fy",
          "reference": "sim-refund-p-dmf93gn3fy"
        },
        "hash": "e40439bccf3159d753af14276820a1c7c180ad9a3777f9d0ff3606a180f09885"
      },
      {
        "v": "proto-2",
        "runId": "run-y75v86uhqr",
        "seq": 5,
        "prev": "e40439bccf3159d753af14276820a1c7c180ad9a3777f9d0ff3606a180f09885",
        "how": {
          "build": "attesto-flight-recorder@proto-2.0",
          "rules": "rules-v1#6ad3916fe682caed",
          "traceId": "a4bb1d4809693584",
          "agent": "Support agent@toy-0.1"
        },
        "type": "action.proposed",
        "at": "2026-10-17T00:16:24.828Z",
        "who": {
          "kind": "agent",
          "id": "agent:toy-support",
          "name": "Support agent",
          "version": "toy-0.1"
        },
        "tag": "claimed",
        "source": "agent proposal",
        "data": {
          "proposalId": "p-y73mcygsqe",
          "action": {
            "kind": "refund",
            "orderId": "1182",
            "amountCents": 25000,
            "currency": "USD"
          },
          "reasonHash": "dea2fada4f971d2e1a9541926350bb1b9a304d503311388985b104931c6a8875"
        },
        "hash": "8d53ab5a7ebd8e19322eb19f64b8d222accc183c33539da3244fffcde0f37f7f"
      },
      {
        "v": "proto-2",
        "runId": "run-y75v86uhqr",
        "seq": 6,
        "prev": "8d53ab5a7ebd8e19322eb19f64b8d222accc183c33539da3244fffcde0f37f7f",
        "how": {
          "build": "attesto-flight-recorder@proto-2.0",
          "rules": "rules-v1#6ad3916fe682caed",
          "traceId": "a4bb1d4809693584",
          "agent": "Support agent@toy-0.1"
        },
        "at": "2026-10-17T00:16:24.828Z",
        "who": {
          "kind": "rules",
          "id": "rules",
          "name": "Your rules"
        },
        "tag": "observed",
        "source": "decide()",
        "type": "action.held",
        "data": {
          "proposalId": "p-y73mcygsqe",
          "rule": {
            "id": "over-100-needs-person",
            "name": "Refunds over $100 need a person"
          },
          "checked": [
            {
              "ruleId": "flagged-customer",
              "matched": false
            },
            {
              "ruleId": "one-refund-per-order",
              "matched": false
            },
            {
              "ruleId": "over-100-needs-person",
              "matched": true
            }
          ],
          "approvalId": "ap-p-y73mcygsqe"
        },
        "hash": "4fcb9d1a725602a1f7c2feac578fdd3b6c5987941e49ef13f350470eff459a02"
      },
      {
        "v": "proto-2",
        "runId": "run-y75v86uhqr",
        "seq": 7,
        "prev": "4fcb9d1a725602a1f7c2feac578fdd3b6c5987941e49ef13f350470eff459a02",
        "how": {
          "build": "attesto-flight-recorder@proto-2.0",
          "rules": "rules-v1#6ad3916fe682caed",
          "traceId": "a4bb1d4809693584",
          "agent": "Support agent@toy-0.1"
        },
        "type": "action.proposed",
        "at": "2026-10-17T00:16:24.906Z",
        "who": {
          "kind": "agent",
          "id": "agent:toy-support",
          "name": "Support agent",
          "version": "toy-0.1"
        },
        "tag": "claimed",
        "source": "agent proposal",
        "data": {
          "proposalId": "p-apys8sv9b8",
          "action": {
            "kind": "refund",
            "orderId": "1175",
            "amountCents": 9000,
            "currency": "USD"
          },
          "reasonHash": "b506e09acae4cae3189dd9224ba64495b930eff758575a0b5e1a84ecbbe93c1e"
        },
        "hash": "8f04b04a1078a011237c249bfee1df8bd90c7195103c15014627f412f24529a3"
      },
      {
        "v": "proto-2",
        "runId": "run-y75v86uhqr",
        "seq": 8,
        "prev": "8f04b04a1078a011237c249bfee1df8bd90c7195103c15014627f412f24529a3",
        "how": {
          "build": "attesto-flight-recorder@proto-2.0",
          "rules": "rules-v1#6ad3916fe682caed",
          "traceId": "a4bb1d4809693584",
          "agent": "Support agent@toy-0.1"
        },
        "at": "2026-10-17T00:16:24.906Z",
        "who": {
          "kind": "rules",
          "id": "rules",
          "name": "Your rules"
        },
        "tag": "observed",
        "source": "decide()",
        "type": "action.blocked",
        "data": {
          "proposalId": "p-apys8sv9b8",
          "rule": {
            "id": "one-refund-per-order",
            "name": "Never refund the same order twice"
          },
          "checked": [
            {
              "ruleId": "flagged-customer",
              "matched": false
            },
            {
              "ruleId": "one-refund-per-order",
              "matched": true
            }
          ]
        },
        "hash": "7841b3ca2c2af882f86e170b5b5e8d084ae362fae6df37ba8ee53ea473ada341"
      }
    ]
  },
  "checkpoints": [],
  "batches": [],
  "otsAnchors": [],
  "rules": {
    "ref": "rules-v1#6ad3916fe682caed",
    "list": [
      {
        "id": "flagged-customer",
        "name": "Block if the customer is flagged",
        "when": {
          "check": "customer-flagged"
        },
        "outcome": "block"
      },
      {
        "id": "one-refund-per-order",
        "name": "Never refund the same order twice",
        "when": {
          "check": "order-already-refunded"
        },
        "outcome": "block"
      },
      {
        "id": "over-100-needs-person",
        "name": "Refunds over $100 need a person",
        "when": {
          "check": "amount-over",
          "cents": 10000
        },
        "outcome": "hold"
      },
      {
        "id": "small-refunds-ok",
        "name": "Refunds up to $100 are allowed",
        "when": {
          "check": "always"
        },
        "outcome": "allow"
      }
    ]
  },
  "privateTexts": {
    "note": "Not part of the chain. Each text's SHA-256 is in the facts. These can be removed from a shared copy without breaking the chain.",
    "byHash": {
      "be48d0c2db96f6730ebd94cbe5ed72a512cda2f83a68d3e8c5fe7bb9908e64d8": "Hi, my blender from order 1182 arrived broken, and I was charged shipping twice on order 1175. Can you help?",
      "6e4afc2821d9a6e4769d264faad85fd439d6275a8b389f1b84db16492acf9579": "Shipping was charged twice on order 1175. Refund the extra $40.",
      "dea2fada4f971d2e1a9541926350bb1b9a304d503311388985b104931c6a8875": "The blender in order 1182 arrived broken. Refund the full $250.",
      "b506e09acae4cae3189dd9224ba64495b930eff758575a0b5e1a84ecbbe93c1e": "Add a $90 goodwill credit on order 1175 for the trouble."
    }
  },
  "summary": {
    "customer": "Ana Ruiz",
    "actions": [
      {
        "title": "Refund $40 for order 1175",
        "status": "Done",
        "story": "On 17 Oct 2026 at 00:16 UTC the support agent proposed a $40 refund for order 1175. The rule “Refunds up to $100 are allowed” allowed it. It was done at 00:16 UTC."
      },
      {
        "title": "Refund $250 for order 1182",
        "status": "Waiting for a person",
        "story": "On 17 Oct 2026 at 00:16 UTC the support agent proposed a $250 refund for order 1182. The rule “Refunds over $100 need a person” held it for a person."
      },
      {
        "title": "Refund $90 for order 1175",
        "status": "Blocked by a rule",
        "story": "On 17 Oct 2026 at 00:16 UTC the support agent proposed a $90 refund for order 1175. The rule “Never refund the same order twice” blocked it. Nothing was done."
      }
    ],
    "note": "Plain-language summary for reading the file. The checker does not trust it: it rebuilds the timeline from the facts."
  }
}