{
  "process_id": "CM-07",
  "policy_version": "synthetic-v1",
  "event_id": "cm-07-example-v1",
  "input": {
    "opening_notional_cents": 0,
    "independent_closing_notional_cents": 300000000,
    "blotter": [
      {
        "trade_id": "T1",
        "side": "buy",
        "instrument": "synthetic-TBA",
        "coupon_bps": 550,
        "settlement_date": "2026-12-10",
        "notional_cents": 500000000,
        "price_bps": 10000,
        "currency": "USD"
      },
      {
        "trade_id": "T2",
        "side": "sell",
        "instrument": "synthetic-TBA",
        "coupon_bps": 550,
        "settlement_date": "2026-12-10",
        "notional_cents": 200000000,
        "price_bps": 10000,
        "currency": "USD"
      }
    ],
    "confirmations": [
      {
        "trade_id": "T1",
        "side": "buy",
        "instrument": "synthetic-TBA",
        "coupon_bps": 550,
        "settlement_date": "2026-12-10",
        "notional_cents": 500000000,
        "price_bps": 10000,
        "currency": "USD"
      },
      {
        "trade_id": "T2",
        "side": "sell",
        "instrument": "synthetic-TBA",
        "coupon_bps": 550,
        "settlement_date": "2026-12-10",
        "notional_cents": 200000000,
        "price_bps": 10000,
        "currency": "USD"
      }
    ],
    "as_of": "2026-11-09T14:00:00Z",
    "source_manifest": {
      "blotter": {
        "source_id": "internal-blotter-feed",
        "as_of": "2026-11-09T14:00:00Z",
        "complete": true,
        "expected_unique_trades": 2
      },
      "confirmations": {
        "source_id": "counterparty-confirmation-feed",
        "as_of": "2026-11-09T14:00:00Z",
        "complete": true,
        "expected_unique_trades": 2
      },
      "closing_position": {
        "source_id": "independent-position-feed",
        "as_of": "2026-11-09T14:00:00Z",
        "complete": true
      }
    },
    "position_key": {
      "instrument": "synthetic-TBA",
      "coupon_bps": 550,
      "settlement_date": "2026-12-10",
      "currency": "USD"
    },
    "closing_position_key": {
      "instrument": "synthetic-TBA",
      "coupon_bps": 550,
      "settlement_date": "2026-12-10",
      "currency": "USD"
    }
  },
  "expected": {
    "status": "ready_for_review",
    "unique_trades": 2,
    "computed_closing_notional_cents": 300000000,
    "breaks": []
  },
  "changes": [
    {
      "name": "Confirmation price mismatch",
      "path": [
        "confirmations",
        1,
        "price_bps"
      ],
      "value": 10010,
      "expected": {
        "status": "hold",
        "unique_trades": 2,
        "computed_closing_notional_cents": 300000000,
        "breaks": [
          "T2:price_bps"
        ]
      }
    },
    {
      "name": "Independent closing position differs",
      "path": [
        "independent_closing_notional_cents"
      ],
      "value": 200000000,
      "expected": {
        "status": "hold",
        "unique_trades": 2,
        "computed_closing_notional_cents": 300000000,
        "breaks": [
          "position_rollforward"
        ]
      }
    },
    {
      "name": "Duplicate blotter event",
      "append_path": [
        "blotter"
      ],
      "append_value": {
        "trade_id": "T1",
        "side": "buy",
        "instrument": "synthetic-TBA",
        "coupon_bps": 550,
        "settlement_date": "2026-12-10",
        "notional_cents": 500000000,
        "price_bps": 10000,
        "currency": "USD"
      },
      "expected": {
        "status": "ready_for_review",
        "unique_trades": 2,
        "computed_closing_notional_cents": 300000000,
        "breaks": []
      }
    },
    {
      "name": "Impossible settlement date",
      "path": [
        "blotter",
        0,
        "settlement_date"
      ],
      "value": "2026-02-30",
      "expected": {
        "status": "hold",
        "errors": [
          "invalid_input:trade.settlement_date:invalid_date"
        ]
      }
    },
    {
      "name": "Missing independent closing position",
      "remove_path": [
        "independent_closing_notional_cents"
      ],
      "expected": {
        "status": "hold",
        "errors": [
          "missing_field:independent_closing_notional_cents"
        ]
      }
    },
    {
      "name": "One upstream export cannot prove independence",
      "path": [
        "source_manifest",
        "confirmations",
        "source_id"
      ],
      "value": "internal-blotter-feed",
      "expected": {
        "status": "hold",
        "errors": [
          "invalid_input:source_manifest:nonindependent_sources"
        ]
      }
    },
    {
      "name": "Incomplete confirmation file",
      "path": [
        "source_manifest",
        "confirmations",
        "complete"
      ],
      "value": false,
      "expected": {
        "status": "hold",
        "errors": [
          "invalid_input:source_manifest:incomplete_or_stale:confirmations"
        ]
      }
    },
    {
      "name": "Different settlement contracts cannot offset",
      "replace_input": {
        "opening_notional_cents": 0,
        "independent_closing_notional_cents": 300000000,
        "blotter": [
          {
            "trade_id": "T1",
            "side": "buy",
            "instrument": "synthetic-TBA",
            "coupon_bps": 550,
            "settlement_date": "2026-12-10",
            "notional_cents": 500000000,
            "price_bps": 10000,
            "currency": "USD"
          },
          {
            "trade_id": "T2",
            "side": "sell",
            "instrument": "synthetic-TBA",
            "coupon_bps": 550,
            "settlement_date": "2026-12-11",
            "notional_cents": 200000000,
            "price_bps": 10000,
            "currency": "USD"
          }
        ],
        "confirmations": [
          {
            "trade_id": "T1",
            "side": "buy",
            "instrument": "synthetic-TBA",
            "coupon_bps": 550,
            "settlement_date": "2026-12-10",
            "notional_cents": 500000000,
            "price_bps": 10000,
            "currency": "USD"
          },
          {
            "trade_id": "T2",
            "side": "sell",
            "instrument": "synthetic-TBA",
            "coupon_bps": 550,
            "settlement_date": "2026-12-11",
            "notional_cents": 200000000,
            "price_bps": 10000,
            "currency": "USD"
          }
        ],
        "as_of": "2026-11-09T14:00:00Z",
        "source_manifest": {
          "blotter": {
            "source_id": "internal-blotter-feed",
            "as_of": "2026-11-09T14:00:00Z",
            "complete": true,
            "expected_unique_trades": 2
          },
          "confirmations": {
            "source_id": "counterparty-confirmation-feed",
            "as_of": "2026-11-09T14:00:00Z",
            "complete": true,
            "expected_unique_trades": 2
          },
          "closing_position": {
            "source_id": "independent-position-feed",
            "as_of": "2026-11-09T14:00:00Z",
            "complete": true
          }
        },
        "position_key": {
          "instrument": "synthetic-TBA",
          "coupon_bps": 550,
          "settlement_date": "2026-12-10",
          "currency": "USD"
        },
        "closing_position_key": {
          "instrument": "synthetic-TBA",
          "coupon_bps": 550,
          "settlement_date": "2026-12-10",
          "currency": "USD"
        }
      },
      "expected": {
        "status": "hold",
        "errors": [
          "invalid_input:trade:position_key_mismatch"
        ]
      }
    },
    {
      "name": "Independent close belongs to another coupon bucket",
      "replace_input": {
        "opening_notional_cents": 0,
        "independent_closing_notional_cents": 300000000,
        "blotter": [
          {
            "trade_id": "T1",
            "side": "buy",
            "instrument": "synthetic-TBA",
            "coupon_bps": 550,
            "settlement_date": "2026-12-10",
            "notional_cents": 500000000,
            "price_bps": 10000,
            "currency": "USD"
          },
          {
            "trade_id": "T2",
            "side": "sell",
            "instrument": "synthetic-TBA",
            "coupon_bps": 550,
            "settlement_date": "2026-12-10",
            "notional_cents": 200000000,
            "price_bps": 10000,
            "currency": "USD"
          }
        ],
        "confirmations": [
          {
            "trade_id": "T1",
            "side": "buy",
            "instrument": "synthetic-TBA",
            "coupon_bps": 550,
            "settlement_date": "2026-12-10",
            "notional_cents": 500000000,
            "price_bps": 10000,
            "currency": "USD"
          },
          {
            "trade_id": "T2",
            "side": "sell",
            "instrument": "synthetic-TBA",
            "coupon_bps": 550,
            "settlement_date": "2026-12-10",
            "notional_cents": 200000000,
            "price_bps": 10000,
            "currency": "USD"
          }
        ],
        "as_of": "2026-11-09T14:00:00Z",
        "source_manifest": {
          "blotter": {
            "source_id": "internal-blotter-feed",
            "as_of": "2026-11-09T14:00:00Z",
            "complete": true,
            "expected_unique_trades": 2
          },
          "confirmations": {
            "source_id": "counterparty-confirmation-feed",
            "as_of": "2026-11-09T14:00:00Z",
            "complete": true,
            "expected_unique_trades": 2
          },
          "closing_position": {
            "source_id": "independent-position-feed",
            "as_of": "2026-11-09T14:00:00Z",
            "complete": true
          }
        },
        "position_key": {
          "instrument": "synthetic-TBA",
          "coupon_bps": 550,
          "settlement_date": "2026-12-10",
          "currency": "USD"
        },
        "closing_position_key": {
          "instrument": "synthetic-TBA",
          "coupon_bps": 600,
          "settlement_date": "2026-12-10",
          "currency": "USD"
        }
      },
      "expected": {
        "status": "hold",
        "errors": [
          "invalid_input:closing_position:position_key_mismatch"
        ]
      }
    }
  ]
}
