{"abstract":"The reduction disagrees with its explicit aggregation oracle.","category":"Numerical aggregation","checks":6,"contract":"Merge disjoint integer (x,y) observation blocks. Return count, exact x/y means and unnormalised centered cross scatter as Fraction strings; empty summary is zero.","evaluation_group":"s3-na-merge-cross-scatter","failed_approach":"Equal centroid averaging ignores unequal block sizes.","family":"s3-numerical-aggregation-merge-cross-scatter-x-centroid-count","id":"FA-13076","implementations":{"attempt":{"sha256":"cd3e7916dd862a966071fa2be303d4a3ebca1b0302e18a18ef771c3b24568e54","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    mx=my=c=Fraction(0)\n    for block in blocks:\n        if not block: continue\n        k=len(block)\n        ax=Fraction(sum(x for x,y in block),k)\n        ay=Fraction(sum(y for x,y in block),k)\n        q=sum((x-ax)*(y-ay) for x,y in block)\n        total=n+k\n        dx,dy=ax-mx,ay-my\n        c=c+q+dx*dy*n*k/total\n        mx=(mx+ax)/2\n        my=my+dy*k/total\n        n=total\n    return [n,str(mx),str(my),str(c)]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('regression 1', solve(*([[(1, 8), (4, 3), (5, 1)], [(9, 1)]],)), [4, '19/4', '13/4', '-111/4'])\ncheck('regression 2', solve(*([[(8, 1)], [(1, 7), (2, 9)]],)), [3, '11/3', '17/3', '-88/3'])\ncheck('regression 3', solve(*([],)), [0, '0', '0', '0'])\ncheck('regression 4', solve(*([[], [(2, 4), (2, 4)]],)), [2, '2', '4', '0'])\ncheck('regression 5', solve(*([[(0, 3), (2, 1)], [(4, 8), (8, 0)]],)), [4, '7/2', '3', '-8'])\ncheck(\"variable replicated pairs\",solve([[(0,2),(2,0)]]*N),[2*N,\"1\",\"1\",str(-2*N)])\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":"73f36d0406f5c8f8df8cd7174dde6d5403e8c74174c864fca878559ded2b6705","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    mx=my=c=Fraction(0)\n    for block in blocks:\n        if not block: continue\n        k=len(block)\n        ax=Fraction(sum(x for x,y in block),k)\n        ay=Fraction(sum(y for x,y in block),k)\n        q=sum((x-ax)*(y-ay) for x,y in block)\n        total=n+k\n        dx,dy=ax-mx,ay-my\n        c=c+q+dx*dy*n*k/total\n        mx=mx+dx*n/total\n        my=my+dy*k/total\n        n=total\n    return [n,str(mx),str(my),str(c)]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('regression 1', solve(*([[(1, 8), (4, 3), (5, 1)], [(9, 1)]],)), [4, '19/4', '13/4', '-111/4'])\ncheck('regression 2', solve(*([[(8, 1)], [(1, 7), (2, 9)]],)), [3, '11/3', '17/3', '-88/3'])\ncheck('regression 3', solve(*([],)), [0, '0', '0', '0'])\ncheck('regression 4', solve(*([[], [(2, 4), (2, 4)]],)), [2, '2', '4', '0'])\ncheck('regression 5', solve(*([[(0, 3), (2, 1)], [(4, 8), (8, 0)]],)), [4, '7/2', '3', '-8'])\ncheck(\"variable replicated pairs\",solve([[(0,2),(2,0)]]*N),[2*N,\"1\",\"1\",str(-2*N)])\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":"46c71abc96f3dbf8e9a3f5c98919aac11ccc7deb073564121d49028238275542","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    mx=my=c=Fraction(0)\n    for block in blocks:\n        if not block: continue\n        k=len(block)\n        ax=Fraction(sum(x for x,y in block),k)\n        ay=Fraction(sum(y for x,y in block),k)\n        q=sum((x-ax)*(y-ay) for x,y in block)\n        total=n+k\n        dx,dy=ax-mx,ay-my\n        c=c+q+dx*dy*n*k/total\n        mx=mx+dx*k/total\n        my=my+dy*k/total\n        n=total\n    return [n,str(mx),str(my),str(c)]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('regression 1', solve(*([[(1, 8), (4, 3), (5, 1)], [(9, 1)]],)), [4, '19/4', '13/4', '-111/4'])\ncheck('regression 2', solve(*([[(8, 1)], [(1, 7), (2, 9)]],)), [3, '11/3', '17/3', '-88/3'])\ncheck('regression 3', solve(*([],)), [0, '0', '0', '0'])\ncheck('regression 4', solve(*([[], [(2, 4), (2, 4)]],)), [2, '2', '4', '0'])\ncheck('regression 5', solve(*([[(0, 3), (2, 1)], [(4, 8), (8, 0)]],)), [4, '7/2', '3', '-8'])\ncheck(\"variable replicated pairs\",solve([[(0,2),(2,0)]]*N),[2*N,\"1\",\"1\",str(-2*N)])\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-cross-scatter-x-centroid-count","generated_at":"2026-09-29T14:39:03.140594+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 cross scatter contract at the identified reduction decision.","root_cause":"The x centroid moves according to old rather than incoming population.","sha256":"8732e3fd980288e91e55c5ee4457aff5d5c18a74f531de385ca5e43ac4b44fdb","title":"Merge cross scatter: The x centroid moves according to old rather than incoming population. · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":49.758,"exit_code":1,"observations":[{"actual":[4,"16/3","13/4","-63/2"],"check":"regression 1","expected":[4,"19/4","13/4","-111/4"],"passed":false},{"actual":[3,"11/4","17/3","-32/3"],"check":"regression 2","expected":[3,"11/3","17/3","-88/3"],"passed":false},{"actual":[0,"0","0","0"],"check":"regression 3","expected":[0,"0","0","0"],"passed":true},{"actual":[2,"1","4","0"],"check":"regression 4","expected":[2,"2","4","0"],"passed":false},{"actual":[4,"13/4","3","-7"],"check":"regression 5","expected":[4,"7/2","3","-8"],"passed":false},{"actual":[2,"1/2","1","-2"],"check":"variable replicated pairs","expected":[2,"1","1","-2"],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression 1\", \"actual\": [4, \"16/3\", \"13/4\", \"-63/2\"], \"expected\": [4, \"19/4\", \"13/4\", \"-111/4\"], \"passed\": false}, {\"check\": \"regression 2\", \"actual\": [3, \"11/4\", \"17/3\", \"-32/3\"], \"expected\": [3, \"11/3\", \"17/3\", \"-88/3\"], \"passed\": false}, {\"check\": \"regression 3\", \"actual\": [0, \"0\", \"0\", \"0\"], \"expected\": [0, \"0\", \"0\", \"0\"], \"passed\": true}, {\"check\": \"regression 4\", \"actual\": [2, \"1\", \"4\", \"0\"], \"expected\": [2, \"2\", \"4\", \"0\"], \"passed\": false}, {\"check\": \"regression 5\", \"actual\": [4, \"13/4\", \"3\", \"-7\"], \"expected\": [4, \"7/2\", \"3\", \"-8\"], \"passed\": false}, {\"check\": \"variable replicated pairs\", \"actual\": [2, \"1/2\", \"1\", \"-2\"], \"expected\": [2, \"1\", \"1\", \"-2\"], \"passed\": false}], \"passed\": false}\n"},"broken":{"elapsed_ms":49.352,"exit_code":1,"observations":[{"actual":[4,"27/4","13/4","-141/4"],"check":"regression 1","expected":[4,"19/4","13/4","-111/4"],"passed":false},{"actual":[3,"1/2","17/3","8"],"check":"regression 2","expected":[3,"11/3","17/3","-88/3"],"passed":false},{"actual":[0,"0","0","0"],"check":"regression 3","expected":[0,"0","0","0"],"passed":true},{"actual":[2,"0","4","0"],"check":"regression 4","expected":[2,"2","4","0"],"passed":false},{"actual":[4,"3","3","-6"],"check":"regression 5","expected":[4,"7/2","3","-8"],"passed":false},{"actual":[2,"0","1","-2"],"check":"variable replicated pairs","expected":[2,"1","1","-2"],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression 1\", \"actual\": [4, \"27/4\", \"13/4\", \"-141/4\"], \"expected\": [4, \"19/4\", \"13/4\", \"-111/4\"], \"passed\": false}, {\"check\": \"regression 2\", \"actual\": [3, \"1/2\", \"17/3\", \"8\"], \"expected\": [3, \"11/3\", \"17/3\", \"-88/3\"], \"passed\": false}, {\"check\": \"regression 3\", \"actual\": [0, \"0\", \"0\", \"0\"], \"expected\": [0, \"0\", \"0\", \"0\"], \"passed\": true}, {\"check\": \"regression 4\", \"actual\": [2, \"0\", \"4\", \"0\"], \"expected\": [2, \"2\", \"4\", \"0\"], \"passed\": false}, {\"check\": \"regression 5\", \"actual\": [4, \"3\", \"3\", \"-6\"], \"expected\": [4, \"7/2\", \"3\", \"-8\"], \"passed\": false}, {\"check\": \"variable replicated pairs\", \"actual\": [2, \"0\", \"1\", \"-2\"], \"expected\": [2, \"1\", \"1\", \"-2\"], \"passed\": false}], \"passed\": false}\n"},"fixed":{"elapsed_ms":55.232,"exit_code":0,"observations":[{"actual":[4,"19/4","13/4","-111/4"],"check":"regression 1","expected":[4,"19/4","13/4","-111/4"],"passed":true},{"actual":[3,"11/3","17/3","-88/3"],"check":"regression 2","expected":[3,"11/3","17/3","-88/3"],"passed":true},{"actual":[0,"0","0","0"],"check":"regression 3","expected":[0,"0","0","0"],"passed":true},{"actual":[2,"2","4","0"],"check":"regression 4","expected":[2,"2","4","0"],"passed":true},{"actual":[4,"7/2","3","-8"],"check":"regression 5","expected":[4,"7/2","3","-8"],"passed":true},{"actual":[2,"1","1","-2"],"check":"variable replicated pairs","expected":[2,"1","1","-2"],"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression 1\", \"actual\": [4, \"19/4\", \"13/4\", \"-111/4\"], \"expected\": [4, \"19/4\", \"13/4\", \"-111/4\"], \"passed\": true}, {\"check\": \"regression 2\", \"actual\": [3, \"11/3\", \"17/3\", \"-88/3\"], \"expected\": [3, \"11/3\", \"17/3\", \"-88/3\"], \"passed\": true}, {\"check\": \"regression 3\", \"actual\": [0, \"0\", \"0\", \"0\"], \"expected\": [0, \"0\", \"0\", \"0\"], \"passed\": true}, {\"check\": \"regression 4\", \"actual\": [2, \"2\", \"4\", \"0\"], \"expected\": [2, \"2\", \"4\", \"0\"], \"passed\": true}, {\"check\": \"regression 5\", \"actual\": [4, \"7/2\", \"3\", \"-8\"], \"expected\": [4, \"7/2\", \"3\", \"-8\"], \"passed\": true}, {\"check\": \"variable replicated pairs\", \"actual\": [2, \"1\", \"1\", \"-2\"], \"expected\": [2, \"1\", \"1\", \"-2\"], \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}