FA-12756 / Voting rule computation / Open access
A transferred ranking stops at another eliminated candidate · case 01
A transferred ranking stops at another eliminated candidate.
ROOT CAUSE
Only the first rank is inspected.
VERIFIED REPAIR
Find the first candidate still active, otherwise exhaust the ballot.
Unsuccessful approach: Skipping exactly one rank still stops before the next active preference.
Case contract
For a unique ranking and active candidate set, return first active candidate or None.
Why this case matters
A deterministic toy ballot model makes the stated counting convention executable.
1 / The failure
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(ranking, active):
return ranking[0] if ranking and ranking[0] in active else None
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('skip multiple eliminated candidates', solve(list(range(N+3)),[N+2]), N+2)
check('first active remains', solve([0,1,2],[0,2]), 0)
check('one eliminated', solve([0,1],[1]), 1)
check('all eliminated', solve([0,1],[]), None)
check('empty ranking', solve([],[0]), None)
check('active order irrelevant', solve([2,1,0],[0,1]), 1)
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 |
|---|---|---|---|
| skip multiple eliminated candidates | None | 3 | Failed |
| first active remains | 0 | 0 | Passed |
| one eliminated | None | 1 | Failed |
| all eliminated | None | None | Passed |
| empty ranking | None | None | Passed |
| active order irrelevant | None | 1 | Failed |
SHA-256 / ab8197381c4c57359dbe7c1e76ca97b29f5f77c3bde2b2c8b1161750fb751a2e
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(ranking, active):
r = ranking if ranking and ranking[0] in active else ranking[1:]
return r[0] if r and r[0] in active else None
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('skip multiple eliminated candidates', solve(list(range(N+3)),[N+2]), N+2)
check('first active remains', solve([0,1,2],[0,2]), 0)
check('one eliminated', solve([0,1],[1]), 1)
check('all eliminated', solve([0,1],[]), None)
check('empty ranking', solve([],[0]), None)
check('active order irrelevant', solve([2,1,0],[0,1]), 1)
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 |
|---|---|---|---|
| skip multiple eliminated candidates | None | 3 | Failed |
| first active remains | 0 | 0 | Passed |
| one eliminated | 1 | 1 | Passed |
| all eliminated | None | None | Passed |
| empty ranking | None | None | Passed |
| active order irrelevant | 1 | 1 | Passed |
SHA-256 / 0a27ba936466dcb802783b465eaa6a74a57a658dec3d91e0a20ce291d633de86
3 / The verified repair
Exit 0"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(ranking, active):
return next((c for c in ranking if c in active), None)
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('skip multiple eliminated candidates', solve(list(range(N+3)),[N+2]), N+2)
check('first active remains', solve([0,1,2],[0,2]), 0)
check('one eliminated', solve([0,1],[1]), 1)
check('all eliminated', solve([0,1],[]), None)
check('empty ranking', solve([],[0]), None)
check('active order irrelevant', solve([2,1,0],[0,1]), 1)
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 |
|---|---|---|---|
| skip multiple eliminated candidates | 3 | 3 | Passed |
| first active remains | 0 | 0 | Passed |
| one eliminated | 1 | 1 | Passed |
| all eliminated | None | None | Passed |
| empty ranking | None | None | Passed |
| active order irrelevant | 1 | 1 | Passed |
SHA-256 / e0b9fef46c259f31c4e7cae54fcc66ff9707eb456dea8099bffa2c44bb3a0c9c
Verification & scope
Abstract counting rules only; excludes jurisdictional law, ballot authentication and election operations. 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:38:59.879825+00:00.
Case digest / e5cfa04132b505dda8936b813c4ea6747aba82b452030867b22e055a357bb226