FAILURE MAP
← Case archive

FA-50161 / PCM sample encoding / Open access

Pcm lpc residual reconstruction: history feedback · case 01

LPC decoder feeds residual instead of reconstructed sample into history.

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

ROOT CAUSE

LPC decoder feeds residual instead of reconstructed sample into history.

VERIFIED REPAIR

Use the stated conversion contract at history feedback.

Unsuccessful approach: Feeding prediction omits the correction required by the next sample.

Case contract

Reconstruct bounded integer PCM LPC residuals using newest-first history, floor-divided complete dot products and reconstructed-sample history feedback.

Why this case matters

Offline PCM interchange uses these exact bounded packet and sample representation decisions.

1 / The failure

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(residuals, history, coefficients, divisor):
    state=list(history)
    out=[]
    for residual in residuals:
        prediction=sum(c*x for c,x in zip(coefficients,state))//divisor
        sample=prediction+residual
        out.append(sample)
        state=[residual]+state[:-1]
    return [out,state]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('oracle 1', solve(*([1, 2, -1], [3, 1], [2, -1], 1)), [[6, 11, 15], [15, 11]])
check('oracle 2', solve(*([0, 1, -2], [-3, 2], [1, 1], 3)), [[-1, -1, -3], [-3, -1]])
check('oracle 3', solve(*([], [2, 1], [2, -1], 1)), [[], [2, 1]])
check('oracle 4', solve(*([2, 0, 1], [0, 0, 0], [3, -2, 1], 2)), [[2, 3, 3], [3, 3, 2]])
check('oracle 5', solve(*([-1, 3], [5], [1], 2)), [[1, 3], [3]])
check('oracle 6', solve(*([1, 1], [1, 2, 3], [1, 2, 3], 4)), [[4, 4], [4, 4, 1]])
check('oracle 7', solve(*([0, -1], [4, -2], [3, 1], 3)), [[3, 3], [3, 3]])
if N == 1: check('variant packet 1', solve(*[[1, 2, -1, 1, 2, -1], [3, 1], [2, -1], 1]), [[6, 11, 15, 20, 27, 33], [33, 27]])
if N == 2: check('variant packet 2', solve(*[[1, 2, -1, 1, 2, -1, 1, 2, -1], [3, 1], [2, -1], 1]), [[6, 11, 15, 20, 27, 33, 40, 49, 57], [57, 49]])
if N == 3: check('variant packet 3', solve(*[[1, 2, -1, 1, 2, -1, 1, 2, -1, 1, 2, -1], [3, 1], [2, -1], 1]), [[6, 11, 15, 20, 27, 33, 40, 49, 57, 66, 77, 87], [87, 77]])
if N == 4: check('variant packet 4', solve(*[[1, 2, -1, 1, 2, -1, 1, 2, -1, 1, 2, -1, 1, 2, -1], [3, 1], [2, -1], 1]), [[6, 11, 15, 20, 27, 33, 40, 49, 57, 66, 77, 87, 98, 111, 123], [123, 111]])
if N == 5: check('variant packet 5', solve(*[[1, 2, -1, 1, 2, -1, 1, 2, -1, 1, 2, -1, 1, 2, -1, 1, 2, -1], [3, 1], [2, -1], 1]), [[6, 11, 15, 20, 27, 33, 40, 49, 57, 66, 77, 87, 98, 111, 123, 136, 151, 165], [165, 151]])
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
oracle 1[[6, 1, 2], [-1, 2]][[6, 11, 15], [15, 11]]Failed
oracle 2[[-1, 0, -2], [-2, 1]][[-1, -1, -3], [-3, -1]]Failed
oracle 3[[], [2, 1]][[], [2, 1]]Passed
oracle 4[[2, 3, -1], [1, 0, 2]][[2, 3, 3], [3, 3, 2]]Failed
oracle 5[[1, 2], [3]][[1, 3], [3]]Failed
oracle 6[[4, 3], [1, 1, 1]][[4, 4], [4, 4, 1]]Failed
oracle 7[[3, 0], [-1, 0]][[3, 3], [3, 3]]Failed
variant packet 1[[6, 1, 2, -3, 5, 2], [-1, 2]][[6, 11, 15, 20, 27, 33], [33, 27]]Failed

SHA-256 / ec1066f1e4aadd6db224c0420914b5268a8503cca908fe1029de702be15970c0

2 / The unsuccessful fix

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(residuals, history, coefficients, divisor):
    state=list(history)
    out=[]
    for residual in residuals:
        prediction=sum(c*x for c,x in zip(coefficients,state))//divisor
        sample=prediction+residual
        out.append(sample)
        state=[prediction]+state[:-1]
    return [out,state]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('oracle 1', solve(*([1, 2, -1], [3, 1], [2, -1], 1)), [[6, 11, 15], [15, 11]])
check('oracle 2', solve(*([0, 1, -2], [-3, 2], [1, 1], 3)), [[-1, -1, -3], [-3, -1]])
check('oracle 3', solve(*([], [2, 1], [2, -1], 1)), [[], [2, 1]])
check('oracle 4', solve(*([2, 0, 1], [0, 0, 0], [3, -2, 1], 2)), [[2, 3, 3], [3, 3, 2]])
check('oracle 5', solve(*([-1, 3], [5], [1], 2)), [[1, 3], [3]])
check('oracle 6', solve(*([1, 1], [1, 2, 3], [1, 2, 3], 4)), [[4, 4], [4, 4, 1]])
check('oracle 7', solve(*([0, -1], [4, -2], [3, 1], 3)), [[3, 3], [3, 3]])
if N == 1: check('variant packet 1', solve(*[[1, 2, -1, 1, 2, -1], [3, 1], [2, -1], 1]), [[6, 11, 15, 20, 27, 33], [33, 27]])
if N == 2: check('variant packet 2', solve(*[[1, 2, -1, 1, 2, -1, 1, 2, -1], [3, 1], [2, -1], 1]), [[6, 11, 15, 20, 27, 33, 40, 49, 57], [57, 49]])
if N == 3: check('variant packet 3', solve(*[[1, 2, -1, 1, 2, -1, 1, 2, -1, 1, 2, -1], [3, 1], [2, -1], 1]), [[6, 11, 15, 20, 27, 33, 40, 49, 57, 66, 77, 87], [87, 77]])
if N == 4: check('variant packet 4', solve(*[[1, 2, -1, 1, 2, -1, 1, 2, -1, 1, 2, -1, 1, 2, -1], [3, 1], [2, -1], 1]), [[6, 11, 15, 20, 27, 33, 40, 49, 57, 66, 77, 87, 98, 111, 123], [123, 111]])
if N == 5: check('variant packet 5', solve(*[[1, 2, -1, 1, 2, -1, 1, 2, -1, 1, 2, -1, 1, 2, -1, 1, 2, -1], [3, 1], [2, -1], 1]), [[6, 11, 15, 20, 27, 33, 40, 49, 57, 66, 77, 87, 98, 111, 123, 136, 151, 165], [165, 151]])
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
oracle 1[[6, 9, 8], [9, 7]][[6, 11, 15], [15, 11]]Failed
oracle 2[[-1, -1, -3], [-1, -2]][[-1, -1, -3], [-3, -1]]Failed
oracle 3[[], [2, 1]][[], [2, 1]]Passed
oracle 4[[2, 0, 1], [0, 0, 0]][[2, 3, 3], [3, 3, 2]]Failed
oracle 5[[1, 4], [1]][[1, 3], [3]]Failed
oracle 6[[4, 3], [2, 3, 1]][[4, 4], [4, 4, 1]]Failed
oracle 7[[3, 3], [4, 3]][[3, 3], [3, 3]]Failed
variant packet 1[[6, 9, 8, 12, 15, 14], [15, 13]][[6, 11, 15, 20, 27, 33], [33, 27]]Failed

SHA-256 / b4fcd56457d4e5c4e639feffd0d94c4f37f7ee023d2e10ac9be28be42c7649ad

3 / The verified repair

Exit 0
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(residuals, history, coefficients, divisor):
    state=list(history)
    out=[]
    for residual in residuals:
        prediction=sum(c*x for c,x in zip(coefficients,state))//divisor
        sample=prediction+residual
        out.append(sample)
        state=[sample]+state[:-1]
    return [out,state]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('oracle 1', solve(*([1, 2, -1], [3, 1], [2, -1], 1)), [[6, 11, 15], [15, 11]])
check('oracle 2', solve(*([0, 1, -2], [-3, 2], [1, 1], 3)), [[-1, -1, -3], [-3, -1]])
check('oracle 3', solve(*([], [2, 1], [2, -1], 1)), [[], [2, 1]])
check('oracle 4', solve(*([2, 0, 1], [0, 0, 0], [3, -2, 1], 2)), [[2, 3, 3], [3, 3, 2]])
check('oracle 5', solve(*([-1, 3], [5], [1], 2)), [[1, 3], [3]])
check('oracle 6', solve(*([1, 1], [1, 2, 3], [1, 2, 3], 4)), [[4, 4], [4, 4, 1]])
check('oracle 7', solve(*([0, -1], [4, -2], [3, 1], 3)), [[3, 3], [3, 3]])
if N == 1: check('variant packet 1', solve(*[[1, 2, -1, 1, 2, -1], [3, 1], [2, -1], 1]), [[6, 11, 15, 20, 27, 33], [33, 27]])
if N == 2: check('variant packet 2', solve(*[[1, 2, -1, 1, 2, -1, 1, 2, -1], [3, 1], [2, -1], 1]), [[6, 11, 15, 20, 27, 33, 40, 49, 57], [57, 49]])
if N == 3: check('variant packet 3', solve(*[[1, 2, -1, 1, 2, -1, 1, 2, -1, 1, 2, -1], [3, 1], [2, -1], 1]), [[6, 11, 15, 20, 27, 33, 40, 49, 57, 66, 77, 87], [87, 77]])
if N == 4: check('variant packet 4', solve(*[[1, 2, -1, 1, 2, -1, 1, 2, -1, 1, 2, -1, 1, 2, -1], [3, 1], [2, -1], 1]), [[6, 11, 15, 20, 27, 33, 40, 49, 57, 66, 77, 87, 98, 111, 123], [123, 111]])
if N == 5: check('variant packet 5', solve(*[[1, 2, -1, 1, 2, -1, 1, 2, -1, 1, 2, -1, 1, 2, -1, 1, 2, -1], [3, 1], [2, -1], 1]), [[6, 11, 15, 20, 27, 33, 40, 49, 57, 66, 77, 87, 98, 111, 123, 136, 151, 165], [165, 151]])
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
oracle 1[[6, 11, 15], [15, 11]][[6, 11, 15], [15, 11]]Passed
oracle 2[[-1, -1, -3], [-3, -1]][[-1, -1, -3], [-3, -1]]Passed
oracle 3[[], [2, 1]][[], [2, 1]]Passed
oracle 4[[2, 3, 3], [3, 3, 2]][[2, 3, 3], [3, 3, 2]]Passed
oracle 5[[1, 3], [3]][[1, 3], [3]]Passed
oracle 6[[4, 4], [4, 4, 1]][[4, 4], [4, 4, 1]]Passed
oracle 7[[3, 3], [3, 3]][[3, 3], [3, 3]]Passed
variant packet 1[[6, 11, 15, 20, 27, 33], [33, 27]][[6, 11, 15, 20, 27, 33], [33, 27]]Passed

SHA-256 / 13ed7d44c9da9b2358c03834f633d9fe772e00fc1f0d48d294522abee17e3586

Verification & scope

Stipulated finite model; no claim of hardware timing or full file-format 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:45:06.619573+00:00.

Case digest / e011a691f22da9b52cb86601686471f3ee10b8a3b9d392a656c6e5f0ff7cef12