FA-84641 / Betting odds conversion / Open access
Yankee expanded with singles or without the fourfold · case 01
A yankee is settled as 15 lines, or as 10 lines without the fourfold.
ROOT CAUSE
The yankee definition includes single lines.
VERIFIED REPAIR
A yankee is doubles, trebles and the fourfold only (11 lines).
Unsuccessful approach: Dropping the fourfold leaves 10 lines.
Case contract
Full-cover system bets. system: trixie (3 selections: doubles and treble), patent (3: singles, doubles, treble), yankee (4: doubles, trebles, fourfold), lucky15 (4: singles through fourfold). Wrong selection count returns "invalid". Every combination is a line staked unit_cents; a line with a losing selection returns 0; void selections count as price 1. Return [lines, total stake, total return rounded down].
Why this case matters
Bookmaker settlement expands system bets into combination lines before pricing each one.
1 / The failure
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
from fractions import Fraction
import itertools
import math
N = 1
observations = []
def solve(selections, unit_cents, system):
SYS = {'trixie': (3, [2, 3]), 'patent': (3, [1, 2, 3]), 'yankee': (4, [1, 2, 3, 4]), 'lucky15': (4, [1, 2, 3, 4])}
n, sizes = SYS[system]
if len(selections) != n:
return 'invalid'
lines = [c for k in sizes for c in itertools.combinations(range(n), k)]
ret = Fraction(0)
for combo in lines:
m = Fraction(1)
for i in combo:
price, result = selections[i]
if result == 'lose':
m = Fraction(0)
break
if result == 'win':
m *= Fraction(price)
ret += unit_cents * m
return [len(lines), unit_cents * len(lines), math.floor(ret)]
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 trixie all win',
([['2.00', 'win'], ['2.00', 'win'], ['2.00', 'win']], 100, 'trixie'),
[4, 400, 2000]),
('control yankee line count',
([['2.00', 'lose'], ['2.00', 'lose'], ['2.00', 'lose'], ['2.00', 'lose']], 100, 'yankee'),
[11, 1100, 0]),
('boundary void selection',
([['2.00', 'void'], ['3.00', 'win'], ['2.00', 'win']], 100, 'trixie'),
[4, 400, 1700]),
('boundary patent single winner',
([['5.00', 'win'], ['2.00', 'lose'], ['2.00', 'lose']], 100, 'patent'),
[7, 700, 500]),
('boundary wrong count',
([['2.00', 'win'], ['2.00', 'win'], ['2.00', 'win']], 100, 'yankee'),
'invalid'),
('regression: yankee composition',
([['5.29', 'win'], ['2.17', 'win'], ['4.78', 'void'], ['3.18', 'void']], 50, 'yankee'),
[11, 550, 3464]),
('variant scenario 1',
([['1.95', 'win'], ['4.63', 'win'], ['5.31', 'win']], 25, 'trixie'),
[4, 100, 2297]),
('variant scenario 2',
([['5.78', 'win'], ['1.85', 'lose'], ['1.47', 'void'], ['1.41', 'void']], 25, 'lucky15'),
[15, 375, 653])],
[('control trixie all win',
([['2.00', 'win'], ['2.00', 'win'], ['2.00', 'win']], 100, 'trixie'),
[4, 400, 2000]),
('control yankee line count',
([['2.00', 'lose'], ['2.00', 'lose'], ['2.00', 'lose'], ['2.00', 'lose']], 100, 'yankee'),
[11, 1100, 0]),
('boundary void selection',
([['2.00', 'void'], ['3.00', 'win'], ['2.00', 'win']], 100, 'trixie'),
[4, 400, 1700]),
('boundary patent single winner',
([['5.00', 'win'], ['2.00', 'lose'], ['2.00', 'lose']], 100, 'patent'),
[7, 700, 500]),
('boundary wrong count',
([['2.00', 'win'], ['2.00', 'win'], ['2.00', 'win']], 100, 'yankee'),
'invalid'),
('regression: yankee composition',
([['5.29', 'lose'], ['1.90', 'win'], ['2.16', 'lose'], ['1.45', 'win']], 50, 'yankee'),
[11, 550, 137]),
('variant scenario 1',
([['2.42', 'lose'], ['2.58', 'win'], ['2.00', 'lose'], ['4.02', 'win']], 100, 'lucky15'),
[15, 1500, 1697]),
('variant scenario 2',
([['2.34', 'win'], ['1.77', 'lose'], ['4.10', 'lose']], 100, 'patent'),
[7, 700, 234])],
[('control trixie all win',
([['2.00', 'win'], ['2.00', 'win'], ['2.00', 'win']], 100, 'trixie'),
[4, 400, 2000]),
('control yankee line count',
([['2.00', 'lose'], ['2.00', 'lose'], ['2.00', 'lose'], ['2.00', 'lose']], 100, 'yankee'),
[11, 1100, 0]),
('boundary void selection',
([['2.00', 'void'], ['3.00', 'win'], ['2.00', 'win']], 100, 'trixie'),
[4, 400, 1700]),
('boundary patent single winner',
([['5.00', 'win'], ['2.00', 'lose'], ['2.00', 'lose']], 100, 'patent'),
[7, 700, 500]),
('boundary wrong count',
([['2.00', 'win'], ['2.00', 'win'], ['2.00', 'win']], 100, 'yankee'),
'invalid'),
('regression: yankee composition',
([['3.11', 'win'], ['5.18', 'win'], ['2.02', 'win'], ['1.76', 'win']], 100, 'yankee'),
[11, 1100, 19864]),
('variant scenario 1',
([['4.95', 'win'], ['5.49', 'void'], ['4.60', 'void']], 100, 'trixie'),
[4, 400, 1585]),
('variant scenario 2',
([['3.01', 'lose'], ['4.92', 'lose'], ['1.83', 'lose'], ['2.53', 'lose'], ['3.61', 'void']],
100,
'lucky15'),
'invalid')],
[('control trixie all win',
([['2.00', 'win'], ['2.00', 'win'], ['2.00', 'win']], 100, 'trixie'),
[4, 400, 2000]),
('control yankee line count',
([['2.00', 'lose'], ['2.00', 'lose'], ['2.00', 'lose'], ['2.00', 'lose']], 100, 'yankee'),
[11, 1100, 0]),
('boundary void selection',
([['2.00', 'void'], ['3.00', 'win'], ['2.00', 'win']], 100, 'trixie'),
[4, 400, 1700]),
('boundary patent single winner',
([['5.00', 'win'], ['2.00', 'lose'], ['2.00', 'lose']], 100, 'patent'),
[7, 700, 500]),
('boundary wrong count',
([['2.00', 'win'], ['2.00', 'win'], ['2.00', 'win']], 100, 'yankee'),
'invalid'),
('regression: yankee composition',
([['5.73', 'void'], ['3.73', 'void'], ['2.13', 'lose'], ['3.62', 'win']], 25, 'yankee'),
[11, 275, 296]),
('variant scenario 1',
([['4.26', 'win'], ['1.31', 'void'], ['1.86', 'void']], 100, 'patent'),
[7, 700, 2004]),
('variant scenario 2',
([['4.86', 'void'], ['3.74', 'void'], ['3.83', 'win']], 25, 'trixie'),
[4, 100, 312])],
[('control trixie all win',
([['2.00', 'win'], ['2.00', 'win'], ['2.00', 'win']], 100, 'trixie'),
[4, 400, 2000]),
('control yankee line count',
([['2.00', 'lose'], ['2.00', 'lose'], ['2.00', 'lose'], ['2.00', 'lose']], 100, 'yankee'),
[11, 1100, 0]),
('boundary void selection',
([['2.00', 'void'], ['3.00', 'win'], ['2.00', 'win']], 100, 'trixie'),
[4, 400, 1700]),
('boundary patent single winner',
([['5.00', 'win'], ['2.00', 'lose'], ['2.00', 'lose']], 100, 'patent'),
[7, 700, 500]),
('boundary wrong count',
([['2.00', 'win'], ['2.00', 'win'], ['2.00', 'win']], 100, 'yankee'),
'invalid'),
('regression: yankee composition',
([['1.39', 'win'], ['4.34', 'void'], ['2.29', 'void'], ['5.41', 'void']], 50, 'yankee'),
[11, 550, 686]),
('variant scenario 1',
([['4.65', 'win'], ['1.35', 'void'], ['1.60', 'void']], 25, 'patent'),
[7, 175, 540]),
('variant scenario 2',
([['3.24', 'win'], ['1.34', 'void'], ['3.79', 'win']], 100, 'trixie'),
[4, 400, 3158])]]
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 trixie all win | [4, 400, 2000] | [4, 400, 2000] | Passed |
| control yankee line count | [15, 1500, 0] | [11, 1100, 0] | Failed |
| boundary void selection | [4, 400, 1700] | [4, 400, 1700] | Passed |
| boundary patent single winner | [7, 700, 500] | [7, 700, 500] | Passed |
| boundary wrong count | invalid | invalid | Passed |
| regression: yankee composition | [15, 750, 3937] | [11, 550, 3464] | Failed |
| variant scenario 1 | [4, 100, 2297] | [4, 100, 2297] | Passed |
| variant scenario 2 | [15, 375, 653] | [15, 375, 653] | Passed |
SHA-256 / 1c7ccaefedc92e2e70b80e90fba40cc7b2827c125032e18e36c89b60377efeb0
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
from fractions import Fraction
import itertools
import math
N = 1
observations = []
def solve(selections, unit_cents, system):
SYS = {'trixie': (3, [2, 3]), 'patent': (3, [1, 2, 3]), 'yankee': (4, [2, 3]), 'lucky15': (4, [1, 2, 3, 4])}
n, sizes = SYS[system]
if len(selections) != n:
return 'invalid'
lines = [c for k in sizes for c in itertools.combinations(range(n), k)]
ret = Fraction(0)
for combo in lines:
m = Fraction(1)
for i in combo:
price, result = selections[i]
if result == 'lose':
m = Fraction(0)
break
if result == 'win':
m *= Fraction(price)
ret += unit_cents * m
return [len(lines), unit_cents * len(lines), math.floor(ret)]
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 trixie all win',
([['2.00', 'win'], ['2.00', 'win'], ['2.00', 'win']], 100, 'trixie'),
[4, 400, 2000]),
('control yankee line count',
([['2.00', 'lose'], ['2.00', 'lose'], ['2.00', 'lose'], ['2.00', 'lose']], 100, 'yankee'),
[11, 1100, 0]),
('boundary void selection',
([['2.00', 'void'], ['3.00', 'win'], ['2.00', 'win']], 100, 'trixie'),
[4, 400, 1700]),
('boundary patent single winner',
([['5.00', 'win'], ['2.00', 'lose'], ['2.00', 'lose']], 100, 'patent'),
[7, 700, 500]),
('boundary wrong count',
([['2.00', 'win'], ['2.00', 'win'], ['2.00', 'win']], 100, 'yankee'),
'invalid'),
('regression: yankee composition',
([['5.29', 'win'], ['2.17', 'win'], ['4.78', 'void'], ['3.18', 'void']], 50, 'yankee'),
[11, 550, 3464]),
('variant scenario 1',
([['1.95', 'win'], ['4.63', 'win'], ['5.31', 'win']], 25, 'trixie'),
[4, 100, 2297]),
('variant scenario 2',
([['5.78', 'win'], ['1.85', 'lose'], ['1.47', 'void'], ['1.41', 'void']], 25, 'lucky15'),
[15, 375, 653])],
[('control trixie all win',
([['2.00', 'win'], ['2.00', 'win'], ['2.00', 'win']], 100, 'trixie'),
[4, 400, 2000]),
('control yankee line count',
([['2.00', 'lose'], ['2.00', 'lose'], ['2.00', 'lose'], ['2.00', 'lose']], 100, 'yankee'),
[11, 1100, 0]),
('boundary void selection',
([['2.00', 'void'], ['3.00', 'win'], ['2.00', 'win']], 100, 'trixie'),
[4, 400, 1700]),
('boundary patent single winner',
([['5.00', 'win'], ['2.00', 'lose'], ['2.00', 'lose']], 100, 'patent'),
[7, 700, 500]),
('boundary wrong count',
([['2.00', 'win'], ['2.00', 'win'], ['2.00', 'win']], 100, 'yankee'),
'invalid'),
('regression: yankee composition',
([['5.29', 'lose'], ['1.90', 'win'], ['2.16', 'lose'], ['1.45', 'win']], 50, 'yankee'),
[11, 550, 137]),
('variant scenario 1',
([['2.42', 'lose'], ['2.58', 'win'], ['2.00', 'lose'], ['4.02', 'win']], 100, 'lucky15'),
[15, 1500, 1697]),
('variant scenario 2',
([['2.34', 'win'], ['1.77', 'lose'], ['4.10', 'lose']], 100, 'patent'),
[7, 700, 234])],
[('control trixie all win',
([['2.00', 'win'], ['2.00', 'win'], ['2.00', 'win']], 100, 'trixie'),
[4, 400, 2000]),
('control yankee line count',
([['2.00', 'lose'], ['2.00', 'lose'], ['2.00', 'lose'], ['2.00', 'lose']], 100, 'yankee'),
[11, 1100, 0]),
('boundary void selection',
([['2.00', 'void'], ['3.00', 'win'], ['2.00', 'win']], 100, 'trixie'),
[4, 400, 1700]),
('boundary patent single winner',
([['5.00', 'win'], ['2.00', 'lose'], ['2.00', 'lose']], 100, 'patent'),
[7, 700, 500]),
('boundary wrong count',
([['2.00', 'win'], ['2.00', 'win'], ['2.00', 'win']], 100, 'yankee'),
'invalid'),
('regression: yankee composition',
([['3.11', 'win'], ['5.18', 'win'], ['2.02', 'win'], ['1.76', 'win']], 100, 'yankee'),
[11, 1100, 19864]),
('variant scenario 1',
([['4.95', 'win'], ['5.49', 'void'], ['4.60', 'void']], 100, 'trixie'),
[4, 400, 1585]),
('variant scenario 2',
([['3.01', 'lose'], ['4.92', 'lose'], ['1.83', 'lose'], ['2.53', 'lose'], ['3.61', 'void']],
100,
'lucky15'),
'invalid')],
[('control trixie all win',
([['2.00', 'win'], ['2.00', 'win'], ['2.00', 'win']], 100, 'trixie'),
[4, 400, 2000]),
('control yankee line count',
([['2.00', 'lose'], ['2.00', 'lose'], ['2.00', 'lose'], ['2.00', 'lose']], 100, 'yankee'),
[11, 1100, 0]),
('boundary void selection',
([['2.00', 'void'], ['3.00', 'win'], ['2.00', 'win']], 100, 'trixie'),
[4, 400, 1700]),
('boundary patent single winner',
([['5.00', 'win'], ['2.00', 'lose'], ['2.00', 'lose']], 100, 'patent'),
[7, 700, 500]),
('boundary wrong count',
([['2.00', 'win'], ['2.00', 'win'], ['2.00', 'win']], 100, 'yankee'),
'invalid'),
('regression: yankee composition',
([['5.73', 'void'], ['3.73', 'void'], ['2.13', 'lose'], ['3.62', 'win']], 25, 'yankee'),
[11, 275, 296]),
('variant scenario 1',
([['4.26', 'win'], ['1.31', 'void'], ['1.86', 'void']], 100, 'patent'),
[7, 700, 2004]),
('variant scenario 2',
([['4.86', 'void'], ['3.74', 'void'], ['3.83', 'win']], 25, 'trixie'),
[4, 100, 312])],
[('control trixie all win',
([['2.00', 'win'], ['2.00', 'win'], ['2.00', 'win']], 100, 'trixie'),
[4, 400, 2000]),
('control yankee line count',
([['2.00', 'lose'], ['2.00', 'lose'], ['2.00', 'lose'], ['2.00', 'lose']], 100, 'yankee'),
[11, 1100, 0]),
('boundary void selection',
([['2.00', 'void'], ['3.00', 'win'], ['2.00', 'win']], 100, 'trixie'),
[4, 400, 1700]),
('boundary patent single winner',
([['5.00', 'win'], ['2.00', 'lose'], ['2.00', 'lose']], 100, 'patent'),
[7, 700, 500]),
('boundary wrong count',
([['2.00', 'win'], ['2.00', 'win'], ['2.00', 'win']], 100, 'yankee'),
'invalid'),
('regression: yankee composition',
([['1.39', 'win'], ['4.34', 'void'], ['2.29', 'void'], ['5.41', 'void']], 50, 'yankee'),
[11, 550, 686]),
('variant scenario 1',
([['4.65', 'win'], ['1.35', 'void'], ['1.60', 'void']], 25, 'patent'),
[7, 175, 540]),
('variant scenario 2',
([['3.24', 'win'], ['1.34', 'void'], ['3.79', 'win']], 100, 'trixie'),
[4, 400, 3158])]]
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 trixie all win | [4, 400, 2000] | [4, 400, 2000] | Passed |
| control yankee line count | [10, 1000, 0] | [11, 1100, 0] | Failed |
| boundary void selection | [4, 400, 1700] | [4, 400, 1700] | Passed |
| boundary patent single winner | [7, 700, 500] | [7, 700, 500] | Passed |
| boundary wrong count | invalid | invalid | Passed |
| regression: yankee composition | [10, 500, 2890] | [11, 550, 3464] | Failed |
| variant scenario 1 | [4, 100, 2297] | [4, 100, 2297] | Passed |
| variant scenario 2 | [15, 375, 653] | [15, 375, 653] | Passed |
SHA-256 / 186b476a7d90dcf26541f87f08a2050393aba043e191615dc79d1c9fe7b24f99
3 / The verified repair
Exit 0"""Failure Map reference implementation. Python standard library only."""
import json
from fractions import Fraction
import itertools
import math
N = 1
observations = []
def solve(selections, unit_cents, system):
SYS = {'trixie': (3, [2, 3]), 'patent': (3, [1, 2, 3]), 'yankee': (4, [2, 3, 4]), 'lucky15': (4, [1, 2, 3, 4])}
n, sizes = SYS[system]
if len(selections) != n:
return 'invalid'
lines = [c for k in sizes for c in itertools.combinations(range(n), k)]
ret = Fraction(0)
for combo in lines:
m = Fraction(1)
for i in combo:
price, result = selections[i]
if result == 'lose':
m = Fraction(0)
break
if result == 'win':
m *= Fraction(price)
ret += unit_cents * m
return [len(lines), unit_cents * len(lines), math.floor(ret)]
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 trixie all win',
([['2.00', 'win'], ['2.00', 'win'], ['2.00', 'win']], 100, 'trixie'),
[4, 400, 2000]),
('control yankee line count',
([['2.00', 'lose'], ['2.00', 'lose'], ['2.00', 'lose'], ['2.00', 'lose']], 100, 'yankee'),
[11, 1100, 0]),
('boundary void selection',
([['2.00', 'void'], ['3.00', 'win'], ['2.00', 'win']], 100, 'trixie'),
[4, 400, 1700]),
('boundary patent single winner',
([['5.00', 'win'], ['2.00', 'lose'], ['2.00', 'lose']], 100, 'patent'),
[7, 700, 500]),
('boundary wrong count',
([['2.00', 'win'], ['2.00', 'win'], ['2.00', 'win']], 100, 'yankee'),
'invalid'),
('regression: yankee composition',
([['5.29', 'win'], ['2.17', 'win'], ['4.78', 'void'], ['3.18', 'void']], 50, 'yankee'),
[11, 550, 3464]),
('variant scenario 1',
([['1.95', 'win'], ['4.63', 'win'], ['5.31', 'win']], 25, 'trixie'),
[4, 100, 2297]),
('variant scenario 2',
([['5.78', 'win'], ['1.85', 'lose'], ['1.47', 'void'], ['1.41', 'void']], 25, 'lucky15'),
[15, 375, 653])],
[('control trixie all win',
([['2.00', 'win'], ['2.00', 'win'], ['2.00', 'win']], 100, 'trixie'),
[4, 400, 2000]),
('control yankee line count',
([['2.00', 'lose'], ['2.00', 'lose'], ['2.00', 'lose'], ['2.00', 'lose']], 100, 'yankee'),
[11, 1100, 0]),
('boundary void selection',
([['2.00', 'void'], ['3.00', 'win'], ['2.00', 'win']], 100, 'trixie'),
[4, 400, 1700]),
('boundary patent single winner',
([['5.00', 'win'], ['2.00', 'lose'], ['2.00', 'lose']], 100, 'patent'),
[7, 700, 500]),
('boundary wrong count',
([['2.00', 'win'], ['2.00', 'win'], ['2.00', 'win']], 100, 'yankee'),
'invalid'),
('regression: yankee composition',
([['5.29', 'lose'], ['1.90', 'win'], ['2.16', 'lose'], ['1.45', 'win']], 50, 'yankee'),
[11, 550, 137]),
('variant scenario 1',
([['2.42', 'lose'], ['2.58', 'win'], ['2.00', 'lose'], ['4.02', 'win']], 100, 'lucky15'),
[15, 1500, 1697]),
('variant scenario 2',
([['2.34', 'win'], ['1.77', 'lose'], ['4.10', 'lose']], 100, 'patent'),
[7, 700, 234])],
[('control trixie all win',
([['2.00', 'win'], ['2.00', 'win'], ['2.00', 'win']], 100, 'trixie'),
[4, 400, 2000]),
('control yankee line count',
([['2.00', 'lose'], ['2.00', 'lose'], ['2.00', 'lose'], ['2.00', 'lose']], 100, 'yankee'),
[11, 1100, 0]),
('boundary void selection',
([['2.00', 'void'], ['3.00', 'win'], ['2.00', 'win']], 100, 'trixie'),
[4, 400, 1700]),
('boundary patent single winner',
([['5.00', 'win'], ['2.00', 'lose'], ['2.00', 'lose']], 100, 'patent'),
[7, 700, 500]),
('boundary wrong count',
([['2.00', 'win'], ['2.00', 'win'], ['2.00', 'win']], 100, 'yankee'),
'invalid'),
('regression: yankee composition',
([['3.11', 'win'], ['5.18', 'win'], ['2.02', 'win'], ['1.76', 'win']], 100, 'yankee'),
[11, 1100, 19864]),
('variant scenario 1',
([['4.95', 'win'], ['5.49', 'void'], ['4.60', 'void']], 100, 'trixie'),
[4, 400, 1585]),
('variant scenario 2',
([['3.01', 'lose'], ['4.92', 'lose'], ['1.83', 'lose'], ['2.53', 'lose'], ['3.61', 'void']],
100,
'lucky15'),
'invalid')],
[('control trixie all win',
([['2.00', 'win'], ['2.00', 'win'], ['2.00', 'win']], 100, 'trixie'),
[4, 400, 2000]),
('control yankee line count',
([['2.00', 'lose'], ['2.00', 'lose'], ['2.00', 'lose'], ['2.00', 'lose']], 100, 'yankee'),
[11, 1100, 0]),
('boundary void selection',
([['2.00', 'void'], ['3.00', 'win'], ['2.00', 'win']], 100, 'trixie'),
[4, 400, 1700]),
('boundary patent single winner',
([['5.00', 'win'], ['2.00', 'lose'], ['2.00', 'lose']], 100, 'patent'),
[7, 700, 500]),
('boundary wrong count',
([['2.00', 'win'], ['2.00', 'win'], ['2.00', 'win']], 100, 'yankee'),
'invalid'),
('regression: yankee composition',
([['5.73', 'void'], ['3.73', 'void'], ['2.13', 'lose'], ['3.62', 'win']], 25, 'yankee'),
[11, 275, 296]),
('variant scenario 1',
([['4.26', 'win'], ['1.31', 'void'], ['1.86', 'void']], 100, 'patent'),
[7, 700, 2004]),
('variant scenario 2',
([['4.86', 'void'], ['3.74', 'void'], ['3.83', 'win']], 25, 'trixie'),
[4, 100, 312])],
[('control trixie all win',
([['2.00', 'win'], ['2.00', 'win'], ['2.00', 'win']], 100, 'trixie'),
[4, 400, 2000]),
('control yankee line count',
([['2.00', 'lose'], ['2.00', 'lose'], ['2.00', 'lose'], ['2.00', 'lose']], 100, 'yankee'),
[11, 1100, 0]),
('boundary void selection',
([['2.00', 'void'], ['3.00', 'win'], ['2.00', 'win']], 100, 'trixie'),
[4, 400, 1700]),
('boundary patent single winner',
([['5.00', 'win'], ['2.00', 'lose'], ['2.00', 'lose']], 100, 'patent'),
[7, 700, 500]),
('boundary wrong count',
([['2.00', 'win'], ['2.00', 'win'], ['2.00', 'win']], 100, 'yankee'),
'invalid'),
('regression: yankee composition',
([['1.39', 'win'], ['4.34', 'void'], ['2.29', 'void'], ['5.41', 'void']], 50, 'yankee'),
[11, 550, 686]),
('variant scenario 1',
([['4.65', 'win'], ['1.35', 'void'], ['1.60', 'void']], 25, 'patent'),
[7, 175, 540]),
('variant scenario 2',
([['3.24', 'win'], ['1.34', 'void'], ['3.79', 'win']], 100, 'trixie'),
[4, 400, 3158])]]
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 trixie all win | [4, 400, 2000] | [4, 400, 2000] | Passed |
| control yankee line count | [11, 1100, 0] | [11, 1100, 0] | Passed |
| boundary void selection | [4, 400, 1700] | [4, 400, 1700] | Passed |
| boundary patent single winner | [7, 700, 500] | [7, 700, 500] | Passed |
| boundary wrong count | invalid | invalid | Passed |
| regression: yankee composition | [11, 550, 3464] | [11, 550, 3464] | Passed |
| variant scenario 1 | [4, 100, 2297] | [4, 100, 2297] | Passed |
| variant scenario 2 | [15, 375, 653] | [15, 375, 653] | Passed |
SHA-256 / 5d5e7335c81c28b2db3f2b0b317b36f9677196cd968f950a2d496feac0badf55
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:32.961442+00:00.
Case digest / eb965b4eb4765ef6c7b3f7f6e337133f0bfce3c187862d08c6f55ee805ff1486