FAILURE MAP
← Case archive

FA-12861 / Numerical aggregation / Open access

Signed channel totals: The channel accumulator is overwritten by its final contribution. · case 01

The reduction disagrees with its explicit aggregation oracle.

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

ROOT CAUSE

The channel accumulator is overwritten by its final contribution.

VERIFIED REPAIR

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

Unsuccessful approach: Keeping the largest channel magnitude still drops other contributions.

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

SHA-256 / ae13dcd8a2675ec89c2bf3ed2a074c5e1fbc707315b6a048d29f1bcb92da1590

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 [max([0]+xs),min([0]+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[3, -4, 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, -8, 0][0, -10, 0]Failed
regression 5[7, 0, 0][11, 0, 0]Failed
variable signed channels[1, -1, 1][2, -1, 1]Failed

SHA-256 / 489786e8f3250f9c411806a635abc8e0d0711b9fbcd3069c69f70c45b3a519d9

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

Case digest / 03c7e84df86231bce167a2c6b09751d863c23418da9c2d1f07568487d85eab4e