FAILURE MAP
← Case archive

FA-12841 / Numerical aggregation / Open access

Signed channel totals: Positive and negative channels are collapsed before reporting. · case 01

The reduction disagrees with its explicit aggregation oracle.

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

ROOT CAUSE

Positive and negative channels are collapsed before reporting.

VERIFIED REPAIR

Preserve the signed channel totals contract at the identified reduction decision.

Unsuccessful approach: Absolute net magnitude still discards cancellation.

Case contract

Return [positive total, negative total, zero count] for an integer sequence; preserve signs and multiplicity.

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):
    return [max(0,sum(xs)),min(0,sum(xs)),xs.count(0)]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('regression 1', solve(*([3, -2, 0, 3, -4, 0],)), [6, -6, 2])
check('regression 2', solve(*([],)), [0, 0, 0])
check('regression 3', solve(*([0, 0, 0],)), [0, 0, 3])
check('regression 4', solve(*([-8, -2],)), [0, -10, 0])
check('regression 5', solve(*([2, 2, 7],)), [11, 0, 0])
check("variable signed channels", solve([N,-N,0,N]), [2*N,-N,1])
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[0, 0, 2][6, -6, 2]Failed
regression 2[0, 0, 0][0, 0, 0]Passed
regression 3[0, 0, 3][0, 0, 3]Passed
regression 4[0, -10, 0][0, -10, 0]Passed
regression 5[11, 0, 0][11, 0, 0]Passed
variable signed channels[1, 0, 1][2, -1, 1]Failed

SHA-256 / 424c2c61a4d47c308093828612c1647fc28b1ab845ef10c44d750745c6f2f903

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):
    return [abs(sum(xs)), -abs(sum(xs)), xs.count(0)]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('regression 1', solve(*([3, -2, 0, 3, -4, 0],)), [6, -6, 2])
check('regression 2', solve(*([],)), [0, 0, 0])
check('regression 3', solve(*([0, 0, 0],)), [0, 0, 3])
check('regression 4', solve(*([-8, -2],)), [0, -10, 0])
check('regression 5', solve(*([2, 2, 7],)), [11, 0, 0])
check("variable signed channels", solve([N,-N,0,N]), [2*N,-N,1])
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[0, 0, 2][6, -6, 2]Failed
regression 2[0, 0, 0][0, 0, 0]Passed
regression 3[0, 0, 3][0, 0, 3]Passed
regression 4[10, -10, 0][0, -10, 0]Failed
regression 5[11, -11, 0][11, 0, 0]Failed
variable signed channels[1, -1, 1][2, -1, 1]Failed

SHA-256 / 18ab568e02e90e8664ad78a8473d00c1acead4e2c764f5f062d1ea7b1024e49d

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):
    return [sum(x for x in xs if x>0), sum(x for x in xs if x<0), xs.count(0)]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('regression 1', solve(*([3, -2, 0, 3, -4, 0],)), [6, -6, 2])
check('regression 2', solve(*([],)), [0, 0, 0])
check('regression 3', solve(*([0, 0, 0],)), [0, 0, 3])
check('regression 4', solve(*([-8, -2],)), [0, -10, 0])
check('regression 5', solve(*([2, 2, 7],)), [11, 0, 0])
check("variable signed channels", solve([N,-N,0,N]), [2*N,-N,1])
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[6, -6, 2][6, -6, 2]Passed
regression 2[0, 0, 0][0, 0, 0]Passed
regression 3[0, 0, 3][0, 0, 3]Passed
regression 4[0, -10, 0][0, -10, 0]Passed
regression 5[11, 0, 0][11, 0, 0]Passed
variable signed channels[2, -1, 1][2, -1, 1]Passed

SHA-256 / 78a7955d2be7a67187873c2aed8d1ea9bd0e81f6fbe78c695ab3204ec5a175d8

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

Case digest / 1b8a2a40e108383cd7b1e504c17ff05c6c9085b50d93ced14c2c64b3d20bbed3