{"abstract":"pair cap is applied before duplicate removal.","category":"Preference pair construction","checks":6,"contract":"Rows are [pair_key,chosen,rejected]. Keep the first row per pair_key, then return the first limit rows; limit is nonnegative.","contract_signature":"rows, limit","evaluation_group":"preference-pair-capacity","failed_approach":"Deduplicating by chosen response alone merges different rejected alternatives.","family":"w3-preference-pair-construction-pair-capacity","id":"FA-100096","implementations":{"attempt":{"sha256":"94f7fe5031f92bc42a0a1487f8ac67f06996380f3e69debaf0513df4fc5c7b1e","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(rows, limit):\n    seen=set(); out=[]\n    for r in rows[:limit]:\n     if r[1] not in seen: seen.add(r[1]); out.append(r)\n    return out\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); c='c'+str(N)\nrows=[[a,'x','y'],[a,'x','z'],[b,'u','v'],[c,'m','n']]\ncheck('dedup before cap',solve(rows,2),[[a,'x','y'],[b,'u','v']])\ncheck('zero cap',solve(rows,0),[])\ncheck('empty rows',solve([],N),[])\ncheck('cap beyond size',solve(rows,9),[[a,'x','y'],[b,'u','v'],[c,'m','n']])\ncheck('distinct rejected alternatives',solve([[a,'x','y'],[b,'x','z']],3),[[a,'x','y'],[b,'x','z']])\ncheck('one row',solve([[a,'x','y']],1),[[a,'x','y']])\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":"c78e3b7e8ceb5f08ad64430f62b85a5dd9572fd9f4a4f8c4d690972fb2802f09","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(rows, limit):\n    return rows[:limit]\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); c='c'+str(N)\nrows=[[a,'x','y'],[a,'x','z'],[b,'u','v'],[c,'m','n']]\ncheck('dedup before cap',solve(rows,2),[[a,'x','y'],[b,'u','v']])\ncheck('zero cap',solve(rows,0),[])\ncheck('empty rows',solve([],N),[])\ncheck('cap beyond size',solve(rows,9),[[a,'x','y'],[b,'u','v'],[c,'m','n']])\ncheck('distinct rejected alternatives',solve([[a,'x','y'],[b,'x','z']],3),[[a,'x','y'],[b,'x','z']])\ncheck('one row',solve([[a,'x','y']],1),[[a,'x','y']])\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-pair-capacity","generated_at":"2026-09-30T16:48:31.716477+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 pair keys consume output capacity and hide later unique training pairs.","sha256":"6cb43c8e8c33e5738187948bd4c23bac41bdf088e14bd66e3cdb6a6d91702060","title":"Preference pairs: pair cap is applied before duplicate removal · 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.405,"exit_code":1,"observations":[{"actual":[["a1","x","y"]],"check":"dedup before cap","expected":[["a1","x","y"],["b1","u","v"]],"passed":false},{"actual":[],"check":"zero cap","expected":[],"passed":true},{"actual":[],"check":"empty rows","expected":[],"passed":true},{"actual":[["a1","x","y"],["b1","u","v"],["c1","m","n"]],"check":"cap beyond size","expected":[["a1","x","y"],["b1","u","v"],["c1","m","n"]],"passed":true},{"actual":[["a1","x","y"]],"check":"distinct rejected alternatives","expected":[["a1","x","y"],["b1","x","z"]],"passed":false},{"actual":[["a1","x","y"]],"check":"one row","expected":[["a1","x","y"]],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"dedup before cap\", \"actual\": [[\"a1\", \"x\", \"y\"]], \"expected\": [[\"a1\", \"x\", \"y\"], [\"b1\", \"u\", \"v\"]], \"passed\": false}, {\"check\": \"zero cap\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"empty rows\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"cap beyond size\", \"actual\": [[\"a1\", \"x\", \"y\"], [\"b1\", \"u\", \"v\"], [\"c1\", \"m\", \"n\"]], \"expected\": [[\"a1\", \"x\", \"y\"], [\"b1\", \"u\", \"v\"], [\"c1\", \"m\", \"n\"]], \"passed\": true}, {\"check\": \"distinct rejected alternatives\", \"actual\": [[\"a1\", \"x\", \"y\"]], \"expected\": [[\"a1\", \"x\", \"y\"], [\"b1\", \"x\", \"z\"]], \"passed\": false}, {\"check\": \"one row\", \"actual\": [[\"a1\", \"x\", \"y\"]], \"expected\": [[\"a1\", \"x\", \"y\"]], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":27.799,"exit_code":1,"observations":[{"actual":[["a1","x","y"],["a1","x","z"]],"check":"dedup before cap","expected":[["a1","x","y"],["b1","u","v"]],"passed":false},{"actual":[],"check":"zero cap","expected":[],"passed":true},{"actual":[],"check":"empty rows","expected":[],"passed":true},{"actual":[["a1","x","y"],["a1","x","z"],["b1","u","v"],["c1","m","n"]],"check":"cap beyond size","expected":[["a1","x","y"],["b1","u","v"],["c1","m","n"]],"passed":false},{"actual":[["a1","x","y"],["b1","x","z"]],"check":"distinct rejected alternatives","expected":[["a1","x","y"],["b1","x","z"]],"passed":true},{"actual":[["a1","x","y"]],"check":"one row","expected":[["a1","x","y"]],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"dedup before cap\", \"actual\": [[\"a1\", \"x\", \"y\"], [\"a1\", \"x\", \"z\"]], \"expected\": [[\"a1\", \"x\", \"y\"], [\"b1\", \"u\", \"v\"]], \"passed\": false}, {\"check\": \"zero cap\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"empty rows\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"cap beyond size\", \"actual\": [[\"a1\", \"x\", \"y\"], [\"a1\", \"x\", \"z\"], [\"b1\", \"u\", \"v\"], [\"c1\", \"m\", \"n\"]], \"expected\": [[\"a1\", \"x\", \"y\"], [\"b1\", \"u\", \"v\"], [\"c1\", \"m\", \"n\"]], \"passed\": false}, {\"check\": \"distinct rejected alternatives\", \"actual\": [[\"a1\", \"x\", \"y\"], [\"b1\", \"x\", \"z\"]], \"expected\": [[\"a1\", \"x\", \"y\"], [\"b1\", \"x\", \"z\"]], \"passed\": true}, {\"check\": \"one row\", \"actual\": [[\"a1\", \"x\", \"y\"]], \"expected\": [[\"a1\", \"x\", \"y\"]], \"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."}}