{"abstract":"A pawn promotes before reaching its final rank.","category":"Game simulation rules","checks":7,"contract":"Piece is pawn/rook/knight; color white/black; rank 1..8; choice queen/rook/bishop/knight. Return choice only for pawn at white rank8 or black rank1; else preserve piece.","contract_signature":"piece, color, rank, choice","evaluation_group":"model-5a0867f8b550be25","failed_approach":"Checking either edge rank permits promotion on the pawn’s starting side.","family":"z-games-promotion-gate","id":"FA-11676","implementations":{"attempt":{"sha256":"82a16a679b66516f48c3fcb769d643fb4e9bf4db34e94430261c6f9f7541bb5e","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(piece, color, rank, choice):\n    return choice if piece=='pawn' and rank in (1,8) else piece\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('middle rank',solve('pawn','white',N+1,'queen'),'pawn')\ncheck('wrong edge white',solve('pawn','white',1,'queen'),'pawn')\ncheck('wrong edge black',solve('pawn','black',8,'queen'),'pawn')\ncheck('white promotion',solve('pawn','white',8,'knight'),'knight')\ncheck('black promotion',solve('pawn','black',1,'rook'),'rook')\ncheck('nonpawn edge',solve('rook','white',8,'queen'),'rook')\ncheck('nonpawn middle',solve('knight','black',N+1,'bishop'),'knight')\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":"8988958acf0babf0910f2b309641723550cad76441d3f90b3aa8a6277667786d","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(piece, color, rank, choice):\n    return choice if piece=='pawn' else piece\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('middle rank',solve('pawn','white',N+1,'queen'),'pawn')\ncheck('wrong edge white',solve('pawn','white',1,'queen'),'pawn')\ncheck('wrong edge black',solve('pawn','black',8,'queen'),'pawn')\ncheck('white promotion',solve('pawn','white',8,'knight'),'knight')\ncheck('black promotion',solve('pawn','black',1,'rook'),'rook')\ncheck('nonpawn edge',solve('rook','white',8,'queen'),'rook')\ncheck('nonpawn middle',solve('knight','black',N+1,'bishop'),'knight')\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":"Controlled rules-only simulation; not a complete game engine. 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":"z-games-promotion-gate","generated_at":"2026-09-29T14:38:49.947789+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"A deterministic game-rule model isolates this rule interaction for regression testing.","root_cause":"Promotion is based only on the requested piece.","sha256":"2acff46a198bd2a2edf057551e7ad9da75cf1c4d9a364038b360c412edd5c0e0","title":"A pawn promotes before reaching its final rank · 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.35,"exit_code":1,"observations":[{"actual":"pawn","check":"middle rank","expected":"pawn","passed":true},{"actual":"queen","check":"wrong edge white","expected":"pawn","passed":false},{"actual":"queen","check":"wrong edge black","expected":"pawn","passed":false},{"actual":"knight","check":"white promotion","expected":"knight","passed":true},{"actual":"rook","check":"black promotion","expected":"rook","passed":true},{"actual":"rook","check":"nonpawn edge","expected":"rook","passed":true},{"actual":"knight","check":"nonpawn middle","expected":"knight","passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"middle rank\", \"actual\": \"pawn\", \"expected\": \"pawn\", \"passed\": true}, {\"check\": \"wrong edge white\", \"actual\": \"queen\", \"expected\": \"pawn\", \"passed\": false}, {\"check\": \"wrong edge black\", \"actual\": \"queen\", \"expected\": \"pawn\", \"passed\": false}, {\"check\": \"white promotion\", \"actual\": \"knight\", \"expected\": \"knight\", \"passed\": true}, {\"check\": \"black promotion\", \"actual\": \"rook\", \"expected\": \"rook\", \"passed\": true}, {\"check\": \"nonpawn edge\", \"actual\": \"rook\", \"expected\": \"rook\", \"passed\": true}, {\"check\": \"nonpawn middle\", \"actual\": \"knight\", \"expected\": \"knight\", \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":37.816,"exit_code":1,"observations":[{"actual":"queen","check":"middle rank","expected":"pawn","passed":false},{"actual":"queen","check":"wrong edge white","expected":"pawn","passed":false},{"actual":"queen","check":"wrong edge black","expected":"pawn","passed":false},{"actual":"knight","check":"white promotion","expected":"knight","passed":true},{"actual":"rook","check":"black promotion","expected":"rook","passed":true},{"actual":"rook","check":"nonpawn edge","expected":"rook","passed":true},{"actual":"knight","check":"nonpawn middle","expected":"knight","passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"middle rank\", \"actual\": \"queen\", \"expected\": \"pawn\", \"passed\": false}, {\"check\": \"wrong edge white\", \"actual\": \"queen\", \"expected\": \"pawn\", \"passed\": false}, {\"check\": \"wrong edge black\", \"actual\": \"queen\", \"expected\": \"pawn\", \"passed\": false}, {\"check\": \"white promotion\", \"actual\": \"knight\", \"expected\": \"knight\", \"passed\": true}, {\"check\": \"black promotion\", \"actual\": \"rook\", \"expected\": \"rook\", \"passed\": true}, {\"check\": \"nonpawn edge\", \"actual\": \"rook\", \"expected\": \"rook\", \"passed\": true}, {\"check\": \"nonpawn middle\", \"actual\": \"knight\", \"expected\": \"knight\", \"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."}}