{"abstract":"Exposure mapping includes the focal unit as its own peer.","category":"Causal analysis data contracts","checks":6,"contract":"Assignment maps unit names to 0/1; neighbors may repeat and contain self. Return [own arm, number of unique treated other neighbors]. All names exist.","evaluation_group":"model-852ad54a515345c6","failed_approach":"Removing self still double-counts repeated neighbor edges.","family":"z-causal_inference-neighbor-exposure","id":"FA-12666","implementations":{"attempt":{"sha256":"8d3951921435bb6cc6d43013c5892521cca4a6b7780549612d866e38bd4a4a80","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(unit, neighbors, assignment):\n    return [assignment[unit], sum(assignment[n] for n in neighbors if n != unit)]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('self exposure', solve('a', ['a'], {'a':1}), [1,0])\ncheck('duplicate peers', solve('a', ['b']*(N+1), {'a':0,'b':1}), [0,1])\ncheck('untreated peer', solve('a', ['b'], {'a':1,'b':0}), [1,0])\ncheck('empty peers', solve('a', [], {'a':0}), [0,0])\ncheck('mixed', solve('a', ['a','b','b','c'], {'a':1,'b':1,'c':0}), [1,1])\ncheck('two peers', solve('a', ['b','c'], {'a':0,'b':1,'c':1}), [0,2])\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":"e2f3ea4fdcb278490fc8f9fab0946765ae3fb59cde37b39f3d9f373884058360","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(unit, neighbors, assignment):\n    return [assignment[unit], sum(assignment[n] for n in neighbors)]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('self exposure', solve('a', ['a'], {'a':1}), [1,0])\ncheck('duplicate peers', solve('a', ['b']*(N+1), {'a':0,'b':1}), [0,1])\ncheck('untreated peer', solve('a', ['b'], {'a':1,'b':0}), [1,0])\ncheck('empty peers', solve('a', [], {'a':0}), [0,0])\ncheck('mixed', solve('a', ['a','b','b','c'], {'a':1,'b':1,'c':0}), [1,1])\ncheck('two peers', solve('a', ['b','c'], {'a':0,'b':1,'c':1}), [0,2])\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"},"fixed":{"sha256":"cc571f0cffac9c34c74d22867c17e762cd7d1ffbe2987cac9773d4ddba3ce3e9","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(unit, neighbors, assignment):\n    return [assignment[unit], sum(assignment[n] for n in set(neighbors)-{unit})]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('self exposure', solve('a', ['a'], {'a':1}), [1,0])\ncheck('duplicate peers', solve('a', ['b']*(N+1), {'a':0,'b':1}), [0,1])\ncheck('untreated peer', solve('a', ['b'], {'a':1,'b':0}), [1,0])\ncheck('empty peers', solve('a', [], {'a':0}), [0,0])\ncheck('mixed', solve('a', ['a','b','b','c'], {'a':1,'b':1,'c':0}), [1,1])\ncheck('two peers', solve('a', ['b','c'], {'a':0,'b':1,'c':1}), [0,2])\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":"Finite, fully specified synthetic data only; identification assumptions are supplied by the fixture design, not inferred from observations. 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-causal_inference-neighbor-exposure","generated_at":"2026-09-29T14:38:58.969214+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"A deterministic synthetic study model isolates this data-contract defect; outputs alone establish no real-world causal identification.","repair":"Count unique treated neighbors excluding the focal unit.","root_cause":"Own assignment is mixed into the prespecified peer exposure.","sha256":"252303c4f2bfb6abe8676cb00b99e84eefa69da8097918e370cd7cbe8e14ce9f","title":"Exposure mapping includes the focal unit as its own peer · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":40.784,"exit_code":1,"observations":[{"actual":[1,0],"check":"self exposure","expected":[1,0],"passed":true},{"actual":[0,2],"check":"duplicate peers","expected":[0,1],"passed":false},{"actual":[1,0],"check":"untreated peer","expected":[1,0],"passed":true},{"actual":[0,0],"check":"empty peers","expected":[0,0],"passed":true},{"actual":[1,2],"check":"mixed","expected":[1,1],"passed":false},{"actual":[0,2],"check":"two peers","expected":[0,2],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"self exposure\", \"actual\": [1, 0], \"expected\": [1, 0], \"passed\": true}, {\"check\": \"duplicate peers\", \"actual\": [0, 2], \"expected\": [0, 1], \"passed\": false}, {\"check\": \"untreated peer\", \"actual\": [1, 0], \"expected\": [1, 0], \"passed\": true}, {\"check\": \"empty peers\", \"actual\": [0, 0], \"expected\": [0, 0], \"passed\": true}, {\"check\": \"mixed\", \"actual\": [1, 2], \"expected\": [1, 1], \"passed\": false}, {\"check\": \"two peers\", \"actual\": [0, 2], \"expected\": [0, 2], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":42.206,"exit_code":1,"observations":[{"actual":[1,1],"check":"self exposure","expected":[1,0],"passed":false},{"actual":[0,2],"check":"duplicate peers","expected":[0,1],"passed":false},{"actual":[1,0],"check":"untreated peer","expected":[1,0],"passed":true},{"actual":[0,0],"check":"empty peers","expected":[0,0],"passed":true},{"actual":[1,3],"check":"mixed","expected":[1,1],"passed":false},{"actual":[0,2],"check":"two peers","expected":[0,2],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"self exposure\", \"actual\": [1, 1], \"expected\": [1, 0], \"passed\": false}, {\"check\": \"duplicate peers\", \"actual\": [0, 2], \"expected\": [0, 1], \"passed\": false}, {\"check\": \"untreated peer\", \"actual\": [1, 0], \"expected\": [1, 0], \"passed\": true}, {\"check\": \"empty peers\", \"actual\": [0, 0], \"expected\": [0, 0], \"passed\": true}, {\"check\": \"mixed\", \"actual\": [1, 3], \"expected\": [1, 1], \"passed\": false}, {\"check\": \"two peers\", \"actual\": [0, 2], \"expected\": [0, 2], \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":39.383,"exit_code":0,"observations":[{"actual":[1,0],"check":"self exposure","expected":[1,0],"passed":true},{"actual":[0,1],"check":"duplicate peers","expected":[0,1],"passed":true},{"actual":[1,0],"check":"untreated peer","expected":[1,0],"passed":true},{"actual":[0,0],"check":"empty peers","expected":[0,0],"passed":true},{"actual":[1,1],"check":"mixed","expected":[1,1],"passed":true},{"actual":[0,2],"check":"two peers","expected":[0,2],"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"self exposure\", \"actual\": [1, 0], \"expected\": [1, 0], \"passed\": true}, {\"check\": \"duplicate peers\", \"actual\": [0, 1], \"expected\": [0, 1], \"passed\": true}, {\"check\": \"untreated peer\", \"actual\": [1, 0], \"expected\": [1, 0], \"passed\": true}, {\"check\": \"empty peers\", \"actual\": [0, 0], \"expected\": [0, 0], \"passed\": true}, {\"check\": \"mixed\", \"actual\": [1, 1], \"expected\": [1, 1], \"passed\": true}, {\"check\": \"two peers\", \"actual\": [0, 2], \"expected\": [0, 2], \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}