{
  "evidence": "Executed local SQLite reference; synthetic data; no Snowflake/dbt or scheduler validation",
  "business_date": "2026-10-01",
  "currency": "AUD",
  "stages": [
    {
      "id": "first",
      "label": "第一批：完成去重",
      "status": "passed",
      "result": {
        "revenue": 150.0,
        "order_count": 2,
        "units": 4,
        "aov": 75.0
      },
      "explanation": "重复的 O100-L1 只保留一次，三条有效明细对应两个订单。"
    },
    {
      "id": "second",
      "label": "第二批：更新与取消",
      "status": "passed",
      "result": {
        "revenue": 130.0,
        "order_count": 2,
        "units": 4,
        "aov": 65.0
      },
      "explanation": "O101 最新状态变为 cancelled，移出 A$50；O102 新增 A$30。"
    },
    {
      "id": "repeat",
      "label": "同批重跑",
      "status": "passed",
      "result": {
        "revenue": 130.0,
        "order_count": 2,
        "units": 4,
        "aov": 65.0
      },
      "explanation": "第二批再次执行，业务结果与上次完全一致；更旧的 paid 状态也不会覆盖取消。"
    },
    {
      "id": "failure",
      "label": "异常批次：阻止发布",
      "status": "blocked",
      "result": {
        "revenue": 130.0,
        "order_count": 2,
        "units": 4,
        "aov": 65.0
      },
      "explanation": "P999 不存在，检查失败，异常批次回滚；这里显示上一次有效结果，不是本次新结果。",
      "error": "Missing product reference: [{\"order_id\": \"O102\", \"line_id\": \"L2\", \"product_id\": \"P999\"}]"
    }
  ],
  "checks": [
    {
      "name": "Duplicate line removed",
      "status": "passed"
    },
    {
      "name": "Cancellation applied",
      "status": "passed"
    },
    {
      "name": "Repeated batch unchanged",
      "status": "passed"
    },
    {
      "name": "Older status ignored",
      "status": "passed"
    },
    {
      "name": "Missing product blocks publication",
      "status": "passed"
    },
    {
      "name": "Rollback retains last valid result",
      "status": "passed"
    }
  ],
  "limitations": [
    "One business date; fixed AUD; no tax/refund accounting",
    "Line changes with the same key are outside this reference implementation",
    "Equal update timestamps require a defined tie-breaker in the course implementation",
    "No cloud, AI execution, scheduling, or production deployment demonstrated"
  ]
}
