{"abstract":"A -0.25 bet on a draw is settled as a full loss or a full push.","category":"Betting odds conversion","checks":9,"contract":"Asian handicap bet on the home side. line is a multiple of 0.25 (else \"invalid line\"). Whole and half lines are a single bet; quarter lines split the stake equally between line - 0.25 and line + 0.25. Each part: margin = home_goals - away_goals + part_line; positive wins stake_part * price, zero refunds stake_part, negative loses. Return [total return in cents rounded down, label] where the label is win, half-win, push, half-lose or lose from the summed part outcomes.","contract_signature":"line, home_goals, away_goals, stake_cents, price","evaluation_group":"w2-odds-conversion-asian-handicap-settlement","failed_approach":"Splitting into the line itself and line + 0.25 prices half the stake on an off-grid line.","family":"w2-odds-conversion-asian-handicap-settlement-quarter-split-offsets","id":"FA-84506","implementations":{"attempt":{"sha256":"28e89480a869a587a668542f0758aae57059b12052c40afb914935ed61b46bab","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nfrom fractions import Fraction\nimport math\nN = 1\nobservations = []\ndef solve(line, home_goals, away_goals, stake_cents, price):\n    L = Fraction(line)\n    if (L * 4).denominator != 1:\n        return 'invalid line'\n    if (L * 2).denominator == 1:\n        parts = [L]\n    else:\n        parts = [L, L + Fraction(1, 4)]\n    d = Fraction(price)\n    share = Fraction(stake_cents, len(parts))\n    ret = Fraction(0)\n    res = []\n    for p in parts:\n        m = home_goals - away_goals + p\n        if m > 0:\n            ret += share * d\n            res.append(1)\n        elif m == 0:\n            ret += share\n            res.append(0)\n        else:\n            res.append(-1)\n    score = sum(res) * 2 // len(parts)\n    label = {2: 'win', 1: 'half-win', 0: 'push', -1: 'half-lose', -2: 'lose'}[score]\n    return [math.floor(ret), label]\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 half line win', ('-0.5', 1, 0, 1000, '1.90'), [1900, 'win']),\n  ('boundary whole line push', ('-1', 2, 1, 1000, '1.90'), [1000, 'push']),\n  ('boundary quarter half-lose', ('-0.25', 1, 1, 1000, '1.90'), [500, 'half-lose']),\n  ('boundary quarter half-win', ('-0.75', 1, 0, 1000, '2.00'), [1500, 'half-win']),\n  ('control lose', ('+0.5', 0, 2, 1000, '1.90'), [0, 'lose']),\n  ('boundary off-grid line', ('-0.3', 1, 0, 1000, '1.90'), 'invalid line'),\n  ('regression: quarter split offsets', ('-1.75', 4, 2, 500, '2.00'), [750, 'half-win']),\n  ('variant scenario 1', ('-0.75', 3, 1, 250, '2.00'), [500, 'win']),\n  ('variant scenario 2', ('+0.75', 4, 1, 250, '2.05'), [512, 'win'])],\n [('control half line win', ('-0.5', 1, 0, 1000, '1.90'), [1900, 'win']),\n  ('boundary whole line push', ('-1', 2, 1, 1000, '1.90'), [1000, 'push']),\n  ('boundary quarter half-lose', ('-0.25', 1, 1, 1000, '1.90'), [500, 'half-lose']),\n  ('boundary quarter half-win', ('-0.75', 1, 0, 1000, '2.00'), [1500, 'half-win']),\n  ('control lose', ('+0.5', 0, 2, 1000, '1.90'), [0, 'lose']),\n  ('boundary off-grid line', ('-0.3', 1, 0, 1000, '1.90'), 'invalid line'),\n  ('regression: quarter split offsets', ('-0.25', 2, 2, 999, '2.00'), [499, 'half-lose']),\n  ('regression: quarter split offsets', ('+1.25', 3, 4, 500, '2.05'), [762, 'half-win']),\n  ('variant scenario 1', ('0', 3, 3, 999, '2.05'), [999, 'push']),\n  ('variant scenario 2', ('-0.5', 3, 1, 500, '2.00'), [1000, 'win'])],\n [('control half line win', ('-0.5', 1, 0, 1000, '1.90'), [1900, 'win']),\n  ('boundary whole line push', ('-1', 2, 1, 1000, '1.90'), [1000, 'push']),\n  ('boundary quarter half-lose', ('-0.25', 1, 1, 1000, '1.90'), [500, 'half-lose']),\n  ('boundary quarter half-win', ('-0.75', 1, 0, 1000, '2.00'), [1500, 'half-win']),\n  ('control lose', ('+0.5', 0, 2, 1000, '1.90'), [0, 'lose']),\n  ('boundary off-grid line', ('-0.3', 1, 0, 1000, '1.90'), 'invalid line'),\n  ('regression: quarter split offsets', ('+1.25', 2, 3, 500, '2.00'), [750, 'half-win']),\n  ('variant scenario 1', ('-1.5', 2, 2, 500, '1.85'), [0, 'lose']),\n  ('variant scenario 2', ('+2', 4, 1, 999, '2.05'), [2047, 'win'])],\n [('control half line win', ('-0.5', 1, 0, 1000, '1.90'), [1900, 'win']),\n  ('boundary whole line push', ('-1', 2, 1, 1000, '1.90'), [1000, 'push']),\n  ('boundary quarter half-lose', ('-0.25', 1, 1, 1000, '1.90'), [500, 'half-lose']),\n  ('boundary quarter half-win', ('-0.75', 1, 0, 1000, '2.00'), [1500, 'half-win']),\n  ('control lose', ('+0.5', 0, 2, 1000, '1.90'), [0, 'lose']),\n  ('boundary off-grid line', ('-0.3', 1, 0, 1000, '1.90'), 'invalid line'),\n  ('regression: quarter split offsets', ('-0.75', 4, 3, 500, '2.00'), [750, 'half-win']),\n  ('variant scenario 1', ('+0.25', 3, 0, 999, '2.05'), [2047, 'win']),\n  ('variant scenario 2', ('-1.5', 3, 3, 500, '2.00'), [0, 'lose'])],\n [('control half line win', ('-0.5', 1, 0, 1000, '1.90'), [1900, 'win']),\n  ('boundary whole line push', ('-1', 2, 1, 1000, '1.90'), [1000, 'push']),\n  ('boundary quarter half-lose', ('-0.25', 1, 1, 1000, '1.90'), [500, 'half-lose']),\n  ('boundary quarter half-win', ('-0.75', 1, 0, 1000, '2.00'), [1500, 'half-win']),\n  ('control lose', ('+0.5', 0, 2, 1000, '1.90'), [0, 'lose']),\n  ('boundary off-grid line', ('-0.3', 1, 0, 1000, '1.90'), 'invalid line'),\n  ('regression: quarter split offsets', ('-0.75', 1, 0, 1000, '2.00'), [1500, 'half-win']),\n  ('variant scenario 1', ('+0.5', 1, 3, 999, '2.00'), [0, 'lose']),\n  ('variant scenario 2', ('+2', 1, 1, 250, '2.05'), [512, 'win'])]]\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":"926f6280174ce9f2f3b4709433c85a32072e95f3214ce424777a855b3a616d91","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nfrom fractions import Fraction\nimport math\nN = 1\nobservations = []\ndef solve(line, home_goals, away_goals, stake_cents, price):\n    L = Fraction(line)\n    if (L * 4).denominator != 1:\n        return 'invalid line'\n    if (L * 2).denominator == 1:\n        parts = [L]\n    else:\n        parts = [L - Fraction(1, 2), L + Fraction(1, 2)]\n    d = Fraction(price)\n    share = Fraction(stake_cents, len(parts))\n    ret = Fraction(0)\n    res = []\n    for p in parts:\n        m = home_goals - away_goals + p\n        if m > 0:\n            ret += share * d\n            res.append(1)\n        elif m == 0:\n            ret += share\n            res.append(0)\n        else:\n            res.append(-1)\n    score = sum(res) * 2 // len(parts)\n    label = {2: 'win', 1: 'half-win', 0: 'push', -1: 'half-lose', -2: 'lose'}[score]\n    return [math.floor(ret), label]\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 half line win', ('-0.5', 1, 0, 1000, '1.90'), [1900, 'win']),\n  ('boundary whole line push', ('-1', 2, 1, 1000, '1.90'), [1000, 'push']),\n  ('boundary quarter half-lose', ('-0.25', 1, 1, 1000, '1.90'), [500, 'half-lose']),\n  ('boundary quarter half-win', ('-0.75', 1, 0, 1000, '2.00'), [1500, 'half-win']),\n  ('control lose', ('+0.5', 0, 2, 1000, '1.90'), [0, 'lose']),\n  ('boundary off-grid line', ('-0.3', 1, 0, 1000, '1.90'), 'invalid line'),\n  ('regression: quarter split offsets', ('-1.75', 4, 2, 500, '2.00'), [750, 'half-win']),\n  ('variant scenario 1', ('-0.75', 3, 1, 250, '2.00'), [500, 'win']),\n  ('variant scenario 2', ('+0.75', 4, 1, 250, '2.05'), [512, 'win'])],\n [('control half line win', ('-0.5', 1, 0, 1000, '1.90'), [1900, 'win']),\n  ('boundary whole line push', ('-1', 2, 1, 1000, '1.90'), [1000, 'push']),\n  ('boundary quarter half-lose', ('-0.25', 1, 1, 1000, '1.90'), [500, 'half-lose']),\n  ('boundary quarter half-win', ('-0.75', 1, 0, 1000, '2.00'), [1500, 'half-win']),\n  ('control lose', ('+0.5', 0, 2, 1000, '1.90'), [0, 'lose']),\n  ('boundary off-grid line', ('-0.3', 1, 0, 1000, '1.90'), 'invalid line'),\n  ('regression: quarter split offsets', ('-0.25', 2, 2, 999, '2.00'), [499, 'half-lose']),\n  ('regression: quarter split offsets', ('+1.25', 3, 4, 500, '2.05'), [762, 'half-win']),\n  ('variant scenario 1', ('0', 3, 3, 999, '2.05'), [999, 'push']),\n  ('variant scenario 2', ('-0.5', 3, 1, 500, '2.00'), [1000, 'win'])],\n [('control half line win', ('-0.5', 1, 0, 1000, '1.90'), [1900, 'win']),\n  ('boundary whole line push', ('-1', 2, 1, 1000, '1.90'), [1000, 'push']),\n  ('boundary quarter half-lose', ('-0.25', 1, 1, 1000, '1.90'), [500, 'half-lose']),\n  ('boundary quarter half-win', ('-0.75', 1, 0, 1000, '2.00'), [1500, 'half-win']),\n  ('control lose', ('+0.5', 0, 2, 1000, '1.90'), [0, 'lose']),\n  ('boundary off-grid line', ('-0.3', 1, 0, 1000, '1.90'), 'invalid line'),\n  ('regression: quarter split offsets', ('+1.25', 2, 3, 500, '2.00'), [750, 'half-win']),\n  ('variant scenario 1', ('-1.5', 2, 2, 500, '1.85'), [0, 'lose']),\n  ('variant scenario 2', ('+2', 4, 1, 999, '2.05'), [2047, 'win'])],\n [('control half line win', ('-0.5', 1, 0, 1000, '1.90'), [1900, 'win']),\n  ('boundary whole line push', ('-1', 2, 1, 1000, '1.90'), [1000, 'push']),\n  ('boundary quarter half-lose', ('-0.25', 1, 1, 1000, '1.90'), [500, 'half-lose']),\n  ('boundary quarter half-win', ('-0.75', 1, 0, 1000, '2.00'), [1500, 'half-win']),\n  ('control lose', ('+0.5', 0, 2, 1000, '1.90'), [0, 'lose']),\n  ('boundary off-grid line', ('-0.3', 1, 0, 1000, '1.90'), 'invalid line'),\n  ('regression: quarter split offsets', ('-0.75', 4, 3, 500, '2.00'), [750, 'half-win']),\n  ('variant scenario 1', ('+0.25', 3, 0, 999, '2.05'), [2047, 'win']),\n  ('variant scenario 2', ('-1.5', 3, 3, 500, '2.00'), [0, 'lose'])],\n [('control half line win', ('-0.5', 1, 0, 1000, '1.90'), [1900, 'win']),\n  ('boundary whole line push', ('-1', 2, 1, 1000, '1.90'), [1000, 'push']),\n  ('boundary quarter half-lose', ('-0.25', 1, 1, 1000, '1.90'), [500, 'half-lose']),\n  ('boundary quarter half-win', ('-0.75', 1, 0, 1000, '2.00'), [1500, 'half-win']),\n  ('control lose', ('+0.5', 0, 2, 1000, '1.90'), [0, 'lose']),\n  ('boundary off-grid line', ('-0.3', 1, 0, 1000, '1.90'), 'invalid line'),\n  ('regression: quarter split offsets', ('-0.75', 1, 0, 1000, '2.00'), [1500, 'half-win']),\n  ('variant scenario 1', ('+0.5', 1, 3, 999, '2.00'), [0, 'lose']),\n  ('variant scenario 2', ('+2', 1, 1, 250, '2.05'), [512, 'win'])]]\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-asian-handicap-settlement-quarter-split-offsets","generated_at":"2026-09-29T14:50:31.577015+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"Asian handicap settlement with split quarter lines is a common source of payout disputes.","root_cause":"The quarter line is split into line - 0.5 and line + 0.5.","sha256":"72cb20491e8cafb78f6177346c34db3f1f4b9ec83cdfe8c9ef4eb060a9491c94","title":"Quarter line split into the wrong neighbouring lines · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verified":true,"visibility":"public","verification":{"attempt":{"elapsed_ms":44.281,"exit_code":1,"observations":[{"actual":[1900,"win"],"check":"control half line win","expected":[1900,"win"],"passed":true},{"actual":[1000,"push"],"check":"boundary whole line push","expected":[1000,"push"],"passed":true},{"actual":[500,"half-lose"],"check":"boundary quarter half-lose","expected":[500,"half-lose"],"passed":true},{"actual":[2000,"win"],"check":"boundary quarter half-win","expected":[1500,"half-win"],"passed":false},{"actual":[0,"lose"],"check":"control lose","expected":[0,"lose"],"passed":true},{"actual":"invalid line","check":"boundary off-grid line","expected":"invalid line","passed":true},{"actual":[1000,"win"],"check":"regression: quarter split offsets","expected":[750,"half-win"],"passed":false},{"actual":[500,"win"],"check":"variant scenario 1","expected":[500,"win"],"passed":true},{"actual":[512,"win"],"check":"variant scenario 2","expected":[512,"win"],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"control half line win\", \"actual\": [1900, \"win\"], \"expected\": [1900, \"win\"], \"passed\": true}, {\"check\": \"boundary whole line push\", \"actual\": [1000, \"push\"], \"expected\": [1000, \"push\"], \"passed\": true}, {\"check\": \"boundary quarter half-lose\", \"actual\": [500, \"half-lose\"], \"expected\": [500, \"half-lose\"], \"passed\": true}, {\"check\": \"boundary quarter half-win\", \"actual\": [2000, \"win\"], \"expected\": [1500, \"half-win\"], \"passed\": false}, {\"check\": \"control lose\", \"actual\": [0, \"lose\"], \"expected\": [0, \"lose\"], \"passed\": true}, {\"check\": \"boundary off-grid line\", \"actual\": \"invalid line\", \"expected\": \"invalid line\", \"passed\": true}, {\"check\": \"regression: quarter split offsets\", \"actual\": [1000, \"win\"], \"expected\": [750, \"half-win\"], \"passed\": false}, {\"check\": \"variant scenario 1\", \"actual\": [500, \"win\"], \"expected\": [500, \"win\"], \"passed\": true}, {\"check\": \"variant scenario 2\", \"actual\": [512, \"win\"], \"expected\": [512, \"win\"], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":40.912,"exit_code":1,"observations":[{"actual":[1900,"win"],"check":"control half line win","expected":[1900,"win"],"passed":true},{"actual":[1000,"push"],"check":"boundary whole line push","expected":[1000,"push"],"passed":true},{"actual":[950,"push"],"check":"boundary quarter half-lose","expected":[500,"half-lose"],"passed":false},{"actual":[1000,"push"],"check":"boundary quarter half-win","expected":[1500,"half-win"],"passed":false},{"actual":[0,"lose"],"check":"control lose","expected":[0,"lose"],"passed":true},{"actual":"invalid line","check":"boundary off-grid line","expected":"invalid line","passed":true},{"actual":[500,"push"],"check":"regression: quarter split offsets","expected":[750,"half-win"],"passed":false},{"actual":[500,"win"],"check":"variant scenario 1","expected":[500,"win"],"passed":true},{"actual":[512,"win"],"check":"variant scenario 2","expected":[512,"win"],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"control half line win\", \"actual\": [1900, \"win\"], \"expected\": [1900, \"win\"], \"passed\": true}, {\"check\": \"boundary whole line push\", \"actual\": [1000, \"push\"], \"expected\": [1000, \"push\"], \"passed\": true}, {\"check\": \"boundary quarter half-lose\", \"actual\": [950, \"push\"], \"expected\": [500, \"half-lose\"], \"passed\": false}, {\"check\": \"boundary quarter half-win\", \"actual\": [1000, \"push\"], \"expected\": [1500, \"half-win\"], \"passed\": false}, {\"check\": \"control lose\", \"actual\": [0, \"lose\"], \"expected\": [0, \"lose\"], \"passed\": true}, {\"check\": \"boundary off-grid line\", \"actual\": \"invalid line\", \"expected\": \"invalid line\", \"passed\": true}, {\"check\": \"regression: quarter split offsets\", \"actual\": [500, \"push\"], \"expected\": [750, \"half-win\"], \"passed\": false}, {\"check\": \"variant scenario 1\", \"actual\": [500, \"win\"], \"expected\": [500, \"win\"], \"passed\": true}, {\"check\": \"variant scenario 2\", \"actual\": [512, \"win\"], \"expected\": [512, \"win\"], \"passed\": true}], \"passed\": false}\n"}},"member_only":{"stages":["fixed"],"fields":["implementations.fixed","verification.fixed","harness","repair"],"note":"The verified repair, its recorded checks, the repair description, and the scoring harness are available to members."}}