FAILURE MAP
← Case archive

FA-12871 / Numerical aggregation / Open access

Absolute deviation about anchor: The anchor is subtracted once from the total instead of once per observation. · case 01

The reduction disagrees with its explicit aggregation oracle.

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

ROOT CAUSE

The anchor is subtracted once from the total instead of once per observation.

VERIFIED REPAIR

Preserve the absolute deviation about anchor contract at the identified reduction decision.

Unsuccessful approach: Scaling the anchor still permits cancellation.

Case contract

Return sum(abs(x-anchor)); empty input returns zero. Anchor is supplied, not estimated.

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(xs, anchor):
    return abs(sum(xs)-anchor) if xs else 0
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('regression 1', solve(*([1, 5, 9], 5)), 8)
check('regression 2', solve(*([], 4)), 0)
check('regression 3', solve(*([4, 4], 4)), 0)
check('regression 4', solve(*([-3, -1], 2)), 8)
check('regression 5', solve(*([0, 0, 6], 1)), 7)
check("variable anchor", solve([N-3,N+2,N+2],N),7)
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 1108Failed
regression 200Passed
regression 340Failed
regression 468Failed
regression 557Failed
variable anchor37Failed

SHA-256 / ef62e497021a97545ff8a6607fe57ab70b9ea6a7ae5547b66fd62a4c3e879814

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(xs, anchor):
    return abs(sum(xs)-anchor*len(xs))
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('regression 1', solve(*([1, 5, 9], 5)), 8)
check('regression 2', solve(*([], 4)), 0)
check('regression 3', solve(*([4, 4], 4)), 0)
check('regression 4', solve(*([-3, -1], 2)), 8)
check('regression 5', solve(*([0, 0, 6], 1)), 7)
check("variable anchor", solve([N-3,N+2,N+2],N),7)
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 108Failed
regression 200Passed
regression 300Passed
regression 488Passed
regression 537Failed
variable anchor17Failed

SHA-256 / 98f46b10be780c16add8d6052bf54f6687f6088d8a5f2c27435c6f2b4c3c52fb

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(xs, anchor):
    return sum(abs(x-anchor) for x in xs)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('regression 1', solve(*([1, 5, 9], 5)), 8)
check('regression 2', solve(*([], 4)), 0)
check('regression 3', solve(*([4, 4], 4)), 0)
check('regression 4', solve(*([-3, -1], 2)), 8)
check('regression 5', solve(*([0, 0, 6], 1)), 7)
check("variable anchor", solve([N-3,N+2,N+2],N),7)
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 188Passed
regression 200Passed
regression 300Passed
regression 488Passed
regression 577Passed
variable anchor77Passed

SHA-256 / fdf32ae20efa0796e6f0e4a7625899e2afdf6315c10f56c9ba996a64f78c8aa0

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

Case digest / 5f672f043b109832d1862a527763ae9449c433ab877dd2126c6f4b07eb75c96f