FA-13076 / Numerical aggregation / Open access
Merge cross scatter: The x centroid moves according to old rather than incoming population. · case 01
The reduction disagrees with its explicit aggregation oracle.
ROOT CAUSE
The x centroid moves according to old rather than incoming population.
VERIFIED REPAIR
Preserve the merge cross scatter contract at the identified reduction decision.
Unsuccessful approach: Equal centroid averaging ignores unequal block sizes.
Case 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.
Why this case matters
Exact bounded examples isolate a reduction defect without floating-point or external-service effects.
1 / The failure
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
from fractions import Fraction
from collections import Counter, defaultdict
import math
import itertools
N = 1
observations = []
def solve(blocks):
n=0
mx=my=c=Fraction(0)
for block in blocks:
if not block: continue
k=len(block)
ax=Fraction(sum(x for x,y in block),k)
ay=Fraction(sum(y for x,y in block),k)
q=sum((x-ax)*(y-ay) for x,y in block)
total=n+k
dx,dy=ax-mx,ay-my
c=c+q+dx*dy*n*k/total
mx=mx+dx*n/total
my=my+dy*k/total
n=total
return [n,str(mx),str(my),str(c)]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('regression 1', solve(*([[(1, 8), (4, 3), (5, 1)], [(9, 1)]],)), [4, '19/4', '13/4', '-111/4'])
check('regression 2', solve(*([[(8, 1)], [(1, 7), (2, 9)]],)), [3, '11/3', '17/3', '-88/3'])
check('regression 3', solve(*([],)), [0, '0', '0', '0'])
check('regression 4', solve(*([[], [(2, 4), (2, 4)]],)), [2, '2', '4', '0'])
check('regression 5', solve(*([[(0, 3), (2, 1)], [(4, 8), (8, 0)]],)), [4, '7/2', '3', '-8'])
check("variable replicated pairs",solve([[(0,2),(2,0)]]*N),[2*N,"1","1",str(-2*N)])
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 |
|---|---|---|---|
| regression 1 | [4, '27/4', '13/4', '-141/4'] | [4, '19/4', '13/4', '-111/4'] | Failed |
| regression 2 | [3, '1/2', '17/3', '8'] | [3, '11/3', '17/3', '-88/3'] | Failed |
| regression 3 | [0, '0', '0', '0'] | [0, '0', '0', '0'] | Passed |
| regression 4 | [2, '0', '4', '0'] | [2, '2', '4', '0'] | Failed |
| regression 5 | [4, '3', '3', '-6'] | [4, '7/2', '3', '-8'] | Failed |
| variable replicated pairs | [2, '0', '1', '-2'] | [2, '1', '1', '-2'] | Failed |
SHA-256 / 73f36d0406f5c8f8df8cd7174dde6d5403e8c74174c864fca878559ded2b6705
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
from fractions import Fraction
from collections import Counter, defaultdict
import math
import itertools
N = 1
observations = []
def solve(blocks):
n=0
mx=my=c=Fraction(0)
for block in blocks:
if not block: continue
k=len(block)
ax=Fraction(sum(x for x,y in block),k)
ay=Fraction(sum(y for x,y in block),k)
q=sum((x-ax)*(y-ay) for x,y in block)
total=n+k
dx,dy=ax-mx,ay-my
c=c+q+dx*dy*n*k/total
mx=(mx+ax)/2
my=my+dy*k/total
n=total
return [n,str(mx),str(my),str(c)]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('regression 1', solve(*([[(1, 8), (4, 3), (5, 1)], [(9, 1)]],)), [4, '19/4', '13/4', '-111/4'])
check('regression 2', solve(*([[(8, 1)], [(1, 7), (2, 9)]],)), [3, '11/3', '17/3', '-88/3'])
check('regression 3', solve(*([],)), [0, '0', '0', '0'])
check('regression 4', solve(*([[], [(2, 4), (2, 4)]],)), [2, '2', '4', '0'])
check('regression 5', solve(*([[(0, 3), (2, 1)], [(4, 8), (8, 0)]],)), [4, '7/2', '3', '-8'])
check("variable replicated pairs",solve([[(0,2),(2,0)]]*N),[2*N,"1","1",str(-2*N)])
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 |
|---|---|---|---|
| regression 1 | [4, '16/3', '13/4', '-63/2'] | [4, '19/4', '13/4', '-111/4'] | Failed |
| regression 2 | [3, '11/4', '17/3', '-32/3'] | [3, '11/3', '17/3', '-88/3'] | Failed |
| regression 3 | [0, '0', '0', '0'] | [0, '0', '0', '0'] | Passed |
| regression 4 | [2, '1', '4', '0'] | [2, '2', '4', '0'] | Failed |
| regression 5 | [4, '13/4', '3', '-7'] | [4, '7/2', '3', '-8'] | Failed |
| variable replicated pairs | [2, '1/2', '1', '-2'] | [2, '1', '1', '-2'] | Failed |
SHA-256 / cd3e7916dd862a966071fa2be303d4a3ebca1b0302e18a18ef771c3b24568e54
3 / The verified repair
Exit 0"""Failure Map reference implementation. Python standard library only."""
import json
from fractions import Fraction
from collections import Counter, defaultdict
import math
import itertools
N = 1
observations = []
def solve(blocks):
n=0
mx=my=c=Fraction(0)
for block in blocks:
if not block: continue
k=len(block)
ax=Fraction(sum(x for x,y in block),k)
ay=Fraction(sum(y for x,y in block),k)
q=sum((x-ax)*(y-ay) for x,y in block)
total=n+k
dx,dy=ax-mx,ay-my
c=c+q+dx*dy*n*k/total
mx=mx+dx*k/total
my=my+dy*k/total
n=total
return [n,str(mx),str(my),str(c)]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('regression 1', solve(*([[(1, 8), (4, 3), (5, 1)], [(9, 1)]],)), [4, '19/4', '13/4', '-111/4'])
check('regression 2', solve(*([[(8, 1)], [(1, 7), (2, 9)]],)), [3, '11/3', '17/3', '-88/3'])
check('regression 3', solve(*([],)), [0, '0', '0', '0'])
check('regression 4', solve(*([[], [(2, 4), (2, 4)]],)), [2, '2', '4', '0'])
check('regression 5', solve(*([[(0, 3), (2, 1)], [(4, 8), (8, 0)]],)), [4, '7/2', '3', '-8'])
check("variable replicated pairs",solve([[(0,2),(2,0)]]*N),[2*N,"1","1",str(-2*N)])
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 |
|---|---|---|---|
| regression 1 | [4, '19/4', '13/4', '-111/4'] | [4, '19/4', '13/4', '-111/4'] | Passed |
| regression 2 | [3, '11/3', '17/3', '-88/3'] | [3, '11/3', '17/3', '-88/3'] | Passed |
| regression 3 | [0, '0', '0', '0'] | [0, '0', '0', '0'] | Passed |
| regression 4 | [2, '2', '4', '0'] | [2, '2', '4', '0'] | Passed |
| regression 5 | [4, '7/2', '3', '-8'] | [4, '7/2', '3', '-8'] | Passed |
| variable replicated pairs | [2, '1', '1', '-2'] | [2, '1', '1', '-2'] | Passed |
SHA-256 / 46c71abc96f3dbf8e9a3f5c98919aac11ccc7deb073564121d49028238275542
Verification & scope
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.
Observations recorded using Python 3.12.14 at 2026-09-29T14:39:03.140594+00:00.
Case digest / 8732e3fd980288e91e55c5ee4457aff5d5c18a74f531de385ca5e43ac4b44fdb