FA-12791 / Tournament pairing rules / Open access
Bye selection ignores prior byes · case 01
Bye selection ignores prior byes.
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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| repeat bye excluded | 1 | 2 | Failed |
| score precedes id | 2 | 2 | Passed |
| id breaks tie | 2 | 2 | Passed |
| empty | None | None | Passed |
| all ineligible | 1 | None | Failed |
| single | 8 | 8 | Passed |
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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| repeat bye excluded | 2 | 2 | Passed |
| score precedes id | 1 | 2 | Failed |
| id breaks tie | 2 | 2 | Passed |
| empty | None | None | Passed |
| all ineligible | None | None | Passed |
| single | 8 | 8 | Passed |
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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| repeat bye excluded | 2 | 2 | Passed |
| score precedes id | 2 | 2 | Passed |
| id breaks tie | 2 | 2 | Passed |
| empty | None | None | Passed |
| all ineligible | None | None | Passed |
| single | 8 | 8 | Passed |
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