FA-82386 / Chess move legality / Open access
Pawn double step jumps over a blocker · case 01
A pawn on e2 with a knight on e3 is offered e4.
ROOT CAUSE
The two-square advance is checked outside the one-square branch, so only the destination square is tested.
VERIFIED REPAIR
Allow the double step only when the single step is also clear.
Unsuccessful approach: Nesting the check but dropping the occupancy test on the far square lets the pawn land on a piece.
Case contract
Input: {"board", "from": square of a pawn, "ep": en passant target square or null}. Return sorted pseudo-legal destinations: one step forward if empty; two steps from the starting rank if both squares are empty; diagonal captures of enemy pieces or onto the ep square. A destination on the last rank is expanded into four entries suffixed q, r, b, n.
Why this case matters
Move validators gate every move in engines, servers and arbiters; accepting an illegal move or rejecting a legal one corrupts the game record.
1 / The failure
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(x):
b=x['board']; sq=x['from']; p=b[sq]; white=p=='P'
f,r=ord(sq[0])-97,int(sq[1])-1
d=1 if white else -1
start=1 if white else 6
last=7 if white else 0
def at(ff,rr): return chr(97+ff)+str(rr+1)
out=[]
if 0<=r+d<8 and at(f,r+d) not in b:
out.append(at(f,r+d))
if r==start and at(f,r+2*d) not in b: out.append(at(f,r+2*d))
for df in (-1,1):
ff=f+df
if not 0<=ff<8 or not 0<=r+d<8: continue
t=at(ff,r+d); occ=b.get(t)
if (occ and occ.isupper()!=white) or t==x.get('ep'): out.append(t)
res=[]
for t in out:
if int(t[1])-1==last: res+=[t+c for c in 'qrbn']
else: res.append(t)
return sorted(res)
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('white double push', {'board': {'e2': 'P'}, 'ep': None, 'from': 'e2'}, ['e3', 'e4']),
('black double push', {'board': {'d7': 'p'}, 'ep': None, 'from': 'd7'}, ['d5', 'd6']),
('blocked jump', {'board': {'e2': 'P', 'e3': 'n'}, 'ep': None, 'from': 'e2'}, []),
('far square blocked', {'board': {'c5': 'P', 'c7': 'p'}, 'ep': None, 'from': 'c7'}, ['c6']),
('captures both colours', {'board': {'c5': 'p', 'd4': 'P', 'e5': 'B'}, 'ep': None, 'from': 'd4'},
['c5', 'd5']),
('black captures',
{'board': {'e5': 'P', 'f5': 'P', 'f6': 'p', 'g5': 'n'}, 'ep': None, 'from': 'f6'}, ['e5']),
('white promotion', {'board': {'a8': 'r', 'b7': 'P'}, 'ep': None, 'from': 'b7'},
['a8b', 'a8n', 'a8q', 'a8r', 'b8b', 'b8n', 'b8q', 'b8r']),
('black blocked by own', {'board': {'a6': 'P', 'b6': 'p', 'b7': 'p'}, 'ep': None, 'from': 'b7'},
['a6'])],
[('blocked jump', {'board': {'e2': 'P', 'e3': 'n'}, 'ep': None, 'from': 'e2'}, []),
('far square blocked', {'board': {'c5': 'P', 'c7': 'p'}, 'ep': None, 'from': 'c7'}, ['c6']),
('black captures',
{'board': {'e5': 'P', 'f5': 'P', 'f6': 'p', 'g5': 'n'}, 'ep': None, 'from': 'f6'}, ['e5']),
('white promotion', {'board': {'a8': 'r', 'b7': 'P'}, 'ep': None, 'from': 'b7'},
['a8b', 'a8n', 'a8q', 'a8r', 'b8b', 'b8n', 'b8q', 'b8r']),
('black promotion', {'board': {'h2': 'p'}, 'ep': None, 'from': 'h2'},
['h1b', 'h1n', 'h1q', 'h1r']),
('en passant target', {'board': {'d5': 'p', 'e5': 'P'}, 'ep': 'd6', 'from': 'e5'}, ['d6', 'e6']),
('black on sixth rank', {'board': {'a6': 'p'}, 'ep': None, 'from': 'a6'}, ['a5']),
('black blocked by own', {'board': {'a6': 'P', 'b6': 'p', 'b7': 'p'}, 'ep': None, 'from': 'b7'},
['a6'])],
[('white double push', {'board': {'e2': 'P'}, 'ep': None, 'from': 'e2'}, ['e3', 'e4']),
('black double push', {'board': {'d7': 'p'}, 'ep': None, 'from': 'd7'}, ['d5', 'd6']),
('blocked jump', {'board': {'e2': 'P', 'e3': 'n'}, 'ep': None, 'from': 'e2'}, []),
('far square blocked', {'board': {'c5': 'P', 'c7': 'p'}, 'ep': None, 'from': 'c7'}, ['c6']),
('en passant target', {'board': {'d5': 'p', 'e5': 'P'}, 'ep': 'd6', 'from': 'e5'}, ['d6', 'e6']),
('black on sixth rank', {'board': {'a6': 'p'}, 'ep': None, 'from': 'a6'}, ['a5']),
('white third rank', {'board': {'g3': 'P'}, 'ep': None, 'from': 'g3'}, ['g4']),
('black blocked by own', {'board': {'a6': 'P', 'b6': 'p', 'b7': 'p'}, 'ep': None, 'from': 'b7'},
['a6'])],
[('white double push', {'board': {'e2': 'P'}, 'ep': None, 'from': 'e2'}, ['e3', 'e4']),
('black double push', {'board': {'d7': 'p'}, 'ep': None, 'from': 'd7'}, ['d5', 'd6']),
('blocked jump', {'board': {'e2': 'P', 'e3': 'n'}, 'ep': None, 'from': 'e2'}, []),
('far square blocked', {'board': {'c5': 'P', 'c7': 'p'}, 'ep': None, 'from': 'c7'}, ['c6']),
('captures both colours', {'board': {'c5': 'p', 'd4': 'P', 'e5': 'B'}, 'ep': None, 'from': 'd4'},
['c5', 'd5']),
('black captures',
{'board': {'e5': 'P', 'f5': 'P', 'f6': 'p', 'g5': 'n'}, 'ep': None, 'from': 'f6'}, ['e5']),
('white promotion', {'board': {'a8': 'r', 'b7': 'P'}, 'ep': None, 'from': 'b7'},
['a8b', 'a8n', 'a8q', 'a8r', 'b8b', 'b8n', 'b8q', 'b8r']),
('black blocked by own', {'board': {'a6': 'P', 'b6': 'p', 'b7': 'p'}, 'ep': None, 'from': 'b7'},
['a6'])],
[('white double push', {'board': {'e2': 'P'}, 'ep': None, 'from': 'e2'}, ['e3', 'e4']),
('black double push', {'board': {'d7': 'p'}, 'ep': None, 'from': 'd7'}, ['d5', 'd6']),
('blocked jump', {'board': {'e2': 'P', 'e3': 'n'}, 'ep': None, 'from': 'e2'}, []),
('far square blocked', {'board': {'c5': 'P', 'c7': 'p'}, 'ep': None, 'from': 'c7'}, ['c6']),
('captures both colours', {'board': {'c5': 'p', 'd4': 'P', 'e5': 'B'}, 'ep': None, 'from': 'd4'},
['c5', 'd5']),
('black captures',
{'board': {'e5': 'P', 'f5': 'P', 'f6': 'p', 'g5': 'n'}, 'ep': None, 'from': 'f6'}, ['e5']),
('white promotion', {'board': {'a8': 'r', 'b7': 'P'}, 'ep': None, 'from': 'b7'},
['a8b', 'a8n', 'a8q', 'a8r', 'b8b', 'b8n', 'b8q', 'b8r']),
('black blocked by own', {'board': {'a6': 'P', 'b6': 'p', 'b7': 'p'}, 'ep': None, 'from': 'b7'},
['a6'])]]
for label, args, expected in fixtures[N-1]:
try:
actual = solve(args)
except Exception as exc:
actual = 'error:' + type(exc).__name__
check(label, actual, 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 |
|---|---|---|---|
| white double push | ['e3', 'e4'] | ['e3', 'e4'] | Passed |
| black double push | ['d5', 'd6'] | ['d5', 'd6'] | Passed |
| blocked jump | ['e4'] | [] | Failed |
| far square blocked | ['c6'] | ['c6'] | Passed |
| captures both colours | ['c5', 'd5'] | ['c5', 'd5'] | Passed |
| black captures | ['e5'] | ['e5'] | Passed |
| white promotion | ['a8b', 'a8n', 'a8q', 'a8r', 'b8b', 'b8n', 'b8q', 'b8r'] | ['a8b', 'a8n', 'a8q', 'a8r', 'b8b', 'b8n', 'b8q', 'b8r'] | Passed |
| black blocked by own | ['a6', 'b5'] | ['a6'] | Failed |
SHA-256 / 445c53bf13880dce5ec932c6a4e23e7a71a1fb34e32ccd28304173fa2fa50d4d
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(x):
b=x['board']; sq=x['from']; p=b[sq]; white=p=='P'
f,r=ord(sq[0])-97,int(sq[1])-1
d=1 if white else -1
start=1 if white else 6
last=7 if white else 0
def at(ff,rr): return chr(97+ff)+str(rr+1)
out=[]
if 0<=r+d<8 and at(f,r+d) not in b:
out.append(at(f,r+d))
if r==start: out.append(at(f,r+2*d))
for df in (-1,1):
ff=f+df
if not 0<=ff<8 or not 0<=r+d<8: continue
t=at(ff,r+d); occ=b.get(t)
if (occ and occ.isupper()!=white) or t==x.get('ep'): out.append(t)
res=[]
for t in out:
if int(t[1])-1==last: res+=[t+c for c in 'qrbn']
else: res.append(t)
return sorted(res)
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('white double push', {'board': {'e2': 'P'}, 'ep': None, 'from': 'e2'}, ['e3', 'e4']),
('black double push', {'board': {'d7': 'p'}, 'ep': None, 'from': 'd7'}, ['d5', 'd6']),
('blocked jump', {'board': {'e2': 'P', 'e3': 'n'}, 'ep': None, 'from': 'e2'}, []),
('far square blocked', {'board': {'c5': 'P', 'c7': 'p'}, 'ep': None, 'from': 'c7'}, ['c6']),
('captures both colours', {'board': {'c5': 'p', 'd4': 'P', 'e5': 'B'}, 'ep': None, 'from': 'd4'},
['c5', 'd5']),
('black captures',
{'board': {'e5': 'P', 'f5': 'P', 'f6': 'p', 'g5': 'n'}, 'ep': None, 'from': 'f6'}, ['e5']),
('white promotion', {'board': {'a8': 'r', 'b7': 'P'}, 'ep': None, 'from': 'b7'},
['a8b', 'a8n', 'a8q', 'a8r', 'b8b', 'b8n', 'b8q', 'b8r']),
('black blocked by own', {'board': {'a6': 'P', 'b6': 'p', 'b7': 'p'}, 'ep': None, 'from': 'b7'},
['a6'])],
[('blocked jump', {'board': {'e2': 'P', 'e3': 'n'}, 'ep': None, 'from': 'e2'}, []),
('far square blocked', {'board': {'c5': 'P', 'c7': 'p'}, 'ep': None, 'from': 'c7'}, ['c6']),
('black captures',
{'board': {'e5': 'P', 'f5': 'P', 'f6': 'p', 'g5': 'n'}, 'ep': None, 'from': 'f6'}, ['e5']),
('white promotion', {'board': {'a8': 'r', 'b7': 'P'}, 'ep': None, 'from': 'b7'},
['a8b', 'a8n', 'a8q', 'a8r', 'b8b', 'b8n', 'b8q', 'b8r']),
('black promotion', {'board': {'h2': 'p'}, 'ep': None, 'from': 'h2'},
['h1b', 'h1n', 'h1q', 'h1r']),
('en passant target', {'board': {'d5': 'p', 'e5': 'P'}, 'ep': 'd6', 'from': 'e5'}, ['d6', 'e6']),
('black on sixth rank', {'board': {'a6': 'p'}, 'ep': None, 'from': 'a6'}, ['a5']),
('black blocked by own', {'board': {'a6': 'P', 'b6': 'p', 'b7': 'p'}, 'ep': None, 'from': 'b7'},
['a6'])],
[('white double push', {'board': {'e2': 'P'}, 'ep': None, 'from': 'e2'}, ['e3', 'e4']),
('black double push', {'board': {'d7': 'p'}, 'ep': None, 'from': 'd7'}, ['d5', 'd6']),
('blocked jump', {'board': {'e2': 'P', 'e3': 'n'}, 'ep': None, 'from': 'e2'}, []),
('far square blocked', {'board': {'c5': 'P', 'c7': 'p'}, 'ep': None, 'from': 'c7'}, ['c6']),
('en passant target', {'board': {'d5': 'p', 'e5': 'P'}, 'ep': 'd6', 'from': 'e5'}, ['d6', 'e6']),
('black on sixth rank', {'board': {'a6': 'p'}, 'ep': None, 'from': 'a6'}, ['a5']),
('white third rank', {'board': {'g3': 'P'}, 'ep': None, 'from': 'g3'}, ['g4']),
('black blocked by own', {'board': {'a6': 'P', 'b6': 'p', 'b7': 'p'}, 'ep': None, 'from': 'b7'},
['a6'])],
[('white double push', {'board': {'e2': 'P'}, 'ep': None, 'from': 'e2'}, ['e3', 'e4']),
('black double push', {'board': {'d7': 'p'}, 'ep': None, 'from': 'd7'}, ['d5', 'd6']),
('blocked jump', {'board': {'e2': 'P', 'e3': 'n'}, 'ep': None, 'from': 'e2'}, []),
('far square blocked', {'board': {'c5': 'P', 'c7': 'p'}, 'ep': None, 'from': 'c7'}, ['c6']),
('captures both colours', {'board': {'c5': 'p', 'd4': 'P', 'e5': 'B'}, 'ep': None, 'from': 'd4'},
['c5', 'd5']),
('black captures',
{'board': {'e5': 'P', 'f5': 'P', 'f6': 'p', 'g5': 'n'}, 'ep': None, 'from': 'f6'}, ['e5']),
('white promotion', {'board': {'a8': 'r', 'b7': 'P'}, 'ep': None, 'from': 'b7'},
['a8b', 'a8n', 'a8q', 'a8r', 'b8b', 'b8n', 'b8q', 'b8r']),
('black blocked by own', {'board': {'a6': 'P', 'b6': 'p', 'b7': 'p'}, 'ep': None, 'from': 'b7'},
['a6'])],
[('white double push', {'board': {'e2': 'P'}, 'ep': None, 'from': 'e2'}, ['e3', 'e4']),
('black double push', {'board': {'d7': 'p'}, 'ep': None, 'from': 'd7'}, ['d5', 'd6']),
('blocked jump', {'board': {'e2': 'P', 'e3': 'n'}, 'ep': None, 'from': 'e2'}, []),
('far square blocked', {'board': {'c5': 'P', 'c7': 'p'}, 'ep': None, 'from': 'c7'}, ['c6']),
('captures both colours', {'board': {'c5': 'p', 'd4': 'P', 'e5': 'B'}, 'ep': None, 'from': 'd4'},
['c5', 'd5']),
('black captures',
{'board': {'e5': 'P', 'f5': 'P', 'f6': 'p', 'g5': 'n'}, 'ep': None, 'from': 'f6'}, ['e5']),
('white promotion', {'board': {'a8': 'r', 'b7': 'P'}, 'ep': None, 'from': 'b7'},
['a8b', 'a8n', 'a8q', 'a8r', 'b8b', 'b8n', 'b8q', 'b8r']),
('black blocked by own', {'board': {'a6': 'P', 'b6': 'p', 'b7': 'p'}, 'ep': None, 'from': 'b7'},
['a6'])]]
for label, args, expected in fixtures[N-1]:
try:
actual = solve(args)
except Exception as exc:
actual = 'error:' + type(exc).__name__
check(label, actual, 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 |
|---|---|---|---|
| white double push | ['e3', 'e4'] | ['e3', 'e4'] | Passed |
| black double push | ['d5', 'd6'] | ['d5', 'd6'] | Passed |
| blocked jump | [] | [] | Passed |
| far square blocked | ['c5', 'c6'] | ['c6'] | Failed |
| captures both colours | ['c5', 'd5'] | ['c5', 'd5'] | Passed |
| black captures | ['e5'] | ['e5'] | Passed |
| white promotion | ['a8b', 'a8n', 'a8q', 'a8r', 'b8b', 'b8n', 'b8q', 'b8r'] | ['a8b', 'a8n', 'a8q', 'a8r', 'b8b', 'b8n', 'b8q', 'b8r'] | Passed |
| black blocked by own | ['a6'] | ['a6'] | Passed |
SHA-256 / 243f113d169ed0b49269cf5231f17a0e4c5851cb901deddc08675974459ff589
3 / The verified repair
Exit 0"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(x):
b=x['board']; sq=x['from']; p=b[sq]; white=p=='P'
f,r=ord(sq[0])-97,int(sq[1])-1
d=1 if white else -1
start=1 if white else 6
last=7 if white else 0
def at(ff,rr): return chr(97+ff)+str(rr+1)
out=[]
if 0<=r+d<8 and at(f,r+d) not in b:
out.append(at(f,r+d))
if r==start and at(f,r+2*d) not in b: out.append(at(f,r+2*d))
for df in (-1,1):
ff=f+df
if not 0<=ff<8 or not 0<=r+d<8: continue
t=at(ff,r+d); occ=b.get(t)
if (occ and occ.isupper()!=white) or t==x.get('ep'): out.append(t)
res=[]
for t in out:
if int(t[1])-1==last: res+=[t+c for c in 'qrbn']
else: res.append(t)
return sorted(res)
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('white double push', {'board': {'e2': 'P'}, 'ep': None, 'from': 'e2'}, ['e3', 'e4']),
('black double push', {'board': {'d7': 'p'}, 'ep': None, 'from': 'd7'}, ['d5', 'd6']),
('blocked jump', {'board': {'e2': 'P', 'e3': 'n'}, 'ep': None, 'from': 'e2'}, []),
('far square blocked', {'board': {'c5': 'P', 'c7': 'p'}, 'ep': None, 'from': 'c7'}, ['c6']),
('captures both colours', {'board': {'c5': 'p', 'd4': 'P', 'e5': 'B'}, 'ep': None, 'from': 'd4'},
['c5', 'd5']),
('black captures',
{'board': {'e5': 'P', 'f5': 'P', 'f6': 'p', 'g5': 'n'}, 'ep': None, 'from': 'f6'}, ['e5']),
('white promotion', {'board': {'a8': 'r', 'b7': 'P'}, 'ep': None, 'from': 'b7'},
['a8b', 'a8n', 'a8q', 'a8r', 'b8b', 'b8n', 'b8q', 'b8r']),
('black blocked by own', {'board': {'a6': 'P', 'b6': 'p', 'b7': 'p'}, 'ep': None, 'from': 'b7'},
['a6'])],
[('blocked jump', {'board': {'e2': 'P', 'e3': 'n'}, 'ep': None, 'from': 'e2'}, []),
('far square blocked', {'board': {'c5': 'P', 'c7': 'p'}, 'ep': None, 'from': 'c7'}, ['c6']),
('black captures',
{'board': {'e5': 'P', 'f5': 'P', 'f6': 'p', 'g5': 'n'}, 'ep': None, 'from': 'f6'}, ['e5']),
('white promotion', {'board': {'a8': 'r', 'b7': 'P'}, 'ep': None, 'from': 'b7'},
['a8b', 'a8n', 'a8q', 'a8r', 'b8b', 'b8n', 'b8q', 'b8r']),
('black promotion', {'board': {'h2': 'p'}, 'ep': None, 'from': 'h2'},
['h1b', 'h1n', 'h1q', 'h1r']),
('en passant target', {'board': {'d5': 'p', 'e5': 'P'}, 'ep': 'd6', 'from': 'e5'}, ['d6', 'e6']),
('black on sixth rank', {'board': {'a6': 'p'}, 'ep': None, 'from': 'a6'}, ['a5']),
('black blocked by own', {'board': {'a6': 'P', 'b6': 'p', 'b7': 'p'}, 'ep': None, 'from': 'b7'},
['a6'])],
[('white double push', {'board': {'e2': 'P'}, 'ep': None, 'from': 'e2'}, ['e3', 'e4']),
('black double push', {'board': {'d7': 'p'}, 'ep': None, 'from': 'd7'}, ['d5', 'd6']),
('blocked jump', {'board': {'e2': 'P', 'e3': 'n'}, 'ep': None, 'from': 'e2'}, []),
('far square blocked', {'board': {'c5': 'P', 'c7': 'p'}, 'ep': None, 'from': 'c7'}, ['c6']),
('en passant target', {'board': {'d5': 'p', 'e5': 'P'}, 'ep': 'd6', 'from': 'e5'}, ['d6', 'e6']),
('black on sixth rank', {'board': {'a6': 'p'}, 'ep': None, 'from': 'a6'}, ['a5']),
('white third rank', {'board': {'g3': 'P'}, 'ep': None, 'from': 'g3'}, ['g4']),
('black blocked by own', {'board': {'a6': 'P', 'b6': 'p', 'b7': 'p'}, 'ep': None, 'from': 'b7'},
['a6'])],
[('white double push', {'board': {'e2': 'P'}, 'ep': None, 'from': 'e2'}, ['e3', 'e4']),
('black double push', {'board': {'d7': 'p'}, 'ep': None, 'from': 'd7'}, ['d5', 'd6']),
('blocked jump', {'board': {'e2': 'P', 'e3': 'n'}, 'ep': None, 'from': 'e2'}, []),
('far square blocked', {'board': {'c5': 'P', 'c7': 'p'}, 'ep': None, 'from': 'c7'}, ['c6']),
('captures both colours', {'board': {'c5': 'p', 'd4': 'P', 'e5': 'B'}, 'ep': None, 'from': 'd4'},
['c5', 'd5']),
('black captures',
{'board': {'e5': 'P', 'f5': 'P', 'f6': 'p', 'g5': 'n'}, 'ep': None, 'from': 'f6'}, ['e5']),
('white promotion', {'board': {'a8': 'r', 'b7': 'P'}, 'ep': None, 'from': 'b7'},
['a8b', 'a8n', 'a8q', 'a8r', 'b8b', 'b8n', 'b8q', 'b8r']),
('black blocked by own', {'board': {'a6': 'P', 'b6': 'p', 'b7': 'p'}, 'ep': None, 'from': 'b7'},
['a6'])],
[('white double push', {'board': {'e2': 'P'}, 'ep': None, 'from': 'e2'}, ['e3', 'e4']),
('black double push', {'board': {'d7': 'p'}, 'ep': None, 'from': 'd7'}, ['d5', 'd6']),
('blocked jump', {'board': {'e2': 'P', 'e3': 'n'}, 'ep': None, 'from': 'e2'}, []),
('far square blocked', {'board': {'c5': 'P', 'c7': 'p'}, 'ep': None, 'from': 'c7'}, ['c6']),
('captures both colours', {'board': {'c5': 'p', 'd4': 'P', 'e5': 'B'}, 'ep': None, 'from': 'd4'},
['c5', 'd5']),
('black captures',
{'board': {'e5': 'P', 'f5': 'P', 'f6': 'p', 'g5': 'n'}, 'ep': None, 'from': 'f6'}, ['e5']),
('white promotion', {'board': {'a8': 'r', 'b7': 'P'}, 'ep': None, 'from': 'b7'},
['a8b', 'a8n', 'a8q', 'a8r', 'b8b', 'b8n', 'b8q', 'b8r']),
('black blocked by own', {'board': {'a6': 'P', 'b6': 'p', 'b7': 'p'}, 'ep': None, 'from': 'b7'},
['a6'])]]
for label, args, expected in fixtures[N-1]:
try:
actual = solve(args)
except Exception as exc:
actual = 'error:' + type(exc).__name__
check(label, actual, 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 |
|---|---|---|---|
| white double push | ['e3', 'e4'] | ['e3', 'e4'] | Passed |
| black double push | ['d5', 'd6'] | ['d5', 'd6'] | Passed |
| blocked jump | [] | [] | Passed |
| far square blocked | ['c6'] | ['c6'] | Passed |
| captures both colours | ['c5', 'd5'] | ['c5', 'd5'] | Passed |
| black captures | ['e5'] | ['e5'] | Passed |
| white promotion | ['a8b', 'a8n', 'a8q', 'a8r', 'b8b', 'b8n', 'b8q', 'b8r'] | ['a8b', 'a8n', 'a8q', 'a8r', 'b8b', 'b8n', 'b8q', 'b8r'] | Passed |
| black blocked by own | ['a6'] | ['a6'] | Passed |
SHA-256 / 12be8492a6eb558228f69a7b3d6d8b4d7ec8acafcb636e11015d75620590dfa1
Verification & scope
A deterministic toy model with an explicitly stated contract; boards are {square: piece} with white upper-case and black lower-case pieces; no claim of full FIDE Laws conformance. 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:11.508884+00:00.
Case digest / a942eded986adb251a7bddea6775c83b5b9ebd7536822738eb549a741d068682