{
  "input": {
    "table": {
      "items": [
        {
          "id": "ac",
          "name": "壁掛けエアコン",
          "kind": "per_unit",
          "unit_label": "台",
          "price": 12000,
          "status": "active"
        },
        {
          "id": "bath",
          "name": "浴室",
          "kind": "per_unit",
          "unit_label": "箇所",
          "price": 18000,
          "status": "active"
        },
        {
          "id": "special",
          "name": "特殊汚れ",
          "kind": "per_unit",
          "unit_label": "箇所",
          "price": null,
          "status": "active"
        }
      ],
      "discounts": [
        {
          "id": "two",
          "kind": "quantity_tier",
          "min_qty": 2,
          "pct_off": 10,
          "count_basis": "units",
          "label": "2点以上で10%引き"
        }
      ],
      "travel": {
        "ask": true,
        "areas": [
          {
            "name": "市内",
            "fee": 0
          },
          {
            "name": "隣接市",
            "fee": 2000
          }
        ],
        "other_area": "quote",
        "free_over": 50000
      },
      "tax": {
        "listed_includes_tax": true,
        "rate_pct": 10
      }
    },
    "cases": [
      {
        "name": "two-units",
        "selections": [
          {
            "item_id": "ac",
            "qty": 2
          }
        ],
        "opts": {
          "travel_area": "市内"
        }
      },
      {
        "name": "travel-fee",
        "selections": [
          {
            "item_id": "ac",
            "qty": 1
          }
        ],
        "opts": {
          "travel_area": "隣接市"
        }
      },
      {
        "name": "free-travel",
        "selections": [
          {
            "item_id": "ac",
            "qty": 5
          }
        ],
        "opts": {
          "travel_area": "隣接市"
        }
      },
      {
        "name": "unknown-item-price",
        "selections": [
          {
            "item_id": "special",
            "qty": 1
          }
        ],
        "opts": {
          "travel_area": "市内"
        }
      },
      {
        "name": "unknown-area",
        "selections": [
          {
            "item_id": "ac",
            "qty": 1
          }
        ],
        "opts": {
          "travel_area": "other"
        }
      },
      {
        "name": "empty",
        "selections": [],
        "opts": {
          "travel_area": "市内"
        }
      },
      {
        "name": "invalid-quantity",
        "selections": [
          {
            "item_id": "ac",
            "qty": -1
          }
        ],
        "opts": {
          "travel_area": "市内"
        }
      }
    ]
  },
  "process": [
    "既存estimate.mjsとformat.mjsをコピー（ハッシュ一致を別途確認）",
    "Node.jsからcomputeEstimateを各入力で直接実行",
    "税込合計と未確定状態を独立した期待値に照合"
  ],
  "output": [
    {
      "name": "two-units",
      "input": {
        "selections": [
          {
            "item_id": "ac",
            "qty": 2
          }
        ],
        "opts": {
          "travel_area": "市内"
        }
      },
      "output": {
        "schema_version": "estimate/1",
        "kind": "estimate",
        "currency": "JPY",
        "lines": [
          {
            "item_id": "ac",
            "name": "壁掛けエアコン",
            "kind": "per_unit",
            "unit_label": "台",
            "qty": 2,
            "unit_price": 12000,
            "amount": 24000,
            "pending": false,
            "price_qualifier": "exact"
          }
        ],
        "known_subtotal": 24000,
        "discount_lines": [
          {
            "rule_id": "two",
            "label": "2点以上で10%引き",
            "amount": -2400
          }
        ],
        "subtotal_after_discount": 21600,
        "travel": {
          "area": "市内",
          "fee": 0,
          "waived": false,
          "pending": false
        },
        "total_listed": 21600,
        "tax": {
          "listed_includes_tax": true,
          "rate_pct": 10
        },
        "total_in_tax": 21600,
        "total_ex_tax": 19636,
        "has_pending": false,
        "total_is_minimum": false,
        "pending": [],
        "total_display": "¥21,600(税込) / ¥19,636(税別)",
        "disclaimer": "概算です。汚れ具合・設置状況で変わり、正式な金額は現地で確定します。"
      }
    },
    {
      "name": "travel-fee",
      "input": {
        "selections": [
          {
            "item_id": "ac",
            "qty": 1
          }
        ],
        "opts": {
          "travel_area": "隣接市"
        }
      },
      "output": {
        "schema_version": "estimate/1",
        "kind": "estimate",
        "currency": "JPY",
        "lines": [
          {
            "item_id": "ac",
            "name": "壁掛けエアコン",
            "kind": "per_unit",
            "unit_label": "台",
            "qty": 1,
            "unit_price": 12000,
            "amount": 12000,
            "pending": false,
            "price_qualifier": "exact"
          }
        ],
        "known_subtotal": 12000,
        "discount_lines": [],
        "subtotal_after_discount": 12000,
        "travel": {
          "area": "隣接市",
          "fee": 2000,
          "waived": false,
          "pending": false
        },
        "total_listed": 14000,
        "tax": {
          "listed_includes_tax": true,
          "rate_pct": 10
        },
        "total_in_tax": 14000,
        "total_ex_tax": 12727,
        "has_pending": false,
        "total_is_minimum": false,
        "pending": [],
        "total_display": "¥14,000(税込) / ¥12,727(税別)",
        "disclaimer": "概算です。汚れ具合・設置状況で変わり、正式な金額は現地で確定します。"
      }
    },
    {
      "name": "free-travel",
      "input": {
        "selections": [
          {
            "item_id": "ac",
            "qty": 5
          }
        ],
        "opts": {
          "travel_area": "隣接市"
        }
      },
      "output": {
        "schema_version": "estimate/1",
        "kind": "estimate",
        "currency": "JPY",
        "lines": [
          {
            "item_id": "ac",
            "name": "壁掛けエアコン",
            "kind": "per_unit",
            "unit_label": "台",
            "qty": 5,
            "unit_price": 12000,
            "amount": 60000,
            "pending": false,
            "price_qualifier": "exact"
          }
        ],
        "known_subtotal": 60000,
        "discount_lines": [
          {
            "rule_id": "two",
            "label": "2点以上で10%引き",
            "amount": -6000
          }
        ],
        "subtotal_after_discount": 54000,
        "travel": {
          "area": "隣接市",
          "fee": 0,
          "waived": true,
          "pending": false
        },
        "total_listed": 54000,
        "tax": {
          "listed_includes_tax": true,
          "rate_pct": 10
        },
        "total_in_tax": 54000,
        "total_ex_tax": 49091,
        "has_pending": false,
        "total_is_minimum": false,
        "pending": [],
        "total_display": "¥54,000(税込) / ¥49,091(税別)",
        "disclaimer": "概算です。汚れ具合・設置状況で変わり、正式な金額は現地で確定します。"
      }
    },
    {
      "name": "unknown-item-price",
      "input": {
        "selections": [
          {
            "item_id": "special",
            "qty": 1
          }
        ],
        "opts": {
          "travel_area": "市内"
        }
      },
      "output": {
        "schema_version": "estimate/1",
        "kind": "estimate",
        "currency": "JPY",
        "lines": [
          {
            "item_id": "special",
            "name": "特殊汚れ",
            "kind": "per_unit",
            "unit_label": "箇所",
            "qty": 1,
            "unit_price": null,
            "amount": null,
            "pending": true,
            "price_qualifier": "exact"
          }
        ],
        "known_subtotal": 0,
        "discount_lines": [],
        "subtotal_after_discount": 0,
        "travel": {
          "area": "市内",
          "fee": 0,
          "waived": false,
          "pending": false
        },
        "total_listed": null,
        "tax": {
          "listed_includes_tax": true,
          "rate_pct": 10
        },
        "total_in_tax": null,
        "total_ex_tax": null,
        "has_pending": true,
        "total_is_minimum": false,
        "pending": [
          {
            "type": "item",
            "ref": "special",
            "label": "特殊汚れ"
          }
        ],
        "total_display": "要見積",
        "disclaimer": "概算です。汚れ具合・設置状況で変わり、正式な金額は現地で確定します。"
      }
    },
    {
      "name": "unknown-area",
      "input": {
        "selections": [
          {
            "item_id": "ac",
            "qty": 1
          }
        ],
        "opts": {
          "travel_area": "other"
        }
      },
      "output": {
        "schema_version": "estimate/1",
        "kind": "estimate",
        "currency": "JPY",
        "lines": [
          {
            "item_id": "ac",
            "name": "壁掛けエアコン",
            "kind": "per_unit",
            "unit_label": "台",
            "qty": 1,
            "unit_price": 12000,
            "amount": 12000,
            "pending": false,
            "price_qualifier": "exact"
          }
        ],
        "known_subtotal": 12000,
        "discount_lines": [],
        "subtotal_after_discount": 12000,
        "travel": {
          "area": "その他",
          "fee": null,
          "waived": false,
          "pending": true
        },
        "total_listed": null,
        "tax": {
          "listed_includes_tax": true,
          "rate_pct": 10
        },
        "total_in_tax": null,
        "total_ex_tax": null,
        "has_pending": true,
        "total_is_minimum": false,
        "pending": [
          {
            "type": "travel",
            "ref": "travel_area",
            "label": "エリア外・要見積"
          }
        ],
        "total_display": "要見積",
        "disclaimer": "概算です。汚れ具合・設置状況で変わり、正式な金額は現地で確定します。"
      }
    },
    {
      "name": "empty",
      "input": {
        "selections": [],
        "opts": {
          "travel_area": "市内"
        }
      },
      "output": {
        "schema_version": "estimate/1",
        "kind": "estimate",
        "currency": "JPY",
        "lines": [],
        "known_subtotal": 0,
        "discount_lines": [],
        "subtotal_after_discount": 0,
        "travel": {
          "area": "市内",
          "fee": 0,
          "waived": false,
          "pending": false
        },
        "total_listed": null,
        "tax": {
          "listed_includes_tax": true,
          "rate_pct": 10
        },
        "total_in_tax": null,
        "total_ex_tax": null,
        "has_pending": true,
        "total_is_minimum": false,
        "pending": [],
        "total_display": "要見積",
        "disclaimer": "概算です。汚れ具合・設置状況で変わり、正式な金額は現地で確定します。"
      }
    },
    {
      "name": "invalid-quantity",
      "input": {
        "selections": [
          {
            "item_id": "ac",
            "qty": -1
          }
        ],
        "opts": {
          "travel_area": "市内"
        }
      },
      "output": {
        "schema_version": "estimate/1",
        "kind": "estimate",
        "currency": "JPY",
        "lines": [],
        "known_subtotal": 0,
        "discount_lines": [],
        "subtotal_after_discount": 0,
        "travel": {
          "area": "市内",
          "fee": 0,
          "waived": false,
          "pending": false
        },
        "total_listed": null,
        "tax": {
          "listed_includes_tax": true,
          "rate_pct": 10
        },
        "total_in_tax": null,
        "total_ex_tax": null,
        "has_pending": true,
        "total_is_minimum": false,
        "pending": [],
        "total_display": "要見積",
        "disclaimer": "概算です。汚れ具合・設置状況で変わり、正式な金額は現地で確定します。"
      }
    }
  ],
  "humanReview": "正式な金額は店側が汚れ・設置状況・対応エリアを確認して確定。未確定項目では合計を出さない。",
  "provenance": {
    "type": "actual-business-logic",
    "engine": "c08-cleaning-estimate computeEstimate",
    "data": "架空料金表と合成入力",
    "aiUsed": false
  },
  "recordedAt": "2026-09-27T23:04:50.496Z"
}