{"abstract":"\"e7e8k\" is reported ok.","category":"Chess move legality","checks":8,"contract":"Input: {\"board\", \"uci\": move string}. Return \"ok\" or a reason: \"syntax\" (length not 4-5, squares outside a1-h8, or from equals to), \"no piece\" (origin empty), \"promotion required\" (a white pawn reaching rank 8 or black pawn reaching rank 1 without a suffix), \"unexpected promotion\" (suffix on any other move), \"bad promotion\" (suffix not one of q, r, b, n).","contract_signature":"x","evaluation_group":"w2-chess_move_legality-uci-move-syntax","failed_approach":"Replacing the king with the pawn letter still admits an impossible promotion.","family":"w2-chess_move_legality-uci-move-syntax-promotion-piece-set","id":"FA-82611","implementations":{"attempt":{"sha256":"1084c5a908109a058fdd8421a5cad9fffe48804b99ca0ed75660b5717acd4925","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(x):\n    u=x['uci']; b=x['board']\n    if len(u) not in (4,5): return 'syntax'\n    fr,to,promo=u[:2],u[2:4],u[4:]\n    for s in (fr,to):\n        if s[0] not in 'abcdefgh' or s[1] not in '12345678': return 'syntax'\n    if fr==to: return 'syntax'\n    p=b.get(fr)\n    if p is None: return 'no piece'\n    last=(p=='P' and to[1]=='8') or (p=='p' and to[1]=='1')\n    if last and not promo: return 'promotion required'\n    if promo and not last: return 'unexpected promotion'\n    if promo and promo not in 'qrbnp': return 'bad promotion'\n    return 'ok'\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[('simple move', {'board': {'e2': 'P'}, 'uci': 'e2e4'}, 'ok'),\n  ('rank nine', {'board': {'e2': 'P'}, 'uci': 'e2e9'}, 'syntax'),\n  ('rank zero', {'board': {'e2': 'P'}, 'uci': 'e2e0'}, 'syntax'),\n  ('white promotion', {'board': {'e7': 'P'}, 'uci': 'e7e8q'}, 'ok'),\n  ('white needs promotion', {'board': {'e7': 'P'}, 'uci': 'e7e8'}, 'promotion required'),\n  ('black needs promotion', {'board': {'b2': 'p'}, 'uci': 'b2b1'}, 'promotion required'),\n  ('king promotion', {'board': {'e7': 'P'}, 'uci': 'e7e8k'}, 'bad promotion'),\n  ('pawn promotion letter', {'board': {'c7': 'P'}, 'uci': 'c7c8p'}, 'bad promotion')],\n [('white promotion', {'board': {'e7': 'P'}, 'uci': 'e7e8q'}, 'ok'),\n  ('white needs promotion', {'board': {'e7': 'P'}, 'uci': 'e7e8'}, 'promotion required'),\n  ('black needs promotion', {'board': {'b2': 'p'}, 'uci': 'b2b1'}, 'promotion required'),\n  ('black promotes knight', {'board': {'b2': 'p'}, 'uci': 'b2a1n'}, 'ok'),\n  ('rook reaches last rank', {'board': {'a1': 'R'}, 'uci': 'a1a8'}, 'ok'),\n  ('king promotion', {'board': {'e7': 'P'}, 'uci': 'e7e8k'}, 'bad promotion'),\n  ('pawn promotion letter', {'board': {'c7': 'P'}, 'uci': 'c7c8p'}, 'bad promotion'),\n  ('suffix on quiet move', {'board': {'g1': 'N'}, 'uci': 'g1f3q'}, 'unexpected promotion')],\n [('black promotes knight', {'board': {'b2': 'p'}, 'uci': 'b2a1n'}, 'ok'),\n  ('rook reaches last rank', {'board': {'a1': 'R'}, 'uci': 'a1a8'}, 'ok'),\n  ('king promotion', {'board': {'e7': 'P'}, 'uci': 'e7e8k'}, 'bad promotion'),\n  ('pawn promotion letter', {'board': {'c7': 'P'}, 'uci': 'c7c8p'}, 'bad promotion'),\n  ('suffix on quiet move', {'board': {'g1': 'N'}, 'uci': 'g1f3q'}, 'unexpected promotion'),\n  ('null move', {'board': {'e2': 'P'}, 'uci': 'e2e2'}, 'syntax'),\n  ('vertical rook move', {'board': {'h1': 'R'}, 'uci': 'h1h5'}, 'ok'),\n  ('empty origin', {'board': {'e2': 'P'}, 'uci': 'd2d4'}, 'no piece')],\n [('king promotion', {'board': {'e7': 'P'}, 'uci': 'e7e8k'}, 'bad promotion'),\n  ('pawn promotion letter', {'board': {'c7': 'P'}, 'uci': 'c7c8p'}, 'bad promotion'),\n  ('null move', {'board': {'e2': 'P'}, 'uci': 'e2e2'}, 'syntax'),\n  ('vertical rook move', {'board': {'h1': 'R'}, 'uci': 'h1h5'}, 'ok'),\n  ('empty origin', {'board': {'e2': 'P'}, 'uci': 'd2d4'}, 'no piece'),\n  ('too long', {'board': {'e7': 'P'}, 'uci': 'e7e8qq'}, 'syntax'),\n  ('too short', {'board': {'e2': 'P'}, 'uci': 'e2e'}, 'syntax'),\n  ('castling encoding', {'board': {'e1': 'K', 'h1': 'R'}, 'uci': 'e1g1'}, 'ok')],\n [('simple move', {'board': {'e2': 'P'}, 'uci': 'e2e4'}, 'ok'),\n  ('rank nine', {'board': {'e2': 'P'}, 'uci': 'e2e9'}, 'syntax'),\n  ('rank zero', {'board': {'e2': 'P'}, 'uci': 'e2e0'}, 'syntax'),\n  ('king promotion', {'board': {'e7': 'P'}, 'uci': 'e7e8k'}, 'bad promotion'),\n  ('pawn promotion letter', {'board': {'c7': 'P'}, 'uci': 'c7c8p'}, 'bad promotion'),\n  ('too long', {'board': {'e7': 'P'}, 'uci': 'e7e8qq'}, 'syntax'),\n  ('too short', {'board': {'e2': 'P'}, 'uci': 'e2e'}, 'syntax'),\n  ('castling encoding', {'board': {'e1': 'K', 'h1': 'R'}, 'uci': 'e1g1'}, 'ok')]]\nfor label, args, expected in fixtures[N-1]:\n    try:\n        actual = solve(args)\n    except Exception as exc:\n        actual = 'error:' + type(exc).__name__\n    check(label, actual, expected)\nprint(json.dumps({\"observations\": observations, \"passed\": all(x[\"passed\"] for x in observations)}, ensure_ascii=False))\nraise SystemExit(0 if all(x[\"passed\"] for x in observations) else 1)\n"},"broken":{"sha256":"f8c394f56eefbaacf9a29d6e7fb7f604bd37d55e5c0b0278d1fc19ba208c701c","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(x):\n    u=x['uci']; b=x['board']\n    if len(u) not in (4,5): return 'syntax'\n    fr,to,promo=u[:2],u[2:4],u[4:]\n    for s in (fr,to):\n        if s[0] not in 'abcdefgh' or s[1] not in '12345678': return 'syntax'\n    if fr==to: return 'syntax'\n    p=b.get(fr)\n    if p is None: return 'no piece'\n    last=(p=='P' and to[1]=='8') or (p=='p' and to[1]=='1')\n    if last and not promo: return 'promotion required'\n    if promo and not last: return 'unexpected promotion'\n    if promo and promo not in 'qrbnk': return 'bad promotion'\n    return 'ok'\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[('simple move', {'board': {'e2': 'P'}, 'uci': 'e2e4'}, 'ok'),\n  ('rank nine', {'board': {'e2': 'P'}, 'uci': 'e2e9'}, 'syntax'),\n  ('rank zero', {'board': {'e2': 'P'}, 'uci': 'e2e0'}, 'syntax'),\n  ('white promotion', {'board': {'e7': 'P'}, 'uci': 'e7e8q'}, 'ok'),\n  ('white needs promotion', {'board': {'e7': 'P'}, 'uci': 'e7e8'}, 'promotion required'),\n  ('black needs promotion', {'board': {'b2': 'p'}, 'uci': 'b2b1'}, 'promotion required'),\n  ('king promotion', {'board': {'e7': 'P'}, 'uci': 'e7e8k'}, 'bad promotion'),\n  ('pawn promotion letter', {'board': {'c7': 'P'}, 'uci': 'c7c8p'}, 'bad promotion')],\n [('white promotion', {'board': {'e7': 'P'}, 'uci': 'e7e8q'}, 'ok'),\n  ('white needs promotion', {'board': {'e7': 'P'}, 'uci': 'e7e8'}, 'promotion required'),\n  ('black needs promotion', {'board': {'b2': 'p'}, 'uci': 'b2b1'}, 'promotion required'),\n  ('black promotes knight', {'board': {'b2': 'p'}, 'uci': 'b2a1n'}, 'ok'),\n  ('rook reaches last rank', {'board': {'a1': 'R'}, 'uci': 'a1a8'}, 'ok'),\n  ('king promotion', {'board': {'e7': 'P'}, 'uci': 'e7e8k'}, 'bad promotion'),\n  ('pawn promotion letter', {'board': {'c7': 'P'}, 'uci': 'c7c8p'}, 'bad promotion'),\n  ('suffix on quiet move', {'board': {'g1': 'N'}, 'uci': 'g1f3q'}, 'unexpected promotion')],\n [('black promotes knight', {'board': {'b2': 'p'}, 'uci': 'b2a1n'}, 'ok'),\n  ('rook reaches last rank', {'board': {'a1': 'R'}, 'uci': 'a1a8'}, 'ok'),\n  ('king promotion', {'board': {'e7': 'P'}, 'uci': 'e7e8k'}, 'bad promotion'),\n  ('pawn promotion letter', {'board': {'c7': 'P'}, 'uci': 'c7c8p'}, 'bad promotion'),\n  ('suffix on quiet move', {'board': {'g1': 'N'}, 'uci': 'g1f3q'}, 'unexpected promotion'),\n  ('null move', {'board': {'e2': 'P'}, 'uci': 'e2e2'}, 'syntax'),\n  ('vertical rook move', {'board': {'h1': 'R'}, 'uci': 'h1h5'}, 'ok'),\n  ('empty origin', {'board': {'e2': 'P'}, 'uci': 'd2d4'}, 'no piece')],\n [('king promotion', {'board': {'e7': 'P'}, 'uci': 'e7e8k'}, 'bad promotion'),\n  ('pawn promotion letter', {'board': {'c7': 'P'}, 'uci': 'c7c8p'}, 'bad promotion'),\n  ('null move', {'board': {'e2': 'P'}, 'uci': 'e2e2'}, 'syntax'),\n  ('vertical rook move', {'board': {'h1': 'R'}, 'uci': 'h1h5'}, 'ok'),\n  ('empty origin', {'board': {'e2': 'P'}, 'uci': 'd2d4'}, 'no piece'),\n  ('too long', {'board': {'e7': 'P'}, 'uci': 'e7e8qq'}, 'syntax'),\n  ('too short', {'board': {'e2': 'P'}, 'uci': 'e2e'}, 'syntax'),\n  ('castling encoding', {'board': {'e1': 'K', 'h1': 'R'}, 'uci': 'e1g1'}, 'ok')],\n [('simple move', {'board': {'e2': 'P'}, 'uci': 'e2e4'}, 'ok'),\n  ('rank nine', {'board': {'e2': 'P'}, 'uci': 'e2e9'}, 'syntax'),\n  ('rank zero', {'board': {'e2': 'P'}, 'uci': 'e2e0'}, 'syntax'),\n  ('king promotion', {'board': {'e7': 'P'}, 'uci': 'e7e8k'}, 'bad promotion'),\n  ('pawn promotion letter', {'board': {'c7': 'P'}, 'uci': 'c7c8p'}, 'bad promotion'),\n  ('too long', {'board': {'e7': 'P'}, 'uci': 'e7e8qq'}, 'syntax'),\n  ('too short', {'board': {'e2': 'P'}, 'uci': 'e2e'}, 'syntax'),\n  ('castling encoding', {'board': {'e1': 'K', 'h1': 'R'}, 'uci': 'e1g1'}, 'ok')]]\nfor label, args, expected in fixtures[N-1]:\n    try:\n        actual = solve(args)\n    except Exception as exc:\n        actual = 'error:' + type(exc).__name__\n    check(label, actual, expected)\nprint(json.dumps({\"observations\": observations, \"passed\": all(x[\"passed\"] for x in observations)}, ensure_ascii=False))\nraise SystemExit(0 if all(x[\"passed\"] for x in observations) else 1)\n"}},"limitations":"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.","method":"Deterministic executable model with adversarial boundary fixtures.","provenance":{"created_by":"Failure Map","dependencies":"Python standard library","family":"w2-chess_move_legality-uci-move-syntax-promotion-piece-set","generated_at":"2026-09-29T14:50:13.807488+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"Engines and servers exchange moves in this long algebraic format.","root_cause":"The promotion letter set includes the king.","sha256":"3011e8509449b6efc5835883207d4805e79fd00aff4ab0b564807aadbbe628a6","title":"Promotion to king accepted · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verified":true,"visibility":"public","verification":{"attempt":{"elapsed_ms":40.624,"exit_code":1,"observations":[{"actual":"ok","check":"simple move","expected":"ok","passed":true},{"actual":"syntax","check":"rank nine","expected":"syntax","passed":true},{"actual":"syntax","check":"rank zero","expected":"syntax","passed":true},{"actual":"ok","check":"white promotion","expected":"ok","passed":true},{"actual":"promotion required","check":"white needs promotion","expected":"promotion required","passed":true},{"actual":"promotion required","check":"black needs promotion","expected":"promotion required","passed":true},{"actual":"bad promotion","check":"king promotion","expected":"bad promotion","passed":true},{"actual":"ok","check":"pawn promotion letter","expected":"bad promotion","passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"simple move\", \"actual\": \"ok\", \"expected\": \"ok\", \"passed\": true}, {\"check\": \"rank nine\", \"actual\": \"syntax\", \"expected\": \"syntax\", \"passed\": true}, {\"check\": \"rank zero\", \"actual\": \"syntax\", \"expected\": \"syntax\", \"passed\": true}, {\"check\": \"white promotion\", \"actual\": \"ok\", \"expected\": \"ok\", \"passed\": true}, {\"check\": \"white needs promotion\", \"actual\": \"promotion required\", \"expected\": \"promotion required\", \"passed\": true}, {\"check\": \"black needs promotion\", \"actual\": \"promotion required\", \"expected\": \"promotion required\", \"passed\": true}, {\"check\": \"king promotion\", \"actual\": \"bad promotion\", \"expected\": \"bad promotion\", \"passed\": true}, {\"check\": \"pawn promotion letter\", \"actual\": \"ok\", \"expected\": \"bad promotion\", \"passed\": false}], \"passed\": false}\n"},"broken":{"elapsed_ms":37.522,"exit_code":1,"observations":[{"actual":"ok","check":"simple move","expected":"ok","passed":true},{"actual":"syntax","check":"rank nine","expected":"syntax","passed":true},{"actual":"syntax","check":"rank zero","expected":"syntax","passed":true},{"actual":"ok","check":"white promotion","expected":"ok","passed":true},{"actual":"promotion required","check":"white needs promotion","expected":"promotion required","passed":true},{"actual":"promotion required","check":"black needs promotion","expected":"promotion required","passed":true},{"actual":"ok","check":"king promotion","expected":"bad promotion","passed":false},{"actual":"bad promotion","check":"pawn promotion letter","expected":"bad promotion","passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"simple move\", \"actual\": \"ok\", \"expected\": \"ok\", \"passed\": true}, {\"check\": \"rank nine\", \"actual\": \"syntax\", \"expected\": \"syntax\", \"passed\": true}, {\"check\": \"rank zero\", \"actual\": \"syntax\", \"expected\": \"syntax\", \"passed\": true}, {\"check\": \"white promotion\", \"actual\": \"ok\", \"expected\": \"ok\", \"passed\": true}, {\"check\": \"white needs promotion\", \"actual\": \"promotion required\", \"expected\": \"promotion required\", \"passed\": true}, {\"check\": \"black needs promotion\", \"actual\": \"promotion required\", \"expected\": \"promotion required\", \"passed\": true}, {\"check\": \"king promotion\", \"actual\": \"ok\", \"expected\": \"bad promotion\", \"passed\": false}, {\"check\": \"pawn promotion letter\", \"actual\": \"bad promotion\", \"expected\": \"bad promotion\", \"passed\": true}], \"passed\": false}\n"}},"member_only":{"stages":["fixed"],"fields":["implementations.fixed","verification.fixed","harness","repair"],"note":"The verified repair, its recorded checks, the repair description, and the scoring harness are available to members."}}