{"abstract":"A plurality of pairwise victories is mistaken for beating every opponent.","category":"Voting rule computation","checks":6,"contract":"Input is a nonempty square matrix of nonnegative head-to-head support counts with zero diagonal. Return the index strictly beating every other index, or None if none exists. A single candidate wins vacuously.","contract_signature":"matrix","evaluation_group":"model-e4a4bac7b4b97d4d","failed_approach":"Allowing tied head-to-head contests admits a weak winner where the contract requires a strict winner.","family":"z-voting_rules-condorcet-winner","id":"FA-12781","implementations":{"attempt":{"sha256":"58e40f9b104d678a2978725a8f16f37aa80ac0fe33e9cf294ff57327c23abd3d","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(matrix):\n    return next((i for i in range(len(matrix)) if all(i==j or matrix[i][j]>=matrix[j][i] for j in range(len(matrix)))),None)\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('three candidate cycle has no winner', solve([[0,N+1,0],[0,0,N+1],[N+1,0,0]]), None)\ncheck('head to head tie disqualifies', solve([[0,N,N+1],[N,0,N+1],[0,0,0]]), None)\ncheck('strict winner need not be first', solve([[0,0,N],[N+1,0,N+1],[0,0,0]]), 1)\ncheck('single candidate', solve([[0]]), 0)\ncheck('all contests tied', solve([[0,N,N],[N,0,N],[N,N,0]]), None)\ncheck('two candidate strict contest', solve([[0,N],[N+1,0]]), 1)\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":"474de7714c1250ac0efda05ba94f1238e2bb768aecd9d622d61f3ffc027bf6da","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(matrix):\n    return max(range(len(matrix)),key=lambda i:sum(matrix[i][j]>matrix[j][i] for j in range(len(matrix)) if i!=j))\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('three candidate cycle has no winner', solve([[0,N+1,0],[0,0,N+1],[N+1,0,0]]), None)\ncheck('head to head tie disqualifies', solve([[0,N,N+1],[N,0,N+1],[0,0,0]]), None)\ncheck('strict winner need not be first', solve([[0,0,N],[N+1,0,N+1],[0,0,0]]), 1)\ncheck('single candidate', solve([[0]]), 0)\ncheck('all contests tied', solve([[0,N,N],[N,0,N],[N,N,0]]), None)\ncheck('two candidate strict contest', solve([[0,N],[N+1,0]]), 1)\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":"Abstract counting rules only; excludes jurisdictional law, ballot authentication and election operations. 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-voting_rules-condorcet-winner","generated_at":"2026-09-29T14:39:00.110755+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"A deterministic toy ballot model makes the stated counting convention executable.","root_cause":"The candidate with most head-to-head victories is returned even when a cycle prevents a strict winner.","sha256":"aebb6e0684eeb191761d99289ba13e507e3871c745a2f5249892e97cfb19e5ee","title":"A plurality of pairwise victories is mistaken for beating every opponent · 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.894,"exit_code":1,"observations":[{"actual":null,"check":"three candidate cycle has no winner","expected":null,"passed":true},{"actual":0,"check":"head to head tie disqualifies","expected":null,"passed":false},{"actual":1,"check":"strict winner need not be first","expected":1,"passed":true},{"actual":0,"check":"single candidate","expected":0,"passed":true},{"actual":0,"check":"all contests tied","expected":null,"passed":false},{"actual":1,"check":"two candidate strict contest","expected":1,"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"three candidate cycle has no winner\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"head to head tie disqualifies\", \"actual\": 0, \"expected\": null, \"passed\": false}, {\"check\": \"strict winner need not be first\", \"actual\": 1, \"expected\": 1, \"passed\": true}, {\"check\": \"single candidate\", \"actual\": 0, \"expected\": 0, \"passed\": true}, {\"check\": \"all contests tied\", \"actual\": 0, \"expected\": null, \"passed\": false}, {\"check\": \"two candidate strict contest\", \"actual\": 1, \"expected\": 1, \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":44.903,"exit_code":1,"observations":[{"actual":0,"check":"three candidate cycle has no winner","expected":null,"passed":false},{"actual":0,"check":"head to head tie disqualifies","expected":null,"passed":false},{"actual":1,"check":"strict winner need not be first","expected":1,"passed":true},{"actual":0,"check":"single candidate","expected":0,"passed":true},{"actual":0,"check":"all contests tied","expected":null,"passed":false},{"actual":1,"check":"two candidate strict contest","expected":1,"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"three candidate cycle has no winner\", \"actual\": 0, \"expected\": null, \"passed\": false}, {\"check\": \"head to head tie disqualifies\", \"actual\": 0, \"expected\": null, \"passed\": false}, {\"check\": \"strict winner need not be first\", \"actual\": 1, \"expected\": 1, \"passed\": true}, {\"check\": \"single candidate\", \"actual\": 0, \"expected\": 0, \"passed\": true}, {\"check\": \"all contests tied\", \"actual\": 0, \"expected\": null, \"passed\": false}, {\"check\": \"two candidate strict contest\", \"actual\": 1, \"expected\": 1, \"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."}}