FA-6366 / Discrete calculus / Open access
Prefix products inclusive · case 01
Addition replaces multiplicative accumulation.
ROOT CAUSE
Addition replaces multiplicative accumulation.
VERIFIED REPAIR
Apply the specified mathematical contract directly, preserving all terms and boundary cases: return list(itertools.accumulate(values,lambda a,b:a*b))
Unsuccessful approach: The current factor is excluded.
Case contract
Integer sample values and compatible sample-array lengths. Rational results are reduced Fraction strings; spacing is positive unless explicitly stated otherwise. Prefix products inclusive. Exact operational definition: list(itertools.accumulate(values,lambda a,b:a*b))
Why this case matters
Small exact fixtures expose this error without platform timing, external services, or probabilistic observations. Discrete calculus results depend on the stated convention.
1 / The failure
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
import math
import calendar
import statistics
import itertools
from fractions import Fraction
from datetime import date, datetime, timedelta, timezone
from decimal import Decimal, ROUND_HALF_UP, ROUND_DOWN, ROUND_CEILING, ROUND_FLOOR
N = 1
observations = []
def solve(values):
return list(itertools.accumulate(values))
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1: ([2, 3, 4],)', solve(*([2, 3, 4],)), [2, 6, 24])
check('fixture 2: ([2, 0, 5],)', solve(*([2, 0, 5],)), [2, 0, 0])
check('fixture 3: ([5],)', solve(*([5],)), [5])
check('fixture 4: ([],)', solve(*([],)), [])
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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| fixture 1: ([2, 3, 4],) | [2, 5, 9] | [2, 6, 24] | Failed |
| fixture 2: ([2, 0, 5],) | [2, 2, 7] | [2, 0, 0] | Failed |
| fixture 3: ([5],) | [5] | [5] | Passed |
| fixture 4: ([],) | [] | [] | Passed |
SHA-256 / 877ff47b47c7002617b3f5dddc075ffd67821ed9642fb43c09549c78e90641ab
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
import math
import calendar
import statistics
import itertools
from fractions import Fraction
from datetime import date, datetime, timedelta, timezone
from decimal import Decimal, ROUND_HALF_UP, ROUND_DOWN, ROUND_CEILING, ROUND_FLOOR
N = 1
observations = []
def solve(values):
return [math.prod(values[:i]) for i in range(len(values))]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1: ([2, 3, 4],)', solve(*([2, 3, 4],)), [2, 6, 24])
check('fixture 2: ([2, 0, 5],)', solve(*([2, 0, 5],)), [2, 0, 0])
check('fixture 3: ([5],)', solve(*([5],)), [5])
check('fixture 4: ([],)', solve(*([],)), [])
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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| fixture 1: ([2, 3, 4],) | [1, 2, 6] | [2, 6, 24] | Failed |
| fixture 2: ([2, 0, 5],) | [1, 2, 0] | [2, 0, 0] | Failed |
| fixture 3: ([5],) | [1] | [5] | Failed |
| fixture 4: ([],) | [] | [] | Passed |
SHA-256 / d999aa18a8bf29a52cbfcf8a7670f7ad1b1dc5404eaafc18ea9e39b67ebc8b7c
3 / The verified repair
Exit 0"""Failure Map reference implementation. Python standard library only."""
import json
import math
import calendar
import statistics
import itertools
from fractions import Fraction
from datetime import date, datetime, timedelta, timezone
from decimal import Decimal, ROUND_HALF_UP, ROUND_DOWN, ROUND_CEILING, ROUND_FLOOR
N = 1
observations = []
def solve(values):
return list(itertools.accumulate(values,lambda a,b:a*b))
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1: ([2, 3, 4],)', solve(*([2, 3, 4],)), [2, 6, 24])
check('fixture 2: ([2, 0, 5],)', solve(*([2, 0, 5],)), [2, 0, 0])
check('fixture 3: ([5],)', solve(*([5],)), [5])
check('fixture 4: ([],)', solve(*([],)), [])
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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| fixture 1: ([2, 3, 4],) | [2, 6, 24] | [2, 6, 24] | Passed |
| fixture 2: ([2, 0, 5],) | [2, 0, 0] | [2, 0, 0] | Passed |
| fixture 3: ([5],) | [5] | [5] | Passed |
| fixture 4: ([],) | [] | [] | Passed |
SHA-256 / 6f56a368e12f38d0795373b9f0ea0a1001640a5976652b8e69122ef32e4787ae
Verification & scope
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:38:00.874384+00:00.
Case digest / 53c594ae47cefb8e20a34c54a8e04b40501d3fd21e7b1c0cf95217c9d2fca4f0