FA-13066 / Numerical aggregation / Open access
Merge cross scatter: The between-block covariance sign is discarded. · case 01
The reduction disagrees with its explicit aggregation oracle.
ROOT CAUSE
The between-block covariance sign is discarded.
VERIFIED REPAIR
Preserve the merge cross scatter contract at the identified reduction decision.
Unsuccessful approach: A globally negative sign cannot handle both correlated directions.
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+abs(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', '-9/4'] | [4, '19/4', '13/4', '-111/4'] | Failed |
| regression 2 | [3, '11/3', '17/3', '94/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', '-8'] | [4, '7/2', '3', '-8'] | Passed |
| variable replicated pairs | [2, '1', '1', '-2'] | [2, '1', '1', '-2'] | Passed |
SHA-256 / e36500b871703ceb146a5358d9b3eb407bc0d104128470a113d90882ef749192
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+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', '-9/4'] | [4, '19/4', '13/4', '-111/4'] | Failed |
| regression 2 | [3, '11/3', '17/3', '94/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', '-28'] | [4, '7/2', '3', '-8'] | Failed |
| variable replicated pairs | [2, '1', '1', '-2'] | [2, '1', '1', '-2'] | Passed |
SHA-256 / cf444cc182d494ffb5951530dd1aebc1ca55cfe7459458173f47c4a1e9f6de8f
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.134919+00:00.
Case digest / 49b4043ddfb3bfafbcde0bdf4ae2d1928010c36c78f3dd70c45d01f59e910eca