FA-13071 / Numerical aggregation / Open access
Merge cross scatter: The incoming block cross scatter is not added. · case 01
The reduction disagrees with its explicit aggregation oracle.
ROOT CAUSE
The incoming block cross scatter is not added.
VERIFIED REPAIR
Preserve the merge cross scatter contract at the identified reduction decision.
Unsuccessful approach: Keeping incoming scatter alone loses accumulated covariance.
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+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', '-51/4'] | [4, '19/4', '13/4', '-111/4'] | Failed |
| regression 2 | [3, '11/3', '17/3', '-91/3'] | [3, '11/3', '17/3', '-88/3'] | Failed |
| 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', '10'] | [4, '7/2', '3', '-8'] | Failed |
| variable replicated pairs | [2, '1', '1', '0'] | [2, '1', '1', '-2'] | Failed |
SHA-256 / c168d629f2282f965cc6b6e057de120c4b60f6d7820e9e463419d45d3a740a41
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=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', '-51/4'] | [4, '19/4', '13/4', '-111/4'] | Failed |
| 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', '-6'] | [4, '7/2', '3', '-8'] | Failed |
| variable replicated pairs | [2, '1', '1', '-2'] | [2, '1', '1', '-2'] | Passed |
SHA-256 / ed06ea2a38ba107f8aabd65bd97e85b6b49353ae1afab0b346a1a0e17664fd47
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.140006+00:00.
Case digest / 16a9eaaa6d64d53f46c08066f841c422a8c3d61f92f90c4149469edf87fd6b95