FAILURE MAP
← Case archive

FA-85276 / Fantasy sports scoring / Open access

Tied indices split by name order · case 01

Two players tied on the top index receive 3 and 2.

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

ROOT CAUSE

Each player is processed as its own group, so name order breaks ties.

VERIFIED REPAIR

Group all players with equal index before awarding.

Unsuccessful approach: Capping groups at two players still splits three-way ties.

Case contract

Allocate bonus points from a per-match performance index: rank players by index descending; positions 1, 2, 3 earn 3, 2, 1. Tied players all receive the award of the first position their group occupies and consume as many positions as the group size, so a two-way tie for first earns 3 each and the next player 1. Players whose index is 0 or below never receive bonus. Return name -> bonus for awarded players.

Why this case matters

Bonus allocation with ties is a compact but contested rule in football fantasy games.

1 / The failure

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

N = 1
observations = []
def solve(bps):
    ordered = sorted(bps.items(), key=lambda kv: (-kv[1], kv[0]))
    award = [3, 2, 1]
    out = {}
    pos = 0
    i = 0
    while i < len(ordered) and pos < 3:
        j = i
        j += 1
        for name, v in ordered[i:j]:
            if v > 0:
                out[name] = award[pos]
        pos += j - i
        i = j
    return out
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('regression: tie grouping', [{'bo': 12, 'ce': 34, 'di': -2, 'ek': 39, 'fu': 30, 'gi': 30, 'ho': 27}],
   {'ce': 2, 'ek': 3, 'fu': 1, 'gi': 1}),
  ('partial repair probe: tie grouping', [{'ax': -2, 'ce': 30, 'ek': 23, 'fu': 34, 'gi': 30, 'ho': 30}],
   {'ce': 2, 'fu': 3, 'gi': 2, 'ho': 2}),
  ('second regression', [{'ax': 27, 'bo': -2, 'ek': 27}], {'ax': 3, 'ek': 3}),
  ('normal control 1', [{'ax': 4, 'bo': 30, 'ce': 34, 'di': 12, 'ek': 21, 'fu': 12, 'gi': 12, 'ho': 12}],
   {'bo': 2, 'ce': 3, 'ek': 1}),
  ('normal control 2', [{'ax': 12, 'bo': 27, 'ce': 32, 'di': 33, 'ek': -2, 'gi': 0, 'ho': 12}],
   {'bo': 1, 'ce': 2, 'di': 3}),
  ('normal control 3', [{'ax': 27, 'bo': 19, 'ek': 30, 'fu': 34}], {'ax': 1, 'ek': 2, 'fu': 3}),
  ('normal control 4', [{'ax': 0, 'ek': 30, 'gi': 34}], {'ek': 2, 'gi': 3})],
 [('regression: tie grouping', [{'ax': 34, 'bo': 30, 'di': 30, 'ek': 0, 'gi': 12, 'ho': 34}],
   {'ax': 3, 'bo': 1, 'di': 1, 'ho': 3}),
  ('partial repair probe: tie grouping', [{'ax': 34, 'bo': 34, 'ce': -2, 'di': 30, 'fu': 34, 'gi': 0}],
   {'ax': 3, 'bo': 3, 'fu': 3}),
  ('second regression', [{'ax': 30, 'bo': 27, 'di': 34, 'ek': -3, 'gi': 30}], {'ax': 2, 'di': 3, 'gi': 2}),
  ('normal control 1', [{'ce': 30, 'di': 0, 'ek': -2}], {'ce': 3}),
  ('normal control 2', [{'ax': 27, 'ce': -2, 'ek': 3, 'ho': 34}], {'ax': 2, 'ek': 1, 'ho': 3}),
  ('normal control 3', [{'ek': 0, 'gi': 30, 'ho': 34}], {'gi': 2, 'ho': 3}),
  ('normal control 4', [{'ax': -2, 'ce': 34, 'ek': -2, 'fu': 8, 'gi': -2}], {'ce': 3, 'fu': 2})],
 [('regression: tie grouping', [{'ax': 0, 'ce': 12, 'gi': 12}], {'ce': 3, 'gi': 3}),
  ('partial repair probe: tie grouping', [{'bo': 34, 'di': 12, 'ek': 34, 'fu': 30, 'gi': 34, 'ho': 30}],
   {'bo': 3, 'ek': 3, 'gi': 3}),
  ('second regression', [{'ax': 34, 'bo': -3, 'ek': 34, 'ho': 30}], {'ax': 3, 'ek': 3, 'ho': 1}),
  ('normal control 1', [{'ce': 12, 'fu': 30, 'gi': 0, 'ho': 35}], {'ce': 1, 'fu': 2, 'ho': 3}),
  ('normal control 2', [{'bo': 21, 'di': 30, 'ho': 0}], {'bo': 2, 'di': 3}),
  ('normal control 3', [{'di': 12, 'ek': 27, 'gi': 6}], {'di': 2, 'ek': 3, 'gi': 1}),
  ('normal control 4', [{'di': 30, 'ek': 38, 'gi': 23}], {'di': 2, 'ek': 3, 'gi': 1})],
 [('regression: tie grouping', [{'bo': 34, 'ce': 30, 'di': 33, 'ek': 0, 'fu': 30, 'gi': -2, 'ho': 34}],
   {'bo': 3, 'di': 1, 'ho': 3}),
  ('partial repair probe: tie grouping', [{'ax': 34, 'di': 34, 'ek': 6, 'fu': 12, 'gi': 30, 'ho': 34}],
   {'ax': 3, 'di': 3, 'ho': 3}),
  ('second regression', [{'ax': 30, 'bo': 12, 'ce': 31, 'di': 27, 'ek': 27, 'gi': 12, 'ho': 12}],
   {'ax': 2, 'ce': 3, 'di': 1, 'ek': 1}),
  ('normal control 1', [{'bo': -2, 'di': -2, 'gi': 10, 'ho': 12}], {'gi': 2, 'ho': 3}),
  ('normal control 2', [{'ax': 27, 'bo': 13, 'ce': 34, 'ek': -2, 'fu': 31, 'gi': 27, 'ho': 30}],
   {'ce': 3, 'fu': 2, 'ho': 1}),
  ('normal control 3', [{'bo': 34, 'ce': 0, 'ek': 30}], {'bo': 3, 'ek': 2}),
  ('normal control 4', [{'ce': 34, 'di': -2, 'fu': 33, 'gi': 12, 'ho': 27}], {'ce': 3, 'fu': 2, 'ho': 1})],
 [('regression: tie grouping', [{'ax': 12, 'ce': 30, 'di': 34, 'ek': 0, 'gi': -2, 'ho': 30}],
   {'ce': 2, 'di': 3, 'ho': 2}),
  ('partial repair probe: tie grouping',
   [{'ax': 30, 'bo': 30, 'ce': 30, 'di': -2, 'ek': 34, 'fu': 0, 'gi': 30, 'ho': 30}],
   {'ax': 2, 'bo': 2, 'ce': 2, 'ek': 3, 'gi': 2, 'ho': 2}),
  ('second regression', [{'ax': 0, 'bo': 34, 'di': 0, 'ek': 3, 'fu': 34, 'ho': 0}],
   {'bo': 3, 'ek': 1, 'fu': 3}),
  ('normal control 1', [{'ax': 12, 'bo': 0, 'di': 8, 'ho': 14}], {'ax': 2, 'di': 1, 'ho': 3}),
  ('normal control 2', [{'ce': -2, 'fu': -2, 'gi': -2}], {}),
  ('normal control 3', [{'ax': 27, 'di': -2, 'gi': 34, 'ho': -2}], {'ax': 2, 'gi': 3}),
  ('normal control 4', [{'ax': 0, 'ce': 12, 'di': 30}], {'ce': 2, 'di': 3})]]
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: tie grouping{'ce': 2, 'ek': 3, 'fu': 1}{'ce': 2, 'ek': 3, 'fu': 1, 'gi': 1}Failed
partial repair probe: tie grouping{'ce': 2, 'fu': 3, 'gi': 1}{'ce': 2, 'fu': 3, 'gi': 2, 'ho': 2}Failed
second regression{'ax': 3, 'ek': 2}{'ax': 3, 'ek': 3}Failed
normal control 1{'bo': 2, 'ce': 3, 'ek': 1}{'bo': 2, 'ce': 3, 'ek': 1}Passed
normal control 2{'bo': 1, 'ce': 2, 'di': 3}{'bo': 1, 'ce': 2, 'di': 3}Passed
normal control 3{'ax': 1, 'ek': 2, 'fu': 3}{'ax': 1, 'ek': 2, 'fu': 3}Passed
normal control 4{'ek': 2, 'gi': 3}{'ek': 2, 'gi': 3}Passed

SHA-256 / 4a23f978d4fff14e70212df7fd30a0de9d67d5ceeedf21d827540215ab25fa2c

2 / The unsuccessful fix

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

N = 1
observations = []
def solve(bps):
    ordered = sorted(bps.items(), key=lambda kv: (-kv[1], kv[0]))
    award = [3, 2, 1]
    out = {}
    pos = 0
    i = 0
    while i < len(ordered) and pos < 3:
        j = i
        while j < len(ordered) and ordered[j][1] == ordered[i][1] and j - i < 2:
            j += 1
        for name, v in ordered[i:j]:
            if v > 0:
                out[name] = award[pos]
        pos += j - i
        i = j
    return out
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('regression: tie grouping', [{'bo': 12, 'ce': 34, 'di': -2, 'ek': 39, 'fu': 30, 'gi': 30, 'ho': 27}],
   {'ce': 2, 'ek': 3, 'fu': 1, 'gi': 1}),
  ('partial repair probe: tie grouping', [{'ax': -2, 'ce': 30, 'ek': 23, 'fu': 34, 'gi': 30, 'ho': 30}],
   {'ce': 2, 'fu': 3, 'gi': 2, 'ho': 2}),
  ('second regression', [{'ax': 27, 'bo': -2, 'ek': 27}], {'ax': 3, 'ek': 3}),
  ('normal control 1', [{'ax': 4, 'bo': 30, 'ce': 34, 'di': 12, 'ek': 21, 'fu': 12, 'gi': 12, 'ho': 12}],
   {'bo': 2, 'ce': 3, 'ek': 1}),
  ('normal control 2', [{'ax': 12, 'bo': 27, 'ce': 32, 'di': 33, 'ek': -2, 'gi': 0, 'ho': 12}],
   {'bo': 1, 'ce': 2, 'di': 3}),
  ('normal control 3', [{'ax': 27, 'bo': 19, 'ek': 30, 'fu': 34}], {'ax': 1, 'ek': 2, 'fu': 3}),
  ('normal control 4', [{'ax': 0, 'ek': 30, 'gi': 34}], {'ek': 2, 'gi': 3})],
 [('regression: tie grouping', [{'ax': 34, 'bo': 30, 'di': 30, 'ek': 0, 'gi': 12, 'ho': 34}],
   {'ax': 3, 'bo': 1, 'di': 1, 'ho': 3}),
  ('partial repair probe: tie grouping', [{'ax': 34, 'bo': 34, 'ce': -2, 'di': 30, 'fu': 34, 'gi': 0}],
   {'ax': 3, 'bo': 3, 'fu': 3}),
  ('second regression', [{'ax': 30, 'bo': 27, 'di': 34, 'ek': -3, 'gi': 30}], {'ax': 2, 'di': 3, 'gi': 2}),
  ('normal control 1', [{'ce': 30, 'di': 0, 'ek': -2}], {'ce': 3}),
  ('normal control 2', [{'ax': 27, 'ce': -2, 'ek': 3, 'ho': 34}], {'ax': 2, 'ek': 1, 'ho': 3}),
  ('normal control 3', [{'ek': 0, 'gi': 30, 'ho': 34}], {'gi': 2, 'ho': 3}),
  ('normal control 4', [{'ax': -2, 'ce': 34, 'ek': -2, 'fu': 8, 'gi': -2}], {'ce': 3, 'fu': 2})],
 [('regression: tie grouping', [{'ax': 0, 'ce': 12, 'gi': 12}], {'ce': 3, 'gi': 3}),
  ('partial repair probe: tie grouping', [{'bo': 34, 'di': 12, 'ek': 34, 'fu': 30, 'gi': 34, 'ho': 30}],
   {'bo': 3, 'ek': 3, 'gi': 3}),
  ('second regression', [{'ax': 34, 'bo': -3, 'ek': 34, 'ho': 30}], {'ax': 3, 'ek': 3, 'ho': 1}),
  ('normal control 1', [{'ce': 12, 'fu': 30, 'gi': 0, 'ho': 35}], {'ce': 1, 'fu': 2, 'ho': 3}),
  ('normal control 2', [{'bo': 21, 'di': 30, 'ho': 0}], {'bo': 2, 'di': 3}),
  ('normal control 3', [{'di': 12, 'ek': 27, 'gi': 6}], {'di': 2, 'ek': 3, 'gi': 1}),
  ('normal control 4', [{'di': 30, 'ek': 38, 'gi': 23}], {'di': 2, 'ek': 3, 'gi': 1})],
 [('regression: tie grouping', [{'bo': 34, 'ce': 30, 'di': 33, 'ek': 0, 'fu': 30, 'gi': -2, 'ho': 34}],
   {'bo': 3, 'di': 1, 'ho': 3}),
  ('partial repair probe: tie grouping', [{'ax': 34, 'di': 34, 'ek': 6, 'fu': 12, 'gi': 30, 'ho': 34}],
   {'ax': 3, 'di': 3, 'ho': 3}),
  ('second regression', [{'ax': 30, 'bo': 12, 'ce': 31, 'di': 27, 'ek': 27, 'gi': 12, 'ho': 12}],
   {'ax': 2, 'ce': 3, 'di': 1, 'ek': 1}),
  ('normal control 1', [{'bo': -2, 'di': -2, 'gi': 10, 'ho': 12}], {'gi': 2, 'ho': 3}),
  ('normal control 2', [{'ax': 27, 'bo': 13, 'ce': 34, 'ek': -2, 'fu': 31, 'gi': 27, 'ho': 30}],
   {'ce': 3, 'fu': 2, 'ho': 1}),
  ('normal control 3', [{'bo': 34, 'ce': 0, 'ek': 30}], {'bo': 3, 'ek': 2}),
  ('normal control 4', [{'ce': 34, 'di': -2, 'fu': 33, 'gi': 12, 'ho': 27}], {'ce': 3, 'fu': 2, 'ho': 1})],
 [('regression: tie grouping', [{'ax': 12, 'ce': 30, 'di': 34, 'ek': 0, 'gi': -2, 'ho': 30}],
   {'ce': 2, 'di': 3, 'ho': 2}),
  ('partial repair probe: tie grouping',
   [{'ax': 30, 'bo': 30, 'ce': 30, 'di': -2, 'ek': 34, 'fu': 0, 'gi': 30, 'ho': 30}],
   {'ax': 2, 'bo': 2, 'ce': 2, 'ek': 3, 'gi': 2, 'ho': 2}),
  ('second regression', [{'ax': 0, 'bo': 34, 'di': 0, 'ek': 3, 'fu': 34, 'ho': 0}],
   {'bo': 3, 'ek': 1, 'fu': 3}),
  ('normal control 1', [{'ax': 12, 'bo': 0, 'di': 8, 'ho': 14}], {'ax': 2, 'di': 1, 'ho': 3}),
  ('normal control 2', [{'ce': -2, 'fu': -2, 'gi': -2}], {}),
  ('normal control 3', [{'ax': 27, 'di': -2, 'gi': 34, 'ho': -2}], {'ax': 2, 'gi': 3}),
  ('normal control 4', [{'ax': 0, 'ce': 12, 'di': 30}], {'ce': 2, 'di': 3})]]
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: tie grouping{'ce': 2, 'ek': 3, 'fu': 1, 'gi': 1}{'ce': 2, 'ek': 3, 'fu': 1, 'gi': 1}Passed
partial repair probe: tie grouping{'ce': 2, 'fu': 3, 'gi': 2}{'ce': 2, 'fu': 3, 'gi': 2, 'ho': 2}Failed
second regression{'ax': 3, 'ek': 3}{'ax': 3, 'ek': 3}Passed
normal control 1{'bo': 2, 'ce': 3, 'ek': 1}{'bo': 2, 'ce': 3, 'ek': 1}Passed
normal control 2{'bo': 1, 'ce': 2, 'di': 3}{'bo': 1, 'ce': 2, 'di': 3}Passed
normal control 3{'ax': 1, 'ek': 2, 'fu': 3}{'ax': 1, 'ek': 2, 'fu': 3}Passed
normal control 4{'ek': 2, 'gi': 3}{'ek': 2, 'gi': 3}Passed

SHA-256 / c7ea498cdb00ebc07336395f662f2081b44671600bde3538bcfea4e5dd4eb4dc

3 / The verified repair

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

N = 1
observations = []
def solve(bps):
    ordered = sorted(bps.items(), key=lambda kv: (-kv[1], kv[0]))
    award = [3, 2, 1]
    out = {}
    pos = 0
    i = 0
    while i < len(ordered) and pos < 3:
        j = i
        while j < len(ordered) and ordered[j][1] == ordered[i][1]:
            j += 1
        for name, v in ordered[i:j]:
            if v > 0:
                out[name] = award[pos]
        pos += j - i
        i = j
    return out
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('regression: tie grouping', [{'bo': 12, 'ce': 34, 'di': -2, 'ek': 39, 'fu': 30, 'gi': 30, 'ho': 27}],
   {'ce': 2, 'ek': 3, 'fu': 1, 'gi': 1}),
  ('partial repair probe: tie grouping', [{'ax': -2, 'ce': 30, 'ek': 23, 'fu': 34, 'gi': 30, 'ho': 30}],
   {'ce': 2, 'fu': 3, 'gi': 2, 'ho': 2}),
  ('second regression', [{'ax': 27, 'bo': -2, 'ek': 27}], {'ax': 3, 'ek': 3}),
  ('normal control 1', [{'ax': 4, 'bo': 30, 'ce': 34, 'di': 12, 'ek': 21, 'fu': 12, 'gi': 12, 'ho': 12}],
   {'bo': 2, 'ce': 3, 'ek': 1}),
  ('normal control 2', [{'ax': 12, 'bo': 27, 'ce': 32, 'di': 33, 'ek': -2, 'gi': 0, 'ho': 12}],
   {'bo': 1, 'ce': 2, 'di': 3}),
  ('normal control 3', [{'ax': 27, 'bo': 19, 'ek': 30, 'fu': 34}], {'ax': 1, 'ek': 2, 'fu': 3}),
  ('normal control 4', [{'ax': 0, 'ek': 30, 'gi': 34}], {'ek': 2, 'gi': 3})],
 [('regression: tie grouping', [{'ax': 34, 'bo': 30, 'di': 30, 'ek': 0, 'gi': 12, 'ho': 34}],
   {'ax': 3, 'bo': 1, 'di': 1, 'ho': 3}),
  ('partial repair probe: tie grouping', [{'ax': 34, 'bo': 34, 'ce': -2, 'di': 30, 'fu': 34, 'gi': 0}],
   {'ax': 3, 'bo': 3, 'fu': 3}),
  ('second regression', [{'ax': 30, 'bo': 27, 'di': 34, 'ek': -3, 'gi': 30}], {'ax': 2, 'di': 3, 'gi': 2}),
  ('normal control 1', [{'ce': 30, 'di': 0, 'ek': -2}], {'ce': 3}),
  ('normal control 2', [{'ax': 27, 'ce': -2, 'ek': 3, 'ho': 34}], {'ax': 2, 'ek': 1, 'ho': 3}),
  ('normal control 3', [{'ek': 0, 'gi': 30, 'ho': 34}], {'gi': 2, 'ho': 3}),
  ('normal control 4', [{'ax': -2, 'ce': 34, 'ek': -2, 'fu': 8, 'gi': -2}], {'ce': 3, 'fu': 2})],
 [('regression: tie grouping', [{'ax': 0, 'ce': 12, 'gi': 12}], {'ce': 3, 'gi': 3}),
  ('partial repair probe: tie grouping', [{'bo': 34, 'di': 12, 'ek': 34, 'fu': 30, 'gi': 34, 'ho': 30}],
   {'bo': 3, 'ek': 3, 'gi': 3}),
  ('second regression', [{'ax': 34, 'bo': -3, 'ek': 34, 'ho': 30}], {'ax': 3, 'ek': 3, 'ho': 1}),
  ('normal control 1', [{'ce': 12, 'fu': 30, 'gi': 0, 'ho': 35}], {'ce': 1, 'fu': 2, 'ho': 3}),
  ('normal control 2', [{'bo': 21, 'di': 30, 'ho': 0}], {'bo': 2, 'di': 3}),
  ('normal control 3', [{'di': 12, 'ek': 27, 'gi': 6}], {'di': 2, 'ek': 3, 'gi': 1}),
  ('normal control 4', [{'di': 30, 'ek': 38, 'gi': 23}], {'di': 2, 'ek': 3, 'gi': 1})],
 [('regression: tie grouping', [{'bo': 34, 'ce': 30, 'di': 33, 'ek': 0, 'fu': 30, 'gi': -2, 'ho': 34}],
   {'bo': 3, 'di': 1, 'ho': 3}),
  ('partial repair probe: tie grouping', [{'ax': 34, 'di': 34, 'ek': 6, 'fu': 12, 'gi': 30, 'ho': 34}],
   {'ax': 3, 'di': 3, 'ho': 3}),
  ('second regression', [{'ax': 30, 'bo': 12, 'ce': 31, 'di': 27, 'ek': 27, 'gi': 12, 'ho': 12}],
   {'ax': 2, 'ce': 3, 'di': 1, 'ek': 1}),
  ('normal control 1', [{'bo': -2, 'di': -2, 'gi': 10, 'ho': 12}], {'gi': 2, 'ho': 3}),
  ('normal control 2', [{'ax': 27, 'bo': 13, 'ce': 34, 'ek': -2, 'fu': 31, 'gi': 27, 'ho': 30}],
   {'ce': 3, 'fu': 2, 'ho': 1}),
  ('normal control 3', [{'bo': 34, 'ce': 0, 'ek': 30}], {'bo': 3, 'ek': 2}),
  ('normal control 4', [{'ce': 34, 'di': -2, 'fu': 33, 'gi': 12, 'ho': 27}], {'ce': 3, 'fu': 2, 'ho': 1})],
 [('regression: tie grouping', [{'ax': 12, 'ce': 30, 'di': 34, 'ek': 0, 'gi': -2, 'ho': 30}],
   {'ce': 2, 'di': 3, 'ho': 2}),
  ('partial repair probe: tie grouping',
   [{'ax': 30, 'bo': 30, 'ce': 30, 'di': -2, 'ek': 34, 'fu': 0, 'gi': 30, 'ho': 30}],
   {'ax': 2, 'bo': 2, 'ce': 2, 'ek': 3, 'gi': 2, 'ho': 2}),
  ('second regression', [{'ax': 0, 'bo': 34, 'di': 0, 'ek': 3, 'fu': 34, 'ho': 0}],
   {'bo': 3, 'ek': 1, 'fu': 3}),
  ('normal control 1', [{'ax': 12, 'bo': 0, 'di': 8, 'ho': 14}], {'ax': 2, 'di': 1, 'ho': 3}),
  ('normal control 2', [{'ce': -2, 'fu': -2, 'gi': -2}], {}),
  ('normal control 3', [{'ax': 27, 'di': -2, 'gi': 34, 'ho': -2}], {'ax': 2, 'gi': 3}),
  ('normal control 4', [{'ax': 0, 'ce': 12, 'di': 30}], {'ce': 2, 'di': 3})]]
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: tie grouping{'ce': 2, 'ek': 3, 'fu': 1, 'gi': 1}{'ce': 2, 'ek': 3, 'fu': 1, 'gi': 1}Passed
partial repair probe: tie grouping{'ce': 2, 'fu': 3, 'gi': 2, 'ho': 2}{'ce': 2, 'fu': 3, 'gi': 2, 'ho': 2}Passed
second regression{'ax': 3, 'ek': 3}{'ax': 3, 'ek': 3}Passed
normal control 1{'bo': 2, 'ce': 3, 'ek': 1}{'bo': 2, 'ce': 3, 'ek': 1}Passed
normal control 2{'bo': 1, 'ce': 2, 'di': 3}{'bo': 1, 'ce': 2, 'di': 3}Passed
normal control 3{'ax': 1, 'ek': 2, 'fu': 3}{'ax': 1, 'ek': 2, 'fu': 3}Passed
normal control 4{'ek': 2, 'gi': 3}{'ek': 2, 'gi': 3}Passed

SHA-256 / 9ca51dbb4b5f4f2cc017e5bee5ffaccb0008460c74a0b72051bb16bd1d3c207f

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

Case digest / d8dd1e52605ccc42f9f53497ff1389d9b0977945304cfce4a7e8420df2c41100