[
  {
    "commit_sha": "9f3c1ab",
    "line_no": 1,
    "text": "diff --git a/src/api/coupon_handler.py b/src/api/coupon_handler.py"
  },
  {
    "commit_sha": "9f3c1ab",
    "line_no": 2,
    "text": "index 3b1f0aa..7c2e918 100644"
  },
  {
    "commit_sha": "9f3c1ab",
    "line_no": 3,
    "text": "--- a/src/api/coupon_handler.py"
  },
  {
    "commit_sha": "9f3c1ab",
    "line_no": 4,
    "text": "+++ b/src/api/coupon_handler.py"
  },
  {
    "commit_sha": "9f3c1ab",
    "line_no": 5,
    "text": "@@ -12,6 +12,9 @@ from .store import load_coupon"
  },
  {
    "commit_sha": "9f3c1ab",
    "line_no": 6,
    "text": " def issue_coupon(payload):"
  },
  {
    "commit_sha": "9f3c1ab",
    "line_no": 7,
    "text": "+    if not isinstance(payload, dict):"
  },
  {
    "commit_sha": "9f3c1ab",
    "line_no": 8,
    "text": "+        raise ValueError(\"payload must be a mapping\")"
  },
  {
    "commit_sha": "9f3c1ab",
    "line_no": 9,
    "text": "+    validate_coupon_payload(payload)"
  },
  {
    "commit_sha": "9f3c1ab",
    "line_no": 10,
    "text": "     code = payload[\"code\"]"
  },
  {
    "commit_sha": "9f3c1ab",
    "line_no": 11,
    "text": "diff --git a/tests/api/test_coupon_handler.py b/tests/api/test_coupon_handler.py"
  },
  {
    "commit_sha": "9f3c1ab",
    "line_no": 12,
    "text": "new file mode 100644"
  },
  {
    "commit_sha": "9f3c1ab",
    "line_no": 13,
    "text": "index 0000000..1d9a4c7"
  },
  {
    "commit_sha": "9f3c1ab",
    "line_no": 14,
    "text": "--- /dev/null"
  },
  {
    "commit_sha": "9f3c1ab",
    "line_no": 15,
    "text": "+++ b/tests/api/test_coupon_handler.py"
  },
  {
    "commit_sha": "9f3c1ab",
    "line_no": 16,
    "text": "@@ -0,0 +1,2 @@"
  },
  {
    "commit_sha": "9f3c1ab",
    "line_no": 17,
    "text": "+def test_issue_coupon_rejects_non_mapping():"
  },
  {
    "commit_sha": "9f3c1ab",
    "line_no": 18,
    "text": "+    assert issue_coupon(\"x\") is None"
  },
  {
    "commit_sha": "4e08c52",
    "line_no": 1,
    "text": "diff --git a/src/api/refund_handler.py b/src/api/refund_handler.py"
  },
  {
    "commit_sha": "4e08c52",
    "line_no": 2,
    "text": "index 88ac0d1..a5b3e42 100644"
  },
  {
    "commit_sha": "4e08c52",
    "line_no": 3,
    "text": "--- a/src/api/refund_handler.py"
  },
  {
    "commit_sha": "4e08c52",
    "line_no": 4,
    "text": "+++ b/src/api/refund_handler.py"
  },
  {
    "commit_sha": "4e08c52",
    "line_no": 5,
    "text": "@@ -30,6 +30,9 @@ def request_refund(payload):"
  },
  {
    "commit_sha": "4e08c52",
    "line_no": 6,
    "text": "     order_id = payload[\"order_id\"]"
  },
  {
    "commit_sha": "4e08c52",
    "line_no": 7,
    "text": "-    return refund_client.submit(order_id)"
  },
  {
    "commit_sha": "4e08c52",
    "line_no": 8,
    "text": "+    amount = payload[\"amount\"]"
  },
  {
    "commit_sha": "4e08c52",
    "line_no": 9,
    "text": "+    if amount > order.total:"
  },
  {
    "commit_sha": "4e08c52",
    "line_no": 10,
    "text": "+        amount = order.total"
  },
  {
    "commit_sha": "4e08c52",
    "line_no": 11,
    "text": "+    return refund_client.submit(order_id, amount)"
  },
  {
    "commit_sha": "b7d1f60",
    "line_no": 1,
    "text": "diff --git a/scripts/oneoff_backfill.py b/scripts/oneoff_backfill.py"
  },
  {
    "commit_sha": "b7d1f60",
    "line_no": 2,
    "text": "new file mode 100644"
  },
  {
    "commit_sha": "b7d1f60",
    "line_no": 3,
    "text": "index 0000000..c41e0d8"
  },
  {
    "commit_sha": "b7d1f60",
    "line_no": 4,
    "text": "--- /dev/null"
  },
  {
    "commit_sha": "b7d1f60",
    "line_no": 5,
    "text": "+++ b/scripts/oneoff_backfill.py"
  },
  {
    "commit_sha": "b7d1f60",
    "line_no": 6,
    "text": "@@ -0,0 +1,2 @@"
  },
  {
    "commit_sha": "b7d1f60",
    "line_no": 7,
    "text": "+import sys"
  },
  {
    "commit_sha": "b7d1f60",
    "line_no": 8,
    "text": "+print(sys.argv[1])"
  },
  {
    "commit_sha": "b7d1f60",
    "line_no": 9,
    "text": "diff --git a/src/batch/settle_job.py b/src/batch/settle_job.py"
  },
  {
    "commit_sha": "b7d1f60",
    "line_no": 10,
    "text": "index 4c7d200..9e10b83 100644"
  },
  {
    "commit_sha": "b7d1f60",
    "line_no": 11,
    "text": "--- a/src/batch/settle_job.py"
  },
  {
    "commit_sha": "b7d1f60",
    "line_no": 12,
    "text": "+++ b/src/batch/settle_job.py"
  },
  {
    "commit_sha": "b7d1f60",
    "line_no": 13,
    "text": "@@ -8,4 +8,7 @@ def run_settlement(rows):"
  },
  {
    "commit_sha": "b7d1f60",
    "line_no": 14,
    "text": "     total = 0"
  },
  {
    "commit_sha": "b7d1f60",
    "line_no": 15,
    "text": "+    for row in rows:"
  },
  {
    "commit_sha": "b7d1f60",
    "line_no": 16,
    "text": "+        total += row[\"amount\"]"
  },
  {
    "commit_sha": "b7d1f60",
    "line_no": 17,
    "text": "+    return total"
  },
  {
    "commit_sha": "b7d1f60",
    "line_no": 18,
    "text": "diff --git a/tests/batch/test_settle_job.py b/tests/batch/test_settle_job.py"
  },
  {
    "commit_sha": "b7d1f60",
    "line_no": 19,
    "text": "index 2f0b415..6a1c399 100644"
  },
  {
    "commit_sha": "b7d1f60",
    "line_no": 20,
    "text": "--- a/tests/batch/test_settle_job.py"
  },
  {
    "commit_sha": "b7d1f60",
    "line_no": 21,
    "text": "+++ b/tests/batch/test_settle_job.py"
  },
  {
    "commit_sha": "b7d1f60",
    "line_no": 22,
    "text": "@@ -1,2 +1,4 @@"
  },
  {
    "commit_sha": "b7d1f60",
    "line_no": 23,
    "text": "+def test_run_settlement_sums_amount():"
  },
  {
    "commit_sha": "b7d1f60",
    "line_no": 24,
    "text": "+    assert run_settlement([{\"amount\": 3}]) == 3"
  },
  {
    "commit_sha": "2a55e9c",
    "line_no": 1,
    "text": "diff --git a/src/ui/CouponBanner.tsx b/src/ui/coupon_banner.tsx"
  },
  {
    "commit_sha": "2a55e9c",
    "line_no": 2,
    "text": "similarity index 100%"
  },
  {
    "commit_sha": "2a55e9c",
    "line_no": 3,
    "text": "rename from src/ui/CouponBanner.tsx"
  },
  {
    "commit_sha": "2a55e9c",
    "line_no": 4,
    "text": "rename to src/ui/coupon_banner.tsx"
  }
]