{"abstract":"The reduction disagrees with its explicit aggregation oracle.","category":"Numerical aggregation","checks":7,"contract":"Merge disjoint integer observation blocks into [count, exact mean, unnormalised central moments through order 3]. Empty blocks are identities; moments are Fraction strings, empty summary is zero.","evaluation_group":"s3-na-merge-central-moment-3","failed_approach":"Absolute imbalance loses which block is larger.","family":"s3-numerical-aggregation-merge-central-moment-3-skew-stale-count-imbalance","id":"FA-12986","implementations":{"attempt":{"sha256":"f17a309714040748c4f464f43359bb24373f73ced8e87a8a5fe007e50b01bcfa","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nfrom fractions import Fraction\nfrom collections import Counter, defaultdict\nimport math\nimport itertools\nN = 1\nobservations = []\ndef solve(blocks):\n    n=0\n    mean=Fraction(0)\n    m2=Fraction(0)\n    m3=Fraction(0)\n    m4=Fraction(0)\n    for xs in blocks:\n        if not xs: continue\n        b=len(xs)\n        u=Fraction(sum(xs),b)\n        q2=sum((Fraction(x)-u)**2 for x in xs)\n        q3=sum((Fraction(x)-u)**3 for x in xs)\n        q4=sum((Fraction(x)-u)**4 for x in xs)\n        t=n+b\n        d=u-mean\n        r4=m4+q4+d**4*n*b*(n*n-n*b+b*b)/t**3+6*d*d*(n*n*q2+b*b*m2)/t**2+4*d*(n*q3-b*m3)/t\n        r3=m3+q3+d**3*n*b*abs(n-b)/t**2+3*d*(n*q2-b*m2)/t\n        r2=m2+q2+d*d*n*b/t\n        mean=mean+d*b/t\n        n=t\n        m2,m3,m4=r2,r3,r4\n    return [n,str(mean),str(m2),str(m3)]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('regression 1', solve(*([[8], [1, 3]],)), [3, '4', '26', '36'])\ncheck('regression 2', solve(*([[1, 3], [8]],)), [3, '4', '26', '36'])\ncheck('regression 3', solve(*([[0, 0], [0]],)), [3, '0', '0', '0'])\ncheck('regression 4', solve(*([],)), [0, '0', '0', '0'])\ncheck('regression 5', solve(*([[2, 2, 2], [], [-1, 5]],)), [5, '2', '18', '0'])\ncheck('regression 6', solve(*([[-4], [1, 3], [7, 9]],)), [5, '16/5', '524/5', '-3348/25'])\ncheck(\"variable repeated symmetric blocks\",solve([[0,2]]*N),[2*N,\"1\",str(2*N),\"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":"c2bc28799ed513629e662a2cd4871a1f20f45f940d956b2f1b7784d448fea0f8","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nfrom fractions import Fraction\nfrom collections import Counter, defaultdict\nimport math\nimport itertools\nN = 1\nobservations = []\ndef solve(blocks):\n    n=0\n    mean=Fraction(0)\n    m2=Fraction(0)\n    m3=Fraction(0)\n    m4=Fraction(0)\n    for xs in blocks:\n        if not xs: continue\n        b=len(xs)\n        u=Fraction(sum(xs),b)\n        q2=sum((Fraction(x)-u)**2 for x in xs)\n        q3=sum((Fraction(x)-u)**3 for x in xs)\n        q4=sum((Fraction(x)-u)**4 for x in xs)\n        t=n+b\n        d=u-mean\n        r4=m4+q4+d**4*n*b*(n*n-n*b+b*b)/t**3+6*d*d*(n*n*q2+b*b*m2)/t**2+4*d*(n*q3-b*m3)/t\n        r3=m3+q3+d**3*n*b*(n+b)/t**2+3*d*(n*q2-b*m2)/t\n        r2=m2+q2+d*d*n*b/t\n        mean=mean+d*b/t\n        n=t\n        m2,m3,m4=r2,r3,r4\n    return [n,str(mean),str(m2),str(m3)]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('regression 1', solve(*([[8], [1, 3]],)), [3, '4', '26', '36'])\ncheck('regression 2', solve(*([[1, 3], [8]],)), [3, '4', '26', '36'])\ncheck('regression 3', solve(*([[0, 0], [0]],)), [3, '0', '0', '0'])\ncheck('regression 4', solve(*([],)), [0, '0', '0', '0'])\ncheck('regression 5', solve(*([[2, 2, 2], [], [-1, 5]],)), [5, '2', '18', '0'])\ncheck('regression 6', solve(*([[-4], [1, 3], [7, 9]],)), [5, '16/5', '524/5', '-3348/25'])\ncheck(\"variable repeated symmetric blocks\",solve([[0,2]]*N),[2*N,\"1\",str(2*N),\"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"},"fixed":{"sha256":"4a503c043968b32e5d8f5a7ce52bebf9b15d7a92e45df5102f45fa888eda5b3f","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nfrom fractions import Fraction\nfrom collections import Counter, defaultdict\nimport math\nimport itertools\nN = 1\nobservations = []\ndef solve(blocks):\n    n=0\n    mean=Fraction(0)\n    m2=Fraction(0)\n    m3=Fraction(0)\n    m4=Fraction(0)\n    for xs in blocks:\n        if not xs: continue\n        b=len(xs)\n        u=Fraction(sum(xs),b)\n        q2=sum((Fraction(x)-u)**2 for x in xs)\n        q3=sum((Fraction(x)-u)**3 for x in xs)\n        q4=sum((Fraction(x)-u)**4 for x in xs)\n        t=n+b\n        d=u-mean\n        r4=m4+q4+d**4*n*b*(n*n-n*b+b*b)/t**3+6*d*d*(n*n*q2+b*b*m2)/t**2+4*d*(n*q3-b*m3)/t\n        r3=m3+q3+d**3*n*b*(n-b)/t**2+3*d*(n*q2-b*m2)/t\n        r2=m2+q2+d*d*n*b/t\n        mean=mean+d*b/t\n        n=t\n        m2,m3,m4=r2,r3,r4\n    return [n,str(mean),str(m2),str(m3)]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('regression 1', solve(*([[8], [1, 3]],)), [3, '4', '26', '36'])\ncheck('regression 2', solve(*([[1, 3], [8]],)), [3, '4', '26', '36'])\ncheck('regression 3', solve(*([[0, 0], [0]],)), [3, '0', '0', '0'])\ncheck('regression 4', solve(*([],)), [0, '0', '0', '0'])\ncheck('regression 5', solve(*([[2, 2, 2], [], [-1, 5]],)), [5, '2', '18', '0'])\ncheck('regression 6', solve(*([[-4], [1, 3], [7, 9]],)), [5, '16/5', '524/5', '-3348/25'])\ncheck(\"variable repeated symmetric blocks\",solve([[0,2]]*N),[2*N,\"1\",str(2*N),\"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":"Small offline integer/rational inputs only; no performance, statistical inference, or production-library conformance claim. 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":"s3-numerical-aggregation-merge-central-moment-3-skew-stale-count-imbalance","generated_at":"2026-09-29T14:39:02.380590+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"Exact bounded examples isolate a reduction defect without floating-point or external-service effects.","repair":"Preserve the merge central moment 3 contract at the identified reduction decision.","root_cause":"The cubic term tests total population rather than the difference of block counts.","sha256":"da9db97de494c94fe36f4aaf59c7ccafe737e5480a7a2b8a61a780fe6d9a3f2f","title":"Merge central moment 3: The cubic term tests total population rather than the difference of block counts. · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":46.411,"exit_code":1,"observations":[{"actual":[3,"4","26","-60"],"check":"regression 1","expected":[3,"4","26","36"],"passed":false},{"actual":[3,"4","26","36"],"check":"regression 2","expected":[3,"4","26","36"],"passed":true},{"actual":[3,"0","0","0"],"check":"regression 3","expected":[3,"0","0","0"],"passed":true},{"actual":[0,"0","0","0"],"check":"regression 4","expected":[0,"0","0","0"],"passed":true},{"actual":[5,"2","18","0"],"check":"regression 5","expected":[5,"2","18","0"],"passed":true},{"actual":[5,"16/5","524/5","-948/25"],"check":"regression 6","expected":[5,"16/5","524/5","-3348/25"],"passed":false},{"actual":[2,"1","2","0"],"check":"variable repeated symmetric blocks","expected":[2,"1","2","0"],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression 1\", \"actual\": [3, \"4\", \"26\", \"-60\"], \"expected\": [3, \"4\", \"26\", \"36\"], \"passed\": false}, {\"check\": \"regression 2\", \"actual\": [3, \"4\", \"26\", \"36\"], \"expected\": [3, \"4\", \"26\", \"36\"], \"passed\": true}, {\"check\": \"regression 3\", \"actual\": [3, \"0\", \"0\", \"0\"], \"expected\": [3, \"0\", \"0\", \"0\"], \"passed\": true}, {\"check\": \"regression 4\", \"actual\": [0, \"0\", \"0\", \"0\"], \"expected\": [0, \"0\", \"0\", \"0\"], \"passed\": true}, {\"check\": \"regression 5\", \"actual\": [5, \"2\", \"18\", \"0\"], \"expected\": [5, \"2\", \"18\", \"0\"], \"passed\": true}, {\"check\": \"regression 6\", \"actual\": [5, \"16/5\", \"524/5\", \"-948/25\"], \"expected\": [5, \"16/5\", \"524/5\", \"-3348/25\"], \"passed\": false}, {\"check\": \"variable repeated symmetric blocks\", \"actual\": [2, \"1\", \"2\", \"0\"], \"expected\": [2, \"1\", \"2\", \"0\"], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":46.682,"exit_code":1,"observations":[{"actual":[3,"4","26","-156"],"check":"regression 1","expected":[3,"4","26","36"],"passed":false},{"actual":[3,"4","26","132"],"check":"regression 2","expected":[3,"4","26","36"],"passed":false},{"actual":[3,"0","0","0"],"check":"regression 3","expected":[3,"0","0","0"],"passed":true},{"actual":[0,"0","0","0"],"check":"regression 4","expected":[0,"0","0","0"],"passed":true},{"actual":[5,"2","18","0"],"check":"regression 5","expected":[5,"2","18","0"],"passed":true},{"actual":[5,"16/5","524/5","2748/5"],"check":"regression 6","expected":[5,"16/5","524/5","-3348/25"],"passed":false},{"actual":[2,"1","2","0"],"check":"variable repeated symmetric blocks","expected":[2,"1","2","0"],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression 1\", \"actual\": [3, \"4\", \"26\", \"-156\"], \"expected\": [3, \"4\", \"26\", \"36\"], \"passed\": false}, {\"check\": \"regression 2\", \"actual\": [3, \"4\", \"26\", \"132\"], \"expected\": [3, \"4\", \"26\", \"36\"], \"passed\": false}, {\"check\": \"regression 3\", \"actual\": [3, \"0\", \"0\", \"0\"], \"expected\": [3, \"0\", \"0\", \"0\"], \"passed\": true}, {\"check\": \"regression 4\", \"actual\": [0, \"0\", \"0\", \"0\"], \"expected\": [0, \"0\", \"0\", \"0\"], \"passed\": true}, {\"check\": \"regression 5\", \"actual\": [5, \"2\", \"18\", \"0\"], \"expected\": [5, \"2\", \"18\", \"0\"], \"passed\": true}, {\"check\": \"regression 6\", \"actual\": [5, \"16/5\", \"524/5\", \"2748/5\"], \"expected\": [5, \"16/5\", \"524/5\", \"-3348/25\"], \"passed\": false}, {\"check\": \"variable repeated symmetric blocks\", \"actual\": [2, \"1\", \"2\", \"0\"], \"expected\": [2, \"1\", \"2\", \"0\"], \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":47.564,"exit_code":0,"observations":[{"actual":[3,"4","26","36"],"check":"regression 1","expected":[3,"4","26","36"],"passed":true},{"actual":[3,"4","26","36"],"check":"regression 2","expected":[3,"4","26","36"],"passed":true},{"actual":[3,"0","0","0"],"check":"regression 3","expected":[3,"0","0","0"],"passed":true},{"actual":[0,"0","0","0"],"check":"regression 4","expected":[0,"0","0","0"],"passed":true},{"actual":[5,"2","18","0"],"check":"regression 5","expected":[5,"2","18","0"],"passed":true},{"actual":[5,"16/5","524/5","-3348/25"],"check":"regression 6","expected":[5,"16/5","524/5","-3348/25"],"passed":true},{"actual":[2,"1","2","0"],"check":"variable repeated symmetric blocks","expected":[2,"1","2","0"],"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression 1\", \"actual\": [3, \"4\", \"26\", \"36\"], \"expected\": [3, \"4\", \"26\", \"36\"], \"passed\": true}, {\"check\": \"regression 2\", \"actual\": [3, \"4\", \"26\", \"36\"], \"expected\": [3, \"4\", \"26\", \"36\"], \"passed\": true}, {\"check\": \"regression 3\", \"actual\": [3, \"0\", \"0\", \"0\"], \"expected\": [3, \"0\", \"0\", \"0\"], \"passed\": true}, {\"check\": \"regression 4\", \"actual\": [0, \"0\", \"0\", \"0\"], \"expected\": [0, \"0\", \"0\", \"0\"], \"passed\": true}, {\"check\": \"regression 5\", \"actual\": [5, \"2\", \"18\", \"0\"], \"expected\": [5, \"2\", \"18\", \"0\"], \"passed\": true}, {\"check\": \"regression 6\", \"actual\": [5, \"16/5\", \"524/5\", \"-3348/25\"], \"expected\": [5, \"16/5\", \"524/5\", \"-3348/25\"], \"passed\": true}, {\"check\": \"variable repeated symmetric blocks\", \"actual\": [2, \"1\", \"2\", \"0\"], \"expected\": [2, \"1\", \"2\", \"0\"], \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}