FA-84756 / Betting odds conversion / Open access
Pushed teaser leg graded as a win or a loss · case 01
A leg landing exactly on the teased number wins, or kills the ticket.
ROOT CAUSE
The winning test uses v >= 0, so a push counts as a win.
VERIFIED REPAIR
Drop pushed legs from the count.
Unsuccessful approach: Grading a push as a loss is stricter than the stated rule.
Case contract
Point-spread teaser. legs rows are [team spread line, team margin of victory]; every line is moved in the bettor's favour by points (adjusted = line + points). A leg wins if margin + adjusted > 0, pushes if = 0, loses if < 0. Any losing leg loses the ticket. Pushed legs are dropped; fewer than 2 remaining winners refunds the stake. Payout by winning legs from the American table {2: -120, 3: +160, 4: +260, 5: +400} (5 or more pay +400). Return [status, return cents rounded down].
Why this case matters
Sportsbooks grade teasers with shifted lines, push reduction and a tiered payout table.
1 / The failure
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
from fractions import Fraction
import math
N = 1
observations = []
def solve(legs, points, stake_cents):
TABLE = {2: -120, 3: 160, 4: 260, 5: 400}
wins = 0
for line, margin in legs:
adj = Fraction(line) + Fraction(points)
v = margin + adj
if v < 0:
return ['lose', 0]
if v >= 0:
wins += 1
if wins < 2:
return ['refund', stake_cents]
am = TABLE[min(wins, 5)]
dec = 1 + (Fraction(am, 100) if am > 0 else Fraction(100, -am))
return ['win', math.floor(stake_cents * dec)]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
def run(args):
try:
return solve(*args)
except Exception as exc:
return 'raised ' + type(exc).__name__
cases = [[('control two-team teaser', ([['-7.5', 3], ['+2.5', -5]], '6', 1200), ['win', 2200]),
('boundary push drops a leg', ([['-7', 1], ['+3', 0], ['-1', 2]], '6', 1000), ['win', 1833]),
('boundary reduced to one leg', ([['-7', 1], ['+3', 5]], '6', 1000), ['refund', 1000]),
('control losing leg', ([['-10', 2], ['+3', 5], ['+7', 0]], '6', 1000), ['lose', 0]),
('control three winners', ([['-3', 1], ['+3', 0], ['-1', 0]], '6', 1000), ['win', 2600]),
('regression: push handling', ([['+2.5', 8], ['-10', 3]], '7', 1000), ['refund', 1000]),
('variant scenario 1',
([['-7.5', -11], ['+3', 8], ['-6', -2], ['+3', 10]], '7', 1100),
['lose', 0]),
('variant scenario 2',
([['-1', 9], ['-10', -1], ['-3', -3], ['-7', 5], ['+3', 11], ['-10', -7]], '6', 1100),
['lose', 0])],
[('control two-team teaser', ([['-7.5', 3], ['+2.5', -5]], '6', 1200), ['win', 2200]),
('boundary push drops a leg', ([['-7', 1], ['+3', 0], ['-1', 2]], '6', 1000), ['win', 1833]),
('boundary reduced to one leg', ([['-7', 1], ['+3', 5]], '6', 1000), ['refund', 1000]),
('control losing leg', ([['-10', 2], ['+3', 5], ['+7', 0]], '6', 1000), ['lose', 0]),
('control three winners', ([['-3', 1], ['+3', 0], ['-1', 0]], '6', 1000), ['win', 2600]),
('regression: push handling',
([['-10', 13], ['+3', -10], ['+7', 2], ['-6', 10], ['-3', 9], ['-1', -4]], '7', 1100),
['win', 5500]),
('regression: push handling', ([['-10', 6], ['+3', -10], ['-7', 3]], '7', 1100), ['win', 2016]),
('variant scenario 1', ([['-3', 3], ['-1', -1]], '6.5', 500), ['win', 916]),
('variant scenario 2',
([['+1.5', 9], ['-6', 7], ['-7', 3], ['+2.5', -7]], '7', 1000),
['win', 3600])],
[('control two-team teaser', ([['-7.5', 3], ['+2.5', -5]], '6', 1200), ['win', 2200]),
('boundary push drops a leg', ([['-7', 1], ['+3', 0], ['-1', 2]], '6', 1000), ['win', 1833]),
('boundary reduced to one leg', ([['-7', 1], ['+3', 5]], '6', 1000), ['refund', 1000]),
('control losing leg', ([['-10', 2], ['+3', 5], ['+7', 0]], '6', 1000), ['lose', 0]),
('control three winners', ([['-3', 1], ['+3', 0], ['-1', 0]], '6', 1000), ['win', 2600]),
('regression: push handling',
([['+2.5', -8], ['+3', 7], ['-10', 4], ['+3', 7], ['-1', 4]], '6', 1000),
['win', 3600]),
('variant scenario 1',
([['+7', 5], ['+3', -9], ['+3', -14], ['-6', 12], ['+3', 13]], '6.5', 1000),
['lose', 0]),
('variant scenario 2', ([['+2.5', 6], ['+1.5', 14], ['-3', -6]], '6', 1000), ['lose', 0])],
[('control two-team teaser', ([['-7.5', 3], ['+2.5', -5]], '6', 1200), ['win', 2200]),
('boundary push drops a leg', ([['-7', 1], ['+3', 0], ['-1', 2]], '6', 1000), ['win', 1833]),
('boundary reduced to one leg', ([['-7', 1], ['+3', 5]], '6', 1000), ['refund', 1000]),
('control losing leg', ([['-10', 2], ['+3', 5], ['+7', 0]], '6', 1000), ['lose', 0]),
('control three winners', ([['-3', 1], ['+3', 0], ['-1', 0]], '6', 1000), ['win', 2600]),
('regression: push handling', ([['-7.5', 1], ['+3', 13]], '6.5', 1000), ['refund', 1000]),
('variant scenario 1', ([['+3', 9], ['-7.5', -8], ['-3', 9]], '6', 500), ['lose', 0]),
('variant scenario 2',
([['-10', 12], ['+2.5', -1], ['-3', 5], ['-1', 6], ['+1.5', 5], ['-10', -14]], '6', 1100),
['lose', 0])],
[('control two-team teaser', ([['-7.5', 3], ['+2.5', -5]], '6', 1200), ['win', 2200]),
('boundary push drops a leg', ([['-7', 1], ['+3', 0], ['-1', 2]], '6', 1000), ['win', 1833]),
('boundary reduced to one leg', ([['-7', 1], ['+3', 5]], '6', 1000), ['refund', 1000]),
('control losing leg', ([['-10', 2], ['+3', 5], ['+7', 0]], '6', 1000), ['lose', 0]),
('control three winners', ([['-3', 1], ['+3', 0], ['-1', 0]], '6', 1000), ['win', 2600]),
('regression: push handling', ([['+1.5', 12], ['-7.5', 1]], '6.5', 1000), ['refund', 1000]),
('variant scenario 1',
([['-1', 7], ['-7.5', 5], ['-7.5', 2], ['-7.5', -8], ['-1', 10], ['-6', 0]], '7', 1000),
['lose', 0]),
('variant scenario 2',
([['-10', -12], ['-1', -11], ['+3', -9], ['-7', 6], ['+2.5', -5]], '7', 1100),
['lose', 0])]]
for label, args, expected in cases[N - 1]:
check(label, run(args), expected)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| control two-team teaser | ['win', 2200] | ['win', 2200] | Passed |
| boundary push drops a leg | ['win', 2600] | ['win', 1833] | Failed |
| boundary reduced to one leg | ['win', 1833] | ['refund', 1000] | Failed |
| control losing leg | ['lose', 0] | ['lose', 0] | Passed |
| control three winners | ['win', 2600] | ['win', 2600] | Passed |
| regression: push handling | ['win', 1833] | ['refund', 1000] | Failed |
| variant scenario 1 | ['lose', 0] | ['lose', 0] | Passed |
| variant scenario 2 | ['lose', 0] | ['lose', 0] | Passed |
SHA-256 / 05b17a3a0c38c2b0ea0afe7c1460e3cf68a54caecbc11c2e3bccee51f36563ad
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
from fractions import Fraction
import math
N = 1
observations = []
def solve(legs, points, stake_cents):
TABLE = {2: -120, 3: 160, 4: 260, 5: 400}
wins = 0
for line, margin in legs:
adj = Fraction(line) + Fraction(points)
v = margin + adj
if v <= 0:
return ['lose', 0]
if v > 0:
wins += 1
if wins < 2:
return ['refund', stake_cents]
am = TABLE[min(wins, 5)]
dec = 1 + (Fraction(am, 100) if am > 0 else Fraction(100, -am))
return ['win', math.floor(stake_cents * dec)]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
def run(args):
try:
return solve(*args)
except Exception as exc:
return 'raised ' + type(exc).__name__
cases = [[('control two-team teaser', ([['-7.5', 3], ['+2.5', -5]], '6', 1200), ['win', 2200]),
('boundary push drops a leg', ([['-7', 1], ['+3', 0], ['-1', 2]], '6', 1000), ['win', 1833]),
('boundary reduced to one leg', ([['-7', 1], ['+3', 5]], '6', 1000), ['refund', 1000]),
('control losing leg', ([['-10', 2], ['+3', 5], ['+7', 0]], '6', 1000), ['lose', 0]),
('control three winners', ([['-3', 1], ['+3', 0], ['-1', 0]], '6', 1000), ['win', 2600]),
('regression: push handling', ([['+2.5', 8], ['-10', 3]], '7', 1000), ['refund', 1000]),
('variant scenario 1',
([['-7.5', -11], ['+3', 8], ['-6', -2], ['+3', 10]], '7', 1100),
['lose', 0]),
('variant scenario 2',
([['-1', 9], ['-10', -1], ['-3', -3], ['-7', 5], ['+3', 11], ['-10', -7]], '6', 1100),
['lose', 0])],
[('control two-team teaser', ([['-7.5', 3], ['+2.5', -5]], '6', 1200), ['win', 2200]),
('boundary push drops a leg', ([['-7', 1], ['+3', 0], ['-1', 2]], '6', 1000), ['win', 1833]),
('boundary reduced to one leg', ([['-7', 1], ['+3', 5]], '6', 1000), ['refund', 1000]),
('control losing leg', ([['-10', 2], ['+3', 5], ['+7', 0]], '6', 1000), ['lose', 0]),
('control three winners', ([['-3', 1], ['+3', 0], ['-1', 0]], '6', 1000), ['win', 2600]),
('regression: push handling',
([['-10', 13], ['+3', -10], ['+7', 2], ['-6', 10], ['-3', 9], ['-1', -4]], '7', 1100),
['win', 5500]),
('regression: push handling', ([['-10', 6], ['+3', -10], ['-7', 3]], '7', 1100), ['win', 2016]),
('variant scenario 1', ([['-3', 3], ['-1', -1]], '6.5', 500), ['win', 916]),
('variant scenario 2',
([['+1.5', 9], ['-6', 7], ['-7', 3], ['+2.5', -7]], '7', 1000),
['win', 3600])],
[('control two-team teaser', ([['-7.5', 3], ['+2.5', -5]], '6', 1200), ['win', 2200]),
('boundary push drops a leg', ([['-7', 1], ['+3', 0], ['-1', 2]], '6', 1000), ['win', 1833]),
('boundary reduced to one leg', ([['-7', 1], ['+3', 5]], '6', 1000), ['refund', 1000]),
('control losing leg', ([['-10', 2], ['+3', 5], ['+7', 0]], '6', 1000), ['lose', 0]),
('control three winners', ([['-3', 1], ['+3', 0], ['-1', 0]], '6', 1000), ['win', 2600]),
('regression: push handling',
([['+2.5', -8], ['+3', 7], ['-10', 4], ['+3', 7], ['-1', 4]], '6', 1000),
['win', 3600]),
('variant scenario 1',
([['+7', 5], ['+3', -9], ['+3', -14], ['-6', 12], ['+3', 13]], '6.5', 1000),
['lose', 0]),
('variant scenario 2', ([['+2.5', 6], ['+1.5', 14], ['-3', -6]], '6', 1000), ['lose', 0])],
[('control two-team teaser', ([['-7.5', 3], ['+2.5', -5]], '6', 1200), ['win', 2200]),
('boundary push drops a leg', ([['-7', 1], ['+3', 0], ['-1', 2]], '6', 1000), ['win', 1833]),
('boundary reduced to one leg', ([['-7', 1], ['+3', 5]], '6', 1000), ['refund', 1000]),
('control losing leg', ([['-10', 2], ['+3', 5], ['+7', 0]], '6', 1000), ['lose', 0]),
('control three winners', ([['-3', 1], ['+3', 0], ['-1', 0]], '6', 1000), ['win', 2600]),
('regression: push handling', ([['-7.5', 1], ['+3', 13]], '6.5', 1000), ['refund', 1000]),
('variant scenario 1', ([['+3', 9], ['-7.5', -8], ['-3', 9]], '6', 500), ['lose', 0]),
('variant scenario 2',
([['-10', 12], ['+2.5', -1], ['-3', 5], ['-1', 6], ['+1.5', 5], ['-10', -14]], '6', 1100),
['lose', 0])],
[('control two-team teaser', ([['-7.5', 3], ['+2.5', -5]], '6', 1200), ['win', 2200]),
('boundary push drops a leg', ([['-7', 1], ['+3', 0], ['-1', 2]], '6', 1000), ['win', 1833]),
('boundary reduced to one leg', ([['-7', 1], ['+3', 5]], '6', 1000), ['refund', 1000]),
('control losing leg', ([['-10', 2], ['+3', 5], ['+7', 0]], '6', 1000), ['lose', 0]),
('control three winners', ([['-3', 1], ['+3', 0], ['-1', 0]], '6', 1000), ['win', 2600]),
('regression: push handling', ([['+1.5', 12], ['-7.5', 1]], '6.5', 1000), ['refund', 1000]),
('variant scenario 1',
([['-1', 7], ['-7.5', 5], ['-7.5', 2], ['-7.5', -8], ['-1', 10], ['-6', 0]], '7', 1000),
['lose', 0]),
('variant scenario 2',
([['-10', -12], ['-1', -11], ['+3', -9], ['-7', 6], ['+2.5', -5]], '7', 1100),
['lose', 0])]]
for label, args, expected in cases[N - 1]:
check(label, run(args), expected)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| control two-team teaser | ['win', 2200] | ['win', 2200] | Passed |
| boundary push drops a leg | ['lose', 0] | ['win', 1833] | Failed |
| boundary reduced to one leg | ['lose', 0] | ['refund', 1000] | Failed |
| control losing leg | ['lose', 0] | ['lose', 0] | Passed |
| control three winners | ['win', 2600] | ['win', 2600] | Passed |
| regression: push handling | ['lose', 0] | ['refund', 1000] | Failed |
| variant scenario 1 | ['lose', 0] | ['lose', 0] | Passed |
| variant scenario 2 | ['lose', 0] | ['lose', 0] | Passed |
SHA-256 / 085fd9ef2b880bdf575a919c585af1751d30c19933701be21f4270f5da6f9126
3 / The verified repair
Exit 0"""Failure Map reference implementation. Python standard library only."""
import json
from fractions import Fraction
import math
N = 1
observations = []
def solve(legs, points, stake_cents):
TABLE = {2: -120, 3: 160, 4: 260, 5: 400}
wins = 0
for line, margin in legs:
adj = Fraction(line) + Fraction(points)
v = margin + adj
if v < 0:
return ['lose', 0]
if v > 0:
wins += 1
if wins < 2:
return ['refund', stake_cents]
am = TABLE[min(wins, 5)]
dec = 1 + (Fraction(am, 100) if am > 0 else Fraction(100, -am))
return ['win', math.floor(stake_cents * dec)]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
def run(args):
try:
return solve(*args)
except Exception as exc:
return 'raised ' + type(exc).__name__
cases = [[('control two-team teaser', ([['-7.5', 3], ['+2.5', -5]], '6', 1200), ['win', 2200]),
('boundary push drops a leg', ([['-7', 1], ['+3', 0], ['-1', 2]], '6', 1000), ['win', 1833]),
('boundary reduced to one leg', ([['-7', 1], ['+3', 5]], '6', 1000), ['refund', 1000]),
('control losing leg', ([['-10', 2], ['+3', 5], ['+7', 0]], '6', 1000), ['lose', 0]),
('control three winners', ([['-3', 1], ['+3', 0], ['-1', 0]], '6', 1000), ['win', 2600]),
('regression: push handling', ([['+2.5', 8], ['-10', 3]], '7', 1000), ['refund', 1000]),
('variant scenario 1',
([['-7.5', -11], ['+3', 8], ['-6', -2], ['+3', 10]], '7', 1100),
['lose', 0]),
('variant scenario 2',
([['-1', 9], ['-10', -1], ['-3', -3], ['-7', 5], ['+3', 11], ['-10', -7]], '6', 1100),
['lose', 0])],
[('control two-team teaser', ([['-7.5', 3], ['+2.5', -5]], '6', 1200), ['win', 2200]),
('boundary push drops a leg', ([['-7', 1], ['+3', 0], ['-1', 2]], '6', 1000), ['win', 1833]),
('boundary reduced to one leg', ([['-7', 1], ['+3', 5]], '6', 1000), ['refund', 1000]),
('control losing leg', ([['-10', 2], ['+3', 5], ['+7', 0]], '6', 1000), ['lose', 0]),
('control three winners', ([['-3', 1], ['+3', 0], ['-1', 0]], '6', 1000), ['win', 2600]),
('regression: push handling',
([['-10', 13], ['+3', -10], ['+7', 2], ['-6', 10], ['-3', 9], ['-1', -4]], '7', 1100),
['win', 5500]),
('regression: push handling', ([['-10', 6], ['+3', -10], ['-7', 3]], '7', 1100), ['win', 2016]),
('variant scenario 1', ([['-3', 3], ['-1', -1]], '6.5', 500), ['win', 916]),
('variant scenario 2',
([['+1.5', 9], ['-6', 7], ['-7', 3], ['+2.5', -7]], '7', 1000),
['win', 3600])],
[('control two-team teaser', ([['-7.5', 3], ['+2.5', -5]], '6', 1200), ['win', 2200]),
('boundary push drops a leg', ([['-7', 1], ['+3', 0], ['-1', 2]], '6', 1000), ['win', 1833]),
('boundary reduced to one leg', ([['-7', 1], ['+3', 5]], '6', 1000), ['refund', 1000]),
('control losing leg', ([['-10', 2], ['+3', 5], ['+7', 0]], '6', 1000), ['lose', 0]),
('control three winners', ([['-3', 1], ['+3', 0], ['-1', 0]], '6', 1000), ['win', 2600]),
('regression: push handling',
([['+2.5', -8], ['+3', 7], ['-10', 4], ['+3', 7], ['-1', 4]], '6', 1000),
['win', 3600]),
('variant scenario 1',
([['+7', 5], ['+3', -9], ['+3', -14], ['-6', 12], ['+3', 13]], '6.5', 1000),
['lose', 0]),
('variant scenario 2', ([['+2.5', 6], ['+1.5', 14], ['-3', -6]], '6', 1000), ['lose', 0])],
[('control two-team teaser', ([['-7.5', 3], ['+2.5', -5]], '6', 1200), ['win', 2200]),
('boundary push drops a leg', ([['-7', 1], ['+3', 0], ['-1', 2]], '6', 1000), ['win', 1833]),
('boundary reduced to one leg', ([['-7', 1], ['+3', 5]], '6', 1000), ['refund', 1000]),
('control losing leg', ([['-10', 2], ['+3', 5], ['+7', 0]], '6', 1000), ['lose', 0]),
('control three winners', ([['-3', 1], ['+3', 0], ['-1', 0]], '6', 1000), ['win', 2600]),
('regression: push handling', ([['-7.5', 1], ['+3', 13]], '6.5', 1000), ['refund', 1000]),
('variant scenario 1', ([['+3', 9], ['-7.5', -8], ['-3', 9]], '6', 500), ['lose', 0]),
('variant scenario 2',
([['-10', 12], ['+2.5', -1], ['-3', 5], ['-1', 6], ['+1.5', 5], ['-10', -14]], '6', 1100),
['lose', 0])],
[('control two-team teaser', ([['-7.5', 3], ['+2.5', -5]], '6', 1200), ['win', 2200]),
('boundary push drops a leg', ([['-7', 1], ['+3', 0], ['-1', 2]], '6', 1000), ['win', 1833]),
('boundary reduced to one leg', ([['-7', 1], ['+3', 5]], '6', 1000), ['refund', 1000]),
('control losing leg', ([['-10', 2], ['+3', 5], ['+7', 0]], '6', 1000), ['lose', 0]),
('control three winners', ([['-3', 1], ['+3', 0], ['-1', 0]], '6', 1000), ['win', 2600]),
('regression: push handling', ([['+1.5', 12], ['-7.5', 1]], '6.5', 1000), ['refund', 1000]),
('variant scenario 1',
([['-1', 7], ['-7.5', 5], ['-7.5', 2], ['-7.5', -8], ['-1', 10], ['-6', 0]], '7', 1000),
['lose', 0]),
('variant scenario 2',
([['-10', -12], ['-1', -11], ['+3', -9], ['-7', 6], ['+2.5', -5]], '7', 1100),
['lose', 0])]]
for label, args, expected in cases[N - 1]:
check(label, run(args), expected)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| control two-team teaser | ['win', 2200] | ['win', 2200] | Passed |
| boundary push drops a leg | ['win', 1833] | ['win', 1833] | Passed |
| boundary reduced to one leg | ['refund', 1000] | ['refund', 1000] | Passed |
| control losing leg | ['lose', 0] | ['lose', 0] | Passed |
| control three winners | ['win', 2600] | ['win', 2600] | Passed |
| regression: push handling | ['refund', 1000] | ['refund', 1000] | Passed |
| variant scenario 1 | ['lose', 0] | ['lose', 0] | Passed |
| variant scenario 2 | ['lose', 0] | ['lose', 0] | Passed |
SHA-256 / 4bfc33b7af6e2e88e483d163050c89608ddd16e6fabf7ace98e68a2decd33368
Verification & scope
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.
Observations recorded using Python 3.12.14 at 2026-09-29T14:50:33.994365+00:00.
Case digest / 0c737b53255eb58f7b0604e13791fbe3d376ba7d87863e6bebe3196cc321ee59