[
  {
    "name": "unpaired-result",
    "messages": [
      {
        "role": "toolResult",
        "toolCallId": "missing_call",
        "toolName": "read",
        "isError": false,
        "content": [{ "type": "text", "text": "orphan" }]
      }
    ],
    "expect": {
      "observations": 0,
      "pendingCallCount": 0,
      "unpairedResultCount": 1,
      "duplicateResultCount": 0
    }
  },
  {
    "name": "duplicate-result",
    "messages": [
      {
        "role": "assistant",
        "content": [{ "type": "toolCall", "id": "call_1", "name": "read", "arguments": { "path": "a.txt" } }]
      },
      {
        "role": "toolResult",
        "toolCallId": "call_1",
        "toolName": "read",
        "isError": false,
        "content": [{ "type": "text", "text": "first" }]
      },
      {
        "role": "toolResult",
        "toolCallId": "call_1",
        "toolName": "read",
        "isError": false,
        "content": [{ "type": "text", "text": "second" }]
      }
    ],
    "expect": {
      "observations": 1,
      "pendingCallCount": 0,
      "unpairedResultCount": 0,
      "duplicateResultCount": 1,
      "toolNameMismatch": false
    }
  },
  {
    "name": "tool-name-mismatch",
    "messages": [
      {
        "role": "assistant",
        "content": [{ "type": "toolCall", "id": "call_2", "name": "read", "arguments": { "path": "b.txt" } }]
      },
      {
        "role": "toolResult",
        "toolCallId": "call_2",
        "toolName": "write",
        "isError": true,
        "content": [{ "type": "text", "text": "ENOENT" }]
      }
    ],
    "expect": {
      "observations": 1,
      "pendingCallCount": 0,
      "unpairedResultCount": 0,
      "duplicateResultCount": 0,
      "toolNameMismatch": true,
      "status": "deterministic_error",
      "errorCode": "ENOENT"
    }
  }
]
