FAILURE MAP
← Case archive

FA-12856 / Numerical aggregation / Open access

Signed channel totals: Zero presence is reported instead of zero multiplicity. · case 01

The reduction disagrees with its explicit aggregation oracle.

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

ROOT CAUSE

Zero presence is reported instead of zero multiplicity.

VERIFIED REPAIR

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

Unsuccessful approach: The zero counter uses the number of distinct inputs.

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 [sum(x for x in xs if x>0),sum(x for x in xs if x<0),int(0 in xs)]
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, 1][6, -6, 2]Failed
regression 2[0, 0, 0][0, 0, 0]Passed
regression 3[0, 0, 1][0, 0, 3]Failed
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 / e6edec25fd244b54a9543c1bdf4a7c56fa0c77d223f645d54c554009d5f2bd70

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 [sum(x for x in xs if x>0),sum(x for x in xs if x<0),len(set(xs))]
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, 4][6, -6, 2]Failed
regression 2[0, 0, 0][0, 0, 0]Passed
regression 3[0, 0, 1][0, 0, 3]Failed
regression 4[0, -10, 2][0, -10, 0]Failed
regression 5[11, 0, 2][11, 0, 0]Failed
variable signed channels[2, -1, 3][2, -1, 1]Failed

SHA-256 / f0da768f03958daea5422c6847949a6e8ed09764213e9d1c7faae98d0b52c53c

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

Case digest / dc0d10777f1af3ad67d6e42c3c2607fb3621341da0fc698574c3c27439d5ebe8