FA-84801 / Betting odds conversion / Open access
Accumulators beyond seven legs get no bonus · case 01
An eight-fold loses its bonus entirely, or is capped at 20 percent.
ROOT CAUSE
The table lookup uses the raw count, which has no entry above 7.
THE FAILURE
The table lookup uses the raw count, which has no entry above 7.
Unsuccessful approach: Capping at 6 pays 20 percent instead of 25.
Case contract
Winning accumulator bonus. Every leg price multiplies the accumulator. Legs priced at 1.20 or more qualify; the bonus percentage by qualifying count is {3: 5, 4: 10, 5: 15, 6: 20, 7: 25} with 7 or more paying 25 and fewer than 3 paying 0. The bonus is applied to the profit only: return = stake + profit * (100 + pct) / 100, rounded down. Return [qualifying legs, bonus pct, return cents].
Why this case matters
Acca promotions depend on minimum-odds qualification and apply the bonus to winnings.
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(prices, stake_cents):
TABLE = {3: 5, 4: 10, 5: 15, 6: 20, 7: 25}
factor = Fraction(1)
q = 0
for p in prices:
d = Fraction(p)
factor *= d
if d >= Fraction(120, 100):
q += 1
pct = TABLE.get(q, 0)
profit = stake_cents * (factor - 1)
return [q, pct, math.floor(stake_cents + profit * (100 + pct) / 100)]
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 treble', (['2.00', '2.00', '2.00'], 100), [3, 5, 835]),
('boundary minimum odds leg', (['1.20', '2.00', '2.00'], 100), [3, 5, 499]),
('boundary short leg does not qualify', (['1.19', '2.00', '2.00'], 100), [2, 0, 476]),
('boundary eight legs capped',
(['1.50', '1.50', '1.50', '1.50', '1.50', '1.50', '1.50', '1.50'], 100),
[8, 25, 3178]),
('regression: bonus table cap',
(['1.20', '1.25', '1.20', '1.62', '1.25', '1.20', '1.25', '1.20', '1.25'], 100),
[9, 25, 1000]),
('variant scenario 1', (['2.08', '1.20', '1.25', '1.39', '1.15'], 500), [4, 10, 2693]),
('variant scenario 2', (['1.19', '1.58'], 1000), [1, 0, 1880])],
[('control treble', (['2.00', '2.00', '2.00'], 100), [3, 5, 835]),
('boundary minimum odds leg', (['1.20', '2.00', '2.00'], 100), [3, 5, 499]),
('boundary short leg does not qualify', (['1.19', '2.00', '2.00'], 100), [2, 0, 476]),
('boundary eight legs capped',
(['1.50', '1.50', '1.50', '1.50', '1.50', '1.50', '1.50', '1.50'], 100),
[8, 25, 3178]),
('regression: bonus table cap',
(['1.73', '1.20', '1.41', '1.25', '1.25', '1.25', '2.53'], 100),
[7, 25, 1783]),
('regression: bonus table cap',
(['1.25', '2.16', '1.20', '1.20', '1.94', '1.25', '1.20', '1.15', '1.20'], 500),
[8, 25, 9633]),
('variant scenario 1', (['1.20', '1.96', '1.25', '1.19', '2.22'], 100), [4, 10, 844]),
('variant scenario 2', (['1.19', '2.00', '1.15', '1.15', '1.25'], 1000), [2, 0, 3934])],
[('control treble', (['2.00', '2.00', '2.00'], 100), [3, 5, 835]),
('boundary minimum odds leg', (['1.20', '2.00', '2.00'], 100), [3, 5, 499]),
('boundary short leg does not qualify', (['1.19', '2.00', '2.00'], 100), [2, 0, 476]),
('boundary eight legs capped',
(['1.50', '1.50', '1.50', '1.50', '1.50', '1.50', '1.50', '1.50'], 100),
[8, 25, 3178]),
('regression: bonus table cap',
(['2.20', '1.20', '2.17', '1.20', '1.15', '1.19', '1.20', '1.20', '1.20'], 100),
[7, 25, 2007]),
('regression: bonus table cap',
(['2.45', '1.25', '2.20', '1.25', '2.53', '1.50', '1.19', '1.20', '1.20'], 100),
[8, 25, 6821]),
('variant scenario 1', (['1.25', '1.25', '1.25'], 1000), [3, 5, 2000]),
('variant scenario 2',
(['1.19', '1.19', '2.03', '2.44', '1.25', '1.25', '2.17'], 1000),
[5, 15, 27200])],
[('control treble', (['2.00', '2.00', '2.00'], 100), [3, 5, 835]),
('boundary minimum odds leg', (['1.20', '2.00', '2.00'], 100), [3, 5, 499]),
('boundary short leg does not qualify', (['1.19', '2.00', '2.00'], 100), [2, 0, 476]),
('boundary eight legs capped',
(['1.50', '1.50', '1.50', '1.50', '1.50', '1.50', '1.50', '1.50'], 100),
[8, 25, 3178]),
('regression: bonus table cap',
(['1.95', '1.19', '1.25', '2.22', '1.25', '1.92', '1.77', '1.20', '1.20'], 1000),
[8, 25, 48988]),
('variant scenario 1',
(['1.20', '2.32', '1.19', '1.20', '1.25', '1.20', '1.67'], 500),
[6, 20, 5875]),
('variant scenario 2', (['1.19', '1.15', '2.41', '1.25', '1.15'], 1000), [2, 0, 4740])],
[('control treble', (['2.00', '2.00', '2.00'], 100), [3, 5, 835]),
('boundary minimum odds leg', (['1.20', '2.00', '2.00'], 100), [3, 5, 499]),
('boundary short leg does not qualify', (['1.19', '2.00', '2.00'], 100), [2, 0, 476]),
('boundary eight legs capped',
(['1.50', '1.50', '1.50', '1.50', '1.50', '1.50', '1.50', '1.50'], 100),
[8, 25, 3178]),
('regression: bonus table cap',
(['1.15', '1.25', '1.54', '1.19', '2.47', '1.20', '1.81', '1.20', '1.25'], 500),
[7, 25, 13124]),
('regression: bonus table cap',
(['1.20', '1.25', '1.25', '2.14', '1.92', '1.20', '1.25', '2.30', '1.25'], 500),
[9, 25, 20639]),
('variant scenario 1',
(['1.25', '1.15', '1.25', '1.25', '1.25', '1.20', '1.19', '2.59', '1.15'], 500),
[6, 20, 7064]),
('variant scenario 2',
(['1.78', '1.19', '1.25', '1.71', '1.25', '2.35', '1.25', '1.19'], 1000),
[6, 20, 23540])]]
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 treble | [3, 5, 835] | [3, 5, 835] | Passed |
| boundary minimum odds leg | [3, 5, 499] | [3, 5, 499] | Passed |
| boundary short leg does not qualify | [2, 0, 476] | [2, 0, 476] | Passed |
| boundary eight legs capped | [8, 0, 2562] | [8, 25, 3178] | Failed |
| regression: bonus table cap | [9, 0, 820] | [9, 25, 1000] | Failed |
| variant scenario 1 | [4, 10, 2693] | [4, 10, 2693] | Passed |
| variant scenario 2 | [1, 0, 1880] | [1, 0, 1880] | Passed |
SHA-256 / f7677897a4a352f470a707e6367eeefe5bc0af8fb4756315dd2364355a9455a8
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(prices, stake_cents):
TABLE = {3: 5, 4: 10, 5: 15, 6: 20, 7: 25}
factor = Fraction(1)
q = 0
for p in prices:
d = Fraction(p)
factor *= d
if d >= Fraction(120, 100):
q += 1
pct = TABLE.get(min(q, 6), 0)
profit = stake_cents * (factor - 1)
return [q, pct, math.floor(stake_cents + profit * (100 + pct) / 100)]
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 treble', (['2.00', '2.00', '2.00'], 100), [3, 5, 835]),
('boundary minimum odds leg', (['1.20', '2.00', '2.00'], 100), [3, 5, 499]),
('boundary short leg does not qualify', (['1.19', '2.00', '2.00'], 100), [2, 0, 476]),
('boundary eight legs capped',
(['1.50', '1.50', '1.50', '1.50', '1.50', '1.50', '1.50', '1.50'], 100),
[8, 25, 3178]),
('regression: bonus table cap',
(['1.20', '1.25', '1.20', '1.62', '1.25', '1.20', '1.25', '1.20', '1.25'], 100),
[9, 25, 1000]),
('variant scenario 1', (['2.08', '1.20', '1.25', '1.39', '1.15'], 500), [4, 10, 2693]),
('variant scenario 2', (['1.19', '1.58'], 1000), [1, 0, 1880])],
[('control treble', (['2.00', '2.00', '2.00'], 100), [3, 5, 835]),
('boundary minimum odds leg', (['1.20', '2.00', '2.00'], 100), [3, 5, 499]),
('boundary short leg does not qualify', (['1.19', '2.00', '2.00'], 100), [2, 0, 476]),
('boundary eight legs capped',
(['1.50', '1.50', '1.50', '1.50', '1.50', '1.50', '1.50', '1.50'], 100),
[8, 25, 3178]),
('regression: bonus table cap',
(['1.73', '1.20', '1.41', '1.25', '1.25', '1.25', '2.53'], 100),
[7, 25, 1783]),
('regression: bonus table cap',
(['1.25', '2.16', '1.20', '1.20', '1.94', '1.25', '1.20', '1.15', '1.20'], 500),
[8, 25, 9633]),
('variant scenario 1', (['1.20', '1.96', '1.25', '1.19', '2.22'], 100), [4, 10, 844]),
('variant scenario 2', (['1.19', '2.00', '1.15', '1.15', '1.25'], 1000), [2, 0, 3934])],
[('control treble', (['2.00', '2.00', '2.00'], 100), [3, 5, 835]),
('boundary minimum odds leg', (['1.20', '2.00', '2.00'], 100), [3, 5, 499]),
('boundary short leg does not qualify', (['1.19', '2.00', '2.00'], 100), [2, 0, 476]),
('boundary eight legs capped',
(['1.50', '1.50', '1.50', '1.50', '1.50', '1.50', '1.50', '1.50'], 100),
[8, 25, 3178]),
('regression: bonus table cap',
(['2.20', '1.20', '2.17', '1.20', '1.15', '1.19', '1.20', '1.20', '1.20'], 100),
[7, 25, 2007]),
('regression: bonus table cap',
(['2.45', '1.25', '2.20', '1.25', '2.53', '1.50', '1.19', '1.20', '1.20'], 100),
[8, 25, 6821]),
('variant scenario 1', (['1.25', '1.25', '1.25'], 1000), [3, 5, 2000]),
('variant scenario 2',
(['1.19', '1.19', '2.03', '2.44', '1.25', '1.25', '2.17'], 1000),
[5, 15, 27200])],
[('control treble', (['2.00', '2.00', '2.00'], 100), [3, 5, 835]),
('boundary minimum odds leg', (['1.20', '2.00', '2.00'], 100), [3, 5, 499]),
('boundary short leg does not qualify', (['1.19', '2.00', '2.00'], 100), [2, 0, 476]),
('boundary eight legs capped',
(['1.50', '1.50', '1.50', '1.50', '1.50', '1.50', '1.50', '1.50'], 100),
[8, 25, 3178]),
('regression: bonus table cap',
(['1.95', '1.19', '1.25', '2.22', '1.25', '1.92', '1.77', '1.20', '1.20'], 1000),
[8, 25, 48988]),
('variant scenario 1',
(['1.20', '2.32', '1.19', '1.20', '1.25', '1.20', '1.67'], 500),
[6, 20, 5875]),
('variant scenario 2', (['1.19', '1.15', '2.41', '1.25', '1.15'], 1000), [2, 0, 4740])],
[('control treble', (['2.00', '2.00', '2.00'], 100), [3, 5, 835]),
('boundary minimum odds leg', (['1.20', '2.00', '2.00'], 100), [3, 5, 499]),
('boundary short leg does not qualify', (['1.19', '2.00', '2.00'], 100), [2, 0, 476]),
('boundary eight legs capped',
(['1.50', '1.50', '1.50', '1.50', '1.50', '1.50', '1.50', '1.50'], 100),
[8, 25, 3178]),
('regression: bonus table cap',
(['1.15', '1.25', '1.54', '1.19', '2.47', '1.20', '1.81', '1.20', '1.25'], 500),
[7, 25, 13124]),
('regression: bonus table cap',
(['1.20', '1.25', '1.25', '2.14', '1.92', '1.20', '1.25', '2.30', '1.25'], 500),
[9, 25, 20639]),
('variant scenario 1',
(['1.25', '1.15', '1.25', '1.25', '1.25', '1.20', '1.19', '2.59', '1.15'], 500),
[6, 20, 7064]),
('variant scenario 2',
(['1.78', '1.19', '1.25', '1.71', '1.25', '2.35', '1.25', '1.19'], 1000),
[6, 20, 23540])]]
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 treble | [3, 5, 835] | [3, 5, 835] | Passed |
| boundary minimum odds leg | [3, 5, 499] | [3, 5, 499] | Passed |
| boundary short leg does not qualify | [2, 0, 476] | [2, 0, 476] | Passed |
| boundary eight legs capped | [8, 20, 3055] | [8, 25, 3178] | Failed |
| regression: bonus table cap | [9, 20, 964] | [9, 25, 1000] | Failed |
| variant scenario 1 | [4, 10, 2693] | [4, 10, 2693] | Passed |
| variant scenario 2 | [1, 0, 1880] | [1, 0, 1880] | Passed |
SHA-256 / 9f2c469b56f334fa3e56fa37acacfab4eebff990a74c7929bf5e3fcadfc002f7
HELD IN THE MEMBER ARCHIVE
The verified repair and its recorded checks are member-only.
This mechanism has 7 recorded checks per implementation. The open-access tier publishes the failure and the unsuccessful fix; the repaired source that passes every check, and the observations that prove it, are available to members.
Every case sharing this mechanism uses the same contract and the same repair, so this one record is held back for all of them.
Member access is invitation-based. Sign in with your invited account to inspect the repair.
Sign in to the archive ↗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:34.543983+00:00.
Case digest / 772f20fa606c27c625ab5395b87bea590f0b74d31c689ab1142e178550e05938