FAILURE MAP
← Case archive

FA-84471 / Betting odds conversion / Open access

Half-win leg settled as a full win or as half the price · case 01

Parlays with a half-won Asian leg are over- or under-paid.

Verified by executionVariant 1 · 9 checks per implementationDownload source bundle ↓JSON ↗

ROOT CAUSE

The half-win factor uses the full price.

VERIFIED REPAIR

Use (1 + d) / 2: half at the price and half refunded.

Unsuccessful approach: Halving the price forgets the refunded half stake.

Case contract

Accumulator settlement. legs rows are [decimal price, result] with results win, lose, push, void, half-win (half the stake wins at the price, half is refunded: factor (1 + d) / 2) and half-lose (half refunded: factor 1/2). push and void legs have factor 1, win factor d, lose makes the whole bet lose. Return [combined factor rounded half up to four decimals as a string, payout in cents rounded down].

Why this case matters

Settlement engines must collapse pushed, voided and Asian half results inside multiples.

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, stake_cents):
    factor = Fraction(1)
    for price, result in legs:
        d = Fraction(price)
        if result == 'lose':
            factor = Fraction(0)
            break
        if result == 'win':
            factor *= d
        elif result == 'half-win':
            factor *= d
        elif result == 'half-lose':
            factor *= Fraction(1, 2)
    q = math.floor(factor * 10000 + Fraction(1, 2))
    return ['%d.%04d' % (q // 10000, q % 10000), math.floor(stake_cents * factor)]
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 winners', ([['2.00', 'win'], ['1.50', 'win']], 1000), ['3.0000', 3000]),
  ('boundary pushed leg', ([['2.00', 'win'], ['1.90', 'push']], 1000), ['2.0000', 2000]),
  ('boundary half-win leg', ([['2.00', 'half-win'], ['2.00', 'win']], 1000), ['3.0000', 3000]),
  ('boundary half-lose leg', ([['2.00', 'half-lose'], ['3.00', 'win']], 1000), ['1.5000', 1500]),
  ('control losing leg', ([['2.00', 'win'], ['1.50', 'lose']], 1000), ['0.0000', 0]),
  ('control payout rounds down', ([['1.33', 'win']], 333), ['1.3300', 442]),
  ('regression: half win factor',
   ([['2.35', 'win'], ['1.77', 'void'], ['1.28', 'half-lose'], ['3.07', 'half-win']], 1000),
   ['2.3911', 2391]),
  ('variant scenario 1',
   ([['2.04', 'half-win'],
     ['1.30', 'half-win'],
     ['2.75', 'win'],
     ['2.56', 'half-lose'],
     ['3.90', 'lose']],
    1999),
   ['0.0000', 0]),
  ('variant scenario 2', ([['3.10', 'win'], ['2.58', 'void']], 100), ['3.1000', 310])],
 [('control two winners', ([['2.00', 'win'], ['1.50', 'win']], 1000), ['3.0000', 3000]),
  ('boundary pushed leg', ([['2.00', 'win'], ['1.90', 'push']], 1000), ['2.0000', 2000]),
  ('boundary half-win leg', ([['2.00', 'half-win'], ['2.00', 'win']], 1000), ['3.0000', 3000]),
  ('boundary half-lose leg', ([['2.00', 'half-lose'], ['3.00', 'win']], 1000), ['1.5000', 1500]),
  ('control losing leg', ([['2.00', 'win'], ['1.50', 'lose']], 1000), ['0.0000', 0]),
  ('control payout rounds down', ([['1.33', 'win']], 333), ['1.3300', 442]),
  ('regression: half win factor',
   ([['2.78', 'win'],
     ['3.36', 'half-lose'],
     ['1.51', 'half-win'],
     ['1.53', 'win'],
     ['2.82', 'win']],
    333),
   ['7.5266', 2506]),
  ('variant scenario 1',
   ([['1.69', 'win'], ['3.30', 'win'], ['1.27', 'win'], ['2.88', 'half-lose'], ['3.75', 'push']],
    1000),
   ['3.5414', 3541]),
  ('variant scenario 2', ([['3.90', 'win'], ['2.38', 'half-lose']], 1000), ['1.9500', 1950])],
 [('control two winners', ([['2.00', 'win'], ['1.50', 'win']], 1000), ['3.0000', 3000]),
  ('boundary pushed leg', ([['2.00', 'win'], ['1.90', 'push']], 1000), ['2.0000', 2000]),
  ('boundary half-win leg', ([['2.00', 'half-win'], ['2.00', 'win']], 1000), ['3.0000', 3000]),
  ('boundary half-lose leg', ([['2.00', 'half-lose'], ['3.00', 'win']], 1000), ['1.5000', 1500]),
  ('control losing leg', ([['2.00', 'win'], ['1.50', 'lose']], 1000), ['0.0000', 0]),
  ('control payout rounds down', ([['1.33', 'win']], 333), ['1.3300', 442]),
  ('regression: half win factor',
   ([['3.66', 'push'],
     ['1.61', 'half-lose'],
     ['3.40', 'half-win'],
     ['2.67', 'half-win'],
     ['2.27', 'half-win']],
    250),
   ['3.3002', 825]),
  ('variant scenario 1',
   ([['1.64', 'void'], ['1.40', 'lose'], ['2.39', 'half-lose']], 333),
   ['0.0000', 0]),
  ('variant scenario 2',
   ([['1.78', 'push'], ['1.46', 'half-lose'], ['2.49', 'win']], 333),
   ['1.2450', 414])],
 [('control two winners', ([['2.00', 'win'], ['1.50', 'win']], 1000), ['3.0000', 3000]),
  ('boundary pushed leg', ([['2.00', 'win'], ['1.90', 'push']], 1000), ['2.0000', 2000]),
  ('boundary half-win leg', ([['2.00', 'half-win'], ['2.00', 'win']], 1000), ['3.0000', 3000]),
  ('boundary half-lose leg', ([['2.00', 'half-lose'], ['3.00', 'win']], 1000), ['1.5000', 1500]),
  ('control losing leg', ([['2.00', 'win'], ['1.50', 'lose']], 1000), ['0.0000', 0]),
  ('control payout rounds down', ([['1.33', 'win']], 333), ['1.3300', 442]),
  ('regression: half win factor',
   ([['3.26', 'void'], ['3.52', 'half-win'], ['2.05', 'half-lose'], ['3.79', 'void']], 100),
   ['1.1300', 113]),
  ('variant scenario 1',
   ([['1.32', 'win'], ['2.63', 'push'], ['1.31', 'void'], ['1.97', 'win'], ['2.37', 'win']], 333),
   ['6.1629', 2052]),
  ('variant scenario 2',
   ([['1.29', 'void'], ['1.56', 'half-lose'], ['2.62', 'win'], ['1.98', 'void'], ['2.10', 'win']],
    333),
   ['2.7510', 916])],
 [('control two winners', ([['2.00', 'win'], ['1.50', 'win']], 1000), ['3.0000', 3000]),
  ('boundary pushed leg', ([['2.00', 'win'], ['1.90', 'push']], 1000), ['2.0000', 2000]),
  ('boundary half-win leg', ([['2.00', 'half-win'], ['2.00', 'win']], 1000), ['3.0000', 3000]),
  ('boundary half-lose leg', ([['2.00', 'half-lose'], ['3.00', 'win']], 1000), ['1.5000', 1500]),
  ('control losing leg', ([['2.00', 'win'], ['1.50', 'lose']], 1000), ['0.0000', 0]),
  ('control payout rounds down', ([['1.33', 'win']], 333), ['1.3300', 442]),
  ('regression: half win factor',
   ([['2.90', 'half-lose'],
     ['2.13', 'win'],
     ['2.30', 'half-win'],
     ['1.23', 'half-win'],
     ['1.38', 'win']],
    100),
   ['2.7039', 270]),
  ('variant scenario 1',
   ([['3.43', 'void'], ['1.58', 'win'], ['1.37', 'push'], ['3.02', 'win'], ['3.24', 'win']], 100),
   ['15.4600', 1545]),
  ('variant scenario 2', ([['3.08', 'win'], ['3.61', 'void']], 333), ['3.0800', 1025])]]
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 fixtureActualExpectedOutcome
control two winners['3.0000', 3000]['3.0000', 3000]Passed
boundary pushed leg['2.0000', 2000]['2.0000', 2000]Passed
boundary half-win leg['4.0000', 4000]['3.0000', 3000]Failed
boundary half-lose leg['1.5000', 1500]['1.5000', 1500]Passed
control losing leg['0.0000', 0]['0.0000', 0]Passed
control payout rounds down['1.3300', 442]['1.3300', 442]Passed
regression: half win factor['3.6073', 3607]['2.3911', 2391]Failed
variant scenario 1['0.0000', 0]['0.0000', 0]Passed
variant scenario 2['3.1000', 310]['3.1000', 310]Passed

SHA-256 / f05391e5a1ef974cd98b1d49a716d42daaec8bbff3285edd91ac368e33d96f9f

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, stake_cents):
    factor = Fraction(1)
    for price, result in legs:
        d = Fraction(price)
        if result == 'lose':
            factor = Fraction(0)
            break
        if result == 'win':
            factor *= d
        elif result == 'half-win':
            factor *= d / 2
        elif result == 'half-lose':
            factor *= Fraction(1, 2)
    q = math.floor(factor * 10000 + Fraction(1, 2))
    return ['%d.%04d' % (q // 10000, q % 10000), math.floor(stake_cents * factor)]
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 winners', ([['2.00', 'win'], ['1.50', 'win']], 1000), ['3.0000', 3000]),
  ('boundary pushed leg', ([['2.00', 'win'], ['1.90', 'push']], 1000), ['2.0000', 2000]),
  ('boundary half-win leg', ([['2.00', 'half-win'], ['2.00', 'win']], 1000), ['3.0000', 3000]),
  ('boundary half-lose leg', ([['2.00', 'half-lose'], ['3.00', 'win']], 1000), ['1.5000', 1500]),
  ('control losing leg', ([['2.00', 'win'], ['1.50', 'lose']], 1000), ['0.0000', 0]),
  ('control payout rounds down', ([['1.33', 'win']], 333), ['1.3300', 442]),
  ('regression: half win factor',
   ([['2.35', 'win'], ['1.77', 'void'], ['1.28', 'half-lose'], ['3.07', 'half-win']], 1000),
   ['2.3911', 2391]),
  ('variant scenario 1',
   ([['2.04', 'half-win'],
     ['1.30', 'half-win'],
     ['2.75', 'win'],
     ['2.56', 'half-lose'],
     ['3.90', 'lose']],
    1999),
   ['0.0000', 0]),
  ('variant scenario 2', ([['3.10', 'win'], ['2.58', 'void']], 100), ['3.1000', 310])],
 [('control two winners', ([['2.00', 'win'], ['1.50', 'win']], 1000), ['3.0000', 3000]),
  ('boundary pushed leg', ([['2.00', 'win'], ['1.90', 'push']], 1000), ['2.0000', 2000]),
  ('boundary half-win leg', ([['2.00', 'half-win'], ['2.00', 'win']], 1000), ['3.0000', 3000]),
  ('boundary half-lose leg', ([['2.00', 'half-lose'], ['3.00', 'win']], 1000), ['1.5000', 1500]),
  ('control losing leg', ([['2.00', 'win'], ['1.50', 'lose']], 1000), ['0.0000', 0]),
  ('control payout rounds down', ([['1.33', 'win']], 333), ['1.3300', 442]),
  ('regression: half win factor',
   ([['2.78', 'win'],
     ['3.36', 'half-lose'],
     ['1.51', 'half-win'],
     ['1.53', 'win'],
     ['2.82', 'win']],
    333),
   ['7.5266', 2506]),
  ('variant scenario 1',
   ([['1.69', 'win'], ['3.30', 'win'], ['1.27', 'win'], ['2.88', 'half-lose'], ['3.75', 'push']],
    1000),
   ['3.5414', 3541]),
  ('variant scenario 2', ([['3.90', 'win'], ['2.38', 'half-lose']], 1000), ['1.9500', 1950])],
 [('control two winners', ([['2.00', 'win'], ['1.50', 'win']], 1000), ['3.0000', 3000]),
  ('boundary pushed leg', ([['2.00', 'win'], ['1.90', 'push']], 1000), ['2.0000', 2000]),
  ('boundary half-win leg', ([['2.00', 'half-win'], ['2.00', 'win']], 1000), ['3.0000', 3000]),
  ('boundary half-lose leg', ([['2.00', 'half-lose'], ['3.00', 'win']], 1000), ['1.5000', 1500]),
  ('control losing leg', ([['2.00', 'win'], ['1.50', 'lose']], 1000), ['0.0000', 0]),
  ('control payout rounds down', ([['1.33', 'win']], 333), ['1.3300', 442]),
  ('regression: half win factor',
   ([['3.66', 'push'],
     ['1.61', 'half-lose'],
     ['3.40', 'half-win'],
     ['2.67', 'half-win'],
     ['2.27', 'half-win']],
    250),
   ['3.3002', 825]),
  ('variant scenario 1',
   ([['1.64', 'void'], ['1.40', 'lose'], ['2.39', 'half-lose']], 333),
   ['0.0000', 0]),
  ('variant scenario 2',
   ([['1.78', 'push'], ['1.46', 'half-lose'], ['2.49', 'win']], 333),
   ['1.2450', 414])],
 [('control two winners', ([['2.00', 'win'], ['1.50', 'win']], 1000), ['3.0000', 3000]),
  ('boundary pushed leg', ([['2.00', 'win'], ['1.90', 'push']], 1000), ['2.0000', 2000]),
  ('boundary half-win leg', ([['2.00', 'half-win'], ['2.00', 'win']], 1000), ['3.0000', 3000]),
  ('boundary half-lose leg', ([['2.00', 'half-lose'], ['3.00', 'win']], 1000), ['1.5000', 1500]),
  ('control losing leg', ([['2.00', 'win'], ['1.50', 'lose']], 1000), ['0.0000', 0]),
  ('control payout rounds down', ([['1.33', 'win']], 333), ['1.3300', 442]),
  ('regression: half win factor',
   ([['3.26', 'void'], ['3.52', 'half-win'], ['2.05', 'half-lose'], ['3.79', 'void']], 100),
   ['1.1300', 113]),
  ('variant scenario 1',
   ([['1.32', 'win'], ['2.63', 'push'], ['1.31', 'void'], ['1.97', 'win'], ['2.37', 'win']], 333),
   ['6.1629', 2052]),
  ('variant scenario 2',
   ([['1.29', 'void'], ['1.56', 'half-lose'], ['2.62', 'win'], ['1.98', 'void'], ['2.10', 'win']],
    333),
   ['2.7510', 916])],
 [('control two winners', ([['2.00', 'win'], ['1.50', 'win']], 1000), ['3.0000', 3000]),
  ('boundary pushed leg', ([['2.00', 'win'], ['1.90', 'push']], 1000), ['2.0000', 2000]),
  ('boundary half-win leg', ([['2.00', 'half-win'], ['2.00', 'win']], 1000), ['3.0000', 3000]),
  ('boundary half-lose leg', ([['2.00', 'half-lose'], ['3.00', 'win']], 1000), ['1.5000', 1500]),
  ('control losing leg', ([['2.00', 'win'], ['1.50', 'lose']], 1000), ['0.0000', 0]),
  ('control payout rounds down', ([['1.33', 'win']], 333), ['1.3300', 442]),
  ('regression: half win factor',
   ([['2.90', 'half-lose'],
     ['2.13', 'win'],
     ['2.30', 'half-win'],
     ['1.23', 'half-win'],
     ['1.38', 'win']],
    100),
   ['2.7039', 270]),
  ('variant scenario 1',
   ([['3.43', 'void'], ['1.58', 'win'], ['1.37', 'push'], ['3.02', 'win'], ['3.24', 'win']], 100),
   ['15.4600', 1545]),
  ('variant scenario 2', ([['3.08', 'win'], ['3.61', 'void']], 333), ['3.0800', 1025])]]
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 fixtureActualExpectedOutcome
control two winners['3.0000', 3000]['3.0000', 3000]Passed
boundary pushed leg['2.0000', 2000]['2.0000', 2000]Passed
boundary half-win leg['2.0000', 2000]['3.0000', 3000]Failed
boundary half-lose leg['1.5000', 1500]['1.5000', 1500]Passed
control losing leg['0.0000', 0]['0.0000', 0]Passed
control payout rounds down['1.3300', 442]['1.3300', 442]Passed
regression: half win factor['1.8036', 1803]['2.3911', 2391]Failed
variant scenario 1['0.0000', 0]['0.0000', 0]Passed
variant scenario 2['3.1000', 310]['3.1000', 310]Passed

SHA-256 / 56889da77db7db53491fc1b9ba771bc2ca45d7139476064954db0b999a9fff8f

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, stake_cents):
    factor = Fraction(1)
    for price, result in legs:
        d = Fraction(price)
        if result == 'lose':
            factor = Fraction(0)
            break
        if result == 'win':
            factor *= d
        elif result == 'half-win':
            factor *= (1 + d) / 2
        elif result == 'half-lose':
            factor *= Fraction(1, 2)
    q = math.floor(factor * 10000 + Fraction(1, 2))
    return ['%d.%04d' % (q // 10000, q % 10000), math.floor(stake_cents * factor)]
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 winners', ([['2.00', 'win'], ['1.50', 'win']], 1000), ['3.0000', 3000]),
  ('boundary pushed leg', ([['2.00', 'win'], ['1.90', 'push']], 1000), ['2.0000', 2000]),
  ('boundary half-win leg', ([['2.00', 'half-win'], ['2.00', 'win']], 1000), ['3.0000', 3000]),
  ('boundary half-lose leg', ([['2.00', 'half-lose'], ['3.00', 'win']], 1000), ['1.5000', 1500]),
  ('control losing leg', ([['2.00', 'win'], ['1.50', 'lose']], 1000), ['0.0000', 0]),
  ('control payout rounds down', ([['1.33', 'win']], 333), ['1.3300', 442]),
  ('regression: half win factor',
   ([['2.35', 'win'], ['1.77', 'void'], ['1.28', 'half-lose'], ['3.07', 'half-win']], 1000),
   ['2.3911', 2391]),
  ('variant scenario 1',
   ([['2.04', 'half-win'],
     ['1.30', 'half-win'],
     ['2.75', 'win'],
     ['2.56', 'half-lose'],
     ['3.90', 'lose']],
    1999),
   ['0.0000', 0]),
  ('variant scenario 2', ([['3.10', 'win'], ['2.58', 'void']], 100), ['3.1000', 310])],
 [('control two winners', ([['2.00', 'win'], ['1.50', 'win']], 1000), ['3.0000', 3000]),
  ('boundary pushed leg', ([['2.00', 'win'], ['1.90', 'push']], 1000), ['2.0000', 2000]),
  ('boundary half-win leg', ([['2.00', 'half-win'], ['2.00', 'win']], 1000), ['3.0000', 3000]),
  ('boundary half-lose leg', ([['2.00', 'half-lose'], ['3.00', 'win']], 1000), ['1.5000', 1500]),
  ('control losing leg', ([['2.00', 'win'], ['1.50', 'lose']], 1000), ['0.0000', 0]),
  ('control payout rounds down', ([['1.33', 'win']], 333), ['1.3300', 442]),
  ('regression: half win factor',
   ([['2.78', 'win'],
     ['3.36', 'half-lose'],
     ['1.51', 'half-win'],
     ['1.53', 'win'],
     ['2.82', 'win']],
    333),
   ['7.5266', 2506]),
  ('variant scenario 1',
   ([['1.69', 'win'], ['3.30', 'win'], ['1.27', 'win'], ['2.88', 'half-lose'], ['3.75', 'push']],
    1000),
   ['3.5414', 3541]),
  ('variant scenario 2', ([['3.90', 'win'], ['2.38', 'half-lose']], 1000), ['1.9500', 1950])],
 [('control two winners', ([['2.00', 'win'], ['1.50', 'win']], 1000), ['3.0000', 3000]),
  ('boundary pushed leg', ([['2.00', 'win'], ['1.90', 'push']], 1000), ['2.0000', 2000]),
  ('boundary half-win leg', ([['2.00', 'half-win'], ['2.00', 'win']], 1000), ['3.0000', 3000]),
  ('boundary half-lose leg', ([['2.00', 'half-lose'], ['3.00', 'win']], 1000), ['1.5000', 1500]),
  ('control losing leg', ([['2.00', 'win'], ['1.50', 'lose']], 1000), ['0.0000', 0]),
  ('control payout rounds down', ([['1.33', 'win']], 333), ['1.3300', 442]),
  ('regression: half win factor',
   ([['3.66', 'push'],
     ['1.61', 'half-lose'],
     ['3.40', 'half-win'],
     ['2.67', 'half-win'],
     ['2.27', 'half-win']],
    250),
   ['3.3002', 825]),
  ('variant scenario 1',
   ([['1.64', 'void'], ['1.40', 'lose'], ['2.39', 'half-lose']], 333),
   ['0.0000', 0]),
  ('variant scenario 2',
   ([['1.78', 'push'], ['1.46', 'half-lose'], ['2.49', 'win']], 333),
   ['1.2450', 414])],
 [('control two winners', ([['2.00', 'win'], ['1.50', 'win']], 1000), ['3.0000', 3000]),
  ('boundary pushed leg', ([['2.00', 'win'], ['1.90', 'push']], 1000), ['2.0000', 2000]),
  ('boundary half-win leg', ([['2.00', 'half-win'], ['2.00', 'win']], 1000), ['3.0000', 3000]),
  ('boundary half-lose leg', ([['2.00', 'half-lose'], ['3.00', 'win']], 1000), ['1.5000', 1500]),
  ('control losing leg', ([['2.00', 'win'], ['1.50', 'lose']], 1000), ['0.0000', 0]),
  ('control payout rounds down', ([['1.33', 'win']], 333), ['1.3300', 442]),
  ('regression: half win factor',
   ([['3.26', 'void'], ['3.52', 'half-win'], ['2.05', 'half-lose'], ['3.79', 'void']], 100),
   ['1.1300', 113]),
  ('variant scenario 1',
   ([['1.32', 'win'], ['2.63', 'push'], ['1.31', 'void'], ['1.97', 'win'], ['2.37', 'win']], 333),
   ['6.1629', 2052]),
  ('variant scenario 2',
   ([['1.29', 'void'], ['1.56', 'half-lose'], ['2.62', 'win'], ['1.98', 'void'], ['2.10', 'win']],
    333),
   ['2.7510', 916])],
 [('control two winners', ([['2.00', 'win'], ['1.50', 'win']], 1000), ['3.0000', 3000]),
  ('boundary pushed leg', ([['2.00', 'win'], ['1.90', 'push']], 1000), ['2.0000', 2000]),
  ('boundary half-win leg', ([['2.00', 'half-win'], ['2.00', 'win']], 1000), ['3.0000', 3000]),
  ('boundary half-lose leg', ([['2.00', 'half-lose'], ['3.00', 'win']], 1000), ['1.5000', 1500]),
  ('control losing leg', ([['2.00', 'win'], ['1.50', 'lose']], 1000), ['0.0000', 0]),
  ('control payout rounds down', ([['1.33', 'win']], 333), ['1.3300', 442]),
  ('regression: half win factor',
   ([['2.90', 'half-lose'],
     ['2.13', 'win'],
     ['2.30', 'half-win'],
     ['1.23', 'half-win'],
     ['1.38', 'win']],
    100),
   ['2.7039', 270]),
  ('variant scenario 1',
   ([['3.43', 'void'], ['1.58', 'win'], ['1.37', 'push'], ['3.02', 'win'], ['3.24', 'win']], 100),
   ['15.4600', 1545]),
  ('variant scenario 2', ([['3.08', 'win'], ['3.61', 'void']], 333), ['3.0800', 1025])]]
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 fixtureActualExpectedOutcome
control two winners['3.0000', 3000]['3.0000', 3000]Passed
boundary pushed leg['2.0000', 2000]['2.0000', 2000]Passed
boundary half-win leg['3.0000', 3000]['3.0000', 3000]Passed
boundary half-lose leg['1.5000', 1500]['1.5000', 1500]Passed
control losing leg['0.0000', 0]['0.0000', 0]Passed
control payout rounds down['1.3300', 442]['1.3300', 442]Passed
regression: half win factor['2.3911', 2391]['2.3911', 2391]Passed
variant scenario 1['0.0000', 0]['0.0000', 0]Passed
variant scenario 2['3.1000', 310]['3.1000', 310]Passed

SHA-256 / d022c25e11268e9dc5038e2caac270bd4ce9e3b0295f12e425b4fe9de0711fa9

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:31.204368+00:00.

Case digest / 15c8c0a4fbddfd13442e58822f82e7db09a92e89b56c235402887f37b71f1e22