FA-91351 / Digital signal filters / Open access
Streaming FIR correlates instead of convolving · case 01
An asymmetric impulse response comes out time-reversed.
ROOT CAUSE
Coefficients are paired with the delay line in reversed order.
VERIFIED REPAIR
Pair taps[k] with x[n-k].
Unsuccessful approach: The attempted repair reverses the delay line instead, which is the same correlation.
Case contract
Input [taps, blocks] of integers. Filter the concatenated stream with y[n] = sum_k taps[k] x[n-k] (zero initial history) while processing block by block; return the outputs grouped per input block.
Why this case matters
Block-based FIR processing must carry history across buffer boundaries or every block edge glitches.
1 / The failure
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(x):
b, blocks = x
hist = [0] * (len(b) - 1)
outs = []
for blk in blocks:
ys = []
for s in blk:
taps = [s] + hist
ys.append(sum(c * v for c, v in zip(reversed(b), taps)))
hist = taps[:len(b) - 1]
outs.append(ys)
return outs
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['regression: short blocks spanning history', [[1, 2, 3, 4], [[1], [0], [0, 5], [2]]], [[1], [2], [3, 9], [12]]], ['regression: asymmetric taps one block', [[1, -1, 2], [[1, 0, 0, 0]]], [[1, -1, 2, 0]]], ['regression: empty block in stream', [[2, 1], [[1, 2], [], [3]]], [[2, 5], [], [8]]], ['control: single tap', [[3], [[1, 2], [3]]], [[3, 6], [9]]], ['control: random stream 2', [[1, -3], [[]]], [[]]], ['control: random stream 3', [[-2], [[-5, 2, 0, 2], [-2, 3, -2, 5]]], [[10, -4, 0, -4], [4, -6, 4, -10]]], ['control: random stream 6', [[-3, 3, -1, 0], [[]]], [[]]]], [['regression: random stream 0', [[3, 1, 3, 3], [[3, 4, -2], [3], [5, 4, -3], []]], [[9, 15, 7], [28], [24, 20, 19], []]], ['regression: random stream 1', [[-1, -2, -3, 1], [[1, 2, 5, 4]]], [[-1, -4, -12, -19]]], ['regression: empty block in stream', [[2, 1], [[1, 2], [], [3]]], [[2, 5], [], [8]]], ['control: random stream 7', [[-2], [[], [1, 1, 1]]], [[], [-2, -2, -2]]], ['control: random stream 8', [[1], [[0, -4], [0, -5]]], [[0, -4], [0, -5]]], ['control: random stream 9', [[3, -3, -2, -2], [[]]], [[]]], ['control: random stream 10', [[0], [[5], [-2, 2, 3, -2], [1], [-4, 1, 1]]], [[0], [0, 0, 0, 0], [0], [0, 0, 0]]]], [['regression: random stream 5', [[3, -3, 2, -1, -1], [[-1, -5, -4, 4], []]], [[-3, -12, 1, 15], []]], ['regression: random stream 11', [[-3, -1], [[], [-3], [4, 5, 4]]], [[], [9], [-9, -19, -17]]], ['regression: random stream 1', [[-1, -2, -3, 1], [[1, 2, 5, 4]]], [[-1, -4, -12, -19]]], ['control: random stream 12', [[-3], [[2], [-5, 4]]], [[-6], [15, -12]]], ['control: random stream 13', [[3, -1, 0], [[]]], [[]]], ['control: random stream 14', [[-2], [[], [0, 0, 4, 2]]], [[], [0, 0, -8, -4]]], ['control: random stream 17', [[-3], [[1], [1, 4], [-1, 3, -3]]], [[-3], [-3, -12], [3, -9, 9]]]], [['regression: random stream 16', [[2, -2], [[-2, 5, 1, 2], [-4, 1, -5, -4]]], [[-4, 14, -8, 2], [-12, 10, -12, 2]]], ['regression: random stream 20', [[1, 1, -2], [[-3, 2]]], [[-3, -1]]], ['regression: random stream 5', [[3, -3, 2, -1, -1], [[-1, -5, -4, 4], []]], [[-3, -12, 1, 15], []]], ['control: random stream 18', [[-2], [[3, 5, 4], [-4, -1, -2, -2]]], [[-6, -10, -8], [8, 2, 4, 4]]], ['control: random stream 19', [[-3], [[2, -2, -5], [], [-1]]], [[-6, 6, 15], [], [3]]], ['control: random stream 21', [[2, 2, 2], [[-5, -5, 2, 0], [-5, -5]]], [[-10, -20, -16, -6], [-6, -20]]], ['control: random stream 22', [[2, -3, 0, -3, 2], [[-3, -4], [], [3, 0, -5]]], [[-6, 1], [], [18, 0, -4]]]], [['regression: random stream 26', [[2, 2, 1, 0], [[3, -4, 3], [-5, -1, 4, -4], [-5, -2, -4], [4, 5, 2]]], [[6, -2, 1], [-8, -9, 1, -1], [-14, -18, -17], [-2, 14, 18]]], ['regression: random stream 27', [[-3, -1, -1], [[-2, 3, -3, 0], [2, -2, 0]]], [[6, -7, 8, 0], [-3, 4, 0]]], ['regression: random stream 15', [[1, 0], [[-3, 5, -3], [-2, 4]]], [[-3, 5, -3], [-2, 4]]], ['control: random stream 24', [[0, 1, -3, 1], [[]]], [[]]], ['control: random stream 25', [[2], [[1, 0]]], [[2, 0]]], ['control: random stream 38', [[3, 3], [[-5, -3, 3]]], [[-15, -24, 0]]], ['control: random stream 41', [[1, 1], [[2, -2, 1, 3], [], [-5, 4, 1, -5]]], [[2, 0, -1, 4], [], [-2, -1, 5, -4]]]]]
for label, args, expected in fixtures[N-1]:
check(label, solve(args), expected)
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 |
|---|---|---|---|
| regression: short blocks spanning history | [[4], [3], [2, 21], [23]] | [[1], [2], [3, 9], [12]] | Failed |
| regression: asymmetric taps one block | [[2, -1, 1, 0]] | [[1, -1, 2, 0]] | Failed |
| regression: empty block in stream | [[1, 4], [], [7]] | [[2, 5], [], [8]] | Failed |
| control: single tap | [[3, 6], [9]] | [[3, 6], [9]] | Passed |
| control: random stream 2 | [[]] | [[]] | Passed |
| control: random stream 3 | [[10, -4, 0, -4], [4, -6, 4, -10]] | [[10, -4, 0, -4], [4, -6, 4, -10]] | Passed |
| control: random stream 6 | [[]] | [[]] | Passed |
SHA-256 / 6f7ba9398f66e06beecfee004cb67e714472c08d32de59ce36f8dae2b67b6b50
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(x):
b, blocks = x
hist = [0] * (len(b) - 1)
outs = []
for blk in blocks:
ys = []
for s in blk:
taps = [s] + hist
ys.append(sum(c * v for c, v in zip(b, reversed(taps))))
hist = taps[:len(b) - 1]
outs.append(ys)
return outs
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['regression: short blocks spanning history', [[1, 2, 3, 4], [[1], [0], [0, 5], [2]]], [[1], [2], [3, 9], [12]]], ['regression: asymmetric taps one block', [[1, -1, 2], [[1, 0, 0, 0]]], [[1, -1, 2, 0]]], ['regression: empty block in stream', [[2, 1], [[1, 2], [], [3]]], [[2, 5], [], [8]]], ['control: single tap', [[3], [[1, 2], [3]]], [[3, 6], [9]]], ['control: random stream 2', [[1, -3], [[]]], [[]]], ['control: random stream 3', [[-2], [[-5, 2, 0, 2], [-2, 3, -2, 5]]], [[10, -4, 0, -4], [4, -6, 4, -10]]], ['control: random stream 6', [[-3, 3, -1, 0], [[]]], [[]]]], [['regression: random stream 0', [[3, 1, 3, 3], [[3, 4, -2], [3], [5, 4, -3], []]], [[9, 15, 7], [28], [24, 20, 19], []]], ['regression: random stream 1', [[-1, -2, -3, 1], [[1, 2, 5, 4]]], [[-1, -4, -12, -19]]], ['regression: empty block in stream', [[2, 1], [[1, 2], [], [3]]], [[2, 5], [], [8]]], ['control: random stream 7', [[-2], [[], [1, 1, 1]]], [[], [-2, -2, -2]]], ['control: random stream 8', [[1], [[0, -4], [0, -5]]], [[0, -4], [0, -5]]], ['control: random stream 9', [[3, -3, -2, -2], [[]]], [[]]], ['control: random stream 10', [[0], [[5], [-2, 2, 3, -2], [1], [-4, 1, 1]]], [[0], [0, 0, 0, 0], [0], [0, 0, 0]]]], [['regression: random stream 5', [[3, -3, 2, -1, -1], [[-1, -5, -4, 4], []]], [[-3, -12, 1, 15], []]], ['regression: random stream 11', [[-3, -1], [[], [-3], [4, 5, 4]]], [[], [9], [-9, -19, -17]]], ['regression: random stream 1', [[-1, -2, -3, 1], [[1, 2, 5, 4]]], [[-1, -4, -12, -19]]], ['control: random stream 12', [[-3], [[2], [-5, 4]]], [[-6], [15, -12]]], ['control: random stream 13', [[3, -1, 0], [[]]], [[]]], ['control: random stream 14', [[-2], [[], [0, 0, 4, 2]]], [[], [0, 0, -8, -4]]], ['control: random stream 17', [[-3], [[1], [1, 4], [-1, 3, -3]]], [[-3], [-3, -12], [3, -9, 9]]]], [['regression: random stream 16', [[2, -2], [[-2, 5, 1, 2], [-4, 1, -5, -4]]], [[-4, 14, -8, 2], [-12, 10, -12, 2]]], ['regression: random stream 20', [[1, 1, -2], [[-3, 2]]], [[-3, -1]]], ['regression: random stream 5', [[3, -3, 2, -1, -1], [[-1, -5, -4, 4], []]], [[-3, -12, 1, 15], []]], ['control: random stream 18', [[-2], [[3, 5, 4], [-4, -1, -2, -2]]], [[-6, -10, -8], [8, 2, 4, 4]]], ['control: random stream 19', [[-3], [[2, -2, -5], [], [-1]]], [[-6, 6, 15], [], [3]]], ['control: random stream 21', [[2, 2, 2], [[-5, -5, 2, 0], [-5, -5]]], [[-10, -20, -16, -6], [-6, -20]]], ['control: random stream 22', [[2, -3, 0, -3, 2], [[-3, -4], [], [3, 0, -5]]], [[-6, 1], [], [18, 0, -4]]]], [['regression: random stream 26', [[2, 2, 1, 0], [[3, -4, 3], [-5, -1, 4, -4], [-5, -2, -4], [4, 5, 2]]], [[6, -2, 1], [-8, -9, 1, -1], [-14, -18, -17], [-2, 14, 18]]], ['regression: random stream 27', [[-3, -1, -1], [[-2, 3, -3, 0], [2, -2, 0]]], [[6, -7, 8, 0], [-3, 4, 0]]], ['regression: random stream 15', [[1, 0], [[-3, 5, -3], [-2, 4]]], [[-3, 5, -3], [-2, 4]]], ['control: random stream 24', [[0, 1, -3, 1], [[]]], [[]]], ['control: random stream 25', [[2], [[1, 0]]], [[2, 0]]], ['control: random stream 38', [[3, 3], [[-5, -3, 3]]], [[-15, -24, 0]]], ['control: random stream 41', [[1, 1], [[2, -2, 1, 3], [], [-5, 4, 1, -5]]], [[2, 0, -1, 4], [], [-2, -1, 5, -4]]]]]
for label, args, expected in fixtures[N-1]:
check(label, solve(args), expected)
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 |
|---|---|---|---|
| regression: short blocks spanning history | [[4], [3], [2, 21], [23]] | [[1], [2], [3, 9], [12]] | Failed |
| regression: asymmetric taps one block | [[2, -1, 1, 0]] | [[1, -1, 2, 0]] | Failed |
| regression: empty block in stream | [[1, 4], [], [7]] | [[2, 5], [], [8]] | Failed |
| control: single tap | [[3, 6], [9]] | [[3, 6], [9]] | Passed |
| control: random stream 2 | [[]] | [[]] | Passed |
| control: random stream 3 | [[10, -4, 0, -4], [4, -6, 4, -10]] | [[10, -4, 0, -4], [4, -6, 4, -10]] | Passed |
| control: random stream 6 | [[]] | [[]] | Passed |
SHA-256 / 64772681a41b64efa791ec32aedf1cbefb1ed42b554e127ef578062d0a7ff623
3 / The verified repair
Exit 0"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(x):
b, blocks = x
hist = [0] * (len(b) - 1)
outs = []
for blk in blocks:
ys = []
for s in blk:
taps = [s] + hist
ys.append(sum(c * v for c, v in zip(b, taps)))
hist = taps[:len(b) - 1]
outs.append(ys)
return outs
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['regression: short blocks spanning history', [[1, 2, 3, 4], [[1], [0], [0, 5], [2]]], [[1], [2], [3, 9], [12]]], ['regression: asymmetric taps one block', [[1, -1, 2], [[1, 0, 0, 0]]], [[1, -1, 2, 0]]], ['regression: empty block in stream', [[2, 1], [[1, 2], [], [3]]], [[2, 5], [], [8]]], ['control: single tap', [[3], [[1, 2], [3]]], [[3, 6], [9]]], ['control: random stream 2', [[1, -3], [[]]], [[]]], ['control: random stream 3', [[-2], [[-5, 2, 0, 2], [-2, 3, -2, 5]]], [[10, -4, 0, -4], [4, -6, 4, -10]]], ['control: random stream 6', [[-3, 3, -1, 0], [[]]], [[]]]], [['regression: random stream 0', [[3, 1, 3, 3], [[3, 4, -2], [3], [5, 4, -3], []]], [[9, 15, 7], [28], [24, 20, 19], []]], ['regression: random stream 1', [[-1, -2, -3, 1], [[1, 2, 5, 4]]], [[-1, -4, -12, -19]]], ['regression: empty block in stream', [[2, 1], [[1, 2], [], [3]]], [[2, 5], [], [8]]], ['control: random stream 7', [[-2], [[], [1, 1, 1]]], [[], [-2, -2, -2]]], ['control: random stream 8', [[1], [[0, -4], [0, -5]]], [[0, -4], [0, -5]]], ['control: random stream 9', [[3, -3, -2, -2], [[]]], [[]]], ['control: random stream 10', [[0], [[5], [-2, 2, 3, -2], [1], [-4, 1, 1]]], [[0], [0, 0, 0, 0], [0], [0, 0, 0]]]], [['regression: random stream 5', [[3, -3, 2, -1, -1], [[-1, -5, -4, 4], []]], [[-3, -12, 1, 15], []]], ['regression: random stream 11', [[-3, -1], [[], [-3], [4, 5, 4]]], [[], [9], [-9, -19, -17]]], ['regression: random stream 1', [[-1, -2, -3, 1], [[1, 2, 5, 4]]], [[-1, -4, -12, -19]]], ['control: random stream 12', [[-3], [[2], [-5, 4]]], [[-6], [15, -12]]], ['control: random stream 13', [[3, -1, 0], [[]]], [[]]], ['control: random stream 14', [[-2], [[], [0, 0, 4, 2]]], [[], [0, 0, -8, -4]]], ['control: random stream 17', [[-3], [[1], [1, 4], [-1, 3, -3]]], [[-3], [-3, -12], [3, -9, 9]]]], [['regression: random stream 16', [[2, -2], [[-2, 5, 1, 2], [-4, 1, -5, -4]]], [[-4, 14, -8, 2], [-12, 10, -12, 2]]], ['regression: random stream 20', [[1, 1, -2], [[-3, 2]]], [[-3, -1]]], ['regression: random stream 5', [[3, -3, 2, -1, -1], [[-1, -5, -4, 4], []]], [[-3, -12, 1, 15], []]], ['control: random stream 18', [[-2], [[3, 5, 4], [-4, -1, -2, -2]]], [[-6, -10, -8], [8, 2, 4, 4]]], ['control: random stream 19', [[-3], [[2, -2, -5], [], [-1]]], [[-6, 6, 15], [], [3]]], ['control: random stream 21', [[2, 2, 2], [[-5, -5, 2, 0], [-5, -5]]], [[-10, -20, -16, -6], [-6, -20]]], ['control: random stream 22', [[2, -3, 0, -3, 2], [[-3, -4], [], [3, 0, -5]]], [[-6, 1], [], [18, 0, -4]]]], [['regression: random stream 26', [[2, 2, 1, 0], [[3, -4, 3], [-5, -1, 4, -4], [-5, -2, -4], [4, 5, 2]]], [[6, -2, 1], [-8, -9, 1, -1], [-14, -18, -17], [-2, 14, 18]]], ['regression: random stream 27', [[-3, -1, -1], [[-2, 3, -3, 0], [2, -2, 0]]], [[6, -7, 8, 0], [-3, 4, 0]]], ['regression: random stream 15', [[1, 0], [[-3, 5, -3], [-2, 4]]], [[-3, 5, -3], [-2, 4]]], ['control: random stream 24', [[0, 1, -3, 1], [[]]], [[]]], ['control: random stream 25', [[2], [[1, 0]]], [[2, 0]]], ['control: random stream 38', [[3, 3], [[-5, -3, 3]]], [[-15, -24, 0]]], ['control: random stream 41', [[1, 1], [[2, -2, 1, 3], [], [-5, 4, 1, -5]]], [[2, 0, -1, 4], [], [-2, -1, 5, -4]]]]]
for label, args, expected in fixtures[N-1]:
check(label, solve(args), expected)
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 |
|---|---|---|---|
| regression: short blocks spanning history | [[1], [2], [3, 9], [12]] | [[1], [2], [3, 9], [12]] | Passed |
| regression: asymmetric taps one block | [[1, -1, 2, 0]] | [[1, -1, 2, 0]] | Passed |
| regression: empty block in stream | [[2, 5], [], [8]] | [[2, 5], [], [8]] | Passed |
| control: single tap | [[3, 6], [9]] | [[3, 6], [9]] | Passed |
| control: random stream 2 | [[]] | [[]] | Passed |
| control: random stream 3 | [[10, -4, 0, -4], [4, -6, 4, -10]] | [[10, -4, 0, -4], [4, -6, 4, -10]] | Passed |
| control: random stream 6 | [[]] | [[]] | Passed |
SHA-256 / 53328a0aa9380e8f8262cd1c6f69135dda3fd32ad50e115deb73e4a531825f0f
Verification & scope
A deterministic bounded teaching model with a stipulated toy contract; exact rational arithmetic or fixed-decimal rounding keeps outputs strict JSON. It is not a production DSP library and claims no standards conformance. 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:51:35.093366+00:00.
Case digest / 2cff14103864666e5b3b3a4129f57260d7f6fda2656d34fb8ca5a554e0c934db