FAILURE MAP
← Case archive

FA-85026 / Fantasy sports scoring / Open access

Equal matchup scores awarded to the listed home team · case 01

Two teams tied at 90.25 produce a win and a loss.

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

ROOT CAUSE

The first team in the pair wins on equal scores.

THE FAILURE

The first team in the pair wins on equal scores.

Unsuccessful approach: Breaking ties alphabetically still converts a tie into a win and a loss.

Case contract

Weekly fantasy scores are integer hundredths. Each head-to-head pair records a win/loss or a tie on equal scores (an odd team out has no head-to-head game). Every team also plays the league median: the middle score for an odd team count or the mean of the two middle scores for an even count; above the median is a win, below a loss, equal a tie. Return team -> [wins, losses, ties].

Why this case matters

Median-scoring leagues award a second result each week; the median definition and half-point comparisons decide playoff races.

1 / The failure

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(pairs, scores):
    rec = {t: [0, 0, 0] for t in scores}
    for a, b in pairs:
        if scores[a] >= scores[b]:
            rec[a][0] += 1; rec[b][1] += 1
        elif scores[a] < scores[b]:
            rec[a][1] += 1; rec[b][0] += 1
        else:
            rec[a][2] += 1; rec[b][2] += 1
    vals = sorted(scores.values())
    n = len(vals)
    twice_median = vals[n // 2] * 2 if n % 2 else vals[n // 2 - 1] + vals[n // 2]
    for t, s in scores.items():
        if 2 * s > twice_median:
            rec[t][0] += 1
        elif 2 * s < twice_median:
            rec[t][1] += 1
        else:
            rec[t][2] += 1
    return rec
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('regression: head-to-head tie',
   [[['T2', 'T6'], ['T4', 'T0'], ['T5', 'T1']],
    {'T0': 9025, 'T1': 9025, 'T2': 8850, 'T3': 11240, 'T4': 11240, 'T5': 8850, 'T6': 8850}],
   {'T0': [0, 1, 1],
    'T1': [1, 0, 1],
    'T2': [0, 1, 1],
    'T3': [1, 0, 0],
    'T4': [2, 0, 0],
    'T5': [0, 2, 0],
    'T6': [0, 1, 1]}),
  ('partial repair probe: head-to-head tie',
   [[['T4', 'T0'], ['T3', 'T2'], ['T1', 'T5']],
    {'T0': 9025, 'T1': 9025, 'T2': 10110, 'T3': 10110, 'T4': 9025, 'T5': 9025}],
   {'T0': [0, 0, 2], 'T1': [0, 0, 2], 'T2': [1, 0, 1], 'T3': [1, 0, 1], 'T4': [0, 0, 2], 'T5': [0, 0, 2]}),
  ('second regression',
   [[['T5', 'T3'], ['T6', 'T2'], ['T1', 'T4']],
    {'T0': 12000, 'T1': 10344, 'T2': 9025, 'T3': 12000, 'T4': 12000, 'T5': 8850, 'T6': 9025}],
   {'T0': [1, 0, 0],
    'T1': [0, 1, 1],
    'T2': [0, 1, 1],
    'T3': [2, 0, 0],
    'T4': [2, 0, 0],
    'T5': [0, 2, 0],
    'T6': [0, 1, 1]}),
  ('normal control 1',
   [[['T0', 'T1'], ['T4', 'T2']], {'T0': 11240, 'T1': 7386, 'T2': 8850, 'T3': 10111, 'T4': 9025}],
   {'T0': [2, 0, 0], 'T1': [0, 2, 0], 'T2': [0, 2, 0], 'T3': [1, 0, 0], 'T4': [1, 0, 1]}),
  ('normal control 2',
   [[['T2', 'T1'], ['T4', 'T0'], ['T3', 'T5']],
    {'T0': 10111, 'T1': 9025, 'T2': 12000, 'T3': 12000, 'T4': 8850, 'T5': 10111}],
   {'T0': [1, 0, 1], 'T1': [0, 2, 0], 'T2': [2, 0, 0], 'T3': [2, 0, 0], 'T4': [0, 2, 0], 'T5': [0, 1, 1]}),
  ('normal control 3',
   [[['T4', 'T3'], ['T0', 'T6'], ['T2', 'T5']],
    {'T0': 12558, 'T1': 8850, 'T2': 10110, 'T3': 12000, 'T4': 9025, 'T5': 8850, 'T6': 11240}],
   {'T0': [2, 0, 0],
    'T1': [0, 1, 0],
    'T2': [1, 0, 1],
    'T3': [2, 0, 0],
    'T4': [0, 2, 0],
    'T5': [0, 2, 0],
    'T6': [1, 1, 0]}),
  ('normal control 4', [[['T2', 'T0'], ['T1', 'T3']], {'T0': 9025, 'T1': 10110, 'T2': 10110, 'T3': 9025}],
   {'T0': [0, 2, 0], 'T1': [2, 0, 0], 'T2': [2, 0, 0], 'T3': [0, 2, 0]})],
 [('regression: head-to-head tie',
   [[['T3', 'T4'], ['T0', 'T2']], {'T0': 11100, 'T1': 8514, 'T2': 11240, 'T3': 10110, 'T4': 10110}],
   {'T0': [1, 1, 0], 'T1': [0, 1, 0], 'T2': [2, 0, 0], 'T3': [0, 0, 2], 'T4': [0, 0, 2]}),
  ('partial repair probe: head-to-head tie',
   [[['T0', 'T5'], ['T1', 'T4'], ['T3', 'T2']],
    {'T0': 11240, 'T1': 9025, 'T2': 11240, 'T3': 9025, 'T4': 9025, 'T5': 8850}],
   {'T0': [2, 0, 0], 'T1': [0, 0, 2], 'T2': [2, 0, 0], 'T3': [0, 1, 1], 'T4': [0, 0, 2], 'T5': [0, 2, 0]}),
  ('second regression', [[['T0', 'T1'], ['T3', 'T2']], {'T0': 11059, 'T1': 9025, 'T2': 10110, 'T3': 10110}],
   {'T0': [2, 0, 0], 'T1': [0, 2, 0], 'T2': [0, 0, 2], 'T3': [0, 0, 2]}),
  ('normal control 1',
   [[['T0', 'T5'], ['T1', 'T3'], ['T7', 'T6'], ['T2', 'T4']],
    {'T0': 12000, 'T1': 8850, 'T2': 10111, 'T3': 10111, 'T4': 7680, 'T5': 10034, 'T6': 9025, 'T7': 10111}],
   {'T0': [2, 0, 0],
    'T1': [0, 2, 0],
    'T2': [2, 0, 0],
    'T3': [2, 0, 0],
    'T4': [0, 2, 0],
    'T5': [0, 2, 0],
    'T6': [0, 2, 0],
    'T7': [2, 0, 0]}),
  ('normal control 2',
   [[['T1', 'T0'], ['T2', 'T5'], ['T6', 'T3']],
    {'T0': 11833, 'T1': 9025, 'T2': 9025, 'T3': 8817, 'T4': 10111, 'T5': 8850, 'T6': 9025}],
   {'T0': [2, 0, 0],
    'T1': [0, 1, 1],
    'T2': [1, 0, 1],
    'T3': [0, 2, 0],
    'T4': [1, 0, 0],
    'T5': [0, 2, 0],
    'T6': [1, 0, 1]}),
  ('normal control 3',
   [[['T4', 'T0'], ['T3', 'T2'], ['T1', 'T5']],
    {'T0': 12000, 'T1': 9025, 'T2': 10110, 'T3': 10111, 'T4': 10111, 'T5': 9788}],
   {'T0': [2, 0, 0], 'T1': [0, 2, 0], 'T2': [0, 2, 0], 'T3': [2, 0, 0], 'T4': [1, 1, 0], 'T5': [1, 1, 0]}),
  ('normal control 4',
   [[['T0', 'T1'], ['T6', 'T4'], ['T3', 'T2']],
    {'T0': 8850, 'T1': 9025, 'T2': 13184, 'T3': 11240, 'T4': 11240, 'T5': 10110, 'T6': 12000}],
   {'T0': [0, 2, 0],
    'T1': [1, 1, 0],
    'T2': [2, 0, 0],
    'T3': [0, 1, 1],
    'T4': [0, 1, 1],
    'T5': [0, 1, 0],
    'T6': [2, 0, 0]})],
 [('regression: head-to-head tie',
   [[['T2', 'T1'], ['T3', 'T0']], {'T0': 12000, 'T1': 9025, 'T2': 9025, 'T3': 10111}],
   {'T0': [2, 0, 0], 'T1': [0, 1, 1], 'T2': [0, 1, 1], 'T3': [1, 1, 0]}),
  ('partial repair probe: head-to-head tie',
   [[['T4', 'T0'], ['T1', 'T2'], ['T3', 'T5']],
    {'T0': 8850, 'T1': 9025, 'T2': 9025, 'T3': 9025, 'T4': 9025, 'T5': 10111}],
   {'T0': [0, 2, 0], 'T1': [0, 0, 2], 'T2': [0, 0, 2], 'T3': [0, 1, 1], 'T4': [1, 0, 1], 'T5': [2, 0, 0]}),
  ('second regression', [[['T0', 'T1'], ['T3', 'T2']], {'T0': 10110, 'T1': 10110, 'T2': 12000, 'T3': 12000}],
   {'T0': [0, 1, 1], 'T1': [0, 1, 1], 'T2': [1, 0, 1], 'T3': [1, 0, 1]}),
  ('normal control 1', [[['T1', 'T0'], ['T3', 'T2']], {'T0': 10111, 'T1': 8850, 'T2': 8609, 'T3': 12000}],
   {'T0': [2, 0, 0], 'T1': [0, 2, 0], 'T2': [0, 2, 0], 'T3': [2, 0, 0]}),
  ('normal control 2',
   [[['T5', 'T7'], ['T2', 'T6'], ['T3', 'T4'], ['T0', 'T1']],
    {'T0': 11240, 'T1': 10111, 'T2': 9025, 'T3': 11384, 'T4': 9025, 'T5': 10110, 'T6': 12000, 'T7': 10111}],
   {'T0': [2, 0, 0],
    'T1': [0, 1, 1],
    'T2': [0, 2, 0],
    'T3': [2, 0, 0],
    'T4': [0, 2, 0],
    'T5': [0, 2, 0],
    'T6': [2, 0, 0],
    'T7': [1, 0, 1]}),
  ('normal control 3',
   [[['T1', 'T5'], ['T3', 'T2'], ['T4', 'T0']],
    {'T0': 8850, 'T1': 8850, 'T2': 11240, 'T3': 10111, 'T4': 10111, 'T5': 10111}],
   {'T0': [0, 2, 0], 'T1': [0, 2, 0], 'T2': [2, 0, 0], 'T3': [0, 1, 1], 'T4': [1, 0, 1], 'T5': [1, 0, 1]}),
  ('normal control 4',
   [[['T3', 'T4'], ['T0', 'T1']], {'T0': 9025, 'T1': 10111, 'T2': 9480, 'T3': 7036, 'T4': 11240}],
   {'T0': [0, 2, 0], 'T1': [2, 0, 0], 'T2': [0, 0, 1], 'T3': [0, 2, 0], 'T4': [2, 0, 0]})],
 [('regression: head-to-head tie',
   [[['T3', 'T1'], ['T0', 'T6'], ['T5', 'T4']],
    {'T0': 11240, 'T1': 9025, 'T2': 11240, 'T3': 8850, 'T4': 10111, 'T5': 10110, 'T6': 11240}],
   {'T0': [1, 0, 1],
    'T1': [1, 1, 0],
    'T2': [1, 0, 0],
    'T3': [0, 2, 0],
    'T4': [1, 0, 1],
    'T5': [0, 2, 0],
    'T6': [1, 0, 1]}),
  ('partial repair probe: head-to-head tie',
   [[['T5', 'T0'], ['T2', 'T7'], ['T4', 'T1'], ['T6', 'T3']],
    {'T0': 9025, 'T1': 9025, 'T2': 11240, 'T3': 10110, 'T4': 9025, 'T5': 10110, 'T6': 10111, 'T7': 11240}],
   {'T0': [0, 2, 0],
    'T1': [0, 1, 1],
    'T2': [1, 0, 1],
    'T3': [0, 1, 1],
    'T4': [0, 1, 1],
    'T5': [1, 0, 1],
    'T6': [2, 0, 0],
    'T7': [1, 0, 1]}),
  ('second regression',
   [[['T4', 'T1'], ['T2', 'T3'], ['T6', 'T0']],
    {'T0': 9025, 'T1': 13786, 'T2': 9025, 'T3': 10110, 'T4': 10110, 'T5': 8850, 'T6': 9025}],
   {'T0': [0, 0, 2],
    'T1': [2, 0, 0],
    'T2': [0, 1, 1],
    'T3': [2, 0, 0],
    'T4': [1, 1, 0],
    'T5': [0, 1, 0],
    'T6': [0, 0, 2]}),
  ('normal control 1',
   [[['T6', 'T1'], ['T0', 'T2'], ['T5', 'T4']],
    {'T0': 12000, 'T1': 8850, 'T2': 9025, 'T3': 12000, 'T4': 9025, 'T5': 10111, 'T6': 12000}],
   {'T0': [2, 0, 0],
    'T1': [0, 2, 0],
    'T2': [0, 2, 0],
    'T3': [1, 0, 0],
    'T4': [0, 2, 0],
    'T5': [1, 0, 1],
    'T6': [2, 0, 0]}),
  ('normal control 2',
   [[['T3', 'T4'], ['T0', 'T2']], {'T0': 8850, 'T1': 10111, 'T2': 11240, 'T3': 11240, 'T4': 12000}],
   {'T0': [0, 2, 0], 'T1': [0, 1, 0], 'T2': [1, 0, 1], 'T3': [0, 1, 1], 'T4': [2, 0, 0]}),
  ('normal control 3',
   [[['T0', 'T1'], ['T3', 'T7'], ['T4', 'T5'], ['T2', 'T6']],
    {'T0': 10111, 'T1': 12797, 'T2': 10111, 'T3': 9025, 'T4': 10111, 'T5': 10110, 'T6': 8850, 'T7': 8850}],
   {'T0': [1, 1, 0],
    'T1': [2, 0, 0],
    'T2': [2, 0, 0],
    'T3': [1, 1, 0],
    'T4': [2, 0, 0],
    'T5': [0, 2, 0],
    'T6': [0, 2, 0],
    'T7': [0, 2, 0]}),
  ('normal control 4', [[['T1', 'T3'], ['T2', 'T0']], {'T0': 9025, 'T1': 10110, 'T2': 12000, 'T3': 11240}],
   {'T0': [0, 2, 0], 'T1': [0, 2, 0], 'T2': [2, 0, 0], 'T3': [2, 0, 0]})],
 [('regression: head-to-head tie',
   [[['T5', 'T0'], ['T1', 'T4'], ['T2', 'T3']],
    {'T0': 8850, 'T1': 10111, 'T2': 10111, 'T3': 12000, 'T4': 11240, 'T5': 8850}],
   {'T0': [0, 1, 1], 'T1': [0, 1, 1], 'T2': [0, 1, 1], 'T3': [2, 0, 0], 'T4': [2, 0, 0], 'T5': [0, 1, 1]}),
  ('partial repair probe: head-to-head tie',
   [[['T1', 'T3'], ['T6', 'T2'], ['T5', 'T0'], ['T4', 'T7']],
    {'T0': 10111, 'T1': 9025, 'T2': 11240, 'T3': 11240, 'T4': 10110, 'T5': 10111, 'T6': 11240, 'T7': 10110}],
   {'T0': [0, 0, 2],
    'T1': [0, 2, 0],
    'T2': [1, 0, 1],
    'T3': [2, 0, 0],
    'T4': [0, 1, 1],
    'T5': [0, 0, 2],
    'T6': [1, 0, 1],
    'T7': [0, 1, 1]}),
  ('second regression',
   [[['T5', 'T3'], ['T2', 'T1'], ['T0', 'T4']],
    {'T0': 9025, 'T1': 8850, 'T2': 8850, 'T3': 9025, 'T4': 10111, 'T5': 9025}],
   {'T0': [0, 1, 1], 'T1': [0, 1, 1], 'T2': [0, 1, 1], 'T3': [0, 0, 2], 'T4': [2, 0, 0], 'T5': [0, 0, 2]}),
  ('normal control 1',
   [[['T3', 'T1'], ['T4', 'T2']], {'T0': 9025, 'T1': 13734, 'T2': 10110, 'T3': 9025, 'T4': 9025}],
   {'T0': [0, 0, 1], 'T1': [2, 0, 0], 'T2': [2, 0, 0], 'T3': [0, 1, 1], 'T4': [0, 1, 1]}),
  ('normal control 2',
   [[['T3', 'T4'], ['T5', 'T2'], ['T6', 'T1']],
    {'T0': 9025, 'T1': 9025, 'T2': 9025, 'T3': 9025, 'T4': 12000, 'T5': 10111, 'T6': 10111}],
   {'T0': [0, 0, 1],
    'T1': [0, 1, 1],
    'T2': [0, 1, 1],
    'T3': [0, 1, 1],
    'T4': [2, 0, 0],
    'T5': [2, 0, 0],
    'T6': [2, 0, 0]}),
  ('normal control 3',
   [[['T4', 'T0'], ['T3', 'T1'], ['T6', 'T2']],
    {'T0': 10111, 'T1': 9025, 'T2': 10111, 'T3': 12000, 'T4': 12000, 'T5': 12000, 'T6': 10272}],
   {'T0': [0, 2, 0],
    'T1': [0, 2, 0],
    'T2': [0, 2, 0],
    'T3': [2, 0, 0],
    'T4': [2, 0, 0],
    'T5': [1, 0, 0],
    'T6': [1, 0, 1]}),
  ('normal control 4',
   [[['T1', 'T2'], ['T4', 'T3'], ['T0', 'T5']],
    {'T0': 12000, 'T1': 10110, 'T2': 9025, 'T3': 8850, 'T4': 10110, 'T5': 11240}],
   {'T0': [2, 0, 0], 'T1': [1, 0, 1], 'T2': [0, 2, 0], 'T3': [0, 2, 0], 'T4': [1, 0, 1], 'T5': [1, 1, 0]})]]
for label, args, expected in fixtures[N-1]:
    check(label, solve(*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
regression: head-to-head tie{'T0': [0, 1, 1], 'T1': [1, 0, 1], 'T2': [1, 1, 0], 'T3': [1, 0, 0], 'T4': [2, 0, 0], 'T5': [0, 2, 0], 'T6': [0, 2, 0]}{'T0': [0, 1, 1], 'T1': [1, 0, 1], 'T2': [0, 1, 1], 'T3': [1, 0, 0], 'T4': [2, 0, 0], 'T5': [0, 2, 0], 'T6': [0, 1, 1]}Failed
partial repair probe: head-to-head tie{'T0': [0, 1, 1], 'T1': [1, 0, 1], 'T2': [1, 1, 0], 'T3': [2, 0, 0], 'T4': [1, 0, 1], 'T5': [0, 1, 1]}{'T0': [0, 0, 2], 'T1': [0, 0, 2], 'T2': [1, 0, 1], 'T3': [1, 0, 1], 'T4': [0, 0, 2], 'T5': [0, 0, 2]}Failed
second regression{'T0': [1, 0, 0], 'T1': [0, 1, 1], 'T2': [0, 2, 0], 'T3': [2, 0, 0], 'T4': [2, 0, 0], 'T5': [0, 2, 0], 'T6': [1, 1, 0]}{'T0': [1, 0, 0], 'T1': [0, 1, 1], 'T2': [0, 1, 1], 'T3': [2, 0, 0], 'T4': [2, 0, 0], 'T5': [0, 2, 0], 'T6': [0, 1, 1]}Failed
normal control 1{'T0': [2, 0, 0], 'T1': [0, 2, 0], 'T2': [0, 2, 0], 'T3': [1, 0, 0], 'T4': [1, 0, 1]}{'T0': [2, 0, 0], 'T1': [0, 2, 0], 'T2': [0, 2, 0], 'T3': [1, 0, 0], 'T4': [1, 0, 1]}Passed
normal control 2{'T0': [1, 0, 1], 'T1': [0, 2, 0], 'T2': [2, 0, 0], 'T3': [2, 0, 0], 'T4': [0, 2, 0], 'T5': [0, 1, 1]}{'T0': [1, 0, 1], 'T1': [0, 2, 0], 'T2': [2, 0, 0], 'T3': [2, 0, 0], 'T4': [0, 2, 0], 'T5': [0, 1, 1]}Passed
normal control 3{'T0': [2, 0, 0], 'T1': [0, 1, 0], 'T2': [1, 0, 1], 'T3': [2, 0, 0], 'T4': [0, 2, 0], 'T5': [0, 2, 0], 'T6': [1, 1, 0]}{'T0': [2, 0, 0], 'T1': [0, 1, 0], 'T2': [1, 0, 1], 'T3': [2, 0, 0], 'T4': [0, 2, 0], 'T5': [0, 2, 0], 'T6': [1, 1, 0]}Passed
normal control 4{'T0': [0, 2, 0], 'T1': [2, 0, 0], 'T2': [2, 0, 0], 'T3': [0, 2, 0]}{'T0': [0, 2, 0], 'T1': [2, 0, 0], 'T2': [2, 0, 0], 'T3': [0, 2, 0]}Passed

SHA-256 / 0e93d98ae467a60d0eff5982e6cc3fa7195647bbf0a7c79f805874ff617279ae

2 / The unsuccessful fix

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(pairs, scores):
    rec = {t: [0, 0, 0] for t in scores}
    for a, b in pairs:
        if scores[a] > scores[b] or (scores[a] == scores[b] and a < b):
            rec[a][0] += 1; rec[b][1] += 1
        elif scores[a] < scores[b]:
            rec[a][1] += 1; rec[b][0] += 1
        else:
            rec[a][2] += 1; rec[b][2] += 1
    vals = sorted(scores.values())
    n = len(vals)
    twice_median = vals[n // 2] * 2 if n % 2 else vals[n // 2 - 1] + vals[n // 2]
    for t, s in scores.items():
        if 2 * s > twice_median:
            rec[t][0] += 1
        elif 2 * s < twice_median:
            rec[t][1] += 1
        else:
            rec[t][2] += 1
    return rec
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('regression: head-to-head tie',
   [[['T2', 'T6'], ['T4', 'T0'], ['T5', 'T1']],
    {'T0': 9025, 'T1': 9025, 'T2': 8850, 'T3': 11240, 'T4': 11240, 'T5': 8850, 'T6': 8850}],
   {'T0': [0, 1, 1],
    'T1': [1, 0, 1],
    'T2': [0, 1, 1],
    'T3': [1, 0, 0],
    'T4': [2, 0, 0],
    'T5': [0, 2, 0],
    'T6': [0, 1, 1]}),
  ('partial repair probe: head-to-head tie',
   [[['T4', 'T0'], ['T3', 'T2'], ['T1', 'T5']],
    {'T0': 9025, 'T1': 9025, 'T2': 10110, 'T3': 10110, 'T4': 9025, 'T5': 9025}],
   {'T0': [0, 0, 2], 'T1': [0, 0, 2], 'T2': [1, 0, 1], 'T3': [1, 0, 1], 'T4': [0, 0, 2], 'T5': [0, 0, 2]}),
  ('second regression',
   [[['T5', 'T3'], ['T6', 'T2'], ['T1', 'T4']],
    {'T0': 12000, 'T1': 10344, 'T2': 9025, 'T3': 12000, 'T4': 12000, 'T5': 8850, 'T6': 9025}],
   {'T0': [1, 0, 0],
    'T1': [0, 1, 1],
    'T2': [0, 1, 1],
    'T3': [2, 0, 0],
    'T4': [2, 0, 0],
    'T5': [0, 2, 0],
    'T6': [0, 1, 1]}),
  ('normal control 1',
   [[['T0', 'T1'], ['T4', 'T2']], {'T0': 11240, 'T1': 7386, 'T2': 8850, 'T3': 10111, 'T4': 9025}],
   {'T0': [2, 0, 0], 'T1': [0, 2, 0], 'T2': [0, 2, 0], 'T3': [1, 0, 0], 'T4': [1, 0, 1]}),
  ('normal control 2',
   [[['T2', 'T1'], ['T4', 'T0'], ['T3', 'T5']],
    {'T0': 10111, 'T1': 9025, 'T2': 12000, 'T3': 12000, 'T4': 8850, 'T5': 10111}],
   {'T0': [1, 0, 1], 'T1': [0, 2, 0], 'T2': [2, 0, 0], 'T3': [2, 0, 0], 'T4': [0, 2, 0], 'T5': [0, 1, 1]}),
  ('normal control 3',
   [[['T4', 'T3'], ['T0', 'T6'], ['T2', 'T5']],
    {'T0': 12558, 'T1': 8850, 'T2': 10110, 'T3': 12000, 'T4': 9025, 'T5': 8850, 'T6': 11240}],
   {'T0': [2, 0, 0],
    'T1': [0, 1, 0],
    'T2': [1, 0, 1],
    'T3': [2, 0, 0],
    'T4': [0, 2, 0],
    'T5': [0, 2, 0],
    'T6': [1, 1, 0]}),
  ('normal control 4', [[['T2', 'T0'], ['T1', 'T3']], {'T0': 9025, 'T1': 10110, 'T2': 10110, 'T3': 9025}],
   {'T0': [0, 2, 0], 'T1': [2, 0, 0], 'T2': [2, 0, 0], 'T3': [0, 2, 0]})],
 [('regression: head-to-head tie',
   [[['T3', 'T4'], ['T0', 'T2']], {'T0': 11100, 'T1': 8514, 'T2': 11240, 'T3': 10110, 'T4': 10110}],
   {'T0': [1, 1, 0], 'T1': [0, 1, 0], 'T2': [2, 0, 0], 'T3': [0, 0, 2], 'T4': [0, 0, 2]}),
  ('partial repair probe: head-to-head tie',
   [[['T0', 'T5'], ['T1', 'T4'], ['T3', 'T2']],
    {'T0': 11240, 'T1': 9025, 'T2': 11240, 'T3': 9025, 'T4': 9025, 'T5': 8850}],
   {'T0': [2, 0, 0], 'T1': [0, 0, 2], 'T2': [2, 0, 0], 'T3': [0, 1, 1], 'T4': [0, 0, 2], 'T5': [0, 2, 0]}),
  ('second regression', [[['T0', 'T1'], ['T3', 'T2']], {'T0': 11059, 'T1': 9025, 'T2': 10110, 'T3': 10110}],
   {'T0': [2, 0, 0], 'T1': [0, 2, 0], 'T2': [0, 0, 2], 'T3': [0, 0, 2]}),
  ('normal control 1',
   [[['T0', 'T5'], ['T1', 'T3'], ['T7', 'T6'], ['T2', 'T4']],
    {'T0': 12000, 'T1': 8850, 'T2': 10111, 'T3': 10111, 'T4': 7680, 'T5': 10034, 'T6': 9025, 'T7': 10111}],
   {'T0': [2, 0, 0],
    'T1': [0, 2, 0],
    'T2': [2, 0, 0],
    'T3': [2, 0, 0],
    'T4': [0, 2, 0],
    'T5': [0, 2, 0],
    'T6': [0, 2, 0],
    'T7': [2, 0, 0]}),
  ('normal control 2',
   [[['T1', 'T0'], ['T2', 'T5'], ['T6', 'T3']],
    {'T0': 11833, 'T1': 9025, 'T2': 9025, 'T3': 8817, 'T4': 10111, 'T5': 8850, 'T6': 9025}],
   {'T0': [2, 0, 0],
    'T1': [0, 1, 1],
    'T2': [1, 0, 1],
    'T3': [0, 2, 0],
    'T4': [1, 0, 0],
    'T5': [0, 2, 0],
    'T6': [1, 0, 1]}),
  ('normal control 3',
   [[['T4', 'T0'], ['T3', 'T2'], ['T1', 'T5']],
    {'T0': 12000, 'T1': 9025, 'T2': 10110, 'T3': 10111, 'T4': 10111, 'T5': 9788}],
   {'T0': [2, 0, 0], 'T1': [0, 2, 0], 'T2': [0, 2, 0], 'T3': [2, 0, 0], 'T4': [1, 1, 0], 'T5': [1, 1, 0]}),
  ('normal control 4',
   [[['T0', 'T1'], ['T6', 'T4'], ['T3', 'T2']],
    {'T0': 8850, 'T1': 9025, 'T2': 13184, 'T3': 11240, 'T4': 11240, 'T5': 10110, 'T6': 12000}],
   {'T0': [0, 2, 0],
    'T1': [1, 1, 0],
    'T2': [2, 0, 0],
    'T3': [0, 1, 1],
    'T4': [0, 1, 1],
    'T5': [0, 1, 0],
    'T6': [2, 0, 0]})],
 [('regression: head-to-head tie',
   [[['T2', 'T1'], ['T3', 'T0']], {'T0': 12000, 'T1': 9025, 'T2': 9025, 'T3': 10111}],
   {'T0': [2, 0, 0], 'T1': [0, 1, 1], 'T2': [0, 1, 1], 'T3': [1, 1, 0]}),
  ('partial repair probe: head-to-head tie',
   [[['T4', 'T0'], ['T1', 'T2'], ['T3', 'T5']],
    {'T0': 8850, 'T1': 9025, 'T2': 9025, 'T3': 9025, 'T4': 9025, 'T5': 10111}],
   {'T0': [0, 2, 0], 'T1': [0, 0, 2], 'T2': [0, 0, 2], 'T3': [0, 1, 1], 'T4': [1, 0, 1], 'T5': [2, 0, 0]}),
  ('second regression', [[['T0', 'T1'], ['T3', 'T2']], {'T0': 10110, 'T1': 10110, 'T2': 12000, 'T3': 12000}],
   {'T0': [0, 1, 1], 'T1': [0, 1, 1], 'T2': [1, 0, 1], 'T3': [1, 0, 1]}),
  ('normal control 1', [[['T1', 'T0'], ['T3', 'T2']], {'T0': 10111, 'T1': 8850, 'T2': 8609, 'T3': 12000}],
   {'T0': [2, 0, 0], 'T1': [0, 2, 0], 'T2': [0, 2, 0], 'T3': [2, 0, 0]}),
  ('normal control 2',
   [[['T5', 'T7'], ['T2', 'T6'], ['T3', 'T4'], ['T0', 'T1']],
    {'T0': 11240, 'T1': 10111, 'T2': 9025, 'T3': 11384, 'T4': 9025, 'T5': 10110, 'T6': 12000, 'T7': 10111}],
   {'T0': [2, 0, 0],
    'T1': [0, 1, 1],
    'T2': [0, 2, 0],
    'T3': [2, 0, 0],
    'T4': [0, 2, 0],
    'T5': [0, 2, 0],
    'T6': [2, 0, 0],
    'T7': [1, 0, 1]}),
  ('normal control 3',
   [[['T1', 'T5'], ['T3', 'T2'], ['T4', 'T0']],
    {'T0': 8850, 'T1': 8850, 'T2': 11240, 'T3': 10111, 'T4': 10111, 'T5': 10111}],
   {'T0': [0, 2, 0], 'T1': [0, 2, 0], 'T2': [2, 0, 0], 'T3': [0, 1, 1], 'T4': [1, 0, 1], 'T5': [1, 0, 1]}),
  ('normal control 4',
   [[['T3', 'T4'], ['T0', 'T1']], {'T0': 9025, 'T1': 10111, 'T2': 9480, 'T3': 7036, 'T4': 11240}],
   {'T0': [0, 2, 0], 'T1': [2, 0, 0], 'T2': [0, 0, 1], 'T3': [0, 2, 0], 'T4': [2, 0, 0]})],
 [('regression: head-to-head tie',
   [[['T3', 'T1'], ['T0', 'T6'], ['T5', 'T4']],
    {'T0': 11240, 'T1': 9025, 'T2': 11240, 'T3': 8850, 'T4': 10111, 'T5': 10110, 'T6': 11240}],
   {'T0': [1, 0, 1],
    'T1': [1, 1, 0],
    'T2': [1, 0, 0],
    'T3': [0, 2, 0],
    'T4': [1, 0, 1],
    'T5': [0, 2, 0],
    'T6': [1, 0, 1]}),
  ('partial repair probe: head-to-head tie',
   [[['T5', 'T0'], ['T2', 'T7'], ['T4', 'T1'], ['T6', 'T3']],
    {'T0': 9025, 'T1': 9025, 'T2': 11240, 'T3': 10110, 'T4': 9025, 'T5': 10110, 'T6': 10111, 'T7': 11240}],
   {'T0': [0, 2, 0],
    'T1': [0, 1, 1],
    'T2': [1, 0, 1],
    'T3': [0, 1, 1],
    'T4': [0, 1, 1],
    'T5': [1, 0, 1],
    'T6': [2, 0, 0],
    'T7': [1, 0, 1]}),
  ('second regression',
   [[['T4', 'T1'], ['T2', 'T3'], ['T6', 'T0']],
    {'T0': 9025, 'T1': 13786, 'T2': 9025, 'T3': 10110, 'T4': 10110, 'T5': 8850, 'T6': 9025}],
   {'T0': [0, 0, 2],
    'T1': [2, 0, 0],
    'T2': [0, 1, 1],
    'T3': [2, 0, 0],
    'T4': [1, 1, 0],
    'T5': [0, 1, 0],
    'T6': [0, 0, 2]}),
  ('normal control 1',
   [[['T6', 'T1'], ['T0', 'T2'], ['T5', 'T4']],
    {'T0': 12000, 'T1': 8850, 'T2': 9025, 'T3': 12000, 'T4': 9025, 'T5': 10111, 'T6': 12000}],
   {'T0': [2, 0, 0],
    'T1': [0, 2, 0],
    'T2': [0, 2, 0],
    'T3': [1, 0, 0],
    'T4': [0, 2, 0],
    'T5': [1, 0, 1],
    'T6': [2, 0, 0]}),
  ('normal control 2',
   [[['T3', 'T4'], ['T0', 'T2']], {'T0': 8850, 'T1': 10111, 'T2': 11240, 'T3': 11240, 'T4': 12000}],
   {'T0': [0, 2, 0], 'T1': [0, 1, 0], 'T2': [1, 0, 1], 'T3': [0, 1, 1], 'T4': [2, 0, 0]}),
  ('normal control 3',
   [[['T0', 'T1'], ['T3', 'T7'], ['T4', 'T5'], ['T2', 'T6']],
    {'T0': 10111, 'T1': 12797, 'T2': 10111, 'T3': 9025, 'T4': 10111, 'T5': 10110, 'T6': 8850, 'T7': 8850}],
   {'T0': [1, 1, 0],
    'T1': [2, 0, 0],
    'T2': [2, 0, 0],
    'T3': [1, 1, 0],
    'T4': [2, 0, 0],
    'T5': [0, 2, 0],
    'T6': [0, 2, 0],
    'T7': [0, 2, 0]}),
  ('normal control 4', [[['T1', 'T3'], ['T2', 'T0']], {'T0': 9025, 'T1': 10110, 'T2': 12000, 'T3': 11240}],
   {'T0': [0, 2, 0], 'T1': [0, 2, 0], 'T2': [2, 0, 0], 'T3': [2, 0, 0]})],
 [('regression: head-to-head tie',
   [[['T5', 'T0'], ['T1', 'T4'], ['T2', 'T3']],
    {'T0': 8850, 'T1': 10111, 'T2': 10111, 'T3': 12000, 'T4': 11240, 'T5': 8850}],
   {'T0': [0, 1, 1], 'T1': [0, 1, 1], 'T2': [0, 1, 1], 'T3': [2, 0, 0], 'T4': [2, 0, 0], 'T5': [0, 1, 1]}),
  ('partial repair probe: head-to-head tie',
   [[['T1', 'T3'], ['T6', 'T2'], ['T5', 'T0'], ['T4', 'T7']],
    {'T0': 10111, 'T1': 9025, 'T2': 11240, 'T3': 11240, 'T4': 10110, 'T5': 10111, 'T6': 11240, 'T7': 10110}],
   {'T0': [0, 0, 2],
    'T1': [0, 2, 0],
    'T2': [1, 0, 1],
    'T3': [2, 0, 0],
    'T4': [0, 1, 1],
    'T5': [0, 0, 2],
    'T6': [1, 0, 1],
    'T7': [0, 1, 1]}),
  ('second regression',
   [[['T5', 'T3'], ['T2', 'T1'], ['T0', 'T4']],
    {'T0': 9025, 'T1': 8850, 'T2': 8850, 'T3': 9025, 'T4': 10111, 'T5': 9025}],
   {'T0': [0, 1, 1], 'T1': [0, 1, 1], 'T2': [0, 1, 1], 'T3': [0, 0, 2], 'T4': [2, 0, 0], 'T5': [0, 0, 2]}),
  ('normal control 1',
   [[['T3', 'T1'], ['T4', 'T2']], {'T0': 9025, 'T1': 13734, 'T2': 10110, 'T3': 9025, 'T4': 9025}],
   {'T0': [0, 0, 1], 'T1': [2, 0, 0], 'T2': [2, 0, 0], 'T3': [0, 1, 1], 'T4': [0, 1, 1]}),
  ('normal control 2',
   [[['T3', 'T4'], ['T5', 'T2'], ['T6', 'T1']],
    {'T0': 9025, 'T1': 9025, 'T2': 9025, 'T3': 9025, 'T4': 12000, 'T5': 10111, 'T6': 10111}],
   {'T0': [0, 0, 1],
    'T1': [0, 1, 1],
    'T2': [0, 1, 1],
    'T3': [0, 1, 1],
    'T4': [2, 0, 0],
    'T5': [2, 0, 0],
    'T6': [2, 0, 0]}),
  ('normal control 3',
   [[['T4', 'T0'], ['T3', 'T1'], ['T6', 'T2']],
    {'T0': 10111, 'T1': 9025, 'T2': 10111, 'T3': 12000, 'T4': 12000, 'T5': 12000, 'T6': 10272}],
   {'T0': [0, 2, 0],
    'T1': [0, 2, 0],
    'T2': [0, 2, 0],
    'T3': [2, 0, 0],
    'T4': [2, 0, 0],
    'T5': [1, 0, 0],
    'T6': [1, 0, 1]}),
  ('normal control 4',
   [[['T1', 'T2'], ['T4', 'T3'], ['T0', 'T5']],
    {'T0': 12000, 'T1': 10110, 'T2': 9025, 'T3': 8850, 'T4': 10110, 'T5': 11240}],
   {'T0': [2, 0, 0], 'T1': [1, 0, 1], 'T2': [0, 2, 0], 'T3': [0, 2, 0], 'T4': [1, 0, 1], 'T5': [1, 1, 0]})]]
for label, args, expected in fixtures[N-1]:
    check(label, solve(*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
regression: head-to-head tie{'T0': [0, 1, 1], 'T1': [1, 0, 1], 'T2': [1, 1, 0], 'T3': [1, 0, 0], 'T4': [2, 0, 0], 'T5': [0, 2, 0], 'T6': [0, 2, 0]}{'T0': [0, 1, 1], 'T1': [1, 0, 1], 'T2': [0, 1, 1], 'T3': [1, 0, 0], 'T4': [2, 0, 0], 'T5': [0, 2, 0], 'T6': [0, 1, 1]}Failed
partial repair probe: head-to-head tie{'T0': [0, 0, 2], 'T1': [1, 0, 1], 'T2': [1, 0, 1], 'T3': [1, 0, 1], 'T4': [0, 0, 2], 'T5': [0, 1, 1]}{'T0': [0, 0, 2], 'T1': [0, 0, 2], 'T2': [1, 0, 1], 'T3': [1, 0, 1], 'T4': [0, 0, 2], 'T5': [0, 0, 2]}Failed
second regression{'T0': [1, 0, 0], 'T1': [0, 1, 1], 'T2': [0, 1, 1], 'T3': [2, 0, 0], 'T4': [2, 0, 0], 'T5': [0, 2, 0], 'T6': [0, 1, 1]}{'T0': [1, 0, 0], 'T1': [0, 1, 1], 'T2': [0, 1, 1], 'T3': [2, 0, 0], 'T4': [2, 0, 0], 'T5': [0, 2, 0], 'T6': [0, 1, 1]}Passed
normal control 1{'T0': [2, 0, 0], 'T1': [0, 2, 0], 'T2': [0, 2, 0], 'T3': [1, 0, 0], 'T4': [1, 0, 1]}{'T0': [2, 0, 0], 'T1': [0, 2, 0], 'T2': [0, 2, 0], 'T3': [1, 0, 0], 'T4': [1, 0, 1]}Passed
normal control 2{'T0': [1, 0, 1], 'T1': [0, 2, 0], 'T2': [2, 0, 0], 'T3': [2, 0, 0], 'T4': [0, 2, 0], 'T5': [0, 1, 1]}{'T0': [1, 0, 1], 'T1': [0, 2, 0], 'T2': [2, 0, 0], 'T3': [2, 0, 0], 'T4': [0, 2, 0], 'T5': [0, 1, 1]}Passed
normal control 3{'T0': [2, 0, 0], 'T1': [0, 1, 0], 'T2': [1, 0, 1], 'T3': [2, 0, 0], 'T4': [0, 2, 0], 'T5': [0, 2, 0], 'T6': [1, 1, 0]}{'T0': [2, 0, 0], 'T1': [0, 1, 0], 'T2': [1, 0, 1], 'T3': [2, 0, 0], 'T4': [0, 2, 0], 'T5': [0, 2, 0], 'T6': [1, 1, 0]}Passed
normal control 4{'T0': [0, 2, 0], 'T1': [2, 0, 0], 'T2': [2, 0, 0], 'T3': [0, 2, 0]}{'T0': [0, 2, 0], 'T1': [2, 0, 0], 'T2': [2, 0, 0], 'T3': [0, 2, 0]}Passed

SHA-256 / f14c2b2e23750596b07b9be7385edd395432f0b092d3168550fce85dfca35da1

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

A deterministic toy scoring contract stipulated for this example; it is not the rulebook of any real fantasy platform. 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:36.613522+00:00.

Case digest / 0e093d679239c1ebd5e8d97e32fd5545e81ed51473e412dbc0b71edfcaf6f28a