FA-12656 / Causal analysis data contracts / Open access
Global treatment overlap conceals an unsupported target stratum · case 01
Global treatment overlap conceals an unsupported target stratum.
ROOT CAUSE
Presence of both arms globally is mistaken for conditional design support.
VERIFIED REPAIR
Check both arms in every requested target stratum.
Unsuccessful approach: Checking only observed strata forgets target strata absent from the study.
Case contract
Rows [stratum,arm] encode observed design support. Return target strata lacking either arm, sorted. Multiplicity is irrelevant.
Why this case matters
A deterministic synthetic study model isolates this data-contract defect; outputs alone establish no real-world causal identification.
1 / The failure
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(rows, target):
return [] if {r[1] for r in rows} == {0,1} else sorted(target)
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('separated arms', solve([['a',0],['b',1]], ['a','b']), ['a','b'])
check('absent target', solve([['a',0],['a',1]], ['a','b']), ['b'])
check('supported', solve([['a',0],['a',1]], ['a']), [])
check('empty target', solve([['a',0]], []), [])
check('empty study', solve([], ['a']), ['a'])
check('duplicate rows', solve([['a',0]]*N, ['a']), ['a'])
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| separated arms | [] | ['a', 'b'] | Failed |
| absent target | [] | ['b'] | Failed |
| supported | [] | [] | Passed |
| empty target | [] | [] | Passed |
| empty study | ['a'] | ['a'] | Passed |
| duplicate rows | ['a'] | ['a'] | Passed |
SHA-256 / a7c2d64d48f1fea989a09c6c1cd344735f3384553a361f44769a028996570fc9
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(rows, target):
observed = {r[0] for r in rows}
return sorted(s for s in target if s in observed and {a for t,a in rows if t == s} != {0,1})
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('separated arms', solve([['a',0],['b',1]], ['a','b']), ['a','b'])
check('absent target', solve([['a',0],['a',1]], ['a','b']), ['b'])
check('supported', solve([['a',0],['a',1]], ['a']), [])
check('empty target', solve([['a',0]], []), [])
check('empty study', solve([], ['a']), ['a'])
check('duplicate rows', solve([['a',0]]*N, ['a']), ['a'])
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| separated arms | ['a', 'b'] | ['a', 'b'] | Passed |
| absent target | [] | ['b'] | Failed |
| supported | [] | [] | Passed |
| empty target | [] | [] | Passed |
| empty study | [] | ['a'] | Failed |
| duplicate rows | ['a'] | ['a'] | Passed |
SHA-256 / ebe187a1a9e7f170dfc67a52dc0194a48e5dd51d035dd2541861e8965d5885e1
3 / The verified repair
Exit 0"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(rows, target):
return sorted(s for s in target if {a for t,a in rows if t == s} != {0,1})
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('separated arms', solve([['a',0],['b',1]], ['a','b']), ['a','b'])
check('absent target', solve([['a',0],['a',1]], ['a','b']), ['b'])
check('supported', solve([['a',0],['a',1]], ['a']), [])
check('empty target', solve([['a',0]], []), [])
check('empty study', solve([], ['a']), ['a'])
check('duplicate rows', solve([['a',0]]*N, ['a']), ['a'])
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| separated arms | ['a', 'b'] | ['a', 'b'] | Passed |
| absent target | ['b'] | ['b'] | Passed |
| supported | [] | [] | Passed |
| empty target | [] | [] | Passed |
| empty study | ['a'] | ['a'] | Passed |
| duplicate rows | ['a'] | ['a'] | Passed |
SHA-256 / ebe82f6ce4e05472f70779c360f856be76f494b15ca32df2f33b977b18358369
Verification & scope
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.
Observations recorded using Python 3.12.14 at 2026-09-29T14:38:58.794348+00:00.
Case digest / 9d748fe4e29ef9c073cfab033f82bb4fdb16356ae6dde63f6d92ff4572627400