FA-84236 / Sports scoring and tiebreakers / Open access
Equidistant shot stones awarded to one team · case 01
Two stones of different teams at the same distance give a point to team A.
ROOT CAUSE
There is no tie check; the sort order silently picks a winner.
THE FAILURE
There is no tie check; the sort order silently picks a winner.
Unsuccessful approach: Awarding the tie to the hammer team is not the stated rule.
Case contract
Curling end result. stones rows are [team, distance_mm] from the button to the stone centre; a stone counts only if it touches the house: distance <= 1830 + 145 (house radius plus stone radius). The team with the closest counting stone scores one point for each of its counting stones strictly closer than the opponent's closest counting stone (all its counting stones if the opponent has none). If no stone counts, or the two closest counting stones of different teams are at the same distance, the end is blank and the hammer stays. After a score the hammer goes to the team that did not score. Return [scoring team or None, points, hammer for next end].
Why this case matters
Curling scoreboards compute end scores and hammer possession from measured stone positions.
1 / The failure
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(stones, hammer):
inside = sorted((d, t) for t, d in stones if d <= 1830 + 145)
tie = bool(inside) and any(d == inside[0][0] and t != inside[0][1] for d, t in inside)
if not inside:
return [None, 0, hammer]
best_d, team = inside[0]
opp = [d for d, t in inside if t != team]
limit = min(opp) if opp else None
points = sum(1 for d, t in inside if t == team and (limit is None or d < limit))
nxt = 'B' if team == 'A' else 'A'
return [team, points, nxt]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
def run(args):
try:
return solve(*args)
except Exception as exc:
return 'raised ' + type(exc).__name__
cases = [[('control single shot', ([['A', 100], ['B', 400]], 'A'), ['A', 1, 'B']),
('boundary stone biting house edge', ([['B', 1975]], 'A'), ['B', 1, 'A']),
('boundary stone just outside', ([['B', 1976]], 'A'), [None, 0, 'A']),
('control steal of two', ([['B', 50], ['B', 300], ['A', 500]], 'A'), ['B', 2, 'A']),
('boundary measured tie', ([['A', 200], ['B', 200]], 'B'), [None, 0, 'B']),
('control empty house', ([], 'A'), [None, 0, 'A']),
('regression: measured tie',
([['A', 142],
['B', 2076],
['A', 231],
['A', 503],
['B', 1837],
['B', 465],
['A', 455],
['B', 1715],
['B', 142]],
'B'),
[None, 0, 'B']),
('variant scenario 1',
([['B', 1754], ['B', 1853], ['A', 292], ['B', 6], ['B', 880], ['A', 1806], ['B', 1151]], 'A'),
['B', 1, 'A']),
('variant scenario 2', ([['B', 2023], ['B', 1835]], 'A'), ['B', 1, 'A'])],
[('control single shot', ([['A', 100], ['B', 400]], 'A'), ['A', 1, 'B']),
('boundary stone biting house edge', ([['B', 1975]], 'A'), ['B', 1, 'A']),
('boundary stone just outside', ([['B', 1976]], 'A'), [None, 0, 'A']),
('control steal of two', ([['B', 50], ['B', 300], ['A', 500]], 'A'), ['B', 2, 'A']),
('boundary measured tie', ([['A', 200], ['B', 200]], 'B'), [None, 0, 'B']),
('control empty house', ([], 'A'), [None, 0, 'A']),
('regression: measured tie', ([['A', 1717], ['B', 1872], ['B', 1717]], 'A'), [None, 0, 'A']),
('variant scenario 1',
([['A', 1814], ['B', 340], ['A', 651], ['B', 1838], ['A', 254]], 'A'),
['A', 1, 'B']),
('variant scenario 2',
([['A', 1746], ['A', 2081], ['B', 341], ['A', 1926]], 'B'),
['B', 1, 'A'])],
[('control single shot', ([['A', 100], ['B', 400]], 'A'), ['A', 1, 'B']),
('boundary stone biting house edge', ([['B', 1975]], 'A'), ['B', 1, 'A']),
('boundary stone just outside', ([['B', 1976]], 'A'), [None, 0, 'A']),
('control steal of two', ([['B', 50], ['B', 300], ['A', 500]], 'A'), ['B', 2, 'A']),
('boundary measured tie', ([['A', 200], ['B', 200]], 'B'), [None, 0, 'B']),
('control empty house', ([], 'A'), [None, 0, 'A']),
('regression: measured tie', ([['A', 501], ['B', 501]], 'A'), [None, 0, 'A']),
('variant scenario 1',
([['A', 1600], ['B', 569], ['B', 1676], ['B', 101], ['B', 458], ['B', 1600]], 'A'),
['B', 3, 'A']),
('variant scenario 2', ([['B', 1700], ['A', 1676], ['B', 15]], 'B'), ['B', 1, 'A'])],
[('control single shot', ([['A', 100], ['B', 400]], 'A'), ['A', 1, 'B']),
('boundary stone biting house edge', ([['B', 1975]], 'A'), ['B', 1, 'A']),
('boundary stone just outside', ([['B', 1976]], 'A'), [None, 0, 'A']),
('control steal of two', ([['B', 50], ['B', 300], ['A', 500]], 'A'), ['B', 2, 'A']),
('boundary measured tie', ([['A', 200], ['B', 200]], 'B'), [None, 0, 'B']),
('control empty house', ([], 'A'), [None, 0, 'A']),
('regression: measured tie', ([['A', 13], ['B', 13]], 'B'), [None, 0, 'B']),
('variant scenario 1', ([['A', 627], ['A', 2084]], 'B'), ['A', 1, 'B']),
('variant scenario 2', ([['A', 343], ['A', 1779], ['A', 2240]], 'B'), ['A', 2, 'B'])],
[('control single shot', ([['A', 100], ['B', 400]], 'A'), ['A', 1, 'B']),
('boundary stone biting house edge', ([['B', 1975]], 'A'), ['B', 1, 'A']),
('boundary stone just outside', ([['B', 1976]], 'A'), [None, 0, 'A']),
('control steal of two', ([['B', 50], ['B', 300], ['A', 500]], 'A'), ['B', 2, 'A']),
('boundary measured tie', ([['A', 200], ['B', 200]], 'B'), [None, 0, 'B']),
('control empty house', ([], 'A'), [None, 0, 'A']),
('regression: measured tie', ([['B', 1805], ['A', 1805]], 'A'), [None, 0, 'A']),
('variant scenario 1',
([['B', 1763], ['A', 883], ['B', 131], ['A', 418], ['B', 1450]], 'A'),
['B', 1, 'A']),
('variant scenario 2', ([['A', 134], ['B', 1848], ['A', 20]], 'B'), ['A', 2, 'B'])]]
for label, args, expected in cases[N - 1]:
check(label, run(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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| control single shot | ['A', 1, 'B'] | ['A', 1, 'B'] | Passed |
| boundary stone biting house edge | ['B', 1, 'A'] | ['B', 1, 'A'] | Passed |
| boundary stone just outside | [None, 0, 'A'] | [None, 0, 'A'] | Passed |
| control steal of two | ['B', 2, 'A'] | ['B', 2, 'A'] | Passed |
| boundary measured tie | ['A', 0, 'B'] | [None, 0, 'B'] | Failed |
| control empty house | [None, 0, 'A'] | [None, 0, 'A'] | Passed |
| regression: measured tie | ['A', 0, 'B'] | [None, 0, 'B'] | Failed |
| variant scenario 1 | ['B', 1, 'A'] | ['B', 1, 'A'] | Passed |
| variant scenario 2 | ['B', 1, 'A'] | ['B', 1, 'A'] | Passed |
SHA-256 / dfee68a7bbc21316ddc6b43e1a7827df1a0e8e60cfe74bd45f3689a2715afabc
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(stones, hammer):
inside = sorted((d, t) for t, d in stones if d <= 1830 + 145)
tie = bool(inside) and any(d == inside[0][0] and t != inside[0][1] for d, t in inside)
if not inside:
return [None, 0, hammer]
if tie:
return [hammer, 1, 'B' if hammer == 'A' else 'A']
best_d, team = inside[0]
opp = [d for d, t in inside if t != team]
limit = min(opp) if opp else None
points = sum(1 for d, t in inside if t == team and (limit is None or d < limit))
nxt = 'B' if team == 'A' else 'A'
return [team, points, nxt]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
def run(args):
try:
return solve(*args)
except Exception as exc:
return 'raised ' + type(exc).__name__
cases = [[('control single shot', ([['A', 100], ['B', 400]], 'A'), ['A', 1, 'B']),
('boundary stone biting house edge', ([['B', 1975]], 'A'), ['B', 1, 'A']),
('boundary stone just outside', ([['B', 1976]], 'A'), [None, 0, 'A']),
('control steal of two', ([['B', 50], ['B', 300], ['A', 500]], 'A'), ['B', 2, 'A']),
('boundary measured tie', ([['A', 200], ['B', 200]], 'B'), [None, 0, 'B']),
('control empty house', ([], 'A'), [None, 0, 'A']),
('regression: measured tie',
([['A', 142],
['B', 2076],
['A', 231],
['A', 503],
['B', 1837],
['B', 465],
['A', 455],
['B', 1715],
['B', 142]],
'B'),
[None, 0, 'B']),
('variant scenario 1',
([['B', 1754], ['B', 1853], ['A', 292], ['B', 6], ['B', 880], ['A', 1806], ['B', 1151]], 'A'),
['B', 1, 'A']),
('variant scenario 2', ([['B', 2023], ['B', 1835]], 'A'), ['B', 1, 'A'])],
[('control single shot', ([['A', 100], ['B', 400]], 'A'), ['A', 1, 'B']),
('boundary stone biting house edge', ([['B', 1975]], 'A'), ['B', 1, 'A']),
('boundary stone just outside', ([['B', 1976]], 'A'), [None, 0, 'A']),
('control steal of two', ([['B', 50], ['B', 300], ['A', 500]], 'A'), ['B', 2, 'A']),
('boundary measured tie', ([['A', 200], ['B', 200]], 'B'), [None, 0, 'B']),
('control empty house', ([], 'A'), [None, 0, 'A']),
('regression: measured tie', ([['A', 1717], ['B', 1872], ['B', 1717]], 'A'), [None, 0, 'A']),
('variant scenario 1',
([['A', 1814], ['B', 340], ['A', 651], ['B', 1838], ['A', 254]], 'A'),
['A', 1, 'B']),
('variant scenario 2',
([['A', 1746], ['A', 2081], ['B', 341], ['A', 1926]], 'B'),
['B', 1, 'A'])],
[('control single shot', ([['A', 100], ['B', 400]], 'A'), ['A', 1, 'B']),
('boundary stone biting house edge', ([['B', 1975]], 'A'), ['B', 1, 'A']),
('boundary stone just outside', ([['B', 1976]], 'A'), [None, 0, 'A']),
('control steal of two', ([['B', 50], ['B', 300], ['A', 500]], 'A'), ['B', 2, 'A']),
('boundary measured tie', ([['A', 200], ['B', 200]], 'B'), [None, 0, 'B']),
('control empty house', ([], 'A'), [None, 0, 'A']),
('regression: measured tie', ([['A', 501], ['B', 501]], 'A'), [None, 0, 'A']),
('variant scenario 1',
([['A', 1600], ['B', 569], ['B', 1676], ['B', 101], ['B', 458], ['B', 1600]], 'A'),
['B', 3, 'A']),
('variant scenario 2', ([['B', 1700], ['A', 1676], ['B', 15]], 'B'), ['B', 1, 'A'])],
[('control single shot', ([['A', 100], ['B', 400]], 'A'), ['A', 1, 'B']),
('boundary stone biting house edge', ([['B', 1975]], 'A'), ['B', 1, 'A']),
('boundary stone just outside', ([['B', 1976]], 'A'), [None, 0, 'A']),
('control steal of two', ([['B', 50], ['B', 300], ['A', 500]], 'A'), ['B', 2, 'A']),
('boundary measured tie', ([['A', 200], ['B', 200]], 'B'), [None, 0, 'B']),
('control empty house', ([], 'A'), [None, 0, 'A']),
('regression: measured tie', ([['A', 13], ['B', 13]], 'B'), [None, 0, 'B']),
('variant scenario 1', ([['A', 627], ['A', 2084]], 'B'), ['A', 1, 'B']),
('variant scenario 2', ([['A', 343], ['A', 1779], ['A', 2240]], 'B'), ['A', 2, 'B'])],
[('control single shot', ([['A', 100], ['B', 400]], 'A'), ['A', 1, 'B']),
('boundary stone biting house edge', ([['B', 1975]], 'A'), ['B', 1, 'A']),
('boundary stone just outside', ([['B', 1976]], 'A'), [None, 0, 'A']),
('control steal of two', ([['B', 50], ['B', 300], ['A', 500]], 'A'), ['B', 2, 'A']),
('boundary measured tie', ([['A', 200], ['B', 200]], 'B'), [None, 0, 'B']),
('control empty house', ([], 'A'), [None, 0, 'A']),
('regression: measured tie', ([['B', 1805], ['A', 1805]], 'A'), [None, 0, 'A']),
('variant scenario 1',
([['B', 1763], ['A', 883], ['B', 131], ['A', 418], ['B', 1450]], 'A'),
['B', 1, 'A']),
('variant scenario 2', ([['A', 134], ['B', 1848], ['A', 20]], 'B'), ['A', 2, 'B'])]]
for label, args, expected in cases[N - 1]:
check(label, run(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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| control single shot | ['A', 1, 'B'] | ['A', 1, 'B'] | Passed |
| boundary stone biting house edge | ['B', 1, 'A'] | ['B', 1, 'A'] | Passed |
| boundary stone just outside | [None, 0, 'A'] | [None, 0, 'A'] | Passed |
| control steal of two | ['B', 2, 'A'] | ['B', 2, 'A'] | Passed |
| boundary measured tie | ['B', 1, 'A'] | [None, 0, 'B'] | Failed |
| control empty house | [None, 0, 'A'] | [None, 0, 'A'] | Passed |
| regression: measured tie | ['B', 1, 'A'] | [None, 0, 'B'] | Failed |
| variant scenario 1 | ['B', 1, 'A'] | ['B', 1, 'A'] | Passed |
| variant scenario 2 | ['B', 1, 'A'] | ['B', 1, 'A'] | Passed |
SHA-256 / cb807ffb76e1f3ecc475d41f353b4cdfa6548b6ec5868804601e9734b3c403cb
HELD IN THE MEMBER ARCHIVE
The verified repair and its recorded checks are member-only.
This mechanism has 9 recorded checks per implementation. The open-access tier publishes the failure and the unsuccessful fix; the repaired source that passes every check, and the observations that prove it, are available to members.
Every case sharing this mechanism uses the same contract and the same repair, so this one record is held back for all of them.
Member access is invitation-based. Sign in with your invited account to inspect the repair.
Sign in to the archive ↗Verification & scope
Stipulated, bounded toy contract stated in the contract field; not a claim of conformance with any governing body rulebook or operator house rules. 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:29.092597+00:00.
Case digest / 8b5bbcde57dee47cafaa4854046c6d85d33daaefed87b9fa9713384cd4b723f6