FA-82402 / Chess move legality / Member archive
Promotion triggered one rank early · case 02
A white pawn arriving on the seventh rank is expanded into promotion moves, while the eighth rank is not.
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.
One recorded failure
Sample boundary fixtureThis sample comes from the broken implementation of a controlled reproducer.
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| white promotion | ["a8", "b8"] | ["a8b", "a8n", "a8q", "a8r", "b8b", "b8n", "b8q", "b8r"] | 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 ↗