{"abstract":"Deduplicating repeated PPS draws changes the estimator.","category":"Survey sampling estimators","checks":6,"contract":"draws are (unit identifier,value,positive draw probability); repeated unit entries have identical value and probability. Return Hansen-Hurwitz population total rounded to eight decimals, or None for no draws.","contract_signature":"draws","evaluation_group":"model-501d55c470e9d02e","failed_approach":"Keeping occurrences but dividing by number of unique units still inflates the result.","family":"z-survey_sampling-pps-replacement","id":"FA-12636","implementations":{"attempt":{"sha256":"6e4067782c70a048199eecf8cb1e202c64dd06810377bbf498432ca160a1ec20","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(draws):\n    return round(sum(y/p for u,y,p in draws)/len({u for u,y,p in draws}),8) if draws else None\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('unequal repeat multiplicity',solve([('a',N,0.5),('a',N,0.5),('b',4*N,0.5)]),4*N)\ncheck('same unit twice',solve([('a',N,0.25),('a',N,0.25)]),4*N)\ncheck('single draw',solve([('a',N,0.25)]),4*N)\ncheck('different unique draws',solve([('a',N,0.5),('b',3*N,0.5)]),4*N)\ncheck('zero valued draw counts',solve([('a',0,0.5),('a',0,0.5),('b',3*N,0.5)]),2*N)\ncheck('no draws',solve([]),None)\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":"847223d69f92732110ef448f406bdb7a8d1e07d3e08bb5215716b891a9d7b548","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(draws):\n    unique={u:(y,p) for u,y,p in draws}\n    return round(sum(y/p for y,p in unique.values())/len(unique),8) if unique else None\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('unequal repeat multiplicity',solve([('a',N,0.5),('a',N,0.5),('b',4*N,0.5)]),4*N)\ncheck('same unit twice',solve([('a',N,0.25),('a',N,0.25)]),4*N)\ncheck('single draw',solve([('a',N,0.25)]),4*N)\ncheck('different unique draws',solve([('a',N,0.5),('b',3*N,0.5)]),4*N)\ncheck('zero valued draw counts',solve([('a',0,0.5),('a',0,0.5),('b',3*N,0.5)]),2*N)\ncheck('no draws',solve([]),None)\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 finite fixtures; not a general survey-analysis package. 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-survey_sampling-pps-replacement","generated_at":"2026-09-29T14:38:58.792999+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"A deterministic survey-design model isolates this sampling contract before it is embedded in a larger estimation pipeline.","root_cause":"Repeated with-replacement draws are collapsed before Hansen-Hurwitz estimation.","sha256":"26b33d996b4b2a777a17e357476201a618386b4a4892b3e898fa3e545d91e2fe","title":"Deduplicating repeated PPS draws changes the estimator · 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":43.949,"exit_code":1,"observations":[{"actual":6.0,"check":"unequal repeat multiplicity","expected":4,"passed":false},{"actual":8.0,"check":"same unit twice","expected":4,"passed":false},{"actual":4.0,"check":"single draw","expected":4,"passed":true},{"actual":4.0,"check":"different unique draws","expected":4,"passed":true},{"actual":3.0,"check":"zero valued draw counts","expected":2,"passed":false},{"actual":null,"check":"no draws","expected":null,"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"unequal repeat multiplicity\", \"actual\": 6.0, \"expected\": 4, \"passed\": false}, {\"check\": \"same unit twice\", \"actual\": 8.0, \"expected\": 4, \"passed\": false}, {\"check\": \"single draw\", \"actual\": 4.0, \"expected\": 4, \"passed\": true}, {\"check\": \"different unique draws\", \"actual\": 4.0, \"expected\": 4, \"passed\": true}, {\"check\": \"zero valued draw counts\", \"actual\": 3.0, \"expected\": 2, \"passed\": false}, {\"check\": \"no draws\", \"actual\": null, \"expected\": null, \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":40.335,"exit_code":1,"observations":[{"actual":5.0,"check":"unequal repeat multiplicity","expected":4,"passed":false},{"actual":4.0,"check":"same unit twice","expected":4,"passed":true},{"actual":4.0,"check":"single draw","expected":4,"passed":true},{"actual":4.0,"check":"different unique draws","expected":4,"passed":true},{"actual":3.0,"check":"zero valued draw counts","expected":2,"passed":false},{"actual":null,"check":"no draws","expected":null,"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"unequal repeat multiplicity\", \"actual\": 5.0, \"expected\": 4, \"passed\": false}, {\"check\": \"same unit twice\", \"actual\": 4.0, \"expected\": 4, \"passed\": true}, {\"check\": \"single draw\", \"actual\": 4.0, \"expected\": 4, \"passed\": true}, {\"check\": \"different unique draws\", \"actual\": 4.0, \"expected\": 4, \"passed\": true}, {\"check\": \"zero valued draw counts\", \"actual\": 3.0, \"expected\": 2, \"passed\": false}, {\"check\": \"no draws\", \"actual\": null, \"expected\": null, \"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."}}