{"abstract":"A two-period design subtracts levels instead of changes.","category":"Causal analysis data contracts","checks":6,"contract":"Input [treated_pre,treated_post,control_pre,control_post] defines a synthetic two-period contrast. Return (treated_post-treated_pre)-(control_post-control_pre); this arithmetic alone does not assert parallel trends.","contract_signature":"cells","evaluation_group":"model-0794cb56fc6b6825","failed_approach":"Treated before-after change leaves the common period shock intact.","family":"z-causal_inference-difference-in-differences","id":"FA-12676","implementations":{"attempt":{"sha256":"e470c8175b4f14c8d57d882e463ba1450954b4a6a47d76e57ec41eb862d8f2c4","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(cells):\n    return cells[1]-cells[0]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('baseline imbalance', solve([10*N,15*N,2*N,5*N]), 2*N)\ncheck('common shock', solve([N,3*N,0,2*N]), 0)\ncheck('no change', solve([N,N,0,0]), 0)\ncheck('negative effect', solve([0,N,0,3*N]), -2*N)\ncheck('no control change', solve([0,N,2*N,2*N]), N)\ncheck('all zero', solve([0,0,0,0]), 0)\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":"f57f9034a41ec09c3dc3679c8da6b451c55f6f120597924b31f30d7ea375e8c0","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(cells):\n    return cells[1]-cells[3]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('baseline imbalance', solve([10*N,15*N,2*N,5*N]), 2*N)\ncheck('common shock', solve([N,3*N,0,2*N]), 0)\ncheck('no change', solve([N,N,0,0]), 0)\ncheck('negative effect', solve([0,N,0,3*N]), -2*N)\ncheck('no control change', solve([0,N,2*N,2*N]), N)\ncheck('all zero', solve([0,0,0,0]), 0)\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-difference-in-differences","generated_at":"2026-09-29T14:38:59.138619+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.","root_cause":"The treated post-period contrast ignores baseline imbalance.","sha256":"fda2863f69d87c7f37d351a5eebc32120b3c5a68f80d89e4a182797a06947afd","title":"A two-period design subtracts levels instead of changes · 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":39.531,"exit_code":1,"observations":[{"actual":5,"check":"baseline imbalance","expected":2,"passed":false},{"actual":2,"check":"common shock","expected":0,"passed":false},{"actual":0,"check":"no change","expected":0,"passed":true},{"actual":1,"check":"negative effect","expected":-2,"passed":false},{"actual":1,"check":"no control change","expected":1,"passed":true},{"actual":0,"check":"all zero","expected":0,"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"baseline imbalance\", \"actual\": 5, \"expected\": 2, \"passed\": false}, {\"check\": \"common shock\", \"actual\": 2, \"expected\": 0, \"passed\": false}, {\"check\": \"no change\", \"actual\": 0, \"expected\": 0, \"passed\": true}, {\"check\": \"negative effect\", \"actual\": 1, \"expected\": -2, \"passed\": false}, {\"check\": \"no control change\", \"actual\": 1, \"expected\": 1, \"passed\": true}, {\"check\": \"all zero\", \"actual\": 0, \"expected\": 0, \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":39.797,"exit_code":1,"observations":[{"actual":10,"check":"baseline imbalance","expected":2,"passed":false},{"actual":1,"check":"common shock","expected":0,"passed":false},{"actual":1,"check":"no change","expected":0,"passed":false},{"actual":-2,"check":"negative effect","expected":-2,"passed":true},{"actual":-1,"check":"no control change","expected":1,"passed":false},{"actual":0,"check":"all zero","expected":0,"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"baseline imbalance\", \"actual\": 10, \"expected\": 2, \"passed\": false}, {\"check\": \"common shock\", \"actual\": 1, \"expected\": 0, \"passed\": false}, {\"check\": \"no change\", \"actual\": 1, \"expected\": 0, \"passed\": false}, {\"check\": \"negative effect\", \"actual\": -2, \"expected\": -2, \"passed\": true}, {\"check\": \"no control change\", \"actual\": -1, \"expected\": 1, \"passed\": false}, {\"check\": \"all zero\", \"actual\": 0, \"expected\": 0, \"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."}}