FAILURE MAP
← Case archive

FA-82555 / Chess move legality / Member archive

Positions without castling rights rejected · case 05

Every FEN with "-" in the castling field is reported invalid.

Member previewVariant 5 · 3 implementations · 8 checks per implementation

Case contract

Input: a FEN string. Return {"pieces": {square: piece}, "turn", "castling", "ep", "halfmove", "fullmove"} or "invalid". Placement lists rank 8 first; digits skip empty squares; each rank must total 8; exactly one king per side. Turn is w or b; castling is "-" or letters from KQkq (returned as "" when "-"); ep is "-" (null) or a square on rank 6 when white is to move, rank 3 when black is; halfmove is a non-negative integer and fullmove at least 1.

Why this case matters

Every position-based legality check starts from a parsed FEN; a misparse silently changes which moves are legal.

One recorded failure

Sample boundary fixture

This sample comes from the broken implementation of a controlled reproducer.

Boundary fixtureActualExpectedOutcome
black to move ep"invalid"{"castling": "", "ep": "d3", "fullmove": 12, "halfmove": 0, "pieces": {"d4": "P", "e1": "K", "e4": "p", "e8": "k"}, "turn": "b"}Failed

MEMBER ARCHIVE

The complete case is available to members.

This record includes three runnable implementations, regression fixtures, execution results, and source hashes.

Member access is invitation-based. Sign in with your invited account to inspect the sources.

Sign in to the archive ↗