[
  {
    "input": {
      "title": "Test Product",
      "price": "1 234,56 €"
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 1234.56,
        "min": null,
        "max": null,
        "currency": "EUR",
        "raw": "1 234,56 €"
      },
      "warnings": [],
      "confidence": 1
    },
    "category": "price.whitespace",
    "note": "NBSP between thousands and symbol"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "1 234,56 EUR"
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 1234.56,
        "min": null,
        "max": null,
        "currency": "EUR",
        "raw": "1 234,56 EUR"
      },
      "warnings": [],
      "confidence": 1
    },
    "category": "price.whitespace",
    "note": "thin space U+2009"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "1 234,56 €"
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 1234.56,
        "min": null,
        "max": null,
        "currency": "EUR",
        "raw": "1 234,56 €"
      },
      "warnings": [],
      "confidence": 1
    },
    "category": "price.whitespace",
    "note": "narrow NBSP U+202F"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "19​.9‌9‍﻿ €"
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 19.99,
        "min": null,
        "max": null,
        "currency": "EUR",
        "raw": "19​.9‌9‍﻿ €"
      },
      "warnings": [],
      "confidence": 1
    },
    "category": "price.whitespace",
    "note": "zero-width chars stripped mid-number"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "1 234,56 €"
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 1234.56,
        "min": null,
        "max": null,
        "currency": "EUR",
        "raw": "1 234,56 €"
      },
      "warnings": [],
      "confidence": 1
    },
    "category": "price.whitespace",
    "note": "regular-space thousands (French) — product decision"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "&euro;19,99"
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 19.99,
        "min": null,
        "max": null,
        "currency": "EUR",
        "raw": "&euro;19,99"
      },
      "warnings": [],
      "confidence": 1
    },
    "category": "price.entities",
    "note": "&euro; named entity"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "&pound;1,234.56"
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 1234.56,
        "min": null,
        "max": null,
        "currency": "GBP",
        "raw": "&pound;1,234.56"
      },
      "warnings": [],
      "confidence": 1
    },
    "category": "price.entities",
    "note": "&pound; with comma thousands"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "&#36;19.99"
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 19.99,
        "min": null,
        "max": null,
        "currency": "USD",
        "raw": "&#36;19.99"
      },
      "warnings": [
        "currency_ambiguous"
      ],
      "confidence": 0.9
    },
    "category": "price.entities",
    "note": "&#36; numeric entity is a bare dollar"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "&amp;euro;19,99"
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 19.99,
        "min": null,
        "max": null,
        "currency": "EUR",
        "raw": "&amp;euro;19,99"
      },
      "warnings": [],
      "confidence": 1
    },
    "category": "price.entities",
    "note": "double-encoded &amp;euro;"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "19,99&nbsp;&euro;"
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 19.99,
        "min": null,
        "max": null,
        "currency": "EUR",
        "raw": "19,99&nbsp;&euro;"
      },
      "warnings": [],
      "confidence": 1
    },
    "category": "price.entities",
    "note": "&nbsp; before symbol"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "&amp;euro; 5,00"
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 5,
        "min": null,
        "max": null,
        "currency": "EUR",
        "raw": "&amp;euro; 5,00"
      },
      "warnings": [],
      "confidence": 1
    },
    "category": "price.entities",
    "note": "&amp; does not break parsing"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "$19.99",
      "currency": "CAD"
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 19.99,
        "min": null,
        "max": null,
        "currency": "CAD",
        "raw": "$19.99"
      },
      "warnings": [],
      "confidence": 1
    },
    "category": "price.currency",
    "note": "explicit field beats symbol"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "EUR 19.99",
      "currency": "usd"
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 19.99,
        "min": null,
        "max": null,
        "currency": "USD",
        "raw": "EUR 19.99"
      },
      "warnings": [],
      "confidence": 1
    },
    "category": "price.currency",
    "note": "explicit field beats ISO in string, lowercased"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "$19.99 CAD"
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 19.99,
        "min": null,
        "max": null,
        "currency": "CAD",
        "raw": "$19.99 CAD"
      },
      "warnings": [],
      "confidence": 1
    },
    "category": "price.currency",
    "note": "ISO in string beats bare $ (no ambiguity warning)"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "19.99",
      "currency": "€"
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 19.99,
        "min": null,
        "max": null,
        "currency": "EUR",
        "raw": "19.99"
      },
      "warnings": [],
      "confidence": 1
    },
    "category": "price.currency",
    "note": "explicit symbol in currency field"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "19.99",
      "currency_code": "GBP"
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 19.99,
        "min": null,
        "max": null,
        "currency": "GBP",
        "raw": "19.99"
      },
      "warnings": [],
      "confidence": 1
    },
    "category": "price.currency",
    "note": "currency_code alias"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "19.99",
      "curr": "CHF"
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 19.99,
        "min": null,
        "max": null,
        "currency": "CHF",
        "raw": "19.99"
      },
      "warnings": [],
      "confidence": 1
    },
    "category": "price.currency",
    "note": "curr alias"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "£19.99",
      "currency": "pounds"
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 19.99,
        "min": null,
        "max": null,
        "currency": "GBP",
        "raw": "£19.99"
      },
      "warnings": [],
      "confidence": 1
    },
    "category": "price.currency",
    "note": "unusable explicit currency falls through to string"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "£19.99"
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 19.99,
        "min": null,
        "max": null,
        "currency": "GBP",
        "raw": "£19.99"
      },
      "warnings": [],
      "confidence": 1
    },
    "category": "price.currency",
    "note": "pound symbol"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "¥1500"
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 1500,
        "min": null,
        "max": null,
        "currency": "JPY",
        "raw": "¥1500"
      },
      "warnings": [
        "currency_ambiguous"
      ],
      "confidence": 0.9
    },
    "category": "price.currency",
    "note": "bare yen is JPY + currency_ambiguous (A2.10)"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "R$ 19,99"
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 19.99,
        "min": null,
        "max": null,
        "currency": "BRL",
        "raw": "R$ 19,99"
      },
      "warnings": [],
      "confidence": 1
    },
    "category": "price.currency",
    "note": "R$ is BRL not USD"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "199 kr"
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 199,
        "min": null,
        "max": null,
        "currency": "SEK",
        "raw": "199 kr"
      },
      "warnings": [
        "currency_ambiguous"
      ],
      "confidence": 0.9
    },
    "category": "price.currency",
    "note": "bare kr is SEK + currency_ambiguous (A2.10)"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "199 kr."
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 199,
        "min": null,
        "max": null,
        "currency": "SEK",
        "raw": "199 kr."
      },
      "warnings": [
        "currency_ambiguous"
      ],
      "confidence": 0.9
    },
    "category": "price.currency",
    "note": "kr. with dot"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "CHF 19.95"
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 19.95,
        "min": null,
        "max": null,
        "currency": "CHF",
        "raw": "CHF 19.95"
      },
      "warnings": [],
      "confidence": 1
    },
    "category": "price.currency",
    "note": "CHF prefix"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "199 SEK"
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 199,
        "min": null,
        "max": null,
        "currency": "SEK",
        "raw": "199 SEK"
      },
      "warnings": [],
      "confidence": 1
    },
    "category": "price.currency",
    "note": "ISO code suffix"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "19.99 €"
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 19.99,
        "min": null,
        "max": null,
        "currency": "EUR",
        "raw": "19.99 €"
      },
      "warnings": [],
      "confidence": 1
    },
    "category": "price.currency",
    "note": "euro suffix"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "$19.99"
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 19.99,
        "min": null,
        "max": null,
        "currency": "USD",
        "raw": "$19.99"
      },
      "warnings": [
        "currency_ambiguous"
      ],
      "confidence": 0.9
    },
    "category": "price.currency",
    "note": "bare $ is USD + currency_ambiguous"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "19.99"
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 19.99,
        "min": null,
        "max": null,
        "currency": null,
        "raw": "19.99"
      },
      "warnings": [
        "currency_missing"
      ],
      "confidence": 0.8
    },
    "category": "price.currency",
    "note": "no currency anywhere"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "USD19.99"
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 19.99,
        "min": null,
        "max": null,
        "currency": "USD",
        "raw": "USD19.99"
      },
      "warnings": [],
      "confidence": 1
    },
    "category": "price.currency",
    "note": "ISO attached to digits"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "1.234,56 €"
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 1234.56,
        "min": null,
        "max": null,
        "currency": "EUR",
        "raw": "1.234,56 €"
      },
      "warnings": [],
      "confidence": 1
    },
    "category": "price.decimal",
    "note": "EU format both separators"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "$1,234.56 USD"
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 1234.56,
        "min": null,
        "max": null,
        "currency": "USD",
        "raw": "$1,234.56 USD"
      },
      "warnings": [],
      "confidence": 1
    },
    "category": "price.decimal",
    "note": "US format both separators"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "19,99 €"
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 19.99,
        "min": null,
        "max": null,
        "currency": "EUR",
        "raw": "19,99 €"
      },
      "warnings": [],
      "confidence": 1
    },
    "category": "price.decimal",
    "note": "comma decimal 2 digits"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "19,5 €"
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 19.5,
        "min": null,
        "max": null,
        "currency": "EUR",
        "raw": "19,5 €"
      },
      "warnings": [],
      "confidence": 1
    },
    "category": "price.decimal",
    "note": "comma decimal 1 digit"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "1.234.567,89 €"
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 1234567.89,
        "min": null,
        "max": null,
        "currency": "EUR",
        "raw": "1.234.567,89 €"
      },
      "warnings": [],
      "confidence": 1
    },
    "category": "price.decimal",
    "note": "multiple thousands + decimal comma"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "1,234,567 USD"
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 1234567,
        "min": null,
        "max": null,
        "currency": "USD",
        "raw": "1,234,567 USD"
      },
      "warnings": [],
      "confidence": 1
    },
    "category": "price.decimal",
    "note": "repeated comma thousands is unambiguous"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "1,234 USD"
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 1234,
        "min": null,
        "max": null,
        "currency": "USD",
        "raw": "1,234 USD"
      },
      "warnings": [
        "ambiguous_separator"
      ],
      "confidence": 0.7
    },
    "category": "price.decimal",
    "note": "one separator + 3 digits, non zero-decimal → thousands + warning"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "€ 1.234"
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 1234,
        "min": null,
        "max": null,
        "currency": "EUR",
        "raw": "€ 1.234"
      },
      "warnings": [
        "ambiguous_separator"
      ],
      "confidence": 0.7
    },
    "category": "price.decimal",
    "note": "dot + 3 digits EUR"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "1.234"
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 1234,
        "min": null,
        "max": null,
        "currency": null,
        "raw": "1.234"
      },
      "warnings": [
        "currency_missing",
        "ambiguous_separator"
      ],
      "confidence": 0.7
    },
    "category": "price.decimal",
    "note": "ambiguous with unknown currency: both warnings, lowest cap"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "JPY 1,234"
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 1234,
        "min": null,
        "max": null,
        "currency": "JPY",
        "raw": "JPY 1,234"
      },
      "warnings": [],
      "confidence": 1
    },
    "category": "price.decimal",
    "note": "JPY zero-decimal: 3 digits are thousands, no ambiguous_separator"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "KRW 12.345"
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 12345,
        "min": null,
        "max": null,
        "currency": "KRW",
        "raw": "KRW 12.345"
      },
      "warnings": [],
      "confidence": 1
    },
    "category": "price.decimal",
    "note": "KRW zero-decimal with dot"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "1,2345 €"
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 1.2345,
        "min": null,
        "max": null,
        "currency": "EUR",
        "raw": "1,2345 €"
      },
      "warnings": [
        "decimals_exceed_currency"
      ],
      "confidence": 0.9
    },
    "category": "price.decimal",
    "note": "4 digits after a single separator is decimal (A2.1) and keeps its precision (A5.2)"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "CHF 1'234.56"
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 1234.56,
        "min": null,
        "max": null,
        "currency": "CHF",
        "raw": "CHF 1'234.56"
      },
      "warnings": [],
      "confidence": 1
    },
    "category": "price.decimal",
    "note": "Swiss apostrophe"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "CHF 1'234'567.50"
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 1234567.5,
        "min": null,
        "max": null,
        "currency": "CHF",
        "raw": "CHF 1'234'567.50"
      },
      "warnings": [],
      "confidence": 1
    },
    "category": "price.decimal",
    "note": "Swiss apostrophe multiple groups"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "CHF 1’234.56"
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 1234.56,
        "min": null,
        "max": null,
        "currency": "CHF",
        "raw": "CHF 1’234.56"
      },
      "warnings": [],
      "confidence": 1
    },
    "category": "price.decimal",
    "note": "Swiss apostrophe, typographic"
  },
  {
    "input": {
      "title": "Test Product",
      "price": ".99 €"
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 0.99,
        "min": null,
        "max": null,
        "currency": "EUR",
        "raw": ".99 €"
      },
      "warnings": [],
      "confidence": 1
    },
    "category": "price.decimal",
    "note": "leading separator"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "19 €"
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 19,
        "min": null,
        "max": null,
        "currency": "EUR",
        "raw": "19 €"
      },
      "warnings": [],
      "confidence": 1
    },
    "category": "price.decimal",
    "note": "plain integer"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "19,- €"
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 19,
        "min": null,
        "max": null,
        "currency": "EUR",
        "raw": "19,- €"
      },
      "warnings": [],
      "confidence": 1
    },
    "category": "price.decimal",
    "note": "German trailing ,-"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "1,23.456,7 €"
    },
    "expected": {
      "price": {
        "type": "unavailable",
        "amount": null,
        "min": null,
        "max": null,
        "currency": "EUR",
        "raw": "1,23.456,7 €"
      },
      "warnings": [
        "price_unparseable"
      ],
      "confidence": 0.2
    },
    "category": "price.decimal",
    "note": "unparseable separator mess"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "From 19,99 €"
    },
    "expected": {
      "price": {
        "type": "from",
        "amount": 19.99,
        "min": null,
        "max": null,
        "currency": "EUR",
        "raw": "From 19,99 €"
      },
      "warnings": [],
      "confidence": 1
    },
    "category": "price.prefix",
    "note": "From"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "As low as $19.99"
    },
    "expected": {
      "price": {
        "type": "from",
        "amount": 19.99,
        "min": null,
        "max": null,
        "currency": "USD",
        "raw": "As low as $19.99"
      },
      "warnings": [
        "currency_ambiguous"
      ],
      "confidence": 0.9
    },
    "category": "price.prefix",
    "note": "As low as"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "Starting at £19.99"
    },
    "expected": {
      "price": {
        "type": "from",
        "amount": 19.99,
        "min": null,
        "max": null,
        "currency": "GBP",
        "raw": "Starting at £19.99"
      },
      "warnings": [],
      "confidence": 1
    },
    "category": "price.prefix",
    "note": "Starting at"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "À partir de 19,99 €"
    },
    "expected": {
      "price": {
        "type": "from",
        "amount": 19.99,
        "min": null,
        "max": null,
        "currency": "EUR",
        "raw": "À partir de 19,99 €"
      },
      "warnings": [],
      "confidence": 1
    },
    "category": "price.prefix",
    "note": "À partir de"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "from €1.299,00"
    },
    "expected": {
      "price": {
        "type": "from",
        "amount": 1299,
        "min": null,
        "max": null,
        "currency": "EUR",
        "raw": "from €1.299,00"
      },
      "warnings": [],
      "confidence": 1
    },
    "category": "price.prefix",
    "note": "lowercase from with thousands"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "19,99 - 29,99 €"
    },
    "expected": {
      "price": {
        "type": "range",
        "amount": null,
        "min": 19.99,
        "max": 29.99,
        "currency": "EUR",
        "raw": "19,99 - 29,99 €"
      },
      "warnings": [],
      "confidence": 1
    },
    "category": "price.range",
    "note": "comma decimals with spaced hyphen"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "19.99–29.99"
    },
    "expected": {
      "price": {
        "type": "range",
        "amount": null,
        "min": 19.99,
        "max": 29.99,
        "currency": null,
        "raw": "19.99–29.99"
      },
      "warnings": [
        "currency_missing"
      ],
      "confidence": 0.8
    },
    "category": "price.range",
    "note": "en dash, no currency"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "$19 to $29"
    },
    "expected": {
      "price": {
        "type": "range",
        "amount": null,
        "min": 19,
        "max": 29,
        "currency": "USD",
        "raw": "$19 to $29"
      },
      "warnings": [
        "currency_ambiguous"
      ],
      "confidence": 0.9
    },
    "category": "price.range",
    "note": "to with bare $"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "19-29 EUR"
    },
    "expected": {
      "price": {
        "type": "range",
        "amount": null,
        "min": 19,
        "max": 29,
        "currency": "EUR",
        "raw": "19-29 EUR"
      },
      "warnings": [],
      "confidence": 1
    },
    "category": "price.range",
    "note": "tight hyphen"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "€19,99-€29,99"
    },
    "expected": {
      "price": {
        "type": "range",
        "amount": null,
        "min": 19.99,
        "max": 29.99,
        "currency": "EUR",
        "raw": "€19,99-€29,99"
      },
      "warnings": [],
      "confidence": 1
    },
    "category": "price.range",
    "note": "symbols on both bounds, tight hyphen"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "From 19.99 to 29.99 USD"
    },
    "expected": {
      "price": {
        "type": "range",
        "amount": null,
        "min": 19.99,
        "max": 29.99,
        "currency": "USD",
        "raw": "From 19.99 to 29.99 USD"
      },
      "warnings": [],
      "confidence": 1
    },
    "category": "price.range",
    "note": "from + range → range wins — product decision"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "29.99 - 19.99 €"
    },
    "expected": {
      "price": {
        "type": "range",
        "amount": null,
        "min": 19.99,
        "max": 29.99,
        "currency": "EUR",
        "raw": "29.99 - 19.99 €"
      },
      "warnings": [],
      "confidence": 1
    },
    "category": "price.range",
    "note": "reversed bounds are ordered — product decision"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "1.234 - 2.345 EUR"
    },
    "expected": {
      "price": {
        "type": "range",
        "amount": null,
        "min": 1234,
        "max": 2345,
        "currency": "EUR",
        "raw": "1.234 - 2.345 EUR"
      },
      "warnings": [
        "ambiguous_separator"
      ],
      "confidence": 0.7
    },
    "category": "price.range",
    "note": "ambiguous separators in both bounds warn once"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "19,99 € TTC"
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 19.99,
        "min": null,
        "max": null,
        "currency": "EUR",
        "raw": "19,99 € TTC"
      },
      "warnings": [],
      "confidence": 1
    },
    "category": "price.suffix",
    "note": "TTC"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "19,99 € HT"
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 19.99,
        "min": null,
        "max": null,
        "currency": "EUR",
        "raw": "19,99 € HT"
      },
      "warnings": [],
      "confidence": 1
    },
    "category": "price.suffix",
    "note": "HT"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "€19.99 incl. VAT"
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 19.99,
        "min": null,
        "max": null,
        "currency": "EUR",
        "raw": "€19.99 incl. VAT"
      },
      "warnings": [],
      "confidence": 1
    },
    "category": "price.suffix",
    "note": "incl. VAT"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "€19.99 excl. VAT"
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 19.99,
        "min": null,
        "max": null,
        "currency": "EUR",
        "raw": "€19.99 excl. VAT"
      },
      "warnings": [],
      "confidence": 1
    },
    "category": "price.suffix",
    "note": "excl. VAT"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "19.99 EUR/unit"
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 19.99,
        "min": null,
        "max": null,
        "currency": "EUR",
        "raw": "19.99 EUR/unit"
      },
      "warnings": [],
      "confidence": 1
    },
    "category": "price.suffix",
    "note": "/unit"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "19.99 EUR / ea"
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 19.99,
        "min": null,
        "max": null,
        "currency": "EUR",
        "raw": "19.99 EUR / ea"
      },
      "warnings": [],
      "confidence": 1
    },
    "category": "price.suffix",
    "note": "/ ea"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "$19.99 each"
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 19.99,
        "min": null,
        "max": null,
        "currency": "USD",
        "raw": "$19.99 each"
      },
      "warnings": [
        "currency_ambiguous"
      ],
      "confidence": 0.9
    },
    "category": "price.suffix",
    "note": "each"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "$19.99 + shipping"
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 19.99,
        "min": null,
        "max": null,
        "currency": "USD",
        "raw": "$19.99 + shipping"
      },
      "warnings": [
        "currency_ambiguous"
      ],
      "confidence": 0.9
    },
    "category": "price.suffix",
    "note": "+ shipping"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "19,99 € TTC / unit"
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 19.99,
        "min": null,
        "max": null,
        "currency": "EUR",
        "raw": "19,99 € TTC / unit"
      },
      "warnings": [],
      "confidence": 1
    },
    "category": "price.suffix",
    "note": "stacked suffixes"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "19 - 29 € HT"
    },
    "expected": {
      "price": {
        "type": "range",
        "amount": null,
        "min": 19,
        "max": 29,
        "currency": "EUR",
        "raw": "19 - 29 € HT"
      },
      "warnings": [],
      "confidence": 1
    },
    "category": "price.suffix",
    "note": "suffix inside a range"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "N/A"
    },
    "expected": {
      "price": {
        "type": "unavailable",
        "amount": null,
        "min": null,
        "max": null,
        "currency": null,
        "raw": "N/A"
      },
      "warnings": [],
      "confidence": 1
    },
    "category": "price.unavailable",
    "note": "unavailable literal \"N/A\""
  },
  {
    "input": {
      "title": "Test Product",
      "price": "n/a"
    },
    "expected": {
      "price": {
        "type": "unavailable",
        "amount": null,
        "min": null,
        "max": null,
        "currency": null,
        "raw": "n/a"
      },
      "warnings": [],
      "confidence": 1
    },
    "category": "price.unavailable",
    "note": "unavailable literal \"n/a\""
  },
  {
    "input": {
      "title": "Test Product",
      "price": "--"
    },
    "expected": {
      "price": {
        "type": "unavailable",
        "amount": null,
        "min": null,
        "max": null,
        "currency": null,
        "raw": "--"
      },
      "warnings": [],
      "confidence": 1
    },
    "category": "price.unavailable",
    "note": "unavailable literal \"--\""
  },
  {
    "input": {
      "title": "Test Product",
      "price": "-"
    },
    "expected": {
      "price": {
        "type": "unavailable",
        "amount": null,
        "min": null,
        "max": null,
        "currency": null,
        "raw": "-"
      },
      "warnings": [],
      "confidence": 1
    },
    "category": "price.unavailable",
    "note": "unavailable literal \"-\""
  },
  {
    "input": {
      "title": "Test Product",
      "price": ""
    },
    "expected": {
      "price": {
        "type": "unavailable",
        "amount": null,
        "min": null,
        "max": null,
        "currency": null,
        "raw": ""
      },
      "warnings": [
        "price_missing"
      ],
      "confidence": 0.5
    },
    "category": "price.unavailable",
    "note": "unavailable literal \"\""
  },
  {
    "input": {
      "title": "Test Product",
      "price": "Sold out"
    },
    "expected": {
      "price": {
        "type": "unavailable",
        "amount": null,
        "min": null,
        "max": null,
        "currency": null,
        "raw": "Sold out"
      },
      "warnings": [],
      "confidence": 1
    },
    "category": "price.unavailable",
    "note": "unavailable literal \"Sold out\""
  },
  {
    "input": {
      "title": "Test Product",
      "price": "Out of stock"
    },
    "expected": {
      "price": {
        "type": "unavailable",
        "amount": null,
        "min": null,
        "max": null,
        "currency": null,
        "raw": "Out of stock"
      },
      "warnings": [],
      "confidence": 1
    },
    "category": "price.unavailable",
    "note": "unavailable literal \"Out of stock\""
  },
  {
    "input": {
      "title": "Test Product",
      "price": "Call for price"
    },
    "expected": {
      "price": {
        "type": "unavailable",
        "amount": null,
        "min": null,
        "max": null,
        "currency": null,
        "raw": "Call for price"
      },
      "warnings": [],
      "confidence": 1
    },
    "category": "price.unavailable",
    "note": "unavailable literal \"Call for price\""
  },
  {
    "input": {
      "title": "Test Product",
      "price": "Price on request"
    },
    "expected": {
      "price": {
        "type": "unavailable",
        "amount": null,
        "min": null,
        "max": null,
        "currency": null,
        "raw": "Price on request"
      },
      "warnings": [],
      "confidence": 1
    },
    "category": "price.unavailable",
    "note": "unavailable literal \"Price on request\""
  },
  {
    "input": {
      "title": "Test Product",
      "price": "null"
    },
    "expected": {
      "price": {
        "type": "unavailable",
        "amount": null,
        "min": null,
        "max": null,
        "currency": null,
        "raw": "null"
      },
      "warnings": [],
      "confidence": 1
    },
    "category": "price.unavailable",
    "note": "unavailable literal \"null\""
  },
  {
    "input": {
      "title": "Test Product",
      "price": "undefined"
    },
    "expected": {
      "price": {
        "type": "unavailable",
        "amount": null,
        "min": null,
        "max": null,
        "currency": null,
        "raw": "undefined"
      },
      "warnings": [],
      "confidence": 1
    },
    "category": "price.unavailable",
    "note": "unavailable literal \"undefined\""
  },
  {
    "input": {
      "title": "Test Product",
      "price": null
    },
    "expected": {
      "price": {
        "type": "unavailable",
        "amount": null,
        "min": null,
        "max": null,
        "currency": null,
        "raw": ""
      },
      "warnings": [
        "price_missing"
      ],
      "confidence": 0.5
    },
    "category": "price.unavailable",
    "note": "JSON null is an empty price field (A2.13)"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "N/A",
      "currency": "EUR"
    },
    "expected": {
      "price": {
        "type": "unavailable",
        "amount": null,
        "min": null,
        "max": null,
        "currency": "EUR",
        "raw": "N/A"
      },
      "warnings": [],
      "confidence": 1
    },
    "category": "price.unavailable",
    "note": "unavailable literal keeps explicit currency"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "0",
      "availability": "out_of_stock"
    },
    "expected": {
      "price": {
        "type": "unavailable",
        "amount": null,
        "min": null,
        "max": null,
        "currency": null,
        "raw": "0"
      },
      "warnings": [],
      "confidence": 1
    },
    "category": "price.unavailable",
    "note": "0 + out_of_stock"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "0.00 €",
      "availability": "out_of_stock"
    },
    "expected": {
      "price": {
        "type": "unavailable",
        "amount": null,
        "min": null,
        "max": null,
        "currency": "EUR",
        "raw": "0.00 €"
      },
      "warnings": [],
      "confidence": 1
    },
    "category": "price.unavailable",
    "note": "0.00 + out_of_stock — product decision"
  },
  {
    "input": {
      "title": "Test Product",
      "price": 0,
      "availability": false
    },
    "expected": {
      "price": {
        "type": "unavailable",
        "amount": null,
        "min": null,
        "max": null,
        "currency": null,
        "raw": "0"
      },
      "warnings": [],
      "confidence": 1
    },
    "category": "price.unavailable",
    "note": "numeric 0 + out_of_stock"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "0",
      "availability": "in_stock"
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 0,
        "min": null,
        "max": null,
        "currency": null,
        "raw": "0"
      },
      "warnings": [
        "currency_missing"
      ],
      "confidence": 0.8
    },
    "category": "price.unavailable",
    "note": "0 while in stock stays exact — product decision"
  },
  {
    "input": {
      "title": "Test Product"
    },
    "expected": {
      "price": {
        "type": "unavailable",
        "amount": null,
        "min": null,
        "max": null,
        "currency": null,
        "raw": ""
      },
      "warnings": [
        "price_missing"
      ],
      "confidence": 0.5
    },
    "category": "price.unavailable",
    "note": "price key missing"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "abc"
    },
    "expected": {
      "price": {
        "type": "unavailable",
        "amount": null,
        "min": null,
        "max": null,
        "currency": null,
        "raw": "abc"
      },
      "warnings": [
        "price_unparseable"
      ],
      "confidence": 0.2
    },
    "category": "price.unavailable",
    "note": "no digits at all"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "29.99 19.99 €"
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 29.99,
        "min": null,
        "max": null,
        "currency": "EUR",
        "raw": "29.99 19.99 €"
      },
      "warnings": [
        "multiple_amounts"
      ],
      "confidence": 0.6
    },
    "category": "price.multiple",
    "note": "equal-rank amounts: first wins + multiple_amounts (addendum G)"
  },
  {
    "input": {
      "title": "Test Product",
      "price": {
        "foo": 1
      }
    },
    "expected": {
      "price": {
        "type": "unavailable",
        "amount": null,
        "min": null,
        "max": null,
        "currency": null,
        "raw": "{\"foo\":1}"
      },
      "warnings": [
        "price_unparseable"
      ],
      "confidence": 0.2
    },
    "category": "price.unavailable",
    "note": "price object with no known subkey"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "-5.00 €"
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": -5,
        "min": null,
        "max": null,
        "currency": "EUR",
        "raw": "-5.00 €"
      },
      "warnings": [
        "negative_price"
      ],
      "confidence": 0.3
    },
    "category": "price.negative",
    "note": "negative amount kept, never flipped (addendum K)"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "$-5.00"
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": -5,
        "min": null,
        "max": null,
        "currency": "USD",
        "raw": "$-5.00"
      },
      "warnings": [
        "currency_ambiguous",
        "negative_price"
      ],
      "confidence": 0.3
    },
    "category": "price.negative",
    "note": "negative after symbol"
  },
  {
    "input": {
      "title": "Test Product",
      "price": -5,
      "currency": "EUR"
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": -5,
        "min": null,
        "max": null,
        "currency": "EUR",
        "raw": "-5"
      },
      "warnings": [
        "negative_price"
      ],
      "confidence": 0.3
    },
    "category": "price.negative",
    "note": "negative JSON number"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "KWD -1.500"
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": -1.5,
        "min": null,
        "max": null,
        "currency": "KWD",
        "raw": "KWD -1.500"
      },
      "warnings": [
        "negative_price"
      ],
      "confidence": 0.3
    },
    "category": "price.negative",
    "note": "negative with 3-decimal currency"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "20000000 EUR"
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 20000000,
        "min": null,
        "max": null,
        "currency": "EUR",
        "raw": "20000000 EUR"
      },
      "warnings": [
        "implausible_price"
      ],
      "confidence": 0.5
    },
    "category": "price.implausible",
    "note": "above 10M kept"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "10000000 EUR"
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 10000000,
        "min": null,
        "max": null,
        "currency": "EUR",
        "raw": "10000000 EUR"
      },
      "warnings": [],
      "confidence": 1
    },
    "category": "price.implausible",
    "note": "exactly 10M is plausible"
  },
  {
    "input": {
      "title": "Test Product",
      "price": 19.99,
      "currency": "EUR"
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 19.99,
        "min": null,
        "max": null,
        "currency": "EUR",
        "raw": "19.99"
      },
      "warnings": [],
      "confidence": 1
    },
    "category": "price.number",
    "note": "JSON number with currency"
  },
  {
    "input": {
      "title": "Test Product",
      "price": 12.345,
      "currency": "EUR"
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 12.345,
        "min": null,
        "max": null,
        "currency": "EUR",
        "raw": "12.345"
      },
      "warnings": [
        "decimals_exceed_currency"
      ],
      "confidence": 0.9
    },
    "category": "price.number",
    "note": "JSON number beyond currency exponent keeps its precision + warned (A5.2)"
  },
  {
    "input": {
      "title": "Test Product",
      "price": 12.345,
      "currency": "KWD"
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 12.345,
        "min": null,
        "max": null,
        "currency": "KWD",
        "raw": "12.345"
      },
      "warnings": [],
      "confidence": 1
    },
    "category": "price.number",
    "note": "JSON number with 3 decimals is exact for a 3-decimal currency"
  },
  {
    "input": {
      "title": "Test Product",
      "price": 19.99
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 19.99,
        "min": null,
        "max": null,
        "currency": null,
        "raw": "19.99"
      },
      "warnings": [
        "currency_missing"
      ],
      "confidence": 0.8
    },
    "category": "price.number",
    "note": "JSON number without currency"
  },
  {
    "input": {
      "title": "Test Product",
      "cost": "19.99 €"
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 19.99,
        "min": null,
        "max": null,
        "currency": "EUR",
        "raw": "19.99 €"
      },
      "warnings": [],
      "confidence": 1
    },
    "category": "price.alias",
    "note": "cost alias"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "1 EUR",
      "availability": true
    },
    "expected": {
      "availability": "in_stock"
    },
    "category": "availability",
    "note": "true"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "1 EUR",
      "availability": false
    },
    "expected": {
      "availability": "out_of_stock"
    },
    "category": "availability",
    "note": "false"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "1 EUR",
      "availability": "In Stock"
    },
    "expected": {
      "availability": "in_stock"
    },
    "category": "availability",
    "note": "'In Stock'"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "1 EUR",
      "availability": "http://schema.org/InStock"
    },
    "expected": {
      "availability": "in_stock"
    },
    "category": "availability",
    "note": "schema.org URL"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "1 EUR",
      "availability": "https://schema.org/OutOfStock"
    },
    "expected": {
      "availability": "out_of_stock"
    },
    "category": "availability",
    "note": "schema.org OutOfStock"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "1 EUR",
      "stock": 12
    },
    "expected": {
      "availability": "in_stock"
    },
    "category": "availability",
    "note": "numeric stock > 0"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "1 EUR",
      "stock": 0
    },
    "expected": {
      "availability": "out_of_stock"
    },
    "category": "availability",
    "note": "numeric stock 0"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "1 EUR",
      "stock": "7"
    },
    "expected": {
      "availability": "in_stock"
    },
    "category": "availability",
    "note": "string stock count"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "1 EUR",
      "in_stock": false
    },
    "expected": {
      "availability": "out_of_stock"
    },
    "category": "availability",
    "note": "in_stock alias boolean"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "1 EUR",
      "stock_status": "sold out"
    },
    "expected": {
      "availability": "out_of_stock"
    },
    "category": "availability",
    "note": "stock_status alias"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "1 EUR",
      "availability": "preorder"
    },
    "expected": {
      "availability": "unknown"
    },
    "category": "availability",
    "note": "unrecognized value"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "1 EUR"
    },
    "expected": {
      "availability": "unknown"
    },
    "category": "availability",
    "note": "absent"
  },
  {
    "input": {
      "name": "Blue Shirt",
      "price": "5 EUR"
    },
    "expected": {
      "title": "Blue Shirt"
    },
    "category": "aliases",
    "note": "name"
  },
  {
    "input": {
      "product_name": "Blue Shirt"
    },
    "expected": {
      "title": "Blue Shirt"
    },
    "category": "aliases",
    "note": "product_name"
  },
  {
    "input": {
      "productTitle": "Blue Shirt"
    },
    "expected": {
      "title": "Blue Shirt"
    },
    "category": "aliases",
    "note": "productTitle"
  },
  {
    "input": {
      "Product_Name": "Blue Shirt",
      "PRICE": "5 EUR"
    },
    "expected": {
      "title": "Blue Shirt",
      "price": {
        "amount": 5,
        "currency": "EUR"
      }
    },
    "category": "aliases",
    "note": "case/separator-insensitive keys"
  },
  {
    "input": {
      "title": "X",
      "price_string": "7 EUR",
      "regular_price": "9 EUR"
    },
    "expected": {
      "price": {
        "amount": 7
      }
    },
    "category": "aliases",
    "note": "price_string + regular_price precedence"
  },
  {
    "input": {
      "title": "  ",
      "name": "Real Name"
    },
    "expected": {
      "title": "Real Name"
    },
    "category": "aliases",
    "note": "empty title falls to next alias"
  },
  {
    "input": {
      "title": "X",
      "sku": "AB-123"
    },
    "expected": {
      "sku": "AB-123"
    },
    "category": "aliases",
    "note": "sku explicit"
  },
  {
    "input": {
      "title": "X",
      "mpn": "MPN-9"
    },
    "expected": {
      "sku": "MPN-9"
    },
    "category": "aliases",
    "note": "mpn"
  },
  {
    "input": {
      "title": "X",
      "model": "M1"
    },
    "expected": {
      "sku": "M1"
    },
    "category": "aliases",
    "note": "model"
  },
  {
    "input": {
      "title": "X",
      "part_number": "PN-7"
    },
    "expected": {
      "sku": "PN-7"
    },
    "category": "aliases",
    "note": "part_number"
  },
  {
    "input": {
      "title": "X",
      "mpn": "MPN-9",
      "sku": "S-1"
    },
    "expected": {
      "sku": "S-1"
    },
    "category": "aliases",
    "note": "sku wins over mpn"
  },
  {
    "input": {
      "title": "X",
      "sku": 12345
    },
    "expected": {
      "sku": "12345"
    },
    "category": "aliases",
    "note": "numeric sku stringified"
  },
  {
    "input": {
      "title": "Widget 12345"
    },
    "expected": {
      "sku": null
    },
    "category": "aliases",
    "note": "sku never invented from title digits"
  },
  {
    "input": {
      "title": "  *** Blue Shirt ***  "
    },
    "expected": {
      "title_raw": "  *** Blue Shirt ***  ",
      "title": "Blue Shirt"
    },
    "category": "aliases",
    "note": "title_raw preserved verbatim"
  },
  {
    "input": {
      "price": "5 EUR"
    },
    "expected": {
      "error": {
        "code": "missing_field",
        "field": "title"
      }
    },
    "category": "errors",
    "note": "no title key"
  },
  {
    "input": {
      "title": "",
      "price": "5 EUR"
    },
    "expected": {
      "error": {
        "code": "missing_field",
        "field": "title"
      }
    },
    "category": "errors",
    "note": "empty title"
  },
  {
    "input": {
      "title": "*** ---",
      "price": "5"
    },
    "expected": {
      "error": {
        "code": "missing_field",
        "field": "title"
      }
    },
    "category": "errors",
    "note": "title only decoration"
  },
  {
    "input": {
      "title": "🔥🔥",
      "price": "5"
    },
    "expected": {
      "error": {
        "code": "missing_field",
        "field": "title"
      }
    },
    "category": "errors",
    "note": "title only emoji"
  },
  {
    "input": {
      "title": {
        "a": 1
      }
    },
    "expected": {
      "error": {
        "code": "missing_field",
        "field": "title"
      }
    },
    "category": "errors",
    "note": "title of wrong type"
  },
  {
    "input": {
      "title": "  Blue   Shirt  "
    },
    "expected": {
      "title": "Blue Shirt"
    },
    "category": "title.whitespace",
    "note": "trim + collapse"
  },
  {
    "input": {
      "title": "Blue  Shirt​"
    },
    "expected": {
      "title": "Blue Shirt"
    },
    "category": "title.whitespace",
    "note": "NBSP and zero-width"
  },
  {
    "input": {
      "title": "*** Blue Shirt ***"
    },
    "expected": {
      "title": "Blue Shirt"
    },
    "category": "title.decoration",
    "note": "decorative run ***"
  },
  {
    "input": {
      "title": "--- Blue Shirt ---"
    },
    "expected": {
      "title": "Blue Shirt"
    },
    "category": "title.decoration",
    "note": "decorative run ---"
  },
  {
    "input": {
      "title": "### Blue Shirt ###"
    },
    "expected": {
      "title": "Blue Shirt"
    },
    "category": "title.decoration",
    "note": "decorative run ###"
  },
  {
    "input": {
      "title": "||| Blue Shirt |||"
    },
    "expected": {
      "title": "Blue Shirt"
    },
    "category": "title.decoration",
    "note": "decorative run |||"
  },
  {
    "input": {
      "title": ">>> Blue Shirt <<<"
    },
    "expected": {
      "title": "Blue Shirt"
    },
    "category": "title.decoration",
    "note": "decorative run >>>"
  },
  {
    "input": {
      "title": "*** Blue Shirt"
    },
    "expected": {
      "title": "Blue Shirt"
    },
    "category": "title.decoration",
    "note": "leading only"
  },
  {
    "input": {
      "title": "Blue Shirt ---"
    },
    "expected": {
      "title": "Blue Shirt"
    },
    "category": "title.decoration",
    "note": "trailing only"
  },
  {
    "input": {
      "title": "Blue Shirt*"
    },
    "expected": {
      "title": "Blue Shirt*"
    },
    "category": "title.decoration",
    "note": "single trailing asterisk is kept"
  },
  {
    "input": {
      "title": "Blue - Shirt"
    },
    "expected": {
      "title": "Blue - Shirt"
    },
    "category": "title.decoration",
    "note": "internal hyphen is kept"
  },
  {
    "input": {
      "title": "-Blue Shirt"
    },
    "expected": {
      "title": "-Blue Shirt"
    },
    "category": "title.decoration",
    "note": "single leading hyphen is kept"
  },
  {
    "input": {
      "title": "🔥 Blue Shirt 🔥"
    },
    "expected": {
      "title": "Blue Shirt"
    },
    "category": "title.emoji",
    "note": "leading + trailing"
  },
  {
    "input": {
      "title": "Blue Shirt ✨"
    },
    "expected": {
      "title": "Blue Shirt"
    },
    "category": "title.emoji",
    "note": "trailing sparkles"
  },
  {
    "input": {
      "title": "🎉🎉 Blue Shirt"
    },
    "expected": {
      "title": "Blue Shirt"
    },
    "category": "title.emoji",
    "note": "multiple leading"
  },
  {
    "input": {
      "title": "👨‍👩‍👧 Family Tent"
    },
    "expected": {
      "title": "Family Tent"
    },
    "category": "title.emoji",
    "note": "ZWJ sequence"
  },
  {
    "input": {
      "title": "🇫🇷 Baguette"
    },
    "expected": {
      "title": "Baguette"
    },
    "category": "title.emoji",
    "note": "flag"
  },
  {
    "input": {
      "title": "*** 🔥 Blue Shirt 🔥 ***"
    },
    "expected": {
      "title": "Blue Shirt"
    },
    "category": "title.emoji",
    "note": "decoration and emoji interleaved"
  },
  {
    "input": {
      "title": "Blue 🔥 Shirt"
    },
    "expected": {
      "title": "Blue 🔥 Shirt"
    },
    "category": "title.emoji",
    "note": "internal emoji is kept"
  },
  {
    "input": {
      "title": "Air Max™"
    },
    "expected": {
      "title": "Air Max™"
    },
    "category": "title.emoji",
    "note": "trademark sign is not an emoji"
  },
  {
    "input": {
      "title": "Men&#39;s Jacket"
    },
    "expected": {
      "title": "Men's Jacket"
    },
    "category": "title.entities",
    "note": "numeric entity in title — product decision"
  },
  {
    "input": {
      "title": "NIKE AIR MAX 90 MENS RUNNING SHOES"
    },
    "expected": {
      "title": "Nike Air Max 90 Mens Running Shoes",
      "brand": "Nike"
    },
    "category": "title.case",
    "note": "shouting → smart title case, brand canonical"
  },
  {
    "input": {
      "title": "SAMSUNG 55 INCH 4K UHD TV"
    },
    "expected": {
      "title": "Samsung 55 Inch 4K UHD TV",
      "brand": "Samsung"
    },
    "category": "title.case",
    "note": "acronyms and alphanumeric codes preserved"
  },
  {
    "input": {
      "title": "MEN'S CLASSIC T-SHIRT XL"
    },
    "expected": {
      "title": "Men's Classic T-Shirt XL"
    },
    "category": "title.case",
    "note": "apostrophe + hyphenated + size"
  },
  {
    "input": {
      "title": "USB-C CABLE 2M BLACK"
    },
    "expected": {
      "title": "USB-C Cable 2M Black"
    },
    "category": "title.case",
    "note": "USB-C"
  },
  {
    "input": {
      "title": "ADIDAS AM90 SNEAKERS"
    },
    "expected": {
      "title": "Adidas AM90 Sneakers",
      "brand": "Adidas"
    },
    "category": "title.case",
    "note": "alphanumeric model code"
  },
  {
    "input": {
      "title": "ABCDEF ghij"
    },
    "expected": {
      "title": "ABCDEF ghij"
    },
    "category": "title.case",
    "note": "exactly 60% uppercase is not shouting"
  },
  {
    "input": {
      "title": "ABCDEFG hijk"
    },
    "expected": {
      "title": "Abcdefg Hijk"
    },
    "category": "title.case",
    "note": "just above 60% is shouting"
  },
  {
    "input": {
      "title": "iPhone 15 Pro Max"
    },
    "expected": {
      "title": "iPhone 15 Pro Max"
    },
    "category": "title.case",
    "note": "mixed case untouched"
  },
  {
    "input": {
      "title": "Samsung Galaxy S24 Ultra"
    },
    "expected": {
      "title": "Samsung Galaxy S24 Ultra"
    },
    "category": "title.case",
    "note": "normal title untouched"
  },
  {
    "input": {
      "title": "CHEMISE À CARREAUX ÉTÉ"
    },
    "expected": {
      "title": "Chemise À Carreaux Été"
    },
    "category": "title.case",
    "note": "accented uppercase"
  },
  {
    "input": {
      "title": "*** BLUE SHIRT ***"
    },
    "expected": {
      "title": "Blue Shirt"
    },
    "category": "title.case",
    "note": "case ratio measured after cleanup"
  },
  {
    "input": {
      "title": "Nike Air Zoom"
    },
    "expected": {
      "brand": "Nike"
    },
    "category": "brand",
    "note": "first token known"
  },
  {
    "input": {
      "title": "nike air zoom"
    },
    "expected": {
      "brand": "Nike"
    },
    "category": "brand",
    "note": "lowercase title, canonical casing"
  },
  {
    "input": {
      "title": "New Balance 574"
    },
    "expected": {
      "brand": "New Balance"
    },
    "category": "brand",
    "note": "multi-word brand — product decision"
  },
  {
    "input": {
      "title": "The North Face Jacket"
    },
    "expected": {
      "brand": "The North Face"
    },
    "category": "brand",
    "note": "The North Face"
  },
  {
    "input": {
      "title": "H&M Hoodie"
    },
    "expected": {
      "brand": "H&M"
    },
    "category": "brand",
    "note": "punctuation in brand"
  },
  {
    "input": {
      "title": "Nike Shoes",
      "brand": "Foo"
    },
    "expected": {
      "brand": "Foo"
    },
    "category": "brand",
    "note": "explicit brand field outranks extraction from the title (A5.7)"
  },
  {
    "input": {
      "title": "Mystery Gadget",
      "brand": "Acme"
    },
    "expected": {
      "brand": "Acme"
    },
    "category": "brand",
    "note": "payload brand fallback"
  },
  {
    "input": {
      "title": "Mystery Gadget",
      "brand": "Acme &amp; Co"
    },
    "expected": {
      "brand": "Acme & Co"
    },
    "category": "brand",
    "note": "payload brand decoded"
  },
  {
    "input": {
      "title": "Mystery Gadget"
    },
    "expected": {
      "brand": null
    },
    "category": "brand",
    "note": "unknown → null"
  },
  {
    "input": {
      "title": "Mystery Nike Gadget"
    },
    "expected": {
      "brand": null
    },
    "category": "brand",
    "note": "brand only counts at the start"
  },
  {
    "input": {
      "title": "Mystery Gadget",
      "brand": "  "
    },
    "expected": {
      "brand": null
    },
    "category": "brand",
    "note": "blank payload brand → null"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "KWD 12.345"
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 12.345,
        "min": null,
        "max": null,
        "currency": "KWD",
        "raw": "KWD 12.345"
      },
      "warnings": [],
      "confidence": 1
    },
    "category": "addendum.A.three-decimal",
    "note": "exponent 3: KWD 12.345 is decimal, no warning"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "BHD 5.250"
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 5.25,
        "min": null,
        "max": null,
        "currency": "BHD",
        "raw": "BHD 5.250"
      },
      "warnings": [],
      "confidence": 1
    },
    "category": "addendum.A.three-decimal",
    "note": "exponent 3: BHD 5.250 is decimal, no warning"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "OMR 1,234"
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 1.234,
        "min": null,
        "max": null,
        "currency": "OMR",
        "raw": "OMR 1,234"
      },
      "warnings": [],
      "confidence": 1
    },
    "category": "addendum.A.three-decimal",
    "note": "exponent 3: OMR 1,234 is decimal, no warning"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "JOD 99.500"
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 99.5,
        "min": null,
        "max": null,
        "currency": "JOD",
        "raw": "JOD 99.500"
      },
      "warnings": [],
      "confidence": 1
    },
    "category": "addendum.A.three-decimal",
    "note": "exponent 3: JOD 99.500 is decimal, no warning"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "TND 12.345"
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 12.345,
        "min": null,
        "max": null,
        "currency": "TND",
        "raw": "TND 12.345"
      },
      "warnings": [],
      "confidence": 1
    },
    "category": "addendum.A.three-decimal",
    "note": "exponent 3: TND 12.345 is decimal, no warning"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "LYD 7.125"
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 7.125,
        "min": null,
        "max": null,
        "currency": "LYD",
        "raw": "LYD 7.125"
      },
      "warnings": [],
      "confidence": 1
    },
    "category": "addendum.A.three-decimal",
    "note": "exponent 3: LYD 7.125 is decimal, no warning"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "IQD 1.500"
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 1.5,
        "min": null,
        "max": null,
        "currency": "IQD",
        "raw": "IQD 1.500"
      },
      "warnings": [],
      "confidence": 1
    },
    "category": "addendum.A.three-decimal",
    "note": "exponent 3: IQD 1.500 is decimal, no warning"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "12.345 KWD"
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 12.345,
        "min": null,
        "max": null,
        "currency": "KWD",
        "raw": "12.345 KWD"
      },
      "warnings": [],
      "confidence": 1
    },
    "category": "addendum.A.three-decimal",
    "note": "exponent 3: 12.345 KWD is decimal, no warning"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "KWD 1,234.567"
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 1234.567,
        "min": null,
        "max": null,
        "currency": "KWD",
        "raw": "KWD 1,234.567"
      },
      "warnings": [],
      "confidence": 1
    },
    "category": "addendum.A.three-decimal",
    "note": "exponent 3: KWD 1,234.567 is decimal, no warning"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "KWD 12.34"
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 12.34,
        "min": null,
        "max": null,
        "currency": "KWD",
        "raw": "KWD 12.34"
      },
      "warnings": [],
      "confidence": 1
    },
    "category": "addendum.A.three-decimal",
    "note": "exponent 3: KWD 12.34 is decimal, no warning"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "BHD 0.500"
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 0.5,
        "min": null,
        "max": null,
        "currency": "BHD",
        "raw": "BHD 0.500"
      },
      "warnings": [],
      "confidence": 1
    },
    "category": "addendum.A.three-decimal",
    "note": "exponent 3: BHD 0.500 is decimal, no warning"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "12.345",
      "currency": "KWD"
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 12.345,
        "min": null,
        "max": null,
        "currency": "KWD",
        "raw": "12.345"
      },
      "warnings": [],
      "confidence": 1
    },
    "category": "addendum.A.three-decimal",
    "note": "explicit currency field drives exponent 3"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "$12.345",
      "currency": "KWD"
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 12.345,
        "min": null,
        "max": null,
        "currency": "KWD",
        "raw": "$12.345"
      },
      "warnings": [],
      "confidence": 1
    },
    "category": "addendum.A.three-decimal",
    "note": "bare $ with explicit KWD field"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "CLP 15.999"
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 15999,
        "min": null,
        "max": null,
        "currency": "CLP",
        "raw": "CLP 15.999"
      },
      "warnings": [],
      "confidence": 1
    },
    "category": "addendum.A.zero-decimal",
    "note": "exponent 0: CLP 15.999 is thousands, no warning"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "VND 1.500.000"
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 1500000,
        "min": null,
        "max": null,
        "currency": "VND",
        "raw": "VND 1.500.000"
      },
      "warnings": [],
      "confidence": 1
    },
    "category": "addendum.A.zero-decimal",
    "note": "exponent 0: VND 1.500.000 is thousands, no warning"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "ISK 12.345"
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 12345,
        "min": null,
        "max": null,
        "currency": "ISK",
        "raw": "ISK 12.345"
      },
      "warnings": [],
      "confidence": 1
    },
    "category": "addendum.A.zero-decimal",
    "note": "exponent 0: ISK 12.345 is thousands, no warning"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "COP 1.234"
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 1234,
        "min": null,
        "max": null,
        "currency": "COP",
        "raw": "COP 1.234"
      },
      "warnings": [],
      "confidence": 1
    },
    "category": "addendum.A.zero-decimal",
    "note": "exponent 0: COP 1.234 is thousands, no warning"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "PYG 15.000"
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 15000,
        "min": null,
        "max": null,
        "currency": "PYG",
        "raw": "PYG 15.000"
      },
      "warnings": [],
      "confidence": 1
    },
    "category": "addendum.A.zero-decimal",
    "note": "exponent 0: PYG 15.000 is thousands, no warning"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "UGX 5,000"
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 5000,
        "min": null,
        "max": null,
        "currency": "UGX",
        "raw": "UGX 5,000"
      },
      "warnings": [],
      "confidence": 1
    },
    "category": "addendum.A.zero-decimal",
    "note": "exponent 0: UGX 5,000 is thousands, no warning"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "XOF 10.500"
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 10500,
        "min": null,
        "max": null,
        "currency": "XOF",
        "raw": "XOF 10.500"
      },
      "warnings": [],
      "confidence": 1
    },
    "category": "addendum.A.zero-decimal",
    "note": "exponent 0: XOF 10.500 is thousands, no warning"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "VUV 1.200"
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 1200,
        "min": null,
        "max": null,
        "currency": "VUV",
        "raw": "VUV 1.200"
      },
      "warnings": [],
      "confidence": 1
    },
    "category": "addendum.A.zero-decimal",
    "note": "exponent 0: VUV 1.200 is thousands, no warning"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "$15.999",
      "currency": "CLP"
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 15999,
        "min": null,
        "max": null,
        "currency": "CLP",
        "raw": "$15.999"
      },
      "warnings": [],
      "confidence": 1
    },
    "category": "addendum.A.zero-decimal",
    "note": "$15.999 with explicit CLP"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "CHF 1.234"
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 1234,
        "min": null,
        "max": null,
        "currency": "CHF",
        "raw": "CHF 1.234"
      },
      "warnings": [
        "ambiguous_separator"
      ],
      "confidence": 0.7
    },
    "category": "addendum.A.exponent-2",
    "note": "exponent 2 → thousands + ambiguous_separator"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "XYZ 1.234"
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 1234,
        "min": null,
        "max": null,
        "currency": null,
        "raw": "XYZ 1.234"
      },
      "warnings": [
        "currency_missing",
        "ambiguous_separator"
      ],
      "confidence": 0.7
    },
    "category": "addendum.A.exponent-2",
    "note": "currency without table entry defaults to 2"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "JPY 14,850.00"
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 14850,
        "min": null,
        "max": null,
        "currency": "JPY",
        "raw": "JPY 14,850.00"
      },
      "warnings": [
        "decimals_exceed_currency"
      ],
      "confidence": 0.9
    },
    "category": "addendum.A.rounding",
    "note": "JPY 14,850.00 → 14850 + decimals_exceed_currency"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "EUR 1,234.567"
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 1234.567,
        "min": null,
        "max": null,
        "currency": "EUR",
        "raw": "EUR 1,234.567"
      },
      "warnings": [
        "decimals_exceed_currency"
      ],
      "confidence": 0.9
    },
    "category": "addendum.A.rounding",
    "note": "EUR with 3 decimals after both separators keeps its precision (A5.2)"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "KWD 1,234.567"
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 1234.567,
        "min": null,
        "max": null,
        "currency": "KWD",
        "raw": "KWD 1,234.567"
      },
      "warnings": [],
      "confidence": 1
    },
    "category": "addendum.A.rounding",
    "note": "KWD may carry 3 decimals without warning"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "KRW 15,000.50"
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 15000.5,
        "min": null,
        "max": null,
        "currency": "KRW",
        "raw": "KRW 15,000.50"
      },
      "warnings": [
        "decimals_exceed_currency"
      ],
      "confidence": 0.9
    },
    "category": "addendum.A.rounding",
    "note": "KRW decimal digits keep their precision, warned (A5.2)"
  },
  {
    "input": {
      "title": "Test Product",
      "sale_price": "9.99 EUR",
      "price": "19.99 EUR",
      "regular_price": "29.99 EUR"
    },
    "expected": {
      "price": {
        "amount": 9.99
      },
      "warnings": [
        "multiple_price_fields:price,regular_price"
      ]
    },
    "category": "addendum.B.priority",
    "note": "sale_price > price > regular_price"
  },
  {
    "input": {
      "title": "Test Product",
      "price_string": "7 EUR",
      "price": "5 EUR"
    },
    "expected": {
      "price": {
        "amount": 5
      },
      "warnings": [
        "multiple_price_fields:price_string"
      ]
    },
    "category": "addendum.B.priority",
    "note": "price > price_string"
  },
  {
    "input": {
      "title": "Test Product",
      "amount": "7 EUR",
      "price_string": "6 EUR"
    },
    "expected": {
      "price": {
        "amount": 6
      },
      "warnings": [
        "multiple_price_fields:amount"
      ]
    },
    "category": "addendum.B.priority",
    "note": "price_string > amount"
  },
  {
    "input": {
      "title": "Test Product",
      "regular_price": "9 EUR",
      "amount": "8 EUR"
    },
    "expected": {
      "price": {
        "amount": 8
      },
      "warnings": [
        "multiple_price_fields:regular_price"
      ]
    },
    "category": "addendum.B.priority",
    "note": "amount > regular_price"
  },
  {
    "input": {
      "title": "Test Product",
      "cost": "3 EUR",
      "regular_price": "9 EUR"
    },
    "expected": {
      "price": {
        "amount": 9
      },
      "warnings": [
        "multiple_price_fields:cost"
      ]
    },
    "category": "addendum.B.priority",
    "note": "regular_price > cost"
  },
  {
    "input": {
      "title": "Test Product",
      "sale_price": "",
      "price": "19.99 EUR"
    },
    "expected": {
      "price": {
        "amount": 19.99
      },
      "warnings": []
    },
    "category": "addendum.B.priority",
    "note": "empty sale_price is skipped (WooCommerce)"
  },
  {
    "input": {
      "title": "Test Product",
      "sale_price": null,
      "price": "19.99 EUR"
    },
    "expected": {
      "price": {
        "amount": 19.99
      },
      "warnings": []
    },
    "category": "addendum.B.priority",
    "note": "null sale_price is skipped"
  },
  {
    "input": {
      "title": "Test Product",
      "Price": "5 EUR",
      "Regular_Price": "9 EUR"
    },
    "expected": {
      "price": {
        "amount": 5
      },
      "warnings": [
        "multiple_price_fields:Regular_Price"
      ]
    },
    "category": "addendum.B.priority",
    "note": "ignored keys keep their original spelling"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "5 EUR",
      "price_cents": 100
    },
    "expected": {
      "price": {
        "amount": 5
      },
      "warnings": [
        "multiple_price_fields:price_cents"
      ]
    },
    "category": "addendum.B.priority",
    "note": "price wins over minor-unit key"
  },
  {
    "input": {
      "name": "From Name",
      "title": "From Title"
    },
    "expected": {
      "title": "From Title"
    },
    "category": "addendum.B.priority",
    "note": "title > name"
  },
  {
    "input": {
      "product_name": "pn name",
      "name": "n name"
    },
    "expected": {
      "title": "n name"
    },
    "category": "addendum.B.priority",
    "note": "name > product_name"
  },
  {
    "input": {
      "productTitle": "pt name",
      "product_name": "pn name"
    },
    "expected": {
      "title": "pn name"
    },
    "category": "addendum.B.priority",
    "note": "product_name > productTitle"
  },
  {
    "input": {
      "title": "X",
      "sku": "",
      "mpn": "M1"
    },
    "expected": {
      "sku": "M1"
    },
    "category": "addendum.B.priority",
    "note": "sku skips empty"
  },
  {
    "input": {
      "title": "X",
      "sku": null,
      "model": "M2"
    },
    "expected": {
      "sku": "M2"
    },
    "category": "addendum.B.priority",
    "note": "sku skips null"
  },
  {
    "input": {
      "title": "X",
      "part_number": "P",
      "model": "M",
      "mpn": "N"
    },
    "expected": {
      "sku": "N"
    },
    "category": "addendum.B.priority",
    "note": "sku > mpn > model > part_number"
  },
  {
    "input": {
      "title": "Test Product",
      "price_cents": 34900,
      "currency": "EUR"
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 349,
        "currency": "EUR",
        "raw": "34900"
      },
      "warnings": []
    },
    "category": "addendum.C.minor-units",
    "note": "price_cents EUR"
  },
  {
    "input": {
      "title": "Test Product",
      "amount_cents": 1999,
      "currency": "USD"
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 19.99,
        "currency": "USD"
      },
      "warnings": []
    },
    "category": "addendum.C.minor-units",
    "note": "amount_cents"
  },
  {
    "input": {
      "title": "Test Product",
      "price_in_cents": "1999",
      "currency": "GBP"
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 19.99,
        "currency": "GBP"
      },
      "warnings": []
    },
    "category": "addendum.C.minor-units",
    "note": "price_in_cents string"
  },
  {
    "input": {
      "title": "Test Product",
      "unit_amount": 500,
      "currency": "EUR"
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 5,
        "currency": "EUR"
      },
      "warnings": []
    },
    "category": "addendum.C.minor-units",
    "note": "unit_amount"
  },
  {
    "input": {
      "title": "Test Product",
      "price_cents": 500,
      "currency": "JPY"
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 500,
        "currency": "JPY"
      },
      "warnings": []
    },
    "category": "addendum.C.minor-units",
    "note": "exponent 0 currency is not divided"
  },
  {
    "input": {
      "title": "Test Product",
      "price_cents": 12345,
      "currency": "KWD"
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 12.345,
        "currency": "KWD"
      },
      "warnings": []
    },
    "category": "addendum.C.minor-units",
    "note": "exponent 3 currency divides by 1000"
  },
  {
    "input": {
      "title": "Test Product",
      "price_cents": 34900
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 349,
        "currency": null
      },
      "warnings": [
        "currency_missing"
      ]
    },
    "category": "addendum.C.minor-units",
    "note": "no currency → default exponent 2 + currency_missing"
  },
  {
    "input": {
      "title": "Test Product",
      "priceCents": 100,
      "currency": "EUR"
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 1,
        "currency": "EUR"
      },
      "warnings": []
    },
    "category": "addendum.C.minor-units",
    "note": "camelCase spelling"
  },
  {
    "input": {
      "title": "Test Product",
      "price_cents": 349.5,
      "currency": "EUR"
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 3.495,
        "raw": "349.5"
      },
      "warnings": [
        "minor_unit_non_integer",
        "decimals_exceed_currency"
      ],
      "confidence": 0.9
    },
    "category": "addendum.C.minor-units",
    "note": "non-integer minor units accepted (A2.14)"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "١٢٣٫٤٥ €"
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 123.45,
        "min": null,
        "max": null,
        "currency": "EUR",
        "raw": "١٢٣٫٤٥ €"
      },
      "warnings": [],
      "confidence": 1
    },
    "category": "addendum.D.non-ascii",
    "note": "Arabic-Indic digits + Arabic decimal separator"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "۱۲۳٫۴۵ €"
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 123.45,
        "min": null,
        "max": null,
        "currency": "EUR",
        "raw": "۱۲۳٫۴۵ €"
      },
      "warnings": [],
      "confidence": 1
    },
    "category": "addendum.D.non-ascii",
    "note": "Extended Arabic-Indic digits"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "١٬٢٣٤٫٥٦ €"
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 1234.56,
        "min": null,
        "max": null,
        "currency": "EUR",
        "raw": "١٬٢٣٤٫٥٦ €"
      },
      "warnings": [],
      "confidence": 1
    },
    "category": "addendum.D.non-ascii",
    "note": "Arabic thousands separator U+066C"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "１２３４．５６ €"
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 1234.56,
        "min": null,
        "max": null,
        "currency": "EUR",
        "raw": "１２３４．５６ €"
      },
      "warnings": [],
      "confidence": 1
    },
    "category": "addendum.D.non-ascii",
    "note": "full-width digits + full-width stop"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "１，２３４．５６ EUR"
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 1234.56,
        "min": null,
        "max": null,
        "currency": "EUR",
        "raw": "１，２３４．５６ EUR"
      },
      "warnings": [],
      "confidence": 1
    },
    "category": "addendum.D.non-ascii",
    "note": "full-width comma thousands"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "￥1500"
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 1500,
        "min": null,
        "max": null,
        "currency": "JPY",
        "raw": "￥1500"
      },
      "warnings": [
        "currency_ambiguous"
      ],
      "confidence": 0.9
    },
    "category": "addendum.D.non-ascii",
    "note": "full-width yen U+FFE5 (bare yen is ambiguous)"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "￡19.99"
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 19.99,
        "min": null,
        "max": null,
        "currency": "GBP",
        "raw": "￡19.99"
      },
      "warnings": [],
      "confidence": 1
    },
    "category": "addendum.D.non-ascii",
    "note": "full-width pound U+FFE1"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "＄19.99"
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 19.99,
        "min": null,
        "max": null,
        "currency": "USD",
        "raw": "＄19.99"
      },
      "warnings": [
        "currency_ambiguous"
      ],
      "confidence": 0.9
    },
    "category": "addendum.D.non-ascii",
    "note": "full-width dollar U+FF04"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "549,- €"
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 549,
        "min": null,
        "max": null,
        "currency": "EUR",
        "raw": "549,- €"
      },
      "warnings": [],
      "confidence": 1
    },
    "category": "addendum.E.dash",
    "note": "dash notation \"549,- €\""
  },
  {
    "input": {
      "title": "Test Product",
      "price": "549,-- €"
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 549,
        "min": null,
        "max": null,
        "currency": "EUR",
        "raw": "549,-- €"
      },
      "warnings": [],
      "confidence": 1
    },
    "category": "addendum.E.dash",
    "note": "dash notation \"549,-- €\""
  },
  {
    "input": {
      "title": "Test Product",
      "price": "549.- €"
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 549,
        "min": null,
        "max": null,
        "currency": "EUR",
        "raw": "549.- €"
      },
      "warnings": [],
      "confidence": 1
    },
    "category": "addendum.E.dash",
    "note": "dash notation \"549.- €\""
  },
  {
    "input": {
      "title": "Test Product",
      "price": "549.-- €"
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 549,
        "min": null,
        "max": null,
        "currency": "EUR",
        "raw": "549.-- €"
      },
      "warnings": [],
      "confidence": 1
    },
    "category": "addendum.E.dash",
    "note": "dash notation \"549.-- €\""
  },
  {
    "input": {
      "title": "Test Product",
      "price": "549,– €"
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 549,
        "min": null,
        "max": null,
        "currency": "EUR",
        "raw": "549,– €"
      },
      "warnings": [],
      "confidence": 1
    },
    "category": "addendum.E.dash",
    "note": "dash notation \"549,– €\""
  },
  {
    "input": {
      "title": "Test Product",
      "price": "549.– €"
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 549,
        "min": null,
        "max": null,
        "currency": "EUR",
        "raw": "549.– €"
      },
      "warnings": [],
      "confidence": 1
    },
    "category": "addendum.E.dash",
    "note": "dash notation \"549.– €\""
  },
  {
    "input": {
      "title": "Test Product",
      "price": "549,— €"
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 549,
        "min": null,
        "max": null,
        "currency": "EUR",
        "raw": "549,— €"
      },
      "warnings": [],
      "confidence": 1
    },
    "category": "addendum.E.dash",
    "note": "dash notation \"549,— €\""
  },
  {
    "input": {
      "title": "Test Product",
      "price": "549.— €"
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 549,
        "min": null,
        "max": null,
        "currency": "EUR",
        "raw": "549.— €"
      },
      "warnings": [],
      "confidence": 1
    },
    "category": "addendum.E.dash",
    "note": "dash notation \"549.— €\""
  },
  {
    "input": {
      "title": "Test Product",
      "price": "CHF 6'490.–"
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 6490,
        "min": null,
        "max": null,
        "currency": "CHF",
        "raw": "CHF 6'490.–"
      },
      "warnings": [],
      "confidence": 1
    },
    "category": "addendum.E.dash",
    "note": "dash notation \"CHF 6'490.–\""
  },
  {
    "input": {
      "title": "Test Product",
      "price": "Fr. 1'099.-"
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 1099,
        "min": null,
        "max": null,
        "currency": "CHF",
        "raw": "Fr. 1'099.-"
      },
      "warnings": [],
      "confidence": 1
    },
    "category": "addendum.E.dash",
    "note": "dash notation \"Fr. 1'099.-\""
  },
  {
    "input": {
      "title": "Test Product",
      "price": "6'490.–"
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 6490,
        "min": null,
        "max": null,
        "currency": null,
        "raw": "6'490.–"
      },
      "warnings": [
        "currency_missing"
      ],
      "confidence": 0.8
    },
    "category": "addendum.E.dash",
    "note": "dash notation \"6'490.–\""
  },
  {
    "input": {
      "title": "Test Product",
      "price": "99¢"
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 0.99,
        "min": null,
        "max": null,
        "currency": "USD",
        "raw": "99¢"
      },
      "warnings": [],
      "confidence": 1
    },
    "category": "addendum.F.subunit",
    "note": "99¢ → 0.99 USD"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "5¢"
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 0.05,
        "min": null,
        "max": null,
        "currency": "USD",
        "raw": "5¢"
      },
      "warnings": [],
      "confidence": 1
    },
    "category": "addendum.F.subunit",
    "note": "5¢ → 0.05"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "99¢",
      "currency": "CAD"
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 0.99,
        "min": null,
        "max": null,
        "currency": "CAD",
        "raw": "99¢"
      },
      "warnings": [],
      "confidence": 1
    },
    "category": "addendum.F.subunit",
    "note": "¢ with explicit currency keeps it"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "99c"
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 99,
        "min": null,
        "max": null,
        "currency": null,
        "raw": "99c"
      },
      "warnings": [
        "currency_missing"
      ],
      "confidence": 0.8
    },
    "category": "addendum.F.subunit",
    "note": "bare letter c is not cents"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "149€99"
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 149.99,
        "min": null,
        "max": null,
        "currency": "EUR",
        "raw": "149€99"
      },
      "warnings": [],
      "confidence": 1
    },
    "category": "addendum.F.symbol-decimal",
    "note": "149€99"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "12$50"
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 12.5,
        "min": null,
        "max": null,
        "currency": "USD",
        "raw": "12$50"
      },
      "warnings": [
        "currency_ambiguous"
      ],
      "confidence": 0.9
    },
    "category": "addendum.F.symbol-decimal",
    "note": "12$50"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "12€5"
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 12.5,
        "min": null,
        "max": null,
        "currency": "EUR",
        "raw": "12€5"
      },
      "warnings": [],
      "confidence": 1
    },
    "category": "addendum.F.symbol-decimal",
    "note": "single decimal digit 12€5"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "9£99"
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 9.99,
        "min": null,
        "max": null,
        "currency": "GBP",
        "raw": "9£99"
      },
      "warnings": [],
      "confidence": 1
    },
    "category": "addendum.F.symbol-decimal",
    "note": "£ as separator"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "19.99",
      "currency": "978"
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 19.99,
        "min": null,
        "max": null,
        "currency": "EUR",
        "raw": "19.99"
      },
      "warnings": [
        "currency_numeric_code"
      ],
      "confidence": 0.9
    },
    "category": "addendum.F.numeric-code",
    "note": "numeric 978 → EUR"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "19.99",
      "currency": 840
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 19.99,
        "min": null,
        "max": null,
        "currency": "USD",
        "raw": "19.99"
      },
      "warnings": [
        "currency_numeric_code"
      ],
      "confidence": 0.9
    },
    "category": "addendum.F.numeric-code",
    "note": "numeric 840 → USD"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "19.99",
      "currency": "826"
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 19.99,
        "min": null,
        "max": null,
        "currency": "GBP",
        "raw": "19.99"
      },
      "warnings": [
        "currency_numeric_code"
      ],
      "confidence": 0.9
    },
    "category": "addendum.F.numeric-code",
    "note": "numeric 826 → GBP"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "19.99",
      "currency": "999"
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 19.99,
        "min": null,
        "max": null,
        "currency": null,
        "raw": "19.99"
      },
      "warnings": [
        "currency_missing"
      ],
      "confidence": 0.8
    },
    "category": "addendum.F.numeric-code",
    "note": "unknown numeric code falls through"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "12.345",
      "currency": "414"
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 12.345,
        "min": null,
        "max": null,
        "currency": "KWD",
        "raw": "12.345"
      },
      "warnings": [
        "currency_numeric_code"
      ],
      "confidence": 0.9
    },
    "category": "addendum.F.numeric-code",
    "note": "numeric code drives exponent: 414 = KWD"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "Was $199.00 Now $149.00"
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 149,
        "min": null,
        "max": null,
        "currency": "USD",
        "raw": "Was $199.00 Now $149.00"
      },
      "warnings": [
        "currency_ambiguous"
      ],
      "confidence": 0.9
    },
    "category": "addendum.G.label",
    "note": "Was/Now"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "8,95 € (0,18 € / L)"
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 8.95,
        "min": null,
        "max": null,
        "currency": "EUR",
        "raw": "8,95 € (0,18 € / L)"
      },
      "warnings": [],
      "confidence": 1
    },
    "category": "addendum.G.label",
    "note": "unit price in parentheses is ignored"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "Prix conseillé : 210,00 € - Notre prix : 159,00 €"
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 159,
        "min": null,
        "max": null,
        "currency": "EUR",
        "raw": "Prix conseillé : 210,00 € - Notre prix : 159,00 €"
      },
      "warnings": [],
      "confidence": 1
    },
    "category": "addendum.G.label",
    "note": "French list vs selling price is a sale, not a range"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "UVP 99,99 € 79,99 €"
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 79.99,
        "min": null,
        "max": null,
        "currency": "EUR",
        "raw": "UVP 99,99 € 79,99 €"
      },
      "warnings": [],
      "confidence": 1
    },
    "category": "addendum.G.label",
    "note": "UVP is a list price"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "RRP £50.00 £39.99"
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 39.99,
        "min": null,
        "max": null,
        "currency": "GBP",
        "raw": "RRP £50.00 £39.99"
      },
      "warnings": [],
      "confidence": 1
    },
    "category": "addendum.G.label",
    "note": "RRP list vs plain"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "MSRP $100 Sale $80"
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 80,
        "min": null,
        "max": null,
        "currency": "USD",
        "raw": "MSRP $100 Sale $80"
      },
      "warnings": [
        "currency_ambiguous"
      ],
      "confidence": 0.9
    },
    "category": "addendum.G.label",
    "note": "MSRP vs Sale"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "Sale 80 EUR was 100 EUR"
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 80,
        "min": null,
        "max": null,
        "currency": "EUR",
        "raw": "Sale 80 EUR was 100 EUR"
      },
      "warnings": [],
      "confidence": 1
    },
    "category": "addendum.G.label",
    "note": "Sale before was"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "199 € avant 149 €"
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 149,
        "min": null,
        "max": null,
        "currency": "EUR",
        "raw": "199 € avant 149 €"
      },
      "warnings": [],
      "confidence": 1
    },
    "category": "addendum.G.label",
    "note": "avant is a trailing list label"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "Was 199 €"
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 199,
        "min": null,
        "max": null,
        "currency": "EUR",
        "raw": "Was 199 €"
      },
      "warnings": [],
      "confidence": 1
    },
    "category": "addendum.G.label",
    "note": "sole list-priced amount is still returned"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "19,99 € + 5,99 € shipping"
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 19.99,
        "min": null,
        "max": null,
        "currency": "EUR",
        "raw": "19,99 € + 5,99 € shipping"
      },
      "warnings": [],
      "confidence": 1
    },
    "category": "addendum.G.shipping",
    "note": "+ amount shipping is ignored"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "12.50 € zzgl. Versand 4,90 €"
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 12.5,
        "min": null,
        "max": null,
        "currency": "EUR",
        "raw": "12.50 € zzgl. Versand 4,90 €"
      },
      "warnings": [],
      "confidence": 1
    },
    "category": "addendum.G.shipping",
    "note": "zzgl. Versand is ignored"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "4,50 € 2,25 € / kg"
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 4.5,
        "min": null,
        "max": null,
        "currency": "EUR",
        "raw": "4,50 € 2,25 € / kg"
      },
      "warnings": [],
      "confidence": 1
    },
    "category": "addendum.G.unit",
    "note": "/kg unit price ignored"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "5,00 € / pièce"
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 5,
        "min": null,
        "max": null,
        "currency": "EUR",
        "raw": "5,00 € / pièce"
      },
      "warnings": [],
      "confidence": 1
    },
    "category": "addendum.G.unit",
    "note": "sole unit-priced amount is kept (rule 5 suffix)"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "12.00 € 3.00 €/m"
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 12,
        "min": null,
        "max": null,
        "currency": "EUR",
        "raw": "12.00 € 3.00 €/m"
      },
      "warnings": [],
      "confidence": 1
    },
    "category": "addendum.G.unit",
    "note": "/m"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "14,90 € HT (17,88 € TTC)"
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 14.9,
        "min": null,
        "max": null,
        "currency": "EUR",
        "raw": "14,90 € HT (17,88 € TTC)"
      },
      "warnings": [
        "tax_variant_present"
      ],
      "confidence": 0.8
    },
    "category": "addendum.G.tax",
    "note": "HT then TTC → first + tax_variant_present"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "17,88 € TTC / 14,90 € HT"
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 17.88,
        "min": null,
        "max": null,
        "currency": "EUR",
        "raw": "17,88 € TTC / 14,90 € HT"
      },
      "warnings": [
        "tax_variant_present"
      ],
      "confidence": 0.8
    },
    "category": "addendum.G.tax",
    "note": "TTC then HT keeps the first"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "140€ - 165€"
    },
    "expected": {
      "price": {
        "type": "range",
        "amount": null,
        "min": 140,
        "max": 165,
        "currency": "EUR",
        "raw": "140€ - 165€"
      },
      "warnings": [],
      "confidence": 1
    },
    "category": "addendum.G.range",
    "note": "range delimiter without labels"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "19,99 - 29,99 € TTC"
    },
    "expected": {
      "price": {
        "type": "range",
        "amount": null,
        "min": 19.99,
        "max": 29.99,
        "currency": "EUR",
        "raw": "19,99 - 29,99 € TTC"
      },
      "warnings": [],
      "confidence": 1
    },
    "category": "addendum.G.range",
    "note": "range survives tax words"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "12 EUR 15 EUR"
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 12,
        "min": null,
        "max": null,
        "currency": "EUR",
        "raw": "12 EUR 15 EUR"
      },
      "warnings": [
        "multiple_amounts"
      ],
      "confidence": 0.6
    },
    "category": "addendum.G.tie",
    "note": "plain tie takes the first and warns"
  },
  {
    "input": {
      "product.title": "Blue Shirt",
      "product.price.amount": "19.99",
      "product.price.currency": "EUR"
    },
    "expected": {
      "title": "Blue Shirt",
      "price": {
        "type": "exact",
        "amount": 19.99,
        "currency": "EUR"
      }
    },
    "category": "addendum.H.nested",
    "note": "dotted flat keys"
  },
  {
    "input": {
      "offers[0].price": "12.50",
      "offers[0].priceCurrency": "GBP",
      "name": "Lamp"
    },
    "expected": {
      "price": {
        "amount": 12.5,
        "currency": "GBP"
      }
    },
    "category": "addendum.H.nested",
    "note": "dotted keys with array index"
  },
  {
    "input": {
      "name": "Lamp",
      "offers": {
        "price": "19.99",
        "priceCurrency": "EUR",
        "availability": "https://schema.org/InStock"
      }
    },
    "expected": {
      "title": "Lamp",
      "price": {
        "amount": 19.99,
        "currency": "EUR"
      },
      "availability": "in_stock"
    },
    "category": "addendum.H.nested",
    "note": "schema.org offers object"
  },
  {
    "input": {
      "name": "Lamp",
      "offers": [
        {
          "price": "29.5",
          "priceCurrency": "USD"
        },
        {
          "price": "99",
          "priceCurrency": "USD"
        }
      ]
    },
    "expected": {
      "price": {
        "amount": 29.5,
        "currency": "USD"
      }
    },
    "category": "addendum.H.nested",
    "note": "schema.org offers array uses [0]"
  },
  {
    "input": {
      "title": "Lamp",
      "pricing": {
        "amount": 12.5,
        "currency": "GBP"
      }
    },
    "expected": {
      "price": {
        "amount": 12.5,
        "currency": "GBP"
      }
    },
    "category": "addendum.H.nested",
    "note": "pricing.amount"
  },
  {
    "input": {
      "title": "Lamp",
      "price": {
        "value": "7,50",
        "currency": "EUR"
      }
    },
    "expected": {
      "price": {
        "amount": 7.5,
        "currency": "EUR"
      }
    },
    "category": "addendum.H.nested",
    "note": "price.value"
  },
  {
    "input": {
      "title": "Lamp",
      "price": {
        "formatted": "$1,234.56"
      }
    },
    "expected": {
      "price": {
        "amount": 1234.56,
        "currency": "USD"
      },
      "warnings": [
        "currency_ambiguous"
      ]
    },
    "category": "addendum.H.nested",
    "note": "price.formatted"
  },
  {
    "input": {
      "title": "Lamp",
      "price": {
        "amount": 19.99
      },
      "currency": "EUR"
    },
    "expected": {
      "price": {
        "amount": 19.99,
        "currency": "EUR"
      }
    },
    "category": "addendum.H.nested",
    "note": "price.amount + top-level currency"
  },
  {
    "input": {
      "title": "Lamp",
      "price": {
        "value": "1",
        "amount": "2",
        "currency": "EUR"
      }
    },
    "expected": {
      "price": {
        "amount": 2
      }
    },
    "category": "addendum.H.nested",
    "note": "price.amount beats price.value"
  },
  {
    "input": {
      "name": "Lamp",
      "price_info": {
        "final_price": {
          "value": 49.9
        }
      },
      "currency": "EUR"
    },
    "expected": {
      "price": {
        "amount": 49.9,
        "currency": "EUR"
      }
    },
    "category": "addendum.H.nested",
    "note": "Magento price_info.final_price.value"
  },
  {
    "input": {
      "title": "Lamp",
      "variants": [
        {
          "price": "15.00"
        },
        {
          "price": "20.00"
        }
      ]
    },
    "expected": {
      "price": {
        "amount": 15
      },
      "warnings": [
        "currency_missing"
      ]
    },
    "category": "addendum.H.nested",
    "note": "Shopify variants[0].price"
  },
  {
    "input": {
      "data": {
        "attributes": {
          "name": "Blue Shirt",
          "price": "9.99 EUR",
          "sku": "X1"
        }
      }
    },
    "expected": {
      "title": "Blue Shirt",
      "price": {
        "amount": 9.99,
        "currency": "EUR"
      },
      "sku": "X1"
    },
    "category": "addendum.H.nested",
    "note": "JSON:API data.attributes"
  },
  {
    "input": {
      "data.attributes.name": "Blue Shirt",
      "data.attributes.price": "9.99 EUR"
    },
    "expected": {
      "title": "Blue Shirt",
      "price": {
        "amount": 9.99
      }
    },
    "category": "addendum.H.nested",
    "note": "dotted data.attributes"
  },
  {
    "input": {
      "title": "Lamp",
      "meta_data": [
        {
          "key": "_edit_lock",
          "value": "1"
        },
        {
          "key": "_price",
          "value": "12.00"
        }
      ],
      "currency": "EUR"
    },
    "expected": {
      "price": {
        "amount": 12,
        "currency": "EUR"
      }
    },
    "category": "addendum.H.nested",
    "note": "WooCommerce meta_data _price"
  },
  {
    "input": {
      "title": "Lamp",
      "price": "5 EUR",
      "meta_data": [
        {
          "key": "_price",
          "value": "12"
        }
      ]
    },
    "expected": {
      "price": {
        "amount": 5
      }
    },
    "category": "addendum.H.nested",
    "note": "meta_data _price loses to top-level price"
  },
  {
    "input": {
      "Name": "Blue Shirt",
      "Price": "5 EUR",
      "SKU": "S1"
    },
    "expected": {
      "title": "Blue Shirt",
      "price": {
        "amount": 5
      },
      "sku": "S1"
    },
    "category": "addendum.H.nested",
    "note": "case-insensitive keys"
  },
  {
    "input": {
      "title": [
        "Blue Shirt"
      ],
      "price": [
        "5 EUR"
      ],
      "sku": [
        "S1"
      ]
    },
    "expected": {
      "title": "Blue Shirt",
      "price": {
        "amount": 5
      },
      "sku": "S1"
    },
    "category": "addendum.H.nested",
    "note": "single-element arrays are unwrapped"
  },
  {
    "input": {
      "title": [
        "Blue",
        "Shirt"
      ],
      "price": "5 EUR"
    },
    "expected": {
      "title": "Blue Shirt"
    },
    "category": "addendum.H.nested",
    "note": "title array of strings joins with a space"
  },
  {
    "input": {
      "title": "Root",
      "data": {
        "attributes": {
          "name": "Nested"
        }
      }
    },
    "expected": {
      "title": "Root"
    },
    "category": "addendum.H.nested",
    "note": "root keys win over nested"
  },
  {
    "input": {
      "product": {
        "name": "Nested Lamp",
        "price": "3 EUR"
      }
    },
    "expected": {
      "title": "Nested Lamp",
      "price": {
        "amount": 3
      }
    },
    "category": "addendum.H.nested",
    "note": "title found only in nested product"
  },
  {
    "input": {
      "title": "X",
      "__proto__.polluted": "yes",
      "constructor.prototype.x": "y"
    },
    "expected": {
      "title": "X"
    },
    "category": "addendum.H.nested",
    "note": "prototype-pollution keys are ignored"
  },
  {
    "input": {
      "title": "X",
      "price": null
    },
    "expected": {
      "price": {
        "type": "unavailable"
      },
      "warnings": [
        "price_missing"
      ]
    },
    "category": "addendum.H.nested",
    "note": "empty price key → unavailable + price_missing (A2.13)"
  },
  {
    "input": {
      "title": "Blue\u0000Shirt\u0007\u001f"
    },
    "expected": {
      "title": "BlueShirt"
    },
    "category": "addendum.I.sanitize",
    "note": "null bytes and control chars"
  },
  {
    "input": {
      "title": "BlueShirt"
    },
    "expected": {
      "title": "BlueShirt"
    },
    "category": "addendum.I.sanitize",
    "note": "C1 control chars"
  },
  {
    "input": {
      "title": "Blue\tShirt\r\nRed"
    },
    "expected": {
      "title": "Blue Shirt Red"
    },
    "category": "addendum.I.sanitize",
    "note": "tab/newline/CR kept then collapsed"
  },
  {
    "input": {
      "title": "\u001b[31mRed Shirt\u001b[0m"
    },
    "expected": {
      "title": "Red Shirt"
    },
    "category": "addendum.I.sanitize",
    "note": "ANSI colour codes"
  },
  {
    "input": {
      "title": "\u001b]0;evil\u0007Red Shirt"
    },
    "expected": {
      "title": "Red Shirt"
    },
    "category": "addendum.I.sanitize",
    "note": "ANSI OSC sequence"
  },
  {
    "input": {
      "title": "Blue\ud800Shirt"
    },
    "expected": {
      "title": "BlueShirt"
    },
    "category": "addendum.I.sanitize",
    "note": "lone high surrogate"
  },
  {
    "input": {
      "title": "Blue\udc00Shirt"
    },
    "expected": {
      "title": "BlueShirt"
    },
    "category": "addendum.I.sanitize",
    "note": "lone low surrogate"
  },
  {
    "input": {
      "title": "Blue 𝒮hirt"
    },
    "expected": {
      "title": "Blue 𝒮hirt"
    },
    "category": "addendum.I.sanitize",
    "note": "valid surrogate pair is kept"
  },
  {
    "input": {
      "title": "<b>Blue</b> <i>Shirt</i>"
    },
    "expected": {
      "title": "Blue Shirt"
    },
    "category": "addendum.I.sanitize",
    "note": "HTML tags"
  },
  {
    "input": {
      "title": "&lt;b&gt;Blue&lt;/b&gt; Shirt"
    },
    "expected": {
      "title": "Blue Shirt"
    },
    "category": "addendum.I.sanitize",
    "note": "entity-encoded tags are decoded then stripped"
  },
  {
    "input": {
      "title": "<script>x</script>Shirt"
    },
    "expected": {
      "title": "xShirt"
    },
    "category": "addendum.I.sanitize",
    "note": "script tag content markup removed"
  },
  {
    "input": {
      "title": "Blue<br>Shirt"
    },
    "expected": {
      "title": "Blue Shirt"
    },
    "category": "addendum.I.sanitize",
    "note": "br becomes a space"
  },
  {
    "input": {
      "title": "Size < 5 > 3"
    },
    "expected": {
      "title": "Size < 5 > 3"
    },
    "category": "addendum.I.sanitize",
    "note": "less-than sign without tag is kept"
  },
  {
    "input": {
      "title": "Café Table"
    },
    "expected": {
      "title": "Café Table"
    },
    "category": "addendum.I.sanitize",
    "note": "NFC normalization"
  },
  {
    "input": {
      "title": "x́̂̃̄̅̆ Shirt"
    },
    "expected": {
      "title": "x́̂ Shirt"
    },
    "category": "addendum.I.sanitize",
    "note": "Zalgo collapsed to 2 combining marks"
  },
  {
    "input": {
      "title": "á̂̃̄ Shirt"
    },
    "expected": {
      "title": "á̂̃ Shirt"
    },
    "category": "addendum.I.sanitize",
    "note": "NFC composes first, then the run after the composed char is capped"
  },
  {
    "input": {
      "title": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
    },
    "expected": {
      "title": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
      "warnings": [
        "price_missing",
        "title_truncated"
      ]
    },
    "category": "addendum.I.sanitize",
    "note": "title capped at 500 chars"
  },
  {
    "input": {
      "title": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
    },
    "expected": {
      "title": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
      "warnings": [
        "price_missing"
      ]
    },
    "category": "addendum.I.sanitize",
    "note": "exactly 500 chars is not truncated"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "NaN"
    },
    "expected": {
      "price": {
        "type": "unavailable",
        "amount": null,
        "min": null,
        "max": null,
        "currency": null,
        "raw": "NaN"
      },
      "warnings": [],
      "confidence": 1
    },
    "category": "addendum.I.sanitize",
    "note": "NaN literal"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "Infinity"
    },
    "expected": {
      "price": {
        "type": "unavailable",
        "amount": null,
        "min": null,
        "max": null,
        "currency": null,
        "raw": "Infinity"
      },
      "warnings": [],
      "confidence": 1
    },
    "category": "addendum.I.sanitize",
    "note": "Infinity literal"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "-Infinity"
    },
    "expected": {
      "price": {
        "type": "unavailable",
        "amount": null,
        "min": null,
        "max": null,
        "currency": null,
        "raw": "-Infinity"
      },
      "warnings": [],
      "confidence": 1
    },
    "category": "addendum.I.sanitize",
    "note": "-Infinity literal"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "19.99\u0000 €"
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 19.99,
        "currency": "EUR",
        "raw": "19.99 €"
      }
    },
    "category": "addendum.I.sanitize",
    "note": "control chars stripped from price and raw"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "<span class=\"amount\"><bdi>19.99&nbsp;<span>&euro;</span></bdi></span>"
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 19.99,
        "min": null,
        "max": null,
        "currency": "EUR",
        "raw": "<span class=\"amount\"><bdi>19.99&nbsp;<span>&euro;</span></bdi></span>"
      },
      "warnings": [],
      "confidence": 1
    },
    "category": "addendum.I.sanitize",
    "note": "HTML-wrapped price (WooCommerce price_html)"
  },
  {
    "input": {
      "title": "X",
      "sku": "00123"
    },
    "expected": {
      "sku": "00123"
    },
    "category": "addendum.I.sku",
    "note": "leading zeros preserved"
  },
  {
    "input": {
      "title": "X",
      "sku": 123
    },
    "expected": {
      "sku": "123"
    },
    "category": "addendum.I.sku",
    "note": "number sku becomes string"
  },
  {
    "input": {
      "title": "X",
      "sku": "1e5"
    },
    "expected": {
      "sku": "1e5"
    },
    "category": "addendum.I.sku",
    "note": "exponent-looking sku untouched"
  },
  {
    "input": {
      "title": "X",
      "sku": "AB\u0000-1"
    },
    "expected": {
      "sku": "AB-1"
    },
    "category": "addendum.I.sku",
    "note": "sku with control chars sanitized"
  },
  {
    "input": {
      "title": "X",
      "price": "12345"
    },
    "expected": {
      "sku": null
    },
    "category": "addendum.I.sku",
    "note": "sku is never invented from price"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "1 EUR",
      "availability": "in stock"
    },
    "expected": {
      "availability": "in_stock",
      "warnings": []
    },
    "category": "addendum.J.availability",
    "note": "availability \"in stock\""
  },
  {
    "input": {
      "title": "Test Product",
      "price": "1 EUR",
      "availability": "InStock"
    },
    "expected": {
      "availability": "in_stock",
      "warnings": []
    },
    "category": "addendum.J.availability",
    "note": "availability \"InStock\""
  },
  {
    "input": {
      "title": "Test Product",
      "price": "1 EUR",
      "availability": "in_stock"
    },
    "expected": {
      "availability": "in_stock",
      "warnings": []
    },
    "category": "addendum.J.availability",
    "note": "availability \"in_stock\""
  },
  {
    "input": {
      "title": "Test Product",
      "price": "1 EUR",
      "availability": "available"
    },
    "expected": {
      "availability": "in_stock",
      "warnings": []
    },
    "category": "addendum.J.availability",
    "note": "availability \"available\""
  },
  {
    "input": {
      "title": "Test Product",
      "price": "1 EUR",
      "availability": "Disponible"
    },
    "expected": {
      "availability": "in_stock",
      "warnings": []
    },
    "category": "addendum.J.availability",
    "note": "availability \"Disponible\""
  },
  {
    "input": {
      "title": "Test Product",
      "price": "1 EUR",
      "availability": "en stock"
    },
    "expected": {
      "availability": "in_stock",
      "warnings": []
    },
    "category": "addendum.J.availability",
    "note": "availability \"en stock\""
  },
  {
    "input": {
      "title": "Test Product",
      "price": "1 EUR",
      "availability": "Auf Lager"
    },
    "expected": {
      "availability": "in_stock",
      "warnings": []
    },
    "category": "addendum.J.availability",
    "note": "availability \"Auf Lager\""
  },
  {
    "input": {
      "title": "Test Product",
      "price": "1 EUR",
      "availability": "lagernd"
    },
    "expected": {
      "availability": "in_stock",
      "warnings": []
    },
    "category": "addendum.J.availability",
    "note": "availability \"lagernd\""
  },
  {
    "input": {
      "title": "Test Product",
      "price": "1 EUR",
      "availability": "sofort lieferbar"
    },
    "expected": {
      "availability": "in_stock",
      "warnings": []
    },
    "category": "addendum.J.availability",
    "note": "availability \"sofort lieferbar\""
  },
  {
    "input": {
      "title": "Test Product",
      "price": "1 EUR",
      "availability": "w magazynie"
    },
    "expected": {
      "availability": "in_stock",
      "warnings": []
    },
    "category": "addendum.J.availability",
    "note": "availability \"w magazynie\""
  },
  {
    "input": {
      "title": "Test Product",
      "price": "1 EUR",
      "availability": "verfügbar"
    },
    "expected": {
      "availability": "in_stock",
      "warnings": []
    },
    "category": "addendum.J.availability",
    "note": "availability \"verfügbar\""
  },
  {
    "input": {
      "title": "Test Product",
      "price": "1 EUR",
      "availability": "在庫あり"
    },
    "expected": {
      "availability": "in_stock",
      "warnings": []
    },
    "category": "addendum.J.availability",
    "note": "availability \"在庫あり\""
  },
  {
    "input": {
      "title": "Test Product",
      "price": "1 EUR",
      "availability": "متوفر"
    },
    "expected": {
      "availability": "in_stock",
      "warnings": []
    },
    "category": "addendum.J.availability",
    "note": "availability \"متوفر\""
  },
  {
    "input": {
      "title": "Test Product",
      "price": "1 EUR",
      "availability": "متاح"
    },
    "expected": {
      "availability": "in_stock",
      "warnings": []
    },
    "category": "addendum.J.availability",
    "note": "availability \"متاح\""
  },
  {
    "input": {
      "title": "Test Product",
      "price": "1 EUR",
      "availability": "재고 있음"
    },
    "expected": {
      "availability": "in_stock",
      "warnings": []
    },
    "category": "addendum.J.availability",
    "note": "availability \"재고 있음\""
  },
  {
    "input": {
      "title": "Test Product",
      "price": "1 EUR",
      "availability": "true"
    },
    "expected": {
      "availability": "in_stock",
      "warnings": []
    },
    "category": "addendum.J.availability",
    "note": "availability \"true\""
  },
  {
    "input": {
      "title": "Test Product",
      "price": "1 EUR",
      "availability": "1"
    },
    "expected": {
      "availability": "in_stock",
      "warnings": []
    },
    "category": "addendum.J.availability",
    "note": "availability \"1\""
  },
  {
    "input": {
      "title": "Test Product",
      "price": "1 EUR",
      "availability": "schema.org/InStock"
    },
    "expected": {
      "availability": "in_stock",
      "warnings": []
    },
    "category": "addendum.J.availability",
    "note": "availability \"schema.org/InStock\""
  },
  {
    "input": {
      "title": "Test Product",
      "price": "1 EUR",
      "availability": "http://schema.org/InStock"
    },
    "expected": {
      "availability": "in_stock",
      "warnings": []
    },
    "category": "addendum.J.availability",
    "note": "availability \"http://schema.org/InStock\""
  },
  {
    "input": {
      "title": "Test Product",
      "price": "1 EUR",
      "availability": "https://schema.org/InStock"
    },
    "expected": {
      "availability": "in_stock",
      "warnings": []
    },
    "category": "addendum.J.availability",
    "note": "availability \"https://schema.org/InStock\""
  },
  {
    "input": {
      "title": "Test Product",
      "price": "1 EUR",
      "availability": "out of stock"
    },
    "expected": {
      "availability": "out_of_stock",
      "warnings": []
    },
    "category": "addendum.J.availability",
    "note": "availability \"out of stock\""
  },
  {
    "input": {
      "title": "Test Product",
      "price": "1 EUR",
      "availability": "OutOfStock"
    },
    "expected": {
      "availability": "out_of_stock",
      "warnings": []
    },
    "category": "addendum.J.availability",
    "note": "availability \"OutOfStock\""
  },
  {
    "input": {
      "title": "Test Product",
      "price": "1 EUR",
      "availability": "sold out"
    },
    "expected": {
      "availability": "out_of_stock",
      "warnings": []
    },
    "category": "addendum.J.availability",
    "note": "availability \"sold out\""
  },
  {
    "input": {
      "title": "Test Product",
      "price": "1 EUR",
      "availability": "épuisé"
    },
    "expected": {
      "availability": "out_of_stock",
      "warnings": []
    },
    "category": "addendum.J.availability",
    "note": "availability \"épuisé\""
  },
  {
    "input": {
      "title": "Test Product",
      "price": "1 EUR",
      "availability": "0"
    },
    "expected": {
      "availability": "out_of_stock",
      "warnings": []
    },
    "category": "addendum.J.availability",
    "note": "availability \"0\""
  },
  {
    "input": {
      "title": "Test Product",
      "price": "1 EUR",
      "availability": "false"
    },
    "expected": {
      "availability": "out_of_stock",
      "warnings": []
    },
    "category": "addendum.J.availability",
    "note": "availability \"false\""
  },
  {
    "input": {
      "title": "Test Product",
      "price": "1 EUR",
      "availability": "nicht verfügbar"
    },
    "expected": {
      "availability": "out_of_stock",
      "warnings": []
    },
    "category": "addendum.J.availability",
    "note": "availability \"nicht verfügbar\""
  },
  {
    "input": {
      "title": "Test Product",
      "price": "1 EUR",
      "availability": "품절"
    },
    "expected": {
      "availability": "out_of_stock",
      "warnings": []
    },
    "category": "addendum.J.availability",
    "note": "availability \"품절\""
  },
  {
    "input": {
      "title": "Test Product",
      "price": "1 EUR",
      "availability": "out_of_stock"
    },
    "expected": {
      "availability": "out_of_stock",
      "warnings": []
    },
    "category": "addendum.J.availability",
    "note": "availability \"out_of_stock\""
  },
  {
    "input": {
      "title": "Test Product",
      "price": "1 EUR",
      "availability": "https://schema.org/OutOfStock"
    },
    "expected": {
      "availability": "out_of_stock",
      "warnings": []
    },
    "category": "addendum.J.availability",
    "note": "availability \"https://schema.org/OutOfStock\""
  },
  {
    "input": {
      "title": "Test Product",
      "price": "1 EUR",
      "availability": "backorder"
    },
    "expected": {
      "availability": "unknown",
      "warnings": []
    },
    "category": "addendum.J.availability",
    "note": "availability \"backorder\""
  },
  {
    "input": {
      "title": "Test Product",
      "price": "1 EUR",
      "availability": "discontinued"
    },
    "expected": {
      "availability": "unknown",
      "warnings": []
    },
    "category": "addendum.J.availability",
    "note": "availability \"discontinued\""
  },
  {
    "input": {
      "title": "Test Product",
      "price": "1 EUR",
      "availability": "inquire"
    },
    "expected": {
      "availability": "unknown",
      "warnings": []
    },
    "category": "addendum.J.availability",
    "note": "availability \"inquire\""
  },
  {
    "input": {
      "title": "Test Product",
      "price": "1 EUR",
      "availability": "preorder"
    },
    "expected": {
      "availability": "unknown",
      "warnings": []
    },
    "category": "addendum.J.availability",
    "note": "availability \"preorder\""
  },
  {
    "input": {
      "title": "Test Product",
      "price": "1 EUR",
      "availability": "https://schema.org/PreOrder"
    },
    "expected": {
      "availability": "unknown",
      "warnings": []
    },
    "category": "addendum.J.availability",
    "note": "availability \"https://schema.org/PreOrder\""
  },
  {
    "input": {
      "title": "Test Product",
      "price": "1 EUR",
      "availability": "maybe"
    },
    "expected": {
      "availability": "unknown",
      "warnings": []
    },
    "category": "addendum.J.availability",
    "note": "availability \"maybe\""
  },
  {
    "input": {
      "title": "Test Product",
      "price": "1 EUR",
      "availability": 5
    },
    "expected": {
      "availability": "in_stock",
      "warnings": []
    },
    "category": "addendum.J.availability",
    "note": "availability 5"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "1 EUR",
      "availability": 0
    },
    "expected": {
      "availability": "out_of_stock",
      "warnings": []
    },
    "category": "addendum.J.availability",
    "note": "availability 0"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "1 EUR",
      "availability": true
    },
    "expected": {
      "availability": "in_stock",
      "warnings": []
    },
    "category": "addendum.J.availability",
    "note": "availability true"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "1 EUR",
      "availability": false
    },
    "expected": {
      "availability": "out_of_stock",
      "warnings": []
    },
    "category": "addendum.J.availability",
    "note": "availability false"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "1 EUR",
      "availability": -1
    },
    "expected": {
      "availability": "unknown",
      "warnings": [
        "implausible_stock"
      ]
    },
    "category": "addendum.J.availability",
    "note": "availability -1"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "1 EUR",
      "availability": "-3"
    },
    "expected": {
      "availability": "unknown",
      "warnings": [
        "implausible_stock"
      ]
    },
    "category": "addendum.J.availability",
    "note": "availability \"-3\""
  },
  {
    "input": {
      "title": "Test Product",
      "price": "1 EUR",
      "availability": "10+ an Lager"
    },
    "expected": {
      "availability": "in_stock",
      "warnings": []
    },
    "category": "addendum.J.availability",
    "note": "availability \"10+ an Lager\""
  },
  {
    "input": {
      "title": "Test Product",
      "price": "1 EUR",
      "availability": "3 in stock"
    },
    "expected": {
      "availability": "in_stock",
      "warnings": []
    },
    "category": "addendum.J.availability",
    "note": "availability \"3 in stock\""
  },
  {
    "input": {
      "title": "Test Product",
      "price": "1 EUR",
      "offers": {
        "availability": "https://schema.org/InStock"
      }
    },
    "expected": {
      "availability": "in_stock"
    },
    "category": "addendum.J.availability",
    "note": "availability from offers"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "From -5 €"
    },
    "expected": {
      "price": {
        "type": "from",
        "amount": -5,
        "min": null,
        "max": null,
        "currency": "EUR",
        "raw": "From -5 €"
      },
      "warnings": [
        "negative_price"
      ],
      "confidence": 0.3
    },
    "category": "addendum.K.negative",
    "note": "negative never flipped inside a from-price"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "1‘999.00 CHF"
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 1999,
        "min": null,
        "max": null,
        "currency": "CHF",
        "raw": "1‘999.00 CHF"
      },
      "warnings": [],
      "confidence": 1
    },
    "category": "addendum.robustness",
    "note": "U+2018 as Swiss thousands separator"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "CHF 2′199.00"
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 2199,
        "min": null,
        "max": null,
        "currency": "CHF",
        "raw": "CHF 2′199.00"
      },
      "warnings": [],
      "confidence": 1
    },
    "category": "addendum.robustness",
    "note": "U+2032 prime as Swiss thousands separator"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "49,95 € inkl. 19% MwSt. zzgl. Versand"
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 49.95,
        "min": null,
        "max": null,
        "currency": "EUR",
        "raw": "49,95 € inkl. 19% MwSt. zzgl. Versand"
      },
      "warnings": [],
      "confidence": 1
    },
    "category": "addendum.robustness",
    "note": "tax-rate percentage is not an amount"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "20% off 100 €"
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 100,
        "min": null,
        "max": null,
        "currency": "EUR",
        "raw": "20% off 100 €"
      },
      "warnings": [],
      "confidence": 1
    },
    "category": "addendum.robustness",
    "note": "discount percentage is not an amount"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "549⁠,00 €"
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 549,
        "min": null,
        "max": null,
        "currency": "EUR",
        "raw": "549⁠,00 €"
      },
      "warnings": [],
      "confidence": 1
    },
    "category": "addendum.robustness",
    "note": "word joiner U+2060 before the decimal comma"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "‎699,00 €‏"
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 699,
        "min": null,
        "max": null,
        "currency": "EUR",
        "raw": "‎699,00 €‏"
      },
      "warnings": [],
      "confidence": 1
    },
    "category": "addendum.robustness",
    "note": "LRM/RLM around the price"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "0.125",
      "currency": "USD"
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 0.125,
        "min": null,
        "max": null,
        "currency": "USD",
        "raw": "0.125"
      },
      "warnings": [
        "decimals_exceed_currency"
      ],
      "confidence": 0.9
    },
    "category": "a2.1.zero-integer",
    "note": "zero integer part is decimal: 0.125"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "0,500 €"
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 0.5,
        "min": null,
        "max": null,
        "currency": "EUR",
        "raw": "0,500 €"
      },
      "warnings": [
        "decimals_exceed_currency"
      ],
      "confidence": 0.9
    },
    "category": "a2.1.zero-integer",
    "note": "zero integer part is decimal: 0,500 €"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "0,125 CHF"
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 0.125,
        "min": null,
        "max": null,
        "currency": "CHF",
        "raw": "0,125 CHF"
      },
      "warnings": [
        "decimals_exceed_currency"
      ],
      "confidence": 0.9
    },
    "category": "a2.1.zero-integer",
    "note": "zero integer part is decimal: 0,125 CHF"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "0.500 KWD"
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 0.5,
        "min": null,
        "max": null,
        "currency": "KWD",
        "raw": "0.500 KWD"
      },
      "warnings": [],
      "confidence": 1
    },
    "category": "a2.1.zero-integer",
    "note": "zero integer part is decimal: 0.500 KWD"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "0,999 JPY"
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 0.999,
        "min": null,
        "max": null,
        "currency": "JPY",
        "raw": "0,999 JPY"
      },
      "warnings": [
        "decimals_exceed_currency"
      ],
      "confidence": 0.9
    },
    "category": "a2.1.zero-integer",
    "note": "zero integer part is decimal: 0,999 JPY"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "0.001 USD"
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 0.001,
        "min": null,
        "max": null,
        "currency": "USD",
        "raw": "0.001 USD"
      },
      "warnings": [
        "decimals_exceed_currency"
      ],
      "confidence": 0.9
    },
    "category": "a2.1.zero-integer",
    "note": "zero integer part is decimal: 0.001 USD"
  },
  {
    "input": {
      "title": "Test Product",
      "price": ".500 €"
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 0.5,
        "min": null,
        "max": null,
        "currency": "EUR",
        "raw": ".500 €"
      },
      "warnings": [
        "decimals_exceed_currency"
      ],
      "confidence": 0.9
    },
    "category": "a2.1.zero-integer",
    "note": "zero integer part is decimal: .500 €"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "EUR 0.999"
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 0.999,
        "min": null,
        "max": null,
        "currency": "EUR",
        "raw": "EUR 0.999"
      },
      "warnings": [
        "decimals_exceed_currency"
      ],
      "confidence": 0.9
    },
    "category": "a2.1.zero-integer",
    "note": "zero integer part is decimal: EUR 0.999"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "0.125",
      "currency": "CLP"
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 0.125,
        "min": null,
        "max": null,
        "currency": "CLP",
        "raw": "0.125"
      },
      "warnings": [
        "decimals_exceed_currency"
      ],
      "confidence": 0.9
    },
    "category": "a2.1.zero-integer",
    "note": "zero integer part is decimal: 0.125"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "0.123"
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 0.123,
        "min": null,
        "max": null,
        "currency": null,
        "raw": "0.123"
      },
      "warnings": [
        "currency_missing",
        "decimals_exceed_currency"
      ],
      "confidence": 0.8
    },
    "category": "a2.1.zero-integer",
    "note": "zero integer part with no currency keeps only currency_missing"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "0,125 - 0,250 €"
    },
    "expected": {
      "price": {
        "type": "range",
        "amount": null,
        "min": 0.125,
        "max": 0.25,
        "currency": "EUR",
        "raw": "0,125 - 0,250 €"
      },
      "warnings": [
        "decimals_exceed_currency"
      ],
      "confidence": 0.9
    },
    "category": "a2.1.zero-integer",
    "note": "range of zero-integer decimals"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "1234.567 EUR"
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 1234.567,
        "min": null,
        "max": null,
        "currency": "EUR",
        "raw": "1234.567 EUR"
      },
      "warnings": [
        "decimals_exceed_currency"
      ],
      "confidence": 0.9
    },
    "category": "a2.1.generalized",
    "note": "left group of 4+ digits is never a thousands group"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "12345,678 EUR"
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 12345.678,
        "min": null,
        "max": null,
        "currency": "EUR",
        "raw": "12345,678 EUR"
      },
      "warnings": [
        "decimals_exceed_currency"
      ],
      "confidence": 0.9
    },
    "category": "a2.1.generalized",
    "note": "left group of 5 digits, comma"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "1,234 EUR"
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 1234,
        "min": null,
        "max": null,
        "currency": "EUR",
        "raw": "1,234 EUR"
      },
      "warnings": [
        "ambiguous_separator"
      ],
      "confidence": 0.7
    },
    "category": "a2.1.generalized",
    "note": "1-3 digit non-zero left + 3 right still goes through the exponent table"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "KWD 1,234"
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 1.234,
        "min": null,
        "max": null,
        "currency": "KWD",
        "raw": "KWD 1,234"
      },
      "warnings": [],
      "confidence": 1
    },
    "category": "a2.1.generalized",
    "note": "exponent 3 table still applies when both sides pass"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "12,5678 USD"
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 12.5678,
        "min": null,
        "max": null,
        "currency": "USD",
        "raw": "12,5678 USD"
      },
      "warnings": [
        "decimals_exceed_currency"
      ],
      "confidence": 0.9
    },
    "category": "a2.1.generalized",
    "note": "right group other than 3 digits is decimal"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "0.123.456 EUR"
    },
    "expected": {
      "price": {
        "type": "unavailable",
        "amount": null,
        "min": null,
        "max": null,
        "currency": "EUR",
        "raw": "0.123.456 EUR"
      },
      "warnings": [
        "price_unparseable"
      ],
      "confidence": 0.2
    },
    "category": "a2.1.generalized",
    "note": "repeated separator with a zero head is invalid"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "De 10,00 € à 50,00 €"
    },
    "expected": {
      "price": {
        "type": "range",
        "amount": null,
        "min": 10,
        "max": 50,
        "currency": "EUR",
        "raw": "De 10,00 € à 50,00 €"
      },
      "warnings": [],
      "confidence": 1
    },
    "category": "a2.2.range",
    "note": "De X à Y"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "von 10 bis 20 EUR"
    },
    "expected": {
      "price": {
        "type": "range",
        "amount": null,
        "min": 10,
        "max": 20,
        "currency": "EUR",
        "raw": "von 10 bis 20 EUR"
      },
      "warnings": [],
      "confidence": 1
    },
    "category": "a2.2.range",
    "note": "von X bis Y"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "from $10 to $20"
    },
    "expected": {
      "price": {
        "type": "range",
        "amount": null,
        "min": 10,
        "max": 20,
        "currency": "USD",
        "raw": "from $10 to $20"
      },
      "warnings": [
        "currency_ambiguous"
      ],
      "confidence": 0.9
    },
    "category": "a2.2.range",
    "note": "from X to Y is a range, not a from-price"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "entre 10 et 20 €"
    },
    "expected": {
      "price": {
        "type": "range",
        "amount": null,
        "min": 10,
        "max": 20,
        "currency": "EUR",
        "raw": "entre 10 et 20 €"
      },
      "warnings": [],
      "confidence": 1
    },
    "category": "a2.2.range",
    "note": "entre X et Y"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "10 à 20 €"
    },
    "expected": {
      "price": {
        "type": "range",
        "amount": null,
        "min": 10,
        "max": 20,
        "currency": "EUR",
        "raw": "10 à 20 €"
      },
      "warnings": [],
      "confidence": 1
    },
    "category": "a2.2.range",
    "note": "bare à"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "10 a 20 EUR"
    },
    "expected": {
      "price": {
        "type": "range",
        "amount": null,
        "min": 10,
        "max": 20,
        "currency": "EUR",
        "raw": "10 a 20 EUR"
      },
      "warnings": [],
      "confidence": 1
    },
    "category": "a2.2.range",
    "note": "bare a"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "10 and 20 EUR"
    },
    "expected": {
      "price": {
        "type": "range",
        "amount": null,
        "min": 10,
        "max": 20,
        "currency": "EUR",
        "raw": "10 and 20 EUR"
      },
      "warnings": [],
      "confidence": 1
    },
    "category": "a2.2.range",
    "note": "bare and"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "10 til 20 kr"
    },
    "expected": {
      "price": {
        "type": "range",
        "amount": null,
        "min": 10,
        "max": 20,
        "currency": "SEK",
        "raw": "10 til 20 kr"
      },
      "warnings": [
        "currency_ambiguous"
      ],
      "confidence": 0.9
    },
    "category": "a2.2.range",
    "note": "bare til"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "10 bis 20 EUR"
    },
    "expected": {
      "price": {
        "type": "range",
        "amount": null,
        "min": 10,
        "max": 20,
        "currency": "EUR",
        "raw": "10 bis 20 EUR"
      },
      "warnings": [],
      "confidence": 1
    },
    "category": "a2.2.range",
    "note": "bare bis"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "Prix conseillé : 20 € à Notre prix : 10 €"
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 10,
        "min": null,
        "max": null,
        "currency": "EUR",
        "raw": "Prix conseillé : 20 € à Notre prix : 10 €"
      },
      "warnings": [],
      "confidence": 1
    },
    "category": "a2.2.range",
    "note": "list + selling label means sale, not range"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "Sale 10 - 20 EUR"
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 10,
        "min": null,
        "max": null,
        "currency": "EUR",
        "raw": "Sale 10 - 20 EUR"
      },
      "warnings": [],
      "confidence": 1
    },
    "category": "a2.2.range",
    "note": "a sale label blocks the range reading"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "10 et 20 EUR"
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 10,
        "min": null,
        "max": null,
        "currency": "EUR",
        "raw": "10 et 20 EUR"
      },
      "warnings": [
        "multiple_amounts"
      ],
      "confidence": 0.6
    },
    "category": "a2.2.range",
    "note": "et is only a delimiter inside entre…et"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "ab 29,95 €"
    },
    "expected": {
      "price": {
        "type": "from",
        "amount": 29.95,
        "min": null,
        "max": null,
        "currency": "EUR",
        "raw": "ab 29,95 €"
      },
      "warnings": [],
      "confidence": 1
    },
    "category": "a2.3.from",
    "note": "from prefix: ab 29,95 €"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "desde 10 €"
    },
    "expected": {
      "price": {
        "type": "from",
        "amount": 10,
        "min": null,
        "max": null,
        "currency": "EUR",
        "raw": "desde 10 €"
      },
      "warnings": [],
      "confidence": 1
    },
    "category": "a2.3.from",
    "note": "from prefix: desde 10 €"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "vanaf 10 €"
    },
    "expected": {
      "price": {
        "type": "from",
        "amount": 10,
        "min": null,
        "max": null,
        "currency": "EUR",
        "raw": "vanaf 10 €"
      },
      "warnings": [],
      "confidence": 1
    },
    "category": "a2.3.from",
    "note": "from prefix: vanaf 10 €"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "da 10 €"
    },
    "expected": {
      "price": {
        "type": "from",
        "amount": 10,
        "min": null,
        "max": null,
        "currency": "EUR",
        "raw": "da 10 €"
      },
      "warnings": [],
      "confidence": 1
    },
    "category": "a2.3.from",
    "note": "from prefix: da 10 €"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "a partir de 10 €"
    },
    "expected": {
      "price": {
        "type": "from",
        "amount": 10,
        "min": null,
        "max": null,
        "currency": "EUR",
        "raw": "a partir de 10 €"
      },
      "warnings": [],
      "confidence": 1
    },
    "category": "a2.3.from",
    "note": "from prefix: a partir de 10 €"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "starting from $10"
    },
    "expected": {
      "price": {
        "type": "from",
        "amount": 10,
        "min": null,
        "max": null,
        "currency": "USD",
        "raw": "starting from $10"
      },
      "warnings": [
        "currency_ambiguous"
      ],
      "confidence": 0.9
    },
    "category": "a2.3.from",
    "note": "from prefix: starting from $10"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "prix de départ 10 €"
    },
    "expected": {
      "price": {
        "type": "from",
        "amount": 10,
        "min": null,
        "max": null,
        "currency": "EUR",
        "raw": "prix de départ 10 €"
      },
      "warnings": [],
      "confidence": 1
    },
    "category": "a2.3.from",
    "note": "from prefix: prix de départ 10 €"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "5.9e2",
      "currency": "USD"
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 590,
        "min": null,
        "max": null,
        "currency": "USD",
        "raw": "5.9e2"
      },
      "warnings": [
        "scientific_notation"
      ],
      "confidence": 0.9
    },
    "category": "a2.4.scientific",
    "note": "5.9e2"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "1e-2",
      "currency": "USD"
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 0.01,
        "min": null,
        "max": null,
        "currency": "USD",
        "raw": "1e-2"
      },
      "warnings": [
        "scientific_notation"
      ],
      "confidence": 0.9
    },
    "category": "a2.4.scientific",
    "note": "1e-2"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "-1.5E3",
      "currency": "USD"
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": -1500,
        "min": null,
        "max": null,
        "currency": "USD",
        "raw": "-1.5E3"
      },
      "warnings": [
        "scientific_notation",
        "negative_price"
      ],
      "confidence": 0.3
    },
    "category": "a2.4.scientific",
    "note": "uppercase E with sign"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "5.9e2 EUR"
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 5.9,
        "min": null,
        "max": null,
        "currency": "EUR",
        "raw": "5.9e2 EUR"
      },
      "warnings": [
        "multiple_amounts"
      ],
      "confidence": 0.6
    },
    "category": "a2.4.scientific",
    "note": "never inside a longer string"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "1e999",
      "currency": "USD"
    },
    "expected": {
      "price": {
        "type": "unavailable",
        "amount": null,
        "min": null,
        "max": null,
        "currency": "USD",
        "raw": "1e999"
      },
      "warnings": [
        "price_unparseable"
      ],
      "confidence": 0.2
    },
    "category": "a2.4.scientific",
    "note": "overflowing exponent is unparseable"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "3万9800円"
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 39800,
        "min": null,
        "max": null,
        "currency": "JPY",
        "raw": "3万9800円"
      },
      "warnings": [],
      "confidence": 1
    },
    "category": "a2.5.myriad",
    "note": "3万9800円"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "5万円"
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 50000,
        "min": null,
        "max": null,
        "currency": "JPY",
        "raw": "5万円"
      },
      "warnings": [],
      "confidence": 1
    },
    "category": "a2.5.myriad",
    "note": "5万円"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "1万2千500円"
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 12500,
        "min": null,
        "max": null,
        "currency": "JPY",
        "raw": "1万2千500円"
      },
      "warnings": [],
      "confidence": 1
    },
    "category": "a2.5.myriad",
    "note": "1万2千500円"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "8千円"
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 8000,
        "min": null,
        "max": null,
        "currency": "JPY",
        "raw": "8千円"
      },
      "warnings": [],
      "confidence": 1
    },
    "category": "a2.5.myriad",
    "note": "8千円"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "2千500円"
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 2500,
        "min": null,
        "max": null,
        "currency": "JPY",
        "raw": "2千500円"
      },
      "warnings": [],
      "confidence": 1
    },
    "category": "a2.5.myriad",
    "note": "2千500円"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "12万",
      "currency": "JPY"
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 120000,
        "min": null,
        "max": null,
        "currency": "JPY",
        "raw": "12万"
      },
      "warnings": [],
      "confidence": 1
    },
    "category": "a2.5.myriad",
    "note": "bare 万 with explicit currency"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "Call 1-800-555-0199 for price",
      "currency": "USD"
    },
    "expected": {
      "price": {
        "type": "unavailable",
        "amount": null,
        "min": null,
        "max": null,
        "currency": "USD",
        "raw": "Call 1-800-555-0199 for price"
      },
      "warnings": [],
      "confidence": 1
    },
    "category": "a2.6.gate",
    "note": "Call … for price with a phone number"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "Call us for price"
    },
    "expected": {
      "price": {
        "type": "unavailable",
        "amount": null,
        "min": null,
        "max": null,
        "currency": null,
        "raw": "Call us for price"
      },
      "warnings": [],
      "confidence": 1
    },
    "category": "a2.6.gate",
    "note": "Call us for price"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "Sur devis"
    },
    "expected": {
      "price": {
        "type": "unavailable",
        "amount": null,
        "min": null,
        "max": null,
        "currency": null,
        "raw": "Sur devis"
      },
      "warnings": [],
      "confidence": 1
    },
    "category": "a2.6.gate",
    "note": "sur devis"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "請詢價"
    },
    "expected": {
      "price": {
        "type": "unavailable",
        "amount": null,
        "min": null,
        "max": null,
        "currency": null,
        "raw": "請詢價"
      },
      "warnings": [],
      "confidence": 1
    },
    "category": "a2.6.gate",
    "note": "請詢價"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "Inquire"
    },
    "expected": {
      "price": {
        "type": "unavailable",
        "amount": null,
        "min": null,
        "max": null,
        "currency": null,
        "raw": "Inquire"
      },
      "warnings": [],
      "confidence": 1
    },
    "category": "a2.6.gate",
    "note": "inquire"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "Request a quote"
    },
    "expected": {
      "price": {
        "type": "unavailable",
        "amount": null,
        "min": null,
        "max": null,
        "currency": null,
        "raw": "Request a quote"
      },
      "warnings": [],
      "confidence": 1
    },
    "category": "a2.6.gate",
    "note": "request a quote"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "Price on request – 500 €"
    },
    "expected": {
      "price": {
        "type": "unavailable",
        "amount": null,
        "min": null,
        "max": null,
        "currency": "EUR",
        "raw": "Price on request – 500 €"
      },
      "warnings": [],
      "confidence": 1
    },
    "category": "a2.6.gate",
    "note": "phrase wins over a trailing amount"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "Tel 1-800-555-0199 $19.99"
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 19.99,
        "min": null,
        "max": null,
        "currency": "USD",
        "raw": "Tel 1-800-555-0199 $19.99"
      },
      "warnings": [
        "currency_ambiguous"
      ],
      "confidence": 0.9
    },
    "category": "a2.6.phone",
    "note": "US toll-free number is dropped, price kept"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "555-123-4567 19.99 EUR"
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 19.99,
        "min": null,
        "max": null,
        "currency": "EUR",
        "raw": "555-123-4567 19.99 EUR"
      },
      "warnings": [],
      "confidence": 1
    },
    "category": "a2.6.phone",
    "note": "NANP number is dropped"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "1234567890"
    },
    "expected": {
      "price": {
        "type": "unavailable",
        "amount": null,
        "min": null,
        "max": null,
        "currency": null,
        "raw": "1234567890"
      },
      "warnings": [
        "price_unparseable"
      ],
      "confidence": 0.2
    },
    "category": "a2.6.phone",
    "note": "run of 10+ digits is never a price"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "1234567890 EUR"
    },
    "expected": {
      "price": {
        "type": "unavailable",
        "amount": null,
        "min": null,
        "max": null,
        "currency": "EUR",
        "raw": "1234567890 EUR"
      },
      "warnings": [
        "price_unparseable"
      ],
      "confidence": 0.2
    },
    "category": "a2.6.phone",
    "note": "10+ digits with currency"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "3 89,00 €"
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 389,
        "min": null,
        "max": null,
        "currency": "EUR",
        "raw": "3 89,00 €"
      },
      "warnings": [],
      "confidence": 1
    },
    "category": "a2.7.space",
    "note": "hair space splitting 3 89,00"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "1 234,56 €"
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 1234.56,
        "min": null,
        "max": null,
        "currency": "EUR",
        "raw": "1 234,56 €"
      },
      "warnings": [],
      "confidence": 1
    },
    "category": "a2.7.space",
    "note": "thin space before 3 digits"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "12 345 €"
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 12345,
        "min": null,
        "max": null,
        "currency": "EUR",
        "raw": "12 345 €"
      },
      "warnings": [],
      "confidence": 1
    },
    "category": "a2.7.space",
    "note": "figure space"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "1 2 €"
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 12,
        "min": null,
        "max": null,
        "currency": "EUR",
        "raw": "1 2 €"
      },
      "warnings": [],
      "confidence": 1
    },
    "category": "a2.7.space",
    "note": "narrow NBSP is removed, not converted"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "3 89,00 €"
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 3,
        "min": null,
        "max": null,
        "currency": "EUR",
        "raw": "3 89,00 €"
      },
      "warnings": [
        "multiple_amounts"
      ],
      "confidence": 0.6
    },
    "category": "a2.7.space",
    "note": "regular space not forming a 3-digit group stays a separator"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "1 234 567,89 €"
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 1234567.89,
        "min": null,
        "max": null,
        "currency": "EUR",
        "raw": "1 234 567,89 €"
      },
      "warnings": [],
      "confidence": 1
    },
    "category": "a2.7.space",
    "note": "regular space before exactly 3 digits is thousands"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "19,99 €"
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 19.99,
        "min": null,
        "max": null,
        "currency": "EUR",
        "raw": "19,99 €"
      },
      "warnings": [],
      "confidence": 1
    },
    "category": "a2.7.space",
    "note": "special space between words is still a space"
  },
  {
    "input": {
      "item_title": "Lamp",
      "price": "5 EUR"
    },
    "expected": {
      "title": "Lamp",
      "warnings": []
    },
    "category": "a2.8.alias",
    "note": "item_title"
  },
  {
    "input": {
      "item_name": "Lamp",
      "price": "5 EUR"
    },
    "expected": {
      "title": "Lamp",
      "warnings": []
    },
    "category": "a2.8.alias",
    "note": "item_name"
  },
  {
    "input": {
      "product": "Lamp",
      "price": "5 EUR"
    },
    "expected": {
      "title": "Lamp",
      "warnings": []
    },
    "category": "a2.8.alias",
    "note": "product as a string title"
  },
  {
    "input": {
      "label": "Lamp",
      "price": "5 EUR"
    },
    "expected": {
      "title": "Lamp",
      "warnings": []
    },
    "category": "a2.8.alias",
    "note": "label"
  },
  {
    "input": {
      "label": "L name",
      "name": "N name",
      "price": "5 EUR"
    },
    "expected": {
      "title": "N name"
    },
    "category": "a2.8.alias",
    "note": "name beats label"
  },
  {
    "input": {
      "title": "X",
      "unit_price": "2 EUR"
    },
    "expected": {
      "price": {
        "amount": 2
      },
      "warnings": []
    },
    "category": "a2.8.alias",
    "note": "unit_price"
  },
  {
    "input": {
      "title": "X",
      "list_price": "9 EUR",
      "price": "5 EUR"
    },
    "expected": {
      "price": {
        "amount": 5
      },
      "warnings": [
        "multiple_price_fields:list_price"
      ]
    },
    "category": "a2.8.alias",
    "note": "list_price loses to price"
  },
  {
    "input": {
      "title": "X",
      "final_price": "5 EUR",
      "price": "9 EUR"
    },
    "expected": {
      "price": {
        "amount": 5
      },
      "warnings": [
        "multiple_price_fields:price"
      ]
    },
    "category": "a2.8.alias",
    "note": "final_price wins over price"
  },
  {
    "input": {
      "title": "X",
      "selling_price": "4 EUR",
      "final_price": "5 EUR"
    },
    "expected": {
      "price": {
        "amount": 4
      },
      "warnings": [
        "multiple_price_fields:final_price"
      ]
    },
    "category": "a2.8.alias",
    "note": "selling_price wins over final_price"
  },
  {
    "input": {
      "title": "X",
      "price": "5",
      "iso_currency": "USD"
    },
    "expected": {
      "price": {
        "currency": "USD"
      },
      "warnings": []
    },
    "category": "a2.8.alias",
    "note": "iso_currency"
  },
  {
    "input": {
      "title": "X",
      "price": "5",
      "currencyCode": "GBP"
    },
    "expected": {
      "price": {
        "currency": "GBP"
      },
      "warnings": []
    },
    "category": "a2.8.alias",
    "note": "currencyCode"
  },
  {
    "input": {
      "title": "X",
      "price": "5",
      "priceCurrency": "CHF"
    },
    "expected": {
      "price": {
        "currency": "CHF"
      },
      "warnings": []
    },
    "category": "a2.8.alias",
    "note": "priceCurrency"
  },
  {
    "input": {
      "title": "X",
      "price": "5 EUR",
      "item_code": "A1"
    },
    "expected": {
      "sku": "A1"
    },
    "category": "a2.8.alias",
    "note": "item_code"
  },
  {
    "input": {
      "title": "X",
      "price": "5 EUR",
      "product_code": "A2"
    },
    "expected": {
      "sku": "A2"
    },
    "category": "a2.8.alias",
    "note": "product_code"
  },
  {
    "input": {
      "title": "X",
      "price": "5 EUR",
      "article_number": "A3"
    },
    "expected": {
      "sku": "A3"
    },
    "category": "a2.8.alias",
    "note": "article_number"
  },
  {
    "input": {
      "title": "X",
      "price": "5 EUR",
      "ean": "0012345678905"
    },
    "expected": {
      "sku": "0012345678905"
    },
    "category": "a2.8.alias",
    "note": "ean string keeps leading zero"
  },
  {
    "input": {
      "title": "X",
      "price": "5 EUR",
      "gtin": 4006381333931
    },
    "expected": {
      "sku": "4006381333931"
    },
    "category": "a2.8.alias",
    "note": "gtin number"
  },
  {
    "input": {
      "title": "X",
      "price": "5 EUR",
      "upc": "012345678905"
    },
    "expected": {
      "sku": "012345678905"
    },
    "category": "a2.8.alias",
    "note": "upc"
  },
  {
    "input": {
      "title": "X",
      "price": "5 EUR",
      "ean": "E",
      "sku": "S"
    },
    "expected": {
      "sku": "S"
    },
    "category": "a2.8.alias",
    "note": "sku beats ean"
  },
  {
    "input": {
      "title": "X",
      "price": "5 EUR",
      "item_code": "I",
      "part_number": "P"
    },
    "expected": {
      "sku": "P"
    },
    "category": "a2.8.alias",
    "note": "part_number beats item_code"
  },
  {
    "input": {
      "item_title": "Lululemon Everywhere Belt Bag 1L",
      "sale_price": "38.00",
      "iso_currency": "USD",
      "qty_available": 12,
      "item_code": "LU9AX2S"
    },
    "expected": {
      "title": "Lululemon Everywhere Belt Bag 1L",
      "price": {
        "amount": 38,
        "currency": "USD"
      },
      "sku": "LU9AX2S",
      "warnings": []
    },
    "category": "a2.8.alias",
    "note": "the old 422 feed now works"
  },
  {
    "input": {
      "headline_title": "Blue Shirt",
      "price": "5 EUR"
    },
    "expected": {
      "confidence": 0.7,
      "title": "Blue Shirt",
      "warnings": [
        "alias_inferred"
      ]
    },
    "category": "a2.8.inferred",
    "note": "title inferred from *title*"
  },
  {
    "input": {
      "Product Label Name": "Blue Shirt",
      "price": "5 EUR"
    },
    "expected": {
      "confidence": 0.7,
      "title": "Blue Shirt",
      "warnings": [
        "alias_inferred"
      ]
    },
    "category": "a2.8.inferred",
    "note": "title inferred from *name* with spaces and case"
  },
  {
    "input": {
      "title": "X",
      "total_cost_ht": "12,00 EUR"
    },
    "expected": {
      "confidence": 0.7,
      "price": {
        "type": "exact",
        "amount": 12,
        "currency": "EUR"
      },
      "warnings": [
        "alias_inferred"
      ]
    },
    "category": "a2.8.inferred",
    "note": "price inferred from *cost*"
  },
  {
    "input": {
      "title": "X",
      "retail_amount": "9.99",
      "currency": "USD"
    },
    "expected": {
      "confidence": 0.7,
      "price": {
        "amount": 9.99,
        "currency": "USD"
      },
      "warnings": [
        "alias_inferred"
      ]
    },
    "category": "a2.8.inferred",
    "note": "price inferred from *amount*"
  },
  {
    "input": {
      "title": "X",
      "current_price": "7 EUR"
    },
    "expected": {
      "confidence": 0.7,
      "price": {
        "amount": 7,
        "currency": "EUR"
      },
      "warnings": [
        "alias_inferred"
      ]
    },
    "category": "a2.8.inferred",
    "note": "current_price is a price, not a currency"
  },
  {
    "input": {
      "title": "X",
      "price": "9.99",
      "price_currency_iso": "EUR"
    },
    "expected": {
      "confidence": 0.7,
      "price": {
        "amount": 9.99,
        "currency": "EUR"
      },
      "warnings": [
        "alias_inferred"
      ]
    },
    "category": "a2.8.inferred",
    "note": "currency inferred from *currency*"
  },
  {
    "input": {
      "title": "X",
      "price": "5 EUR",
      "supplier_code": "AB1"
    },
    "expected": {
      "confidence": 0.7,
      "sku": "AB1",
      "warnings": [
        "alias_inferred"
      ]
    },
    "category": "a2.8.inferred",
    "note": "sku inferred from *code*"
  },
  {
    "input": {
      "title": "X",
      "price": "5 EUR",
      "manufacturer_mpn_ref": "M1"
    },
    "expected": {
      "confidence": 0.7,
      "sku": "M1",
      "warnings": [
        "alias_inferred"
      ]
    },
    "category": "a2.8.inferred",
    "note": "sku inferred from *mpn*"
  },
  {
    "input": {
      "title": "A",
      "other_name": "B",
      "price": "5 EUR"
    },
    "expected": {
      "title": "A",
      "warnings": [],
      "confidence": 1
    },
    "category": "a2.8.inferred",
    "note": "no inference when an explicit alias matched"
  },
  {
    "input": {
      "title": "X",
      "currency_code": "EUR",
      "price": "5"
    },
    "expected": {
      "sku": null,
      "warnings": [],
      "confidence": 1
    },
    "category": "a2.8.inferred",
    "note": "explicit aliases are never stolen by inference (currency_code is not a sku)"
  },
  {
    "input": {
      "foo": "bar"
    },
    "expected": {
      "error": {
        "code": "missing_field",
        "field": "title"
      }
    },
    "category": "a2.8.inferred",
    "note": "nothing to infer from → still a 422"
  },
  {
    "input": {
      "title": "Test Product",
      "price": [
        "179,99 €",
        "159,99 €"
      ]
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 179.99,
        "currency": "EUR",
        "raw": "179,99 €"
      },
      "warnings": [
        "price_array_multiple"
      ],
      "confidence": 0.6
    },
    "category": "a2.9.array",
    "note": "two prices → first + price_array_multiple"
  },
  {
    "input": {
      "title": "Test Product",
      "price": [
        "5 EUR",
        "6 EUR",
        "7 EUR"
      ]
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 5,
        "currency": "EUR",
        "raw": "5 EUR"
      },
      "warnings": [
        "price_array_multiple"
      ],
      "confidence": 0.6
    },
    "category": "a2.9.array",
    "note": "three prices"
  },
  {
    "input": {
      "title": "Test Product",
      "price": [
        10,
        20
      ],
      "currency": "EUR"
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 10,
        "currency": "EUR",
        "raw": "10"
      },
      "warnings": [
        "price_array_multiple"
      ],
      "confidence": 0.6
    },
    "category": "a2.9.array",
    "note": "numeric array with currency"
  },
  {
    "input": {
      "title": "Test Product",
      "price": [
        "5 EUR"
      ]
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 5,
        "currency": "EUR",
        "raw": "5 EUR"
      },
      "warnings": [],
      "confidence": 1
    },
    "category": "a2.9.array",
    "note": "single-element array is just unwrapped"
  },
  {
    "input": {
      "title": "Test Product",
      "amount": [
        "12,00 €",
        "15,00 €"
      ]
    },
    "expected": {
      "price": {
        "amount": 12,
        "currency": "EUR"
      },
      "warnings": [
        "price_array_multiple"
      ],
      "confidence": 0.6
    },
    "category": "a2.9.array",
    "note": "array under the amount alias"
  },
  {
    "input": {
      "title": "Test Product",
      "price": [
        "N/A",
        "5 EUR"
      ]
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 5,
        "currency": "EUR",
        "raw": "5 EUR"
      },
      "warnings": [
        "price_array_multiple"
      ],
      "confidence": 0.6
    },
    "category": "a2.9.array",
    "note": "first usable element wins over an unavailable literal (A5.8)"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "Jetzt 79,99 € statt 99,99 €"
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 79.99,
        "min": null,
        "max": null,
        "currency": "EUR",
        "raw": "Jetzt 79,99 € statt 99,99 €"
      },
      "warnings": [],
      "confidence": 1
    },
    "category": "a2.10.labels",
    "note": "Jetzt / statt"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "Aktionspreis 50 € UVP 80 €"
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 50,
        "min": null,
        "max": null,
        "currency": "EUR",
        "raw": "Aktionspreis 50 € UVP 80 €"
      },
      "warnings": [],
      "confidence": 1
    },
    "category": "a2.10.labels",
    "note": "Aktionspreis / UVP"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "oferta 10 € compare at 20 €"
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 10,
        "min": null,
        "max": null,
        "currency": "EUR",
        "raw": "oferta 10 € compare at 20 €"
      },
      "warnings": [],
      "confidence": 1
    },
    "category": "a2.10.labels",
    "note": "oferta / compare at"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "Prix actuel 15 € Prix régulier 20 €"
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 15,
        "min": null,
        "max": null,
        "currency": "EUR",
        "raw": "Prix actuel 15 € Prix régulier 20 €"
      },
      "warnings": [],
      "confidence": 1
    },
    "category": "a2.10.labels",
    "note": "Prix actuel / Prix régulier"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "Our price 5 EUR list price 9 EUR"
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 5,
        "min": null,
        "max": null,
        "currency": "EUR",
        "raw": "Our price 5 EUR list price 9 EUR"
      },
      "warnings": [],
      "confidence": 1
    },
    "category": "a2.10.labels",
    "note": "Our price / list price"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "offerta 12 € statt 15 €"
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 12,
        "min": null,
        "max": null,
        "currency": "EUR",
        "raw": "offerta 12 € statt 15 €"
      },
      "warnings": [],
      "confidence": 1
    },
    "category": "a2.10.labels",
    "note": "offerta / statt"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "statt 99,99 € 79,99 €"
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 79.99,
        "min": null,
        "max": null,
        "currency": "EUR",
        "raw": "statt 99,99 € 79,99 €"
      },
      "warnings": [],
      "confidence": 1
    },
    "category": "a2.10.labels",
    "note": "statt marks a list price"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "Sale price 8 EUR RRP 12 EUR"
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 8,
        "min": null,
        "max": null,
        "currency": "EUR",
        "raw": "Sale price 8 EUR RRP 12 EUR"
      },
      "warnings": [],
      "confidence": 1
    },
    "category": "a2.10.labels",
    "note": "sale price"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "Fr. 495.00"
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 495,
        "min": null,
        "max": null,
        "currency": "CHF",
        "raw": "Fr. 495.00"
      },
      "warnings": [],
      "confidence": 1
    },
    "category": "a2.10.currency",
    "note": "Fr."
  },
  {
    "input": {
      "title": "Test Product",
      "price": "SFr. 349.90"
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 349.9,
        "min": null,
        "max": null,
        "currency": "CHF",
        "raw": "SFr. 349.90"
      },
      "warnings": [],
      "confidence": 1
    },
    "category": "a2.10.currency",
    "note": "SFr."
  },
  {
    "input": {
      "title": "Test Product",
      "price": "US$ 19.99"
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 19.99,
        "min": null,
        "max": null,
        "currency": "USD",
        "raw": "US$ 19.99"
      },
      "warnings": [],
      "confidence": 1
    },
    "category": "a2.10.currency",
    "note": "US$ is unambiguous"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "129,95 DM"
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 129.95,
        "min": null,
        "max": null,
        "currency": "DEM",
        "raw": "129,95 DM"
      },
      "warnings": [
        "legacy_currency"
      ],
      "confidence": 0.9
    },
    "category": "a2.10.currency",
    "note": "DM → DEM + legacy_currency"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "DEM 129,95"
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 129.95,
        "min": null,
        "max": null,
        "currency": "DEM",
        "raw": "DEM 129,95"
      },
      "warnings": [
        "legacy_currency"
      ],
      "confidence": 0.9
    },
    "category": "a2.10.currency",
    "note": "DEM code + legacy_currency"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "100元"
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 100,
        "min": null,
        "max": null,
        "currency": "CNY",
        "raw": "100元"
      },
      "warnings": [],
      "confidence": 1
    },
    "category": "a2.10.currency",
    "note": "元"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "RMB 100"
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 100,
        "min": null,
        "max": null,
        "currency": "CNY",
        "raw": "RMB 100"
      },
      "warnings": [],
      "confidence": 1
    },
    "category": "a2.10.currency",
    "note": "RMB"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "CN¥100"
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 100,
        "min": null,
        "max": null,
        "currency": "CNY",
        "raw": "CN¥100"
      },
      "warnings": [],
      "confidence": 1
    },
    "category": "a2.10.currency",
    "note": "CN¥"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "100円"
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 100,
        "min": null,
        "max": null,
        "currency": "JPY",
        "raw": "100円"
      },
      "warnings": [],
      "confidence": 1
    },
    "category": "a2.10.currency",
    "note": "円"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "199 kr",
      "currency": "NOK"
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 199,
        "min": null,
        "max": null,
        "currency": "NOK",
        "raw": "199 kr"
      },
      "warnings": [],
      "confidence": 1
    },
    "category": "a2.10.currency",
    "note": "kr with a sibling currency field takes the field"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "¥100",
      "currency": "CNY"
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 100,
        "min": null,
        "max": null,
        "currency": "CNY",
        "raw": "¥100"
      },
      "warnings": [],
      "confidence": 1
    },
    "category": "a2.10.currency",
    "note": "bare ¥ with a sibling currency field"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "1 EUR",
      "availability": "متوفر في المخزون"
    },
    "expected": {
      "availability": "in_stock",
      "warnings": []
    },
    "category": "a2.11.availability",
    "note": "availability \"متوفر في المخزون\""
  },
  {
    "input": {
      "title": "Test Product",
      "price": "1 EUR",
      "availability": "not available"
    },
    "expected": {
      "availability": "out_of_stock",
      "warnings": []
    },
    "category": "a2.11.availability",
    "note": "availability \"not available\""
  },
  {
    "input": {
      "title": "Test Product",
      "price": "1 EUR",
      "availability": "Currently unavailable"
    },
    "expected": {
      "availability": "out_of_stock",
      "warnings": []
    },
    "category": "a2.11.availability",
    "note": "availability \"Currently unavailable\""
  },
  {
    "input": {
      "title": "Test Product",
      "price": "1 EUR",
      "availability": "yes"
    },
    "expected": {
      "availability": "in_stock",
      "warnings": []
    },
    "category": "a2.11.availability",
    "note": "availability \"yes\""
  },
  {
    "input": {
      "title": "Test Product",
      "price": "1 EUR",
      "availability": "no"
    },
    "expected": {
      "availability": "out_of_stock",
      "warnings": []
    },
    "category": "a2.11.availability",
    "note": "availability \"no\""
  },
  {
    "input": {
      "title": "Test Product",
      "price": "1 EUR",
      "availability": "Nicht verfügbar"
    },
    "expected": {
      "availability": "out_of_stock",
      "warnings": []
    },
    "category": "a2.11.availability",
    "note": "availability \"Nicht verfügbar\""
  },
  {
    "input": {
      "title": "Test Product",
      "price": "1 EUR",
      "availability": "nicht auf Lager"
    },
    "expected": {
      "availability": "out_of_stock",
      "warnings": []
    },
    "category": "a2.11.availability",
    "note": "availability \"nicht auf Lager\""
  },
  {
    "input": {
      "title": "Test Product",
      "price": "1 EUR",
      "availability": "Non disponible"
    },
    "expected": {
      "availability": "out_of_stock",
      "warnings": []
    },
    "category": "a2.11.availability",
    "note": "availability \"Non disponible\""
  },
  {
    "input": {
      "title": "Test Product",
      "price": "1 EUR",
      "availability": "indisponible"
    },
    "expected": {
      "availability": "out_of_stock",
      "warnings": []
    },
    "category": "a2.11.availability",
    "note": "availability \"indisponible\""
  },
  {
    "input": {
      "title": "Test Product",
      "price": "1 EUR",
      "availability": "Disponible en magasin"
    },
    "expected": {
      "availability": "in_stock",
      "warnings": []
    },
    "category": "a2.11.availability",
    "note": "availability \"Disponible en magasin\""
  },
  {
    "input": {
      "title": "Test Product",
      "price": "1 EUR",
      "availability": "Verfügbar in 3 Tagen"
    },
    "expected": {
      "availability": "in_stock",
      "warnings": []
    },
    "category": "a2.11.availability",
    "note": "availability \"Verfügbar in 3 Tagen\""
  },
  {
    "input": {
      "title": "Test Product",
      "price": "1 EUR",
      "availability": "Limited availability"
    },
    "expected": {
      "availability": "unknown",
      "warnings": []
    },
    "category": "a2.11.availability",
    "note": "availability \"Limited availability\""
  },
  {
    "input": {
      "title": "Test Product",
      "price": "1 EUR",
      "availability": "https://schema.org/LimitedAvailability"
    },
    "expected": {
      "availability": "unknown",
      "warnings": []
    },
    "category": "a2.11.availability",
    "note": "availability \"https://schema.org/LimitedAvailability\""
  },
  {
    "input": {
      "title": "Test Product",
      "price": "1 EUR",
      "availability": "Out of stock - available soon"
    },
    "expected": {
      "availability": "out_of_stock",
      "warnings": []
    },
    "category": "a2.11.availability",
    "note": "availability \"Out of stock - available soon\""
  },
  {
    "input": {
      "title": "Test Product",
      "price": "1 EUR",
      "availability": "yes please"
    },
    "expected": {
      "availability": "unknown",
      "warnings": []
    },
    "category": "a2.11.availability",
    "note": "availability \"yes please\""
  },
  {
    "input": {
      "title": "Test Product",
      "price": "1 EUR",
      "availability": "In-Stock"
    },
    "expected": {
      "availability": "in_stock",
      "warnings": []
    },
    "category": "a2.11.availability",
    "note": "availability \"In-Stock\""
  },
  {
    "input": {
      "title": "Test Product",
      "price": "1 EUR",
      "availability": "OUT-OF-STOCK"
    },
    "expected": {
      "availability": "out_of_stock",
      "warnings": []
    },
    "category": "a2.11.availability",
    "note": "availability \"OUT-OF-STOCK\""
  },
  {
    "input": {
      "title": "Test Product",
      "price": "100",
      "currency": "TRY"
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 100,
        "min": null,
        "max": null,
        "currency": "TRY",
        "raw": "100"
      },
      "warnings": [],
      "confidence": 1
    },
    "category": "a2.12.iso-words",
    "note": "TRY accepted in the explicit field"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "100",
      "currency": "ALL"
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 100,
        "min": null,
        "max": null,
        "currency": "ALL",
        "raw": "100"
      },
      "warnings": [],
      "confidence": 1
    },
    "category": "a2.12.iso-words",
    "note": "ALL accepted in the explicit field"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "100",
      "currency": "PEN"
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 100,
        "min": null,
        "max": null,
        "currency": "PEN",
        "raw": "100"
      },
      "warnings": [],
      "confidence": 1
    },
    "category": "a2.12.iso-words",
    "note": "PEN accepted in the explicit field"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "100",
      "currency": "CAN"
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 100,
        "min": null,
        "max": null,
        "currency": "CAN",
        "raw": "100"
      },
      "warnings": [
        "currency_unknown"
      ],
      "confidence": 0.9
    },
    "category": "a2.17.unknown",
    "note": "CAN: 3 uppercase letters, unknown → currency_unknown"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "100",
      "currency": "AND"
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 100,
        "min": null,
        "max": null,
        "currency": "AND",
        "raw": "100"
      },
      "warnings": [
        "currency_unknown"
      ],
      "confidence": 0.9
    },
    "category": "a2.17.unknown",
    "note": "AND: 3 uppercase letters, unknown → currency_unknown"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "100",
      "currency": "XYZ"
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 100,
        "min": null,
        "max": null,
        "currency": "XYZ",
        "raw": "100"
      },
      "warnings": [
        "currency_unknown"
      ],
      "confidence": 0.9
    },
    "category": "a2.17.unknown",
    "note": "XYZ: 3 uppercase letters, unknown → currency_unknown"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "100",
      "currency": "xyz"
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 100,
        "min": null,
        "max": null,
        "currency": null,
        "raw": "100"
      },
      "warnings": [
        "currency_missing"
      ],
      "confidence": 0.8
    },
    "category": "a2.17.unknown",
    "note": "lowercase unknown code → currency_missing"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "100",
      "currency": "usd"
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 100,
        "min": null,
        "max": null,
        "currency": "USD",
        "raw": "100"
      },
      "warnings": [],
      "confidence": 1
    },
    "category": "a2.17.unknown",
    "note": "lowercase known code is fine"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "100",
      "currency": "Euro"
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 100,
        "min": null,
        "max": null,
        "currency": null,
        "raw": "100"
      },
      "warnings": [
        "currency_missing"
      ],
      "confidence": 0.8
    },
    "category": "a2.17.unknown",
    "note": "word instead of a code → currency_missing"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "100",
      "currency": "EURO"
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 100,
        "min": null,
        "max": null,
        "currency": null,
        "raw": "100"
      },
      "warnings": [
        "currency_missing"
      ],
      "confidence": 0.8
    },
    "category": "a2.17.unknown",
    "note": "4 letters → currency_missing"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "100 TRY"
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 100,
        "min": null,
        "max": null,
        "currency": null,
        "raw": "100 TRY"
      },
      "warnings": [
        "currency_missing"
      ],
      "confidence": 0.8
    },
    "category": "a2.12.iso-words",
    "note": "TRY inside a price string is not a currency"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "ALL 100"
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 100,
        "min": null,
        "max": null,
        "currency": null,
        "raw": "ALL 100"
      },
      "warnings": [
        "currency_missing"
      ],
      "confidence": 0.8
    },
    "category": "a2.12.iso-words",
    "note": "ALL inside a price string is not a currency"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "100 PEN"
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 100,
        "min": null,
        "max": null,
        "currency": null,
        "raw": "100 PEN"
      },
      "warnings": [
        "currency_missing"
      ],
      "confidence": 0.8
    },
    "category": "a2.12.iso-words",
    "note": "PEN inside a price string is not a currency"
  },
  {
    "input": {
      "title": "Test Product",
      "price": ""
    },
    "expected": {
      "price": {
        "type": "unavailable",
        "amount": null
      },
      "warnings": [
        "price_missing"
      ],
      "confidence": 0.5
    },
    "category": "a2.13.price-missing",
    "note": "empty string"
  },
  {
    "input": {
      "title": "Test Product",
      "price": null
    },
    "expected": {
      "price": {
        "type": "unavailable",
        "amount": null
      },
      "warnings": [
        "price_missing"
      ],
      "confidence": 0.5
    },
    "category": "a2.13.price-missing",
    "note": "null"
  },
  {
    "input": {
      "title": "Test Product",
      "sale_price": "",
      "price": "",
      "regular_price": null
    },
    "expected": {
      "price": {
        "type": "unavailable",
        "amount": null
      },
      "warnings": [
        "price_missing"
      ],
      "confidence": 0.5
    },
    "category": "a2.13.price-missing",
    "note": "all aliases empty"
  },
  {
    "input": {
      "title": "Test Product",
      "price": []
    },
    "expected": {
      "price": {
        "type": "unavailable",
        "amount": null
      },
      "warnings": [
        "price_missing"
      ],
      "confidence": 0.5
    },
    "category": "a2.13.price-missing",
    "note": "empty array"
  },
  {
    "input": {
      "title": "Test Product"
    },
    "expected": {
      "price": {
        "type": "unavailable",
        "amount": null
      },
      "warnings": [
        "price_missing"
      ],
      "confidence": 0.5
    },
    "category": "a2.13.price-missing",
    "note": "no price field at all"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "Sold out"
    },
    "expected": {
      "price": {
        "type": "unavailable"
      },
      "warnings": [],
      "confidence": 1
    },
    "category": "a2.13.price-missing",
    "note": "a price field that says Sold out is NOT price_missing"
  },
  {
    "input": {
      "title": "Test Product",
      "price_cents": "349.5",
      "currency": "EUR"
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 3.495
      },
      "warnings": [
        "minor_unit_non_integer",
        "decimals_exceed_currency"
      ],
      "confidence": 0.9
    },
    "category": "a2.14.minor-units",
    "note": "string non-integer minor units"
  },
  {
    "input": {
      "title": "Test Product",
      "amount_cents": 12345.5,
      "currency": "KWD"
    },
    "expected": {
      "price": {
        "amount": 12.3455,
        "currency": "KWD"
      },
      "warnings": [
        "minor_unit_non_integer",
        "decimals_exceed_currency"
      ]
    },
    "category": "a2.14.minor-units",
    "note": "non-integer with a 3-decimal currency"
  },
  {
    "input": {
      "title": "Test Product",
      "price_cents": "abc",
      "currency": "EUR"
    },
    "expected": {
      "price": {
        "type": "unavailable"
      },
      "warnings": [
        "price_unparseable"
      ]
    },
    "category": "a2.14.minor-units",
    "note": "non-numeric minor units are still unparseable"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "0.125",
      "currency": "USD"
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 0.125,
        "currency": "USD",
        "formatted": "$0.13"
      },
      "warnings": [
        "decimals_exceed_currency"
      ],
      "confidence": 0.9
    },
    "category": "a5.2.precision",
    "note": "0.125 USD keeps sub-cent precision, formatted rounds"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "0.12345678 USD"
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 0.123457,
        "currency": "USD",
        "formatted": "$0.12"
      },
      "warnings": [
        "decimals_exceed_currency",
        "precision_capped"
      ],
      "confidence": 0.9
    },
    "category": "a5.2.precision",
    "note": "6-decimal cap rounds and warns"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "0.123456 USD"
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 0.123456,
        "currency": "USD"
      },
      "warnings": [
        "decimals_exceed_currency"
      ]
    },
    "category": "a5.2.precision",
    "note": "exactly 6 decimals is not capped"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "JPY 14,850.00"
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 14850,
        "currency": "JPY",
        "formatted": "¥14,850"
      },
      "warnings": [
        "decimals_exceed_currency"
      ]
    },
    "category": "a5.2.precision",
    "note": "JPY .00 keeps amount, warns"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "KWD 12.345"
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 12.345,
        "currency": "KWD",
        "formatted": "KWD 12.345"
      },
      "warnings": [],
      "confidence": 1
    },
    "category": "a5.2.precision",
    "note": "KWD 3 decimals is within the exponent"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "99.50 CAD"
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 99.5,
        "currency": "CAD",
        "formatted": "CA$99.50"
      },
      "warnings": []
    },
    "category": "a4.formatted",
    "note": "CAD formatted as en-US"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "1.234,56 €"
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 1234.56,
        "currency": "EUR",
        "formatted": "€1,234.56"
      }
    },
    "category": "a4.formatted",
    "note": "EUR with European separators formatted as en-US"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "¥14,850"
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 14850,
        "currency": "JPY",
        "formatted": "¥14,850"
      },
      "warnings": [
        "currency_ambiguous"
      ]
    },
    "category": "a4.formatted",
    "note": "bare yen sign"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "19,99 - 29,99 €"
    },
    "expected": {
      "price": {
        "type": "range",
        "min": 19.99,
        "max": 29.99,
        "formatted": "€19.99"
      }
    },
    "category": "a4.formatted",
    "note": "range formats the minimum"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "Sold out"
    },
    "expected": {
      "price": {
        "type": "unavailable",
        "formatted": null
      }
    },
    "category": "a4.formatted",
    "note": "unavailable has null formatted"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "19.99"
    },
    "expected": {
      "price": {
        "currency": null,
        "formatted": null
      },
      "warnings": [
        "currency_missing"
      ]
    },
    "category": "a4.formatted",
    "note": "missing currency has null formatted"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "19.99",
      "currency": "XYZ"
    },
    "expected": {
      "price": {
        "currency": "XYZ",
        "formatted": null
      },
      "warnings": [
        "currency_unknown"
      ],
      "confidence": 0.9
    },
    "category": "a4.formatted",
    "note": "unknown currency has null formatted"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "-5.00 USD"
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": -5,
        "currency": "USD",
        "formatted": "-$5.00"
      },
      "warnings": [
        "negative_price"
      ]
    },
    "category": "a4.formatted",
    "note": "negative amount keeps its sign"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "1 EUR",
      "description": "<p>Soft <b>cotton</b> tee&nbsp;&amp; more</p>"
    },
    "expected": {
      "description": "Soft cotton tee & more",
      "warnings": []
    },
    "category": "a4.description",
    "note": "tags stripped, entities decoded"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "1 EUR",
      "desc": "Fish &amp;amp; chips"
    },
    "expected": {
      "description": "Fish & chips"
    },
    "category": "a4.description",
    "note": "double-encoded entities decoded"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "1 EUR",
      "summary": "S",
      "description": "D"
    },
    "expected": {
      "description": "D"
    },
    "category": "a4.description",
    "note": "alias priority: description over summary"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "1 EUR",
      "body_html": "<div>Body</div>"
    },
    "expected": {
      "description": "Body"
    },
    "category": "a4.description",
    "note": "body_html alias"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "1 EUR"
    },
    "expected": {
      "description": null
    },
    "category": "a4.description",
    "note": "absent description is null, never derived from the title"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "1 EUR",
      "description": " <br> "
    },
    "expected": {
      "description": null
    },
    "category": "a4.description",
    "note": "blank description is null"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "1 EUR",
      "description": "a\u0000b\u001b[31mc"
    },
    "expected": {
      "description": "abc"
    },
    "category": "a4.description",
    "note": "control characters stripped"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "1 EUR",
      "description": "word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word "
    },
    "expected": {
      "warnings": [
        "description_truncated"
      ]
    },
    "category": "a4.description",
    "note": "over 5000 chars is truncated and warned"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "1 EUR",
      "image": "https://cdn.example.com/a.jpg"
    },
    "expected": {
      "images": [
        "https://cdn.example.com/a.jpg"
      ]
    },
    "category": "a4.images",
    "note": "single URL string"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "1 EUR",
      "images": [
        "https://a.test/1.jpg",
        "//a.test/2.jpg",
        "/rel.jpg",
        "ftp://a.test/3.jpg",
        "javascript:alert(1)",
        "http://a.test/4.jpg",
        "https://a.test/1.jpg"
      ]
    },
    "expected": {
      "images": [
        "https://a.test/1.jpg",
        "http://a.test/4.jpg"
      ],
      "warnings": []
    },
    "category": "a4.images",
    "note": "array of strings keeps only absolute http(s), dedupes in order"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "1 EUR",
      "images": [
        {
          "id": 1,
          "src": "https://s.test/a.png"
        },
        {
          "src": "https://s.test/b.png"
        }
      ]
    },
    "expected": {
      "images": [
        "https://s.test/a.png",
        "https://s.test/b.png"
      ]
    },
    "category": "a4.images",
    "note": "Shopify objects with src"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "1 EUR",
      "featured_image": {
        "url": "https://s.test/f.png"
      }
    },
    "expected": {
      "images": [
        "https://s.test/f.png"
      ]
    },
    "category": "a4.images",
    "note": "objects with url"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "1 EUR",
      "imageUrl": "https://s.test/i.png"
    },
    "expected": {
      "images": [
        "https://s.test/i.png"
      ]
    },
    "category": "a4.images",
    "note": "imageUrl alias"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "1 EUR"
    },
    "expected": {
      "images": []
    },
    "category": "a4.images",
    "note": "absent images is an empty array"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "1 EUR",
      "images": [
        "nope"
      ],
      "thumbnail": "https://s.test/t.png"
    },
    "expected": {
      "images": [
        "https://s.test/t.png"
      ]
    },
    "category": "a4.images",
    "note": "no usable URL falls through to the next alias"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "1 EUR",
      "images": [
        "https://s.test/0.jpg",
        "https://s.test/1.jpg",
        "https://s.test/2.jpg",
        "https://s.test/3.jpg",
        "https://s.test/4.jpg",
        "https://s.test/5.jpg",
        "https://s.test/6.jpg",
        "https://s.test/7.jpg",
        "https://s.test/8.jpg",
        "https://s.test/9.jpg",
        "https://s.test/10.jpg",
        "https://s.test/11.jpg",
        "https://s.test/12.jpg",
        "https://s.test/13.jpg",
        "https://s.test/14.jpg",
        "https://s.test/15.jpg",
        "https://s.test/16.jpg",
        "https://s.test/17.jpg",
        "https://s.test/18.jpg",
        "https://s.test/19.jpg",
        "https://s.test/20.jpg",
        "https://s.test/21.jpg",
        "https://s.test/22.jpg",
        "https://s.test/23.jpg",
        "https://s.test/24.jpg",
        "https://s.test/25.jpg",
        "https://s.test/26.jpg",
        "https://s.test/27.jpg",
        "https://s.test/28.jpg",
        "https://s.test/29.jpg",
        "https://s.test/30.jpg",
        "https://s.test/31.jpg",
        "https://s.test/32.jpg",
        "https://s.test/33.jpg",
        "https://s.test/34.jpg",
        "https://s.test/35.jpg",
        "https://s.test/36.jpg",
        "https://s.test/37.jpg",
        "https://s.test/38.jpg",
        "https://s.test/39.jpg",
        "https://s.test/40.jpg",
        "https://s.test/41.jpg",
        "https://s.test/42.jpg",
        "https://s.test/43.jpg",
        "https://s.test/44.jpg",
        "https://s.test/45.jpg",
        "https://s.test/46.jpg",
        "https://s.test/47.jpg",
        "https://s.test/48.jpg",
        "https://s.test/49.jpg",
        "https://s.test/50.jpg",
        "https://s.test/51.jpg",
        "https://s.test/52.jpg",
        "https://s.test/53.jpg",
        "https://s.test/54.jpg",
        "https://s.test/55.jpg",
        "https://s.test/56.jpg",
        "https://s.test/57.jpg",
        "https://s.test/58.jpg",
        "https://s.test/59.jpg"
      ]
    },
    "expected": {
      "warnings": [
        "images_truncated"
      ]
    },
    "category": "a4.images",
    "note": "more than 50 images is capped and warned"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "1 EUR",
      "image": "https://s.test/a b.jpg"
    },
    "expected": {
      "images": []
    },
    "category": "a4.images",
    "note": "image URL with whitespace is rejected"
  },
  {
    "input": {
      "title": "Nike Air Max 90",
      "price": "1 EUR"
    },
    "expected": {
      "slug": "nike-air-max-90",
      "confidence": 1
    },
    "category": "a3.slug",
    "note": "plain ASCII title"
  },
  {
    "input": {
      "title": "Mécanique Kärcher",
      "price": "1 EUR"
    },
    "expected": {
      "slug": "mecanique-karcher"
    },
    "category": "a3.slug",
    "note": "accents stripped"
  },
  {
    "input": {
      "title": "Straße Æsop Œuvre Ørsted Đồ Łódź Þór",
      "price": "1 EUR"
    },
    "expected": {
      "slug": "strasse-aesop-oeuvre-orsted-do-lodz-thor"
    },
    "category": "a3.slug",
    "note": "non-decomposable letters transliterated"
  },
  {
    "input": {
      "title": "Ben & Jerry's -- Cookie Dough!!!",
      "price": "1 EUR"
    },
    "expected": {
      "slug": "ben-jerry-s-cookie-dough"
    },
    "category": "a3.slug",
    "note": "punctuation runs collapse to one dash"
  },
  {
    "input": {
      "title": "AIR MAX AM90",
      "price": "1 EUR"
    },
    "expected": {
      "slug": "air-max-am90"
    },
    "category": "a3.slug",
    "note": "alphanumeric codes keep digits"
  },
  {
    "input": {
      "title": "ナイキ エアマックス",
      "sku": "NK-90",
      "price": "1 EUR",
      "currency": "EUR"
    },
    "expected": {
      "slug": "",
      "sku": "NK-90",
      "warnings": [
        "slug_unavailable"
      ],
      "confidence": 1
    },
    "category": "a3.slug",
    "note": "Japanese title has no slug, never falls back to the SKU"
  },
  {
    "input": {
      "title": "حذاء رياضي",
      "price": "1 EUR"
    },
    "expected": {
      "slug": "",
      "warnings": [
        "slug_unavailable"
      ]
    },
    "category": "a3.slug",
    "note": "Arabic title has no slug"
  },
  {
    "input": {
      "title": "iPhone 15 ケース",
      "price": "1 EUR"
    },
    "expected": {
      "slug": "iphone-15",
      "warnings": []
    },
    "category": "a3.slug",
    "note": "mixed Latin and CJK keeps the Latin part"
  },
  {
    "input": {
      "title": "abcdefghij abcdefghij abcdefghij abcdefghij abcdefghij abcdefghij abcdefghij abcdefghij abcdefghij abcdefghij abcdefghij abcdefghij",
      "price": "1 EUR"
    },
    "expected": {
      "slug": "abcdefghij-abcdefghij-abcdefghij-abcdefghij-abcdefghij-abcdefghij-abcdefghij"
    },
    "category": "a3.slug",
    "note": "capped at 80 characters on a dash boundary"
  },
  {
    "input": {
      "title": "*** SUPER SHOE ***",
      "price": "1 EUR"
    },
    "expected": {
      "slug": "super-shoe"
    },
    "category": "a3.slug",
    "note": "slug is derived from the cleaned title"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "INR 12,34,567.89"
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 1234567.89,
        "currency": "INR"
      },
      "warnings": [],
      "confidence": 1
    },
    "category": "a5.3.grouping",
    "note": "Indian lakh grouping with decimals"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "1,23,456 INR"
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 123456,
        "currency": "INR"
      },
      "warnings": []
    },
    "category": "a5.3.grouping",
    "note": "Indian grouping without decimals"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "INR 1,23,45,678"
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 12345678,
        "currency": "INR"
      },
      "warnings": [
        "implausible_price"
      ]
    },
    "category": "a5.3.grouping",
    "note": "Indian crore grouping"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "1.2.3 EUR"
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 123,
        "currency": "EUR"
      },
      "warnings": [
        "malformed_thousands"
      ],
      "confidence": 0.5
    },
    "category": "a5.3.grouping",
    "note": "inconsistent repeated separators keep malformed_thousands"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "1 EUR",
      "country_code": "FR",
      "hs_code": "6403"
    },
    "expected": {
      "sku": null,
      "warnings": []
    },
    "category": "a5.7.denylist",
    "note": "country_code and hs_code are never a SKU"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "1 EUR",
      "zip_code": "75001",
      "color_code": "RED"
    },
    "expected": {
      "sku": null
    },
    "category": "a5.7.denylist",
    "note": "zip_code and color_code are never a SKU"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "1 EUR",
      "warehouse_code": "W-9"
    },
    "expected": {
      "sku": "W-9",
      "warnings": [
        "alias_inferred"
      ],
      "confidence": 0.7
    },
    "category": "a5.7.denylist",
    "note": "a key ending in code still infers a SKU"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "1 EUR",
      "total_weight_amount": "5"
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 1,
        "currency": "EUR"
      },
      "warnings": []
    },
    "category": "a5.7.denylist",
    "note": "weight is never a price"
  },
  {
    "input": {
      "name": "Widget",
      "brand_name": "Acme",
      "price": "1 EUR"
    },
    "expected": {
      "title": "Widget",
      "brand": "Acme",
      "warnings": []
    },
    "category": "a5.7.brand",
    "note": "brand_name maps to brand, not to the title"
  },
  {
    "input": {
      "brand_name": "Acme",
      "price": "1 EUR"
    },
    "expected": {
      "error": {
        "code": "missing_field",
        "field": "title"
      }
    },
    "category": "a5.7.brand",
    "note": "brand_name is never inferred as the title"
  },
  {
    "input": {
      "vendor_name": "Acme",
      "price": "1 EUR"
    },
    "expected": {
      "error": {
        "code": "missing_field"
      }
    },
    "category": "a5.7.brand",
    "note": "vendor_name is never inferred as the title"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "1 EUR",
      "vendor": "V",
      "manufacturer": "M"
    },
    "expected": {
      "brand": "M"
    },
    "category": "a5.7.brand",
    "note": "brand alias order: manufacturer before vendor"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "1 EUR",
      "maker": "Maker Co"
    },
    "expected": {
      "brand": "Maker Co"
    },
    "category": "a5.7.brand",
    "note": "maker alias"
  },
  {
    "input": {
      "title": "Adidas Sneakers",
      "brand": "Foo",
      "price": "1 EUR"
    },
    "expected": {
      "brand": "Foo"
    },
    "category": "a5.7.brand",
    "note": "explicit brand outranks a known brand in the title"
  },
  {
    "input": {
      "title": "Adidas Sneakers",
      "price": "1 EUR"
    },
    "expected": {
      "brand": "Adidas"
    },
    "category": "a5.7.brand",
    "note": "known brand in title when no brand field"
  },
  {
    "input": {
      "title": "Test Product",
      "price": [
        "N/A",
        "--"
      ]
    },
    "expected": {
      "price": {
        "type": "unavailable"
      },
      "warnings": [
        "price_array_multiple"
      ],
      "confidence": 0.6
    },
    "category": "a5.8.array",
    "note": "all elements unavailable stays unavailable"
  },
  {
    "input": {
      "title": "Test Product",
      "price": [
        "",
        "5 EUR"
      ]
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 5,
        "currency": "EUR"
      },
      "warnings": [
        "price_array_multiple"
      ]
    },
    "category": "a5.8.array",
    "note": "blank first element is skipped"
  },
  {
    "input": {
      "title": "Test Product",
      "price": [
        "see store",
        "7,50 €"
      ]
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 7.5,
        "currency": "EUR"
      },
      "warnings": [
        "price_array_multiple"
      ]
    },
    "category": "a5.8.array",
    "note": "unparseable first element is skipped"
  },
  {
    "input": {
      "title": "Test Product",
      "price": [
        {
          "amount": "N/A"
        },
        {
          "amount": "5",
          "currency": "CHF"
        }
      ]
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 5,
        "currency": "CHF"
      },
      "warnings": [
        "price_array_multiple"
      ],
      "confidence": 0.6
    },
    "category": "a5.8.array",
    "note": "object elements carry their own currency"
  },
  {
    "input": {
      "title": "Test Product",
      "price": [
        "N/A",
        "5 EUR",
        "9 EUR"
      ]
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 5,
        "currency": "EUR"
      }
    },
    "category": "a5.8.array",
    "note": "first usable element, not the last"
  },
  {
    "input": {
      "produkt_navn": "Træsko",
      "pris_inkl_moms": "199,95 kr",
      "varenummer": "",
      "ean": "5701234567890",
      "maerke": "Sanita"
    },
    "mapping": {
      "title": "produkt_navn",
      "price": "pris_inkl_moms",
      "sku": [
        "varenummer",
        "ean"
      ],
      "brand": "maerke"
    },
    "expected": {
      "title": "Træsko",
      "price": {
        "type": "exact",
        "amount": 199.95,
        "currency": "SEK"
      },
      "sku": "5701234567890",
      "brand": "Sanita",
      "warnings": [
        "currency_ambiguous"
      ],
      "confidence": 0.9
    },
    "category": "a6.mapping",
    "note": "Danish feed: source key lists tried in order"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "5 EUR",
      "hs_code": "84713000"
    },
    "mapping": {
      "sku": "hs_code"
    },
    "expected": {
      "sku": "84713000",
      "warnings": [],
      "confidence": 1
    },
    "category": "a6.mapping",
    "note": "mapping outranks the A5.7 denylist"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "5 EUR",
      "hs_code": "84713000"
    },
    "expected": {
      "sku": null
    },
    "category": "a6.mapping",
    "note": "without the mapping the denylist holds"
  },
  {
    "input": {
      "title": "A",
      "name": "B",
      "price": "1 EUR"
    },
    "mapping": {
      "title": "name"
    },
    "expected": {
      "title": "B"
    },
    "category": "a6.mapping",
    "note": "mapping outranks the alias list"
  },
  {
    "input": {
      "title": "Test Product",
      "item_price": "7.50",
      "currency": "EUR"
    },
    "mapping": {
      "price": "item_price"
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 7.5,
        "currency": "EUR"
      },
      "warnings": [],
      "confidence": 1
    },
    "category": "a6.mapping",
    "note": "mapped field is never alias_inferred and uncapped"
  },
  {
    "input": {
      "title": "Test Product",
      "item_price": "7.50",
      "currency": "EUR"
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 7.5,
        "currency": "EUR"
      },
      "warnings": [
        "alias_inferred"
      ],
      "confidence": 0.7
    },
    "category": "a6.mapping",
    "note": "unmapped inference still caps"
  },
  {
    "input": {
      "title": "Test Product",
      "offers": {
        "price": "12.50",
        "priceCurrency": "CHF"
      },
      "variants": [
        {
          "sku": "V-1"
        }
      ]
    },
    "mapping": {
      "price": "offers.price",
      "currency": "offers.priceCurrency",
      "sku": "variants.0.sku"
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 12.5,
        "currency": "CHF"
      },
      "sku": "V-1",
      "warnings": [],
      "confidence": 1
    },
    "category": "a6.mapping",
    "note": "dotted paths into nested payloads"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "1 EUR",
      "items": [
        {
          "ref": "R-1"
        },
        {
          "ref": "R-2"
        }
      ]
    },
    "mapping": {
      "sku": "items[1].ref"
    },
    "expected": {
      "sku": "R-2"
    },
    "category": "a6.mapping",
    "note": "bracket index path"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "9 EUR"
    },
    "mapping": {
      "price": "gone"
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 9,
        "currency": "EUR"
      },
      "warnings": [
        "mapping_unresolved:price"
      ],
      "confidence": 1
    },
    "category": "a6.mapping",
    "note": "stale mapping falls through with a warning, no cap"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "9 EUR",
      "sku": "S",
      "alt": ""
    },
    "mapping": {
      "sku": "alt"
    },
    "expected": {
      "sku": "S",
      "warnings": [
        "mapping_unresolved:sku"
      ]
    },
    "category": "a6.mapping",
    "note": "empty mapped value falls through"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "9 EUR",
      "name2": "x"
    },
    "mapping": {
      "color": "name2",
      "sku": "name2"
    },
    "expected": {
      "warnings": [
        "mapping_unknown_field:color"
      ]
    },
    "category": "a6.mapping",
    "note": "unknown output field is ignored with a warning"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "9 EUR"
    },
    "mapping": {
      "sku": "__proto__.x",
      "brand": "a.b.c.d.e.f.g.h.i.j"
    },
    "expected": {
      "warnings": [
        "mapping_unresolved:sku",
        "mapping_unresolved:brand"
      ]
    },
    "category": "a6.mapping",
    "note": "prototype and depth guards resolve to nothing"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "9 EUR",
      "SKU_CODE": "C-1"
    },
    "mapping": {
      "sku": "sku_code"
    },
    "expected": {
      "sku": "C-1",
      "warnings": []
    },
    "category": "a6.mapping",
    "note": "mapped keys match case-insensitively"
  },
  {
    "input": {
      "title": "Test Product",
      "prix_cents": 34900,
      "currency": "EUR"
    },
    "mapping": {
      "price": "prix_cents"
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 349,
        "currency": "EUR"
      }
    },
    "category": "a6.mapping",
    "note": "minor-unit source key is detected"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "1 EUR",
      "stock_label": "Sold out",
      "pics": [
        "https://s.test/p.jpg"
      ],
      "blurb": "<i>Nice</i>"
    },
    "mapping": {
      "availability": "stock_label",
      "images": "pics",
      "description": "blurb"
    },
    "expected": {
      "availability": "out_of_stock",
      "images": [
        "https://s.test/p.jpg"
      ],
      "description": "Nice"
    },
    "category": "a6.mapping",
    "note": "mapped availability and images and description"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "10",
      "currency": "USD",
      "devise": "CHF"
    },
    "mapping": {
      "currency": "devise"
    },
    "expected": {
      "price": {
        "type": "exact",
        "amount": 10,
        "currency": "CHF"
      }
    },
    "category": "a6.mapping",
    "note": "mapped currency outranks the payload currency field"
  },
  {
    "input": {
      "title": "Test Product",
      "price": "1 EUR"
    },
    "mapping": {
      "title": 42
    },
    "expected": {
      "warnings": [
        "mapping_unresolved:title"
      ]
    },
    "category": "a6.mapping",
    "note": "a non-string mapping value is unresolved"
  }
]
