{"abstract":"\"2,50\" is rejected or becomes a +250 American line.","category":"Betting odds conversion","checks":9,"contract":"Normalise user-typed odds to a decimal price string with two decimals (half up). Detection order: text containing \"/\" is fractional a/b; text starting with \"+\" or \"-\" is American (magnitude >= 100); an unsigned integer >= 100 is a positive American line; anything else is a decimal price, where a comma is the decimal separator (\"2,50\"). Unparseable input, zero denominators, magnitudes below 100 and results not above 1 return \"invalid\".","evaluation_group":"w2-odds-conversion-odds-format-autodetect","failed_approach":"Stripping the comma as a thousands separator turns \"2,50\" into 250.","family":"w2-odds-conversion-odds-format-autodetect-decimal-comma","id":"FA-84681","implementations":{"attempt":{"sha256":"629fec38f293c63d14dc3ae1f4297a1689dd167c6073687df1a2d66cbf7153ed","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nfrom fractions import Fraction\nimport math\nN = 1\nobservations = []\ndef solve(text):\n    t = text.strip()\n    try:\n        if '/' in t:\n            a, b = t.split('/')\n            dec = 1 + Fraction(int(a), int(b))\n        elif t[:1] in ('+', '-'):\n            n = int(t[1:])\n            if n < 100:\n                return 'invalid'\n            dec = 1 + (Fraction(n, 100) if t[0] == '+' else Fraction(100, n))\n        elif t.isdigit() and int(t) >= 100:\n            dec = 1 + Fraction(int(t), 100)\n        else:\n            dec = Fraction(t.replace(',', ''))\n    except (ValueError, ZeroDivisionError):\n        return 'invalid'\n    if dec <= 1:\n        return 'invalid'\n    c = math.floor(dec * 100 + Fraction(1, 2))\n    return '%d.%02d' % (c // 100, c % 100)\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ndef run(args):\n    try:\n        return solve(*args)\n    except Exception as exc:\n        return 'raised ' + type(exc).__name__\ncases = [[('control fractional', ('5/2',), '3.50'),\n  ('control negative american', ('-110',), '1.91'),\n  ('boundary unsigned hundred', ('100',), '2.00'),\n  ('boundary small integer is decimal', ('3',), '3.00'),\n  ('boundary decimal comma', ('2,50',), '2.50'),\n  ('control empty input', ('',), 'invalid'),\n  ('regression: decimal comma', ('7,89',), '7.89'),\n  ('variant scenario 1', ('3.40',), '3.40'),\n  ('variant scenario 2', ('-372',), '1.27')],\n [('control fractional', ('5/2',), '3.50'),\n  ('control negative american', ('-110',), '1.91'),\n  ('boundary unsigned hundred', ('100',), '2.00'),\n  ('boundary small integer is decimal', ('3',), '3.00'),\n  ('boundary decimal comma', ('2,50',), '2.50'),\n  ('control empty input', ('',), 'invalid'),\n  ('regression: decimal comma', ('6,60',), '6.60'),\n  ('variant scenario 1', ('3.47',), '3.47'),\n  ('variant scenario 2', ('+536',), '6.36')],\n [('control fractional', ('5/2',), '3.50'),\n  ('control negative american', ('-110',), '1.91'),\n  ('boundary unsigned hundred', ('100',), '2.00'),\n  ('boundary small integer is decimal', ('3',), '3.00'),\n  ('boundary decimal comma', ('2,50',), '2.50'),\n  ('control empty input', ('',), 'invalid'),\n  ('regression: decimal comma', ('6,37',), '6.37'),\n  ('variant scenario 1', ('+584',), '6.84'),\n  ('variant scenario 2', ('1,75',), '1.75')],\n [('control fractional', ('5/2',), '3.50'),\n  ('control negative american', ('-110',), '1.91'),\n  ('boundary unsigned hundred', ('100',), '2.00'),\n  ('boundary small integer is decimal', ('3',), '3.00'),\n  ('boundary decimal comma', ('2,50',), '2.50'),\n  ('control empty input', ('',), 'invalid'),\n  ('regression: decimal comma', ('3,22',), '3.22'),\n  ('variant scenario 1', ('10/2',), '6.00'),\n  ('variant scenario 2', ('2/8',), '1.25')],\n [('control fractional', ('5/2',), '3.50'),\n  ('control negative american', ('-110',), '1.91'),\n  ('boundary unsigned hundred', ('100',), '2.00'),\n  ('boundary small integer is decimal', ('3',), '3.00'),\n  ('boundary decimal comma', ('2,50',), '2.50'),\n  ('control empty input', ('',), 'invalid'),\n  ('regression: decimal comma', ('1,75',), '1.75'),\n  ('variant scenario 1', ('6.74',), '6.74'),\n  ('variant scenario 2', ('+195',), '2.95')]]\nfor label, args, expected in cases[N - 1]:\n    check(label, run(args), expected)\nprint(json.dumps({\"observations\": observations, \"passed\": all(x[\"passed\"] for x in observations)}, ensure_ascii=False))\nraise SystemExit(0 if all(x[\"passed\"] for x in observations) else 1)\n"},"broken":{"sha256":"f7abd6b447a2bf1209a951d4185bbf917f0bdd7202766fbd74ed82672fd29c76","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nfrom fractions import Fraction\nimport math\nN = 1\nobservations = []\ndef solve(text):\n    t = text.strip()\n    try:\n        if '/' in t:\n            a, b = t.split('/')\n            dec = 1 + Fraction(int(a), int(b))\n        elif t[:1] in ('+', '-'):\n            n = int(t[1:])\n            if n < 100:\n                return 'invalid'\n            dec = 1 + (Fraction(n, 100) if t[0] == '+' else Fraction(100, n))\n        elif t.isdigit() and int(t) >= 100:\n            dec = 1 + Fraction(int(t), 100)\n        else:\n            dec = Fraction(t)\n    except (ValueError, ZeroDivisionError):\n        return 'invalid'\n    if dec <= 1:\n        return 'invalid'\n    c = math.floor(dec * 100 + Fraction(1, 2))\n    return '%d.%02d' % (c // 100, c % 100)\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ndef run(args):\n    try:\n        return solve(*args)\n    except Exception as exc:\n        return 'raised ' + type(exc).__name__\ncases = [[('control fractional', ('5/2',), '3.50'),\n  ('control negative american', ('-110',), '1.91'),\n  ('boundary unsigned hundred', ('100',), '2.00'),\n  ('boundary small integer is decimal', ('3',), '3.00'),\n  ('boundary decimal comma', ('2,50',), '2.50'),\n  ('control empty input', ('',), 'invalid'),\n  ('regression: decimal comma', ('7,89',), '7.89'),\n  ('variant scenario 1', ('3.40',), '3.40'),\n  ('variant scenario 2', ('-372',), '1.27')],\n [('control fractional', ('5/2',), '3.50'),\n  ('control negative american', ('-110',), '1.91'),\n  ('boundary unsigned hundred', ('100',), '2.00'),\n  ('boundary small integer is decimal', ('3',), '3.00'),\n  ('boundary decimal comma', ('2,50',), '2.50'),\n  ('control empty input', ('',), 'invalid'),\n  ('regression: decimal comma', ('6,60',), '6.60'),\n  ('variant scenario 1', ('3.47',), '3.47'),\n  ('variant scenario 2', ('+536',), '6.36')],\n [('control fractional', ('5/2',), '3.50'),\n  ('control negative american', ('-110',), '1.91'),\n  ('boundary unsigned hundred', ('100',), '2.00'),\n  ('boundary small integer is decimal', ('3',), '3.00'),\n  ('boundary decimal comma', ('2,50',), '2.50'),\n  ('control empty input', ('',), 'invalid'),\n  ('regression: decimal comma', ('6,37',), '6.37'),\n  ('variant scenario 1', ('+584',), '6.84'),\n  ('variant scenario 2', ('1,75',), '1.75')],\n [('control fractional', ('5/2',), '3.50'),\n  ('control negative american', ('-110',), '1.91'),\n  ('boundary unsigned hundred', ('100',), '2.00'),\n  ('boundary small integer is decimal', ('3',), '3.00'),\n  ('boundary decimal comma', ('2,50',), '2.50'),\n  ('control empty input', ('',), 'invalid'),\n  ('regression: decimal comma', ('3,22',), '3.22'),\n  ('variant scenario 1', ('10/2',), '6.00'),\n  ('variant scenario 2', ('2/8',), '1.25')],\n [('control fractional', ('5/2',), '3.50'),\n  ('control negative american', ('-110',), '1.91'),\n  ('boundary unsigned hundred', ('100',), '2.00'),\n  ('boundary small integer is decimal', ('3',), '3.00'),\n  ('boundary decimal comma', ('2,50',), '2.50'),\n  ('control empty input', ('',), 'invalid'),\n  ('regression: decimal comma', ('1,75',), '1.75'),\n  ('variant scenario 1', ('6.74',), '6.74'),\n  ('variant scenario 2', ('+195',), '2.95')]]\nfor label, args, expected in cases[N - 1]:\n    check(label, run(args), expected)\nprint(json.dumps({\"observations\": observations, \"passed\": all(x[\"passed\"] for x in observations)}, ensure_ascii=False))\nraise SystemExit(0 if all(x[\"passed\"] for x in observations) else 1)\n"},"fixed":{"sha256":"6d522091134104277626cc0570538bca5c4b1f07b57a48fc663a0c815d64c2b6","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nfrom fractions import Fraction\nimport math\nN = 1\nobservations = []\ndef solve(text):\n    t = text.strip()\n    try:\n        if '/' in t:\n            a, b = t.split('/')\n            dec = 1 + Fraction(int(a), int(b))\n        elif t[:1] in ('+', '-'):\n            n = int(t[1:])\n            if n < 100:\n                return 'invalid'\n            dec = 1 + (Fraction(n, 100) if t[0] == '+' else Fraction(100, n))\n        elif t.isdigit() and int(t) >= 100:\n            dec = 1 + Fraction(int(t), 100)\n        else:\n            dec = Fraction(t.replace(',', '.'))\n    except (ValueError, ZeroDivisionError):\n        return 'invalid'\n    if dec <= 1:\n        return 'invalid'\n    c = math.floor(dec * 100 + Fraction(1, 2))\n    return '%d.%02d' % (c // 100, c % 100)\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ndef run(args):\n    try:\n        return solve(*args)\n    except Exception as exc:\n        return 'raised ' + type(exc).__name__\ncases = [[('control fractional', ('5/2',), '3.50'),\n  ('control negative american', ('-110',), '1.91'),\n  ('boundary unsigned hundred', ('100',), '2.00'),\n  ('boundary small integer is decimal', ('3',), '3.00'),\n  ('boundary decimal comma', ('2,50',), '2.50'),\n  ('control empty input', ('',), 'invalid'),\n  ('regression: decimal comma', ('7,89',), '7.89'),\n  ('variant scenario 1', ('3.40',), '3.40'),\n  ('variant scenario 2', ('-372',), '1.27')],\n [('control fractional', ('5/2',), '3.50'),\n  ('control negative american', ('-110',), '1.91'),\n  ('boundary unsigned hundred', ('100',), '2.00'),\n  ('boundary small integer is decimal', ('3',), '3.00'),\n  ('boundary decimal comma', ('2,50',), '2.50'),\n  ('control empty input', ('',), 'invalid'),\n  ('regression: decimal comma', ('6,60',), '6.60'),\n  ('variant scenario 1', ('3.47',), '3.47'),\n  ('variant scenario 2', ('+536',), '6.36')],\n [('control fractional', ('5/2',), '3.50'),\n  ('control negative american', ('-110',), '1.91'),\n  ('boundary unsigned hundred', ('100',), '2.00'),\n  ('boundary small integer is decimal', ('3',), '3.00'),\n  ('boundary decimal comma', ('2,50',), '2.50'),\n  ('control empty input', ('',), 'invalid'),\n  ('regression: decimal comma', ('6,37',), '6.37'),\n  ('variant scenario 1', ('+584',), '6.84'),\n  ('variant scenario 2', ('1,75',), '1.75')],\n [('control fractional', ('5/2',), '3.50'),\n  ('control negative american', ('-110',), '1.91'),\n  ('boundary unsigned hundred', ('100',), '2.00'),\n  ('boundary small integer is decimal', ('3',), '3.00'),\n  ('boundary decimal comma', ('2,50',), '2.50'),\n  ('control empty input', ('',), 'invalid'),\n  ('regression: decimal comma', ('3,22',), '3.22'),\n  ('variant scenario 1', ('10/2',), '6.00'),\n  ('variant scenario 2', ('2/8',), '1.25')],\n [('control fractional', ('5/2',), '3.50'),\n  ('control negative american', ('-110',), '1.91'),\n  ('boundary unsigned hundred', ('100',), '2.00'),\n  ('boundary small integer is decimal', ('3',), '3.00'),\n  ('boundary decimal comma', ('2,50',), '2.50'),\n  ('control empty input', ('',), 'invalid'),\n  ('regression: decimal comma', ('1,75',), '1.75'),\n  ('variant scenario 1', ('6.74',), '6.74'),\n  ('variant scenario 2', ('+195',), '2.95')]]\nfor label, args, expected in cases[N - 1]:\n    check(label, run(args), expected)\nprint(json.dumps({\"observations\": observations, \"passed\": all(x[\"passed\"] for x in observations)}, ensure_ascii=False))\nraise SystemExit(0 if all(x[\"passed\"] for x in observations) else 1)\n"}},"limitations":"Stipulated, bounded toy contract stated in the contract field; not a claim of conformance with any operator, exchange or regulator rule set. This reproducer isolates one failure mechanism. Results cover the supplied fixtures. Variants within a family share a test contract and should remain grouped when constructing evaluation splits. Related mechanisms with a shared evaluation_group must also remain together; these controlled models are not independent production incidents.","method":"Deterministic executable model with adversarial boundary fixtures.","provenance":{"created_by":"Failure Map","dependencies":"Python standard library","family":"w2-odds-conversion-odds-format-autodetect-decimal-comma","generated_at":"2026-09-29T14:50:33.259717+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"Bet-slip inputs accept several odds formats and must not misclassify ambiguous text.","repair":"Replace a comma with a decimal point in the decimal branch.","root_cause":"The comma is not converted to a decimal point.","sha256":"d25e3903b89e3cad4eba8b11b7f75e8f44a32ac451fae519fc9ec6adafd22c2f","title":"Decimal comma rejected or read as a thousands separator · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":44.615,"exit_code":1,"observations":[{"actual":"3.50","check":"control fractional","expected":"3.50","passed":true},{"actual":"1.91","check":"control negative american","expected":"1.91","passed":true},{"actual":"2.00","check":"boundary unsigned hundred","expected":"2.00","passed":true},{"actual":"3.00","check":"boundary small integer is decimal","expected":"3.00","passed":true},{"actual":"250.00","check":"boundary decimal comma","expected":"2.50","passed":false},{"actual":"invalid","check":"control empty input","expected":"invalid","passed":true},{"actual":"789.00","check":"regression: decimal comma","expected":"7.89","passed":false},{"actual":"3.40","check":"variant scenario 1","expected":"3.40","passed":true},{"actual":"1.27","check":"variant scenario 2","expected":"1.27","passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"control fractional\", \"actual\": \"3.50\", \"expected\": \"3.50\", \"passed\": true}, {\"check\": \"control negative american\", \"actual\": \"1.91\", \"expected\": \"1.91\", \"passed\": true}, {\"check\": \"boundary unsigned hundred\", \"actual\": \"2.00\", \"expected\": \"2.00\", \"passed\": true}, {\"check\": \"boundary small integer is decimal\", \"actual\": \"3.00\", \"expected\": \"3.00\", \"passed\": true}, {\"check\": \"boundary decimal comma\", \"actual\": \"250.00\", \"expected\": \"2.50\", \"passed\": false}, {\"check\": \"control empty input\", \"actual\": \"invalid\", \"expected\": \"invalid\", \"passed\": true}, {\"check\": \"regression: decimal comma\", \"actual\": \"789.00\", \"expected\": \"7.89\", \"passed\": false}, {\"check\": \"variant scenario 1\", \"actual\": \"3.40\", \"expected\": \"3.40\", \"passed\": true}, {\"check\": \"variant scenario 2\", \"actual\": \"1.27\", \"expected\": \"1.27\", \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":45.393,"exit_code":1,"observations":[{"actual":"3.50","check":"control fractional","expected":"3.50","passed":true},{"actual":"1.91","check":"control negative american","expected":"1.91","passed":true},{"actual":"2.00","check":"boundary unsigned hundred","expected":"2.00","passed":true},{"actual":"3.00","check":"boundary small integer is decimal","expected":"3.00","passed":true},{"actual":"invalid","check":"boundary decimal comma","expected":"2.50","passed":false},{"actual":"invalid","check":"control empty input","expected":"invalid","passed":true},{"actual":"invalid","check":"regression: decimal comma","expected":"7.89","passed":false},{"actual":"3.40","check":"variant scenario 1","expected":"3.40","passed":true},{"actual":"1.27","check":"variant scenario 2","expected":"1.27","passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"control fractional\", \"actual\": \"3.50\", \"expected\": \"3.50\", \"passed\": true}, {\"check\": \"control negative american\", \"actual\": \"1.91\", \"expected\": \"1.91\", \"passed\": true}, {\"check\": \"boundary unsigned hundred\", \"actual\": \"2.00\", \"expected\": \"2.00\", \"passed\": true}, {\"check\": \"boundary small integer is decimal\", \"actual\": \"3.00\", \"expected\": \"3.00\", \"passed\": true}, {\"check\": \"boundary decimal comma\", \"actual\": \"invalid\", \"expected\": \"2.50\", \"passed\": false}, {\"check\": \"control empty input\", \"actual\": \"invalid\", \"expected\": \"invalid\", \"passed\": true}, {\"check\": \"regression: decimal comma\", \"actual\": \"invalid\", \"expected\": \"7.89\", \"passed\": false}, {\"check\": \"variant scenario 1\", \"actual\": \"3.40\", \"expected\": \"3.40\", \"passed\": true}, {\"check\": \"variant scenario 2\", \"actual\": \"1.27\", \"expected\": \"1.27\", \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":42.952,"exit_code":0,"observations":[{"actual":"3.50","check":"control fractional","expected":"3.50","passed":true},{"actual":"1.91","check":"control negative american","expected":"1.91","passed":true},{"actual":"2.00","check":"boundary unsigned hundred","expected":"2.00","passed":true},{"actual":"3.00","check":"boundary small integer is decimal","expected":"3.00","passed":true},{"actual":"2.50","check":"boundary decimal comma","expected":"2.50","passed":true},{"actual":"invalid","check":"control empty input","expected":"invalid","passed":true},{"actual":"7.89","check":"regression: decimal comma","expected":"7.89","passed":true},{"actual":"3.40","check":"variant scenario 1","expected":"3.40","passed":true},{"actual":"1.27","check":"variant scenario 2","expected":"1.27","passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"control fractional\", \"actual\": \"3.50\", \"expected\": \"3.50\", \"passed\": true}, {\"check\": \"control negative american\", \"actual\": \"1.91\", \"expected\": \"1.91\", \"passed\": true}, {\"check\": \"boundary unsigned hundred\", \"actual\": \"2.00\", \"expected\": \"2.00\", \"passed\": true}, {\"check\": \"boundary small integer is decimal\", \"actual\": \"3.00\", \"expected\": \"3.00\", \"passed\": true}, {\"check\": \"boundary decimal comma\", \"actual\": \"2.50\", \"expected\": \"2.50\", \"passed\": true}, {\"check\": \"control empty input\", \"actual\": \"invalid\", \"expected\": \"invalid\", \"passed\": true}, {\"check\": \"regression: decimal comma\", \"actual\": \"7.89\", \"expected\": \"7.89\", \"passed\": true}, {\"check\": \"variant scenario 1\", \"actual\": \"3.40\", \"expected\": \"3.40\", \"passed\": true}, {\"check\": \"variant scenario 2\", \"actual\": \"1.27\", \"expected\": \"1.27\", \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}