{"abstract":"Returning a rook restores a forfeited castling right.","category":"Game simulation rules","checks":7,"contract":"Given initial right and event strings rook_move, rook_return, rook_capture, king_move, king_return, other, return whether this side retains castling rights; no board attack/path checks are modeled.","contract_signature":"initial, events","evaluation_group":"model-627d76e9b879c5af","failed_approach":"Tracking rook movement alone ignores the king’s irreversible loss of both rights.","family":"z-games-castling-history","id":"FA-11651","implementations":{"attempt":{"sha256":"2cb9acf55eed1593094eca21af47c6bee06871921fed1fd90e191f6dbeccb1de","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(initial, events):\n    return initial and not any(e in ('rook_move','rook_capture') for e in events)\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('rook returns',solve(True,['rook_move']+['other']*N+['rook_return']),False)\ncheck('king moved',solve(True,['king_move']),False)\ncheck('king returns',solve(True,['king_move','king_return']),False)\ncheck('captured original rook',solve(True,['rook_capture','rook_return']),False)\ncheck('unrelated moves',solve(True,['other']*N),True)\ncheck('absent initial right',solve(False,[]),False)\ncheck('cannot acquire rights',solve(False,['rook_return']),False)\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":"1112778462e38046ea86ce65fa5847782ff0999379d5da27eeeba1208e0e717d","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(initial, events):\n    right=initial\n    for e in events:\n     if e in ('rook_move','rook_capture','king_move'): right=False\n     if e in ('rook_return','king_return'): right=True\n    return right\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('rook returns',solve(True,['rook_move']+['other']*N+['rook_return']),False)\ncheck('king moved',solve(True,['king_move']),False)\ncheck('king returns',solve(True,['king_move','king_return']),False)\ncheck('captured original rook',solve(True,['rook_capture','rook_return']),False)\ncheck('unrelated moves',solve(True,['other']*N),True)\ncheck('absent initial right',solve(False,[]),False)\ncheck('cannot acquire rights',solve(False,['rook_return']),False)\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-castling-history","generated_at":"2026-09-29T14:38:49.825362+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":"Eligibility is inferred from current rook occupancy.","sha256":"198755a5df512952f4e76f7b1036161848cfccb67ebecdbeeedc62f390462a82","title":"Returning a rook restores a forfeited castling right · 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":38.885,"exit_code":1,"observations":[{"actual":false,"check":"rook returns","expected":false,"passed":true},{"actual":true,"check":"king moved","expected":false,"passed":false},{"actual":true,"check":"king returns","expected":false,"passed":false},{"actual":false,"check":"captured original rook","expected":false,"passed":true},{"actual":true,"check":"unrelated moves","expected":true,"passed":true},{"actual":false,"check":"absent initial right","expected":false,"passed":true},{"actual":false,"check":"cannot acquire rights","expected":false,"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"rook returns\", \"actual\": false, \"expected\": false, \"passed\": true}, {\"check\": \"king moved\", \"actual\": true, \"expected\": false, \"passed\": false}, {\"check\": \"king returns\", \"actual\": true, \"expected\": false, \"passed\": false}, {\"check\": \"captured original rook\", \"actual\": false, \"expected\": false, \"passed\": true}, {\"check\": \"unrelated moves\", \"actual\": true, \"expected\": true, \"passed\": true}, {\"check\": \"absent initial right\", \"actual\": false, \"expected\": false, \"passed\": true}, {\"check\": \"cannot acquire rights\", \"actual\": false, \"expected\": false, \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":37.139,"exit_code":1,"observations":[{"actual":true,"check":"rook returns","expected":false,"passed":false},{"actual":false,"check":"king moved","expected":false,"passed":true},{"actual":true,"check":"king returns","expected":false,"passed":false},{"actual":true,"check":"captured original rook","expected":false,"passed":false},{"actual":true,"check":"unrelated moves","expected":true,"passed":true},{"actual":false,"check":"absent initial right","expected":false,"passed":true},{"actual":true,"check":"cannot acquire rights","expected":false,"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"rook returns\", \"actual\": true, \"expected\": false, \"passed\": false}, {\"check\": \"king moved\", \"actual\": false, \"expected\": false, \"passed\": true}, {\"check\": \"king returns\", \"actual\": true, \"expected\": false, \"passed\": false}, {\"check\": \"captured original rook\", \"actual\": true, \"expected\": false, \"passed\": false}, {\"check\": \"unrelated moves\", \"actual\": true, \"expected\": true, \"passed\": true}, {\"check\": \"absent initial right\", \"actual\": false, \"expected\": false, \"passed\": true}, {\"check\": \"cannot acquire rights\", \"actual\": true, \"expected\": false, \"passed\": false}], \"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."}}