FA-12831 / Tournament pairing rules / Open access
Pair orientation checks total balance but misses streak bans · case 01
Pair orientation checks total balance but misses streak bans.
ROOT CAUSE
A cumulative balance surrogate does not enforce the consecutive-color constraint.
VERIFIED REPAIR
Return whether appending W or B avoids a run of three identical colors. Only the final two historical colors matter; total balance is not a rule in this model.
Unsuccessful approach: Banning any repeated color overrestricts the permitted second consecutive assignment.
Case contract
Synthetic model: Return whether appending W or B avoids a run of three identical colors. Only the final two historical colors matter; total balance is not a rule in this model.
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(history, next_color):
return abs(history.count('W')-history.count('B')+(1 if next_color=='W' else -1))<=2
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('third same after balance', solve("B"*N+"WW", "W"), False)
check('second allowed', solve("W", "W"), True)
check('empty', solve("", "B"), True)
check('switch', solve("WW", "B"), True)
check('black third', solve("W"*N+"BB", "B"), False)
check('alternating', solve("WB"*N, "W"), True)
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 |
|---|---|---|---|
| third same after balance | True | False | Failed |
| second allowed | True | True | Passed |
| empty | True | True | Passed |
| switch | True | True | Passed |
| black third | True | False | Failed |
| alternating | True | True | Passed |
SHA-256 / 148c6c4b135e3aaee17dee41282bb2774e6cf801f63fe2528745948ecdf5b1ac
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(history, next_color):
return not (history and history[-1]==next_color)
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('third same after balance', solve("B"*N+"WW", "W"), False)
check('second allowed', solve("W", "W"), True)
check('empty', solve("", "B"), True)
check('switch', solve("WW", "B"), True)
check('black third', solve("W"*N+"BB", "B"), False)
check('alternating', solve("WB"*N, "W"), True)
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 |
|---|---|---|---|
| third same after balance | False | False | Passed |
| second allowed | False | True | Failed |
| empty | True | True | Passed |
| switch | True | True | Passed |
| black third | False | False | Passed |
| alternating | True | True | Passed |
SHA-256 / 6d4ed8abfbd5f1a8ad7b5de31857b78014868b39ca1d4c1d58ea610dac696129
3 / The verified repair
Exit 0"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(history, next_color):
return not (len(history)>=2 and history[-2:]==next_color*2)
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('third same after balance', solve("B"*N+"WW", "W"), False)
check('second allowed', solve("W", "W"), True)
check('empty', solve("", "B"), True)
check('switch', solve("WW", "B"), True)
check('black third', solve("W"*N+"BB", "B"), False)
check('alternating', solve("WB"*N, "W"), True)
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 |
|---|---|---|---|
| third same after balance | False | False | Passed |
| second allowed | True | True | Passed |
| empty | True | True | Passed |
| switch | True | True | Passed |
| black third | False | False | Passed |
| alternating | True | True | Passed |
SHA-256 / 8fba1e515cd478c3ade6fbf8bc09fa0c950a0ce53b6687d6f33cc7d6b4225403
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.611340+00:00.
Case digest / cd360ae7f734d7e982e1043c75413dbe36a8dda5fd39a1dfe492538d7a36834d