FAILURE MAP
← Case archive

FA-13056 / Numerical aggregation / Open access

Merge cross scatter: The between-block cross scatter is discarded. · case 01

The reduction disagrees with its explicit aggregation oracle.

Verified by executionVariant 1 · 6 checks per implementationDownload source bundle ↓JSON ↗

ROOT CAUSE

The between-block cross scatter is discarded.

VERIFIED REPAIR

Preserve the merge cross scatter contract at the identified reduction decision.

Unsuccessful approach: Restoring displacement without population weights mis-scales it.

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
        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 fixtureActualExpectedOutcome
regression 1[4, '19/4', '13/4', '-15'][4, '19/4', '13/4', '-111/4']Failed
regression 2[3, '11/3', '17/3', '1'][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', '-18'][4, '7/2', '3', '-8']Failed
variable replicated pairs[2, '1', '1', '-2'][2, '1', '1', '-2']Passed

SHA-256 / eac8ea2d44b82290cb1cb4cd83665bcaa21a5d121a7249a498f82a718b5fe9eb

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
        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 fixtureActualExpectedOutcome
regression 1[4, '19/4', '13/4', '-56/3'][4, '19/4', '13/4', '-111/4']Failed
regression 2[3, '11/3', '17/3', '-73/2'][3, '11/3', '17/3', '-88/3']Failed
regression 3[0, '0', '0', '0'][0, '0', '0', '0']Passed
regression 4[2, '2', '4', '8'][2, '2', '4', '0']Failed
regression 5[4, '7/2', '3', '-6'][4, '7/2', '3', '-8']Failed
variable replicated pairs[2, '1', '1', '-1'][2, '1', '1', '-2']Failed

SHA-256 / c2d71c669e42be19ea0fee70912ee443e8b70663b2a7b40ccb319571b367331a

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 fixtureActualExpectedOutcome
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.142755+00:00.

Case digest / 014f17ca27f82237dab044e734b11332167278276823871ad32234caf65ae10a