{"abstract":"replayed response IDs create duplicate pairs.","category":"Preference pair construction","checks":6,"contract":"Candidates are [id,text,score]. Keep first occurrence per ID, then return [highest_id,lowest_id] by score with lexical ID ties, or None if fewer than two unique IDs.","contract_signature":"candidates","evaluation_group":"preference-deduplicate-response","failed_approach":"Deduplicating equal text collapses distinct responses that happen to have identical wording.","family":"w3-preference-pair-construction-deduplicate-response","id":"FA-100061","implementations":{"attempt":{"sha256":"e7ff824b70da5d1fbd3b21ab62ae730e312f5890ff10c7df44430d357017148e","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(candidates):\n    unique={r[1]:r for r in candidates}\n    u=list(unique.values())\n    return [max(u,key=lambda r:r[2])[0],min(u,key=lambda r:r[2])[0]] if len(u)>1 else None\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\na='a'+str(N); b='b'+str(N)\ncheck('replay same id',solve([[a,'one',N+5],[a,'changed',-N],[b,'two',0]]),[a,b])\ncheck('same text distinct IDs',solve([[a,'same',N],[b,'same',0]]),[a,b])\ncheck('empty',solve([]),None)\ncheck('singleton',solve([[a,'x',N]]),None)\ncheck('unique extrema',solve([[a,'x',N],[b,'y',-N]]),[a,b])\ncheck('first replay retained',solve([[a,'x',N+2],[a,'z',-N],[b,'y',0]]),[a,b])\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":"6010e40b5757835a36e0387ddeb9a46013590c3d9aa36cc18f0447daadf62d35","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(candidates):\n    return [max(candidates,key=lambda r:r[2])[0],min(candidates,key=lambda r:r[2])[0]] if len(candidates)>1 else None\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\na='a'+str(N); b='b'+str(N)\ncheck('replay same id',solve([[a,'one',N+5],[a,'changed',-N],[b,'two',0]]),[a,b])\ncheck('same text distinct IDs',solve([[a,'same',N],[b,'same',0]]),[a,b])\ncheck('empty',solve([]),None)\ncheck('singleton',solve([[a,'x',N]]),None)\ncheck('unique extrema',solve([[a,'x',N],[b,'y',-N]]),[a,b])\ncheck('first replay retained',solve([[a,'x',N+2],[a,'z',-N],[b,'y',0]]),[a,b])\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":"These are explicit toy record contracts; they do not claim compatibility with a trainer or improved model behavior. 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":"w3-preference-pair-construction-deduplicate-response","generated_at":"2026-09-30T16:48:31.263088+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"A small deterministic preference-data transform makes pair semantics inspectable without a training framework.","root_cause":"Repeated delivery of one response is treated as a distinct candidate.","sha256":"33998944eab64fc9d7da8096e40f1151cc558b6ea6effc2fbe48c479dec9150e","title":"Preference pairs: replayed response IDs create duplicate pairs · case 01","variant":1,"variant_policy":"The fixture code references N, supplied as 1 through 5. Fixed boundary checks may repeat. These records share one mechanism and must remain together in evaluation splits.","verified":true,"visibility":"public","verification":{"attempt":{"elapsed_ms":29.076,"exit_code":1,"observations":[{"actual":["a1","a1"],"check":"replay same id","expected":["a1","b1"],"passed":false},{"actual":null,"check":"same text distinct IDs","expected":["a1","b1"],"passed":false},{"actual":null,"check":"empty","expected":null,"passed":true},{"actual":null,"check":"singleton","expected":null,"passed":true},{"actual":["a1","b1"],"check":"unique extrema","expected":["a1","b1"],"passed":true},{"actual":["a1","a1"],"check":"first replay retained","expected":["a1","b1"],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"replay same id\", \"actual\": [\"a1\", \"a1\"], \"expected\": [\"a1\", \"b1\"], \"passed\": false}, {\"check\": \"same text distinct IDs\", \"actual\": null, \"expected\": [\"a1\", \"b1\"], \"passed\": false}, {\"check\": \"empty\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"singleton\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"unique extrema\", \"actual\": [\"a1\", \"b1\"], \"expected\": [\"a1\", \"b1\"], \"passed\": true}, {\"check\": \"first replay retained\", \"actual\": [\"a1\", \"a1\"], \"expected\": [\"a1\", \"b1\"], \"passed\": false}], \"passed\": false}\n"},"broken":{"elapsed_ms":27.68,"exit_code":1,"observations":[{"actual":["a1","a1"],"check":"replay same id","expected":["a1","b1"],"passed":false},{"actual":["a1","b1"],"check":"same text distinct IDs","expected":["a1","b1"],"passed":true},{"actual":null,"check":"empty","expected":null,"passed":true},{"actual":null,"check":"singleton","expected":null,"passed":true},{"actual":["a1","b1"],"check":"unique extrema","expected":["a1","b1"],"passed":true},{"actual":["a1","a1"],"check":"first replay retained","expected":["a1","b1"],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"replay same id\", \"actual\": [\"a1\", \"a1\"], \"expected\": [\"a1\", \"b1\"], \"passed\": false}, {\"check\": \"same text distinct IDs\", \"actual\": [\"a1\", \"b1\"], \"expected\": [\"a1\", \"b1\"], \"passed\": true}, {\"check\": \"empty\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"singleton\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"unique extrema\", \"actual\": [\"a1\", \"b1\"], \"expected\": [\"a1\", \"b1\"], \"passed\": true}, {\"check\": \"first replay retained\", \"actual\": [\"a1\", \"a1\"], \"expected\": [\"a1\", \"b1\"], \"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."}}