FAILURE MAP
← Case archive

FA-12791 / Tournament pairing rules / Open access

Bye selection ignores prior byes · case 01

Bye selection ignores prior byes.

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

ROOT CAUSE

Selection ranks all entrants without applying the prior-bye exclusion.

VERIFIED REPAIR

Rows are (id,score,has_prior_bye). Return the eligible id with lowest score then id, or None.

Unsuccessful approach: Filtering eligibility but ranking only by identifier ignores score priority.

Case contract

Synthetic model: Rows are (id,score,has_prior_bye). Return the eligible id with lowest score then id, or None.

Why this case matters

Makes the stated pairing or standings policy executable without assuming any real federation rulebook.

1 / The failure

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

N = 1
observations = []
def solve(rows):
    return min(rows, key=lambda r:(r[1],r[0]))[0] if rows else None
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('repeat bye excluded', solve([(1,0,True),(2,N,False)]), 2)
check('score precedes id', solve([(1,N+1,False),(2,N,False)]), 2)
check('id breaks tie', solve([(3,N,False),(2,N,False)]), 2)
check('empty', solve([]), None)
check('all ineligible', solve([(1,N,True)]), None)
check('single', solve([(8,N,False)]), 8)
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
repeat bye excluded12Failed
score precedes id22Passed
id breaks tie22Passed
emptyNoneNonePassed
all ineligible1NoneFailed
single88Passed

SHA-256 / c88b5734f62e3b866c1c9428c8612444f60ee94383ccec6adb540454a940036b

2 / The unsuccessful fix

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

N = 1
observations = []
def solve(rows):
    eligible=[r for r in rows if not r[2]]
    return min(eligible, key=lambda r:r[0])[0] if eligible else None
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('repeat bye excluded', solve([(1,0,True),(2,N,False)]), 2)
check('score precedes id', solve([(1,N+1,False),(2,N,False)]), 2)
check('id breaks tie', solve([(3,N,False),(2,N,False)]), 2)
check('empty', solve([]), None)
check('all ineligible', solve([(1,N,True)]), None)
check('single', solve([(8,N,False)]), 8)
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
repeat bye excluded22Passed
score precedes id12Failed
id breaks tie22Passed
emptyNoneNonePassed
all ineligibleNoneNonePassed
single88Passed

SHA-256 / 27f258ea44708bfe0f2efb48c89730413cf376541f5d034119d20d3535d8e19b

3 / The verified repair

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

N = 1
observations = []
def solve(rows):
    eligible=[r for r in rows if not r[2]]
    return min(eligible, key=lambda r:(r[1],r[0]))[0] if eligible else None
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('repeat bye excluded', solve([(1,0,True),(2,N,False)]), 2)
check('score precedes id', solve([(1,N+1,False),(2,N,False)]), 2)
check('id breaks tie', solve([(3,N,False),(2,N,False)]), 2)
check('empty', solve([]), None)
check('all ineligible', solve([(1,N,True)]), None)
check('single', solve([(8,N,False)]), 8)
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
repeat bye excluded22Passed
score precedes id22Passed
id breaks tie22Passed
emptyNoneNonePassed
all ineligibleNoneNonePassed
single88Passed

SHA-256 / d2e3d246ea89bf30d6e8c6866eaff1a7e8389ac073641b46ff1994363066cce5

Verification & scope

Controlled synthetic policy; does not implement an entire tournament system. 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:39:00.125447+00:00.

Case digest / 848da8ed79f60bc7b4e5f2418106b642d170d3b723efa379f319eb00655b8fc0