{"abstract":"\"e7e8qq\" is treated as a promotion with suffix \"qq\".","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":"Enforcing only the upper bound lets \"e2e\" slice into a malformed destination.","family":"w2-chess_move_legality-uci-move-syntax-length-window","id":"FA-82626","implementations":{"attempt":{"sha256":"c13a4cac992d0e4140e1e73bf63afe0b41f47793a7b02619da36fcccca2a6869","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)>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 'qrbn': 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  ('too long', {'board': {'e7': 'P'}, 'uci': 'e7e8qq'}, 'syntax'),\n  ('too short', {'board': {'e2': 'P'}, 'uci': 'e2e'}, '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  ('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  ('too long', {'board': {'e7': 'P'}, 'uci': 'e7e8qq'}, 'syntax'),\n  ('too short', {'board': {'e2': 'P'}, 'uci': 'e2e'}, 'syntax')],\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  ('too long', {'board': {'e7': 'P'}, 'uci': 'e7e8qq'}, 'syntax'),\n  ('too short', {'board': {'e2': 'P'}, 'uci': 'e2e'}, 'syntax')],\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  ('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  ('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')]]\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":"3b7142266b6ac59ea4861081eaa455d63c40cd64786348ef3bb45e7a03ee62d8","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)<4: 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 'qrbn': 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  ('too long', {'board': {'e7': 'P'}, 'uci': 'e7e8qq'}, 'syntax'),\n  ('too short', {'board': {'e2': 'P'}, 'uci': 'e2e'}, '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  ('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  ('too long', {'board': {'e7': 'P'}, 'uci': 'e7e8qq'}, 'syntax'),\n  ('too short', {'board': {'e2': 'P'}, 'uci': 'e2e'}, 'syntax')],\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  ('too long', {'board': {'e7': 'P'}, 'uci': 'e7e8qq'}, 'syntax'),\n  ('too short', {'board': {'e2': 'P'}, 'uci': 'e2e'}, 'syntax')],\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  ('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  ('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')]]\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-length-window","generated_at":"2026-09-29T14:50:13.983201+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":"Only a lower length bound is enforced.","sha256":"f1ccb44d16c13b4929e70f6b2993c4a3749b04bb553662018fcd3e4c487c8ff5","title":"Overlong UCI strings pass validation · 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":41.445,"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":"syntax","check":"too long","expected":"syntax","passed":true},{"actual":"error:IndexError","check":"too short","expected":"syntax","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\": \"too long\", \"actual\": \"syntax\", \"expected\": \"syntax\", \"passed\": true}, {\"check\": \"too short\", \"actual\": \"error:IndexError\", \"expected\": \"syntax\", \"passed\": false}], \"passed\": false}\n"},"broken":{"elapsed_ms":42.771,"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":"too long","expected":"syntax","passed":false},{"actual":"syntax","check":"too short","expected":"syntax","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\": \"too long\", \"actual\": \"bad promotion\", \"expected\": \"syntax\", \"passed\": false}, {\"check\": \"too short\", \"actual\": \"syntax\", \"expected\": \"syntax\", \"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."}}