FAILURE MAP
← Case archive

FA-13551 / Numerical aggregation / Open access

Recursive exponential level: The final sample is omitted from the recursion. · case 01

The reduction disagrees with its explicit aggregation oracle.

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

ROOT CAUSE

The final sample is omitted from the recursion.

VERIFIED REPAIR

Preserve the recursive exponential level contract at the identified reduction decision.

Unsuccessful approach: Starting at the third sample drops the first post-initial update.

Case contract

For 0<=p<=q and q>0, initialise the recursive level to the first observation and update y=(p/q)*x+(1-p/q)*y for each later observation. Empty input returns None; return exact Fraction string.

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, p, q):
    if not xs: return None
    alpha=Fraction(p,q)
    y=Fraction(xs[0])
    for x in xs[1:-1]:
        y=alpha*x+(1-alpha)*y
    return str(y)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('regression 1', solve(*([2, 8, 4], 1, 2)), '9/2')
check('regression 2', solve(*([], 1, 2)), None)
check('regression 3', solve(*([7], 1, 3)), '7')
check('regression 4', solve(*([2, 9], 0, 1)), '2')
check('regression 5', solve(*([3, 8, 1], 1, 1)), '1')
check('regression 6', solve(*([-3, 5, -2], 2, 3)), '-5/9')
check('regression 7', solve(*([0, 0, 8], 1, 4)), '2')
check("variable impulse",solve([0,N,0],1,2),str(Fraction(N,4)))
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 159/2Failed
regression 2NoneNonePassed
regression 377Passed
regression 422Passed
regression 581Failed
regression 67/3-5/9Failed
regression 702Failed
variable impulse1/21/4Failed

SHA-256 / 85fd2d3f30a235e8319ff33fb1b131a48f1034e361b8b8a5e4f8100498c9884b

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, p, q):
    if not xs: return None
    alpha=Fraction(p,q)
    y=Fraction(xs[0])
    for x in xs[2:]:
        y=alpha*x+(1-alpha)*y
    return str(y)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('regression 1', solve(*([2, 8, 4], 1, 2)), '9/2')
check('regression 2', solve(*([], 1, 2)), None)
check('regression 3', solve(*([7], 1, 3)), '7')
check('regression 4', solve(*([2, 9], 0, 1)), '2')
check('regression 5', solve(*([3, 8, 1], 1, 1)), '1')
check('regression 6', solve(*([-3, 5, -2], 2, 3)), '-5/9')
check('regression 7', solve(*([0, 0, 8], 1, 4)), '2')
check("variable impulse",solve([0,N,0],1,2),str(Fraction(N,4)))
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 139/2Failed
regression 2NoneNonePassed
regression 377Passed
regression 422Passed
regression 511Passed
regression 6-7/3-5/9Failed
regression 722Passed
variable impulse01/4Failed

SHA-256 / 9a0a639c15b1668a2c520b1b4b271a6413c0489ee140c1a8c013f52058c0446b

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, p, q):
    if not xs: return None
    alpha=Fraction(p,q)
    y=Fraction(xs[0])
    for x in xs[1:]:
        y=alpha*x+(1-alpha)*y
    return str(y)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('regression 1', solve(*([2, 8, 4], 1, 2)), '9/2')
check('regression 2', solve(*([], 1, 2)), None)
check('regression 3', solve(*([7], 1, 3)), '7')
check('regression 4', solve(*([2, 9], 0, 1)), '2')
check('regression 5', solve(*([3, 8, 1], 1, 1)), '1')
check('regression 6', solve(*([-3, 5, -2], 2, 3)), '-5/9')
check('regression 7', solve(*([0, 0, 8], 1, 4)), '2')
check("variable impulse",solve([0,N,0],1,2),str(Fraction(N,4)))
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 19/29/2Passed
regression 2NoneNonePassed
regression 377Passed
regression 422Passed
regression 511Passed
regression 6-5/9-5/9Passed
regression 722Passed
variable impulse1/41/4Passed

SHA-256 / 8ace4ea471d2912374f7d4005a5287324b160218f1e1701a2b16830f1b43c189

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

Case digest / 8b3edc5cb978126e7d0349e488e8b64057ea70410c8eb46d5ce37f3fc7174322