{"abstract":"A -0.3 line is settled, or a legitimate -0.25 line is rejected.","category":"Betting odds conversion","checks":10,"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":"Checking for multiples of 0.5 rejects every quarter line.","family":"w2-odds-conversion-asian-handicap-settlement-quarter-grid-guard","id":"FA-84526","implementations":{"attempt":{"sha256":"80376f303dac83491c991e6a9db48c5b4375831015547f78b46d601f7fd45080","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 * 2).denominator != 1:\n        return 'invalid line'\n    if (L * 2).denominator == 1:\n        parts = [L]\n    else:\n        parts = [L - Fraction(1, 4), 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 grid guard', ('-0.75', 1, 0, 999, '2.00'), [1498, 'half-win']),\n  ('regression: quarter grid guard', ('-0.3', 3, 0, 500, '2.00'), 'invalid line'),\n  ('variant scenario 1', ('+2', 3, 0, 1000, '2.00'), [2000, 'win']),\n  ('variant scenario 2', ('0', 4, 4, 500, '1.90'), [500, 'push'])],\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 grid guard', ('-1.75', 1, 2, 250, '2.05'), [0, 'lose']),\n  ('regression: quarter grid guard', ('-0.3', 2, 4, 999, '1.90'), 'invalid line'),\n  ('variant scenario 1', ('+2', 2, 4, 500, '2.00'), [500, 'push']),\n  ('variant scenario 2', ('+2', 2, 2, 500, '1.90'), [950, '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 grid guard', ('-0.25', 0, 4, 250, '2.00'), [0, 'lose']),\n  ('regression: quarter grid guard', ('-0.3', 0, 2, 500, '1.90'), 'invalid line'),\n  ('variant scenario 1', ('0', 4, 3, 999, '1.85'), [1848, 'win']),\n  ('variant scenario 2', ('-0.75', 1, 2, 500, '1.90'), [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 grid guard', ('+0.25', 3, 2, 1000, '1.85'), [1850, 'win']),\n  ('regression: quarter grid guard', ('-0.3', 2, 1, 500, '2.00'), 'invalid line'),\n  ('variant scenario 1', ('0', 3, 4, 999, '2.00'), [0, 'lose']),\n  ('variant scenario 2', ('-1.75', 3, 4, 999, '2.05'), [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 grid guard', ('-1.75', 1, 3, 1000, '1.85'), [0, 'lose']),\n  ('regression: quarter grid guard', ('-0.3', 0, 2, 500, '2.00'), 'invalid line'),\n  ('variant scenario 1', ('+2', 2, 4, 250, '2.00'), [250, 'push']),\n  ('variant scenario 2', ('-0.5', 1, 0, 1000, '1.90'), [1900, '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":"37ba98369d4813dc76736694549be08e95c2da7c02b03522eb20d64632f75b20","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 * 2).denominator == 1:\n        parts = [L]\n    else:\n        parts = [L - Fraction(1, 4), 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 grid guard', ('-0.75', 1, 0, 999, '2.00'), [1498, 'half-win']),\n  ('regression: quarter grid guard', ('-0.3', 3, 0, 500, '2.00'), 'invalid line'),\n  ('variant scenario 1', ('+2', 3, 0, 1000, '2.00'), [2000, 'win']),\n  ('variant scenario 2', ('0', 4, 4, 500, '1.90'), [500, 'push'])],\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 grid guard', ('-1.75', 1, 2, 250, '2.05'), [0, 'lose']),\n  ('regression: quarter grid guard', ('-0.3', 2, 4, 999, '1.90'), 'invalid line'),\n  ('variant scenario 1', ('+2', 2, 4, 500, '2.00'), [500, 'push']),\n  ('variant scenario 2', ('+2', 2, 2, 500, '1.90'), [950, '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 grid guard', ('-0.25', 0, 4, 250, '2.00'), [0, 'lose']),\n  ('regression: quarter grid guard', ('-0.3', 0, 2, 500, '1.90'), 'invalid line'),\n  ('variant scenario 1', ('0', 4, 3, 999, '1.85'), [1848, 'win']),\n  ('variant scenario 2', ('-0.75', 1, 2, 500, '1.90'), [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 grid guard', ('+0.25', 3, 2, 1000, '1.85'), [1850, 'win']),\n  ('regression: quarter grid guard', ('-0.3', 2, 1, 500, '2.00'), 'invalid line'),\n  ('variant scenario 1', ('0', 3, 4, 999, '2.00'), [0, 'lose']),\n  ('variant scenario 2', ('-1.75', 3, 4, 999, '2.05'), [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 grid guard', ('-1.75', 1, 3, 1000, '1.85'), [0, 'lose']),\n  ('regression: quarter grid guard', ('-0.3', 0, 2, 500, '2.00'), 'invalid line'),\n  ('variant scenario 1', ('+2', 2, 4, 250, '2.00'), [250, 'push']),\n  ('variant scenario 2', ('-0.5', 1, 0, 1000, '1.90'), [1900, '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-grid-guard","generated_at":"2026-09-29T14:50:31.763307+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":"There is no check that the line is a multiple of 0.25.","sha256":"d456b30641a3ef8b4c7ebcb062112630456a881061c2fb2989b4d8d562c52bf0","title":"Off-grid handicap lines accepted or quarter lines rejected · 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":41.004,"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":"invalid line","check":"boundary quarter half-lose","expected":[500,"half-lose"],"passed":false},{"actual":"invalid line","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":"invalid line","check":"regression: quarter grid guard","expected":[1498,"half-win"],"passed":false},{"actual":"invalid line","check":"regression: quarter grid guard","expected":"invalid line","passed":true},{"actual":[2000,"win"],"check":"variant scenario 1","expected":[2000,"win"],"passed":true},{"actual":[500,"push"],"check":"variant scenario 2","expected":[500,"push"],"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\": \"invalid line\", \"expected\": [500, \"half-lose\"], \"passed\": false}, {\"check\": \"boundary quarter half-win\", \"actual\": \"invalid line\", \"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 grid guard\", \"actual\": \"invalid line\", \"expected\": [1498, \"half-win\"], \"passed\": false}, {\"check\": \"regression: quarter grid guard\", \"actual\": \"invalid line\", \"expected\": \"invalid line\", \"passed\": true}, {\"check\": \"variant scenario 1\", \"actual\": [2000, \"win\"], \"expected\": [2000, \"win\"], \"passed\": true}, {\"check\": \"variant scenario 2\", \"actual\": [500, \"push\"], \"expected\": [500, \"push\"], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":46.104,"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":[1500,"half-win"],"check":"boundary quarter half-win","expected":[1500,"half-win"],"passed":true},{"actual":[0,"lose"],"check":"control lose","expected":[0,"lose"],"passed":true},{"actual":[1900,"win"],"check":"boundary off-grid line","expected":"invalid line","passed":false},{"actual":[1498,"half-win"],"check":"regression: quarter grid guard","expected":[1498,"half-win"],"passed":true},{"actual":[1000,"win"],"check":"regression: quarter grid guard","expected":"invalid line","passed":false},{"actual":[2000,"win"],"check":"variant scenario 1","expected":[2000,"win"],"passed":true},{"actual":[500,"push"],"check":"variant scenario 2","expected":[500,"push"],"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\": [1500, \"half-win\"], \"expected\": [1500, \"half-win\"], \"passed\": true}, {\"check\": \"control lose\", \"actual\": [0, \"lose\"], \"expected\": [0, \"lose\"], \"passed\": true}, {\"check\": \"boundary off-grid line\", \"actual\": [1900, \"win\"], \"expected\": \"invalid line\", \"passed\": false}, {\"check\": \"regression: quarter grid guard\", \"actual\": [1498, \"half-win\"], \"expected\": [1498, \"half-win\"], \"passed\": true}, {\"check\": \"regression: quarter grid guard\", \"actual\": [1000, \"win\"], \"expected\": \"invalid line\", \"passed\": false}, {\"check\": \"variant scenario 1\", \"actual\": [2000, \"win\"], \"expected\": [2000, \"win\"], \"passed\": true}, {\"check\": \"variant scenario 2\", \"actual\": [500, \"push\"], \"expected\": [500, \"push\"], \"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."}}