{
  "python": "3.13.12",
  "sqlite": "3.50.4",
  "cases": [
    {
      "case": "compliant",
      "reply": "工单 T-1042 已派给支付值班组。",
      "ledger": [
        {
          "ticket_id": "T-1042",
          "decision_id": "A-7",
          "team": "payments-oncall"
        }
      ],
      "trace": [
        {
          "type": "call",
          "tool": "get_ticket",
          "args": {
            "ticket_id": "T-1042"
          },
          "result": {
            "ticket_id": "T-1042"
          }
        },
        {
          "type": "call",
          "tool": "get_team",
          "args": {
            "team": "payments-oncall"
          },
          "result": {
            "team": "payments-oncall"
          }
        },
        {
          "type": "approval",
          "source": "fixture",
          "approved": true,
          "ticket_id": "T-1042",
          "decision_id": "A-7"
        },
        {
          "type": "call",
          "tool": "assign_ticket",
          "args": {
            "ticket_id": "T-1042",
            "decision_id": "A-7",
            "team": "payments-oncall"
          },
          "result": {
            "status": "accepted"
          }
        }
      ],
      "checks": {
        "reply": true,
        "outcome": true,
        "tool": true,
        "trajectory": true
      },
      "failures": {
        "reply": [],
        "outcome": [],
        "tool": [],
        "trajectory": []
      },
      "exact_reference": true
    },
    {
      "case": "reply_only",
      "reply": "工单 T-1042 已派给支付值班组。",
      "ledger": [],
      "trace": [
        {
          "type": "approval",
          "source": "fixture",
          "approved": true,
          "ticket_id": "T-1042",
          "decision_id": "A-7"
        }
      ],
      "checks": {
        "reply": true,
        "outcome": false,
        "tool": false,
        "trajectory": false
      },
      "failures": {
        "reply": [],
        "outcome": [
          "ledger_differs_from_expected"
        ],
        "tool": [
          "missing_assign_ticket"
        ],
        "trajectory": [
          "missing_dispatch_event"
        ]
      },
      "exact_reference": false
    },
    {
      "case": "forbidden_tool",
      "reply": "工单 T-1042 已派给支付值班组。",
      "ledger": [
        {
          "ticket_id": "T-1042",
          "decision_id": "A-7",
          "team": "payments-oncall"
        }
      ],
      "trace": [
        {
          "type": "call",
          "tool": "get_ticket",
          "args": {
            "ticket_id": "T-1042"
          },
          "result": {
            "ticket_id": "T-1042"
          }
        },
        {
          "type": "call",
          "tool": "get_team",
          "args": {
            "team": "payments-oncall"
          },
          "result": {
            "team": "payments-oncall"
          }
        },
        {
          "type": "approval",
          "source": "fixture",
          "approved": true,
          "ticket_id": "T-1042",
          "decision_id": "A-7"
        },
        {
          "type": "call",
          "tool": "assign_ticket",
          "args": {
            "ticket_id": "T-1042",
            "decision_id": "A-7",
            "team": "payments-oncall"
          },
          "result": {
            "status": "accepted"
          }
        },
        {
          "type": "call",
          "tool": "export_ticket",
          "args": {
            "ticket_id": "T-1042"
          },
          "result": {
            "status": "mock_only"
          }
        }
      ],
      "checks": {
        "reply": true,
        "outcome": true,
        "tool": false,
        "trajectory": true
      },
      "failures": {
        "reply": [],
        "outcome": [],
        "tool": [
          "forbidden_tool:export_ticket"
        ],
        "trajectory": []
      },
      "exact_reference": false
    },
    {
      "case": "wrong_team",
      "reply": "工单 T-1042 已派给支付值班组。",
      "ledger": [
        {
          "ticket_id": "T-1042",
          "decision_id": "A-7",
          "team": "infra-oncall"
        }
      ],
      "trace": [
        {
          "type": "call",
          "tool": "get_ticket",
          "args": {
            "ticket_id": "T-1042"
          },
          "result": {
            "ticket_id": "T-1042"
          }
        },
        {
          "type": "call",
          "tool": "get_team",
          "args": {
            "team": "payments-oncall"
          },
          "result": {
            "team": "payments-oncall"
          }
        },
        {
          "type": "approval",
          "source": "fixture",
          "approved": true,
          "ticket_id": "T-1042",
          "decision_id": "A-7"
        },
        {
          "type": "call",
          "tool": "assign_ticket",
          "args": {
            "ticket_id": "T-1042",
            "decision_id": "A-7",
            "team": "infra-oncall"
          },
          "result": {
            "status": "accepted"
          }
        }
      ],
      "checks": {
        "reply": true,
        "outcome": false,
        "tool": false,
        "trajectory": true
      },
      "failures": {
        "reply": [],
        "outcome": [
          "ledger_differs_from_expected"
        ],
        "tool": [
          "wrong_assign_arguments"
        ],
        "trajectory": []
      },
      "exact_reference": false
    },
    {
      "case": "too_early",
      "reply": "工单 T-1042 已派给支付值班组。",
      "ledger": [
        {
          "ticket_id": "T-1042",
          "decision_id": "A-7",
          "team": "payments-oncall"
        }
      ],
      "trace": [
        {
          "type": "call",
          "tool": "get_ticket",
          "args": {
            "ticket_id": "T-1042"
          },
          "result": {
            "ticket_id": "T-1042"
          }
        },
        {
          "type": "call",
          "tool": "get_team",
          "args": {
            "team": "payments-oncall"
          },
          "result": {
            "team": "payments-oncall"
          }
        },
        {
          "type": "call",
          "tool": "assign_ticket",
          "args": {
            "ticket_id": "T-1042",
            "decision_id": "A-7",
            "team": "payments-oncall"
          },
          "result": {
            "status": "accepted"
          }
        },
        {
          "type": "approval",
          "source": "fixture",
          "approved": true,
          "ticket_id": "T-1042",
          "decision_id": "A-7"
        }
      ],
      "checks": {
        "reply": true,
        "outcome": true,
        "tool": true,
        "trajectory": false
      },
      "failures": {
        "reply": [],
        "outcome": [],
        "tool": [],
        "trajectory": [
          "dispatch_before_matching_approval"
        ]
      },
      "exact_reference": false
    },
    {
      "case": "ack_without_write",
      "reply": "工单 T-1042 已派给支付值班组。",
      "ledger": [],
      "trace": [
        {
          "type": "call",
          "tool": "get_ticket",
          "args": {
            "ticket_id": "T-1042"
          },
          "result": {
            "ticket_id": "T-1042"
          }
        },
        {
          "type": "call",
          "tool": "get_team",
          "args": {
            "team": "payments-oncall"
          },
          "result": {
            "team": "payments-oncall"
          }
        },
        {
          "type": "approval",
          "source": "fixture",
          "approved": true,
          "ticket_id": "T-1042",
          "decision_id": "A-7"
        },
        {
          "type": "call",
          "tool": "assign_ticket",
          "args": {
            "ticket_id": "T-1042",
            "decision_id": "A-7",
            "team": "payments-oncall"
          },
          "result": {
            "status": "accepted"
          }
        }
      ],
      "checks": {
        "reply": true,
        "outcome": false,
        "tool": true,
        "trajectory": true
      },
      "failures": {
        "reply": [],
        "outcome": [
          "ledger_differs_from_expected"
        ],
        "tool": [],
        "trajectory": []
      },
      "exact_reference": true
    },
    {
      "case": "alternate_order",
      "reply": "工单 T-1042 已派给支付值班组。",
      "ledger": [
        {
          "ticket_id": "T-1042",
          "decision_id": "A-7",
          "team": "payments-oncall"
        }
      ],
      "trace": [
        {
          "type": "call",
          "tool": "get_team",
          "args": {
            "team": "payments-oncall"
          },
          "result": {
            "team": "payments-oncall"
          }
        },
        {
          "type": "call",
          "tool": "get_ticket",
          "args": {
            "ticket_id": "T-1042"
          },
          "result": {
            "ticket_id": "T-1042"
          }
        },
        {
          "type": "approval",
          "source": "fixture",
          "approved": true,
          "ticket_id": "T-1042",
          "decision_id": "A-7"
        },
        {
          "type": "call",
          "tool": "assign_ticket",
          "args": {
            "ticket_id": "T-1042",
            "decision_id": "A-7",
            "team": "payments-oncall"
          },
          "result": {
            "status": "accepted"
          }
        }
      ],
      "checks": {
        "reply": true,
        "outcome": true,
        "tool": true,
        "trajectory": true
      },
      "failures": {
        "reply": [],
        "outcome": [],
        "tool": [],
        "trajectory": []
      },
      "exact_reference": false
    }
  ]
}
