FAILURE MAP
← Case archive

FA-50206 / PCM sample encoding / Open access

Pcm warmup lpc packet: linear predictor · case 01

Second-order PCM prediction sums history rather than extrapolating slope.

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

ROOT CAUSE

Second-order PCM prediction sums history rather than extrapolating slope.

VERIFIED REPAIR

Use the stated conversion contract at linear predictor.

Unsuccessful approach: Using only slope omits the current level.

Case contract

Decode fixed-order PCM packets with exactly one or two chronological warmup samples, followed by residuals for hold or linear-extrapolation prediction.

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(packets, order):
    out=[]
    for warmup,residuals in packets:
        if len(warmup)!=order:
            out.append(None)
            continue
        decoded=list(warmup)
        history=list(reversed(warmup))
        for residual in residuals:
            prediction=history[0] if order==1 else history[0]+history[1]
            sample=prediction+residual
            decoded.append(sample)
            history=[sample]+history[:-1]
        out.append(decoded)
    return out
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('oracle 1', solve(*([[[1, 3], [0, 1, -1]], [[4, 2], [1, 0]]], 2)), [[1, 3, 5, 8, 10], [4, 2, 1, 0]])
check('oracle 2', solve(*([[[5], [1, 2]]], 1)), [[5, 6, 8]])
check('oracle 3', solve(*([[[1, 2, 3], [0]], [[1], []]], 2)), [None, None])
check('oracle 4', solve(*([], 2)), [])
check('oracle 5', solve(*([[[0, 0], []]], 2)), [[0, 0]])
check('oracle 6', solve(*([[[-2, -1], [1, -1]]], 2)), [[-2, -1, 1, 2]])
check('oracle 7', solve(*([[[3], []], [[0], [1]]], 1)), [[3], [0, 1]])
if N == 1: check('variant packet 1', solve(*[[[[1, 3], [0, 1, -1]], [[4, 2], [1, 0]], [[1, 3], [0, 1, -1]], [[4, 2], [1, 0]]], 2]), [[1, 3, 5, 8, 10], [4, 2, 1, 0], [1, 3, 5, 8, 10], [4, 2, 1, 0]])
if N == 2: check('variant packet 2', solve(*[[[[1, 3], [0, 1, -1]], [[4, 2], [1, 0]], [[1, 3], [0, 1, -1]], [[4, 2], [1, 0]], [[1, 3], [0, 1, -1]], [[4, 2], [1, 0]]], 2]), [[1, 3, 5, 8, 10], [4, 2, 1, 0], [1, 3, 5, 8, 10], [4, 2, 1, 0], [1, 3, 5, 8, 10], [4, 2, 1, 0]])
if N == 3: check('variant packet 3', solve(*[[[[1, 3], [0, 1, -1]], [[4, 2], [1, 0]], [[1, 3], [0, 1, -1]], [[4, 2], [1, 0]], [[1, 3], [0, 1, -1]], [[4, 2], [1, 0]], [[1, 3], [0, 1, -1]], [[4, 2], [1, 0]]], 2]), [[1, 3, 5, 8, 10], [4, 2, 1, 0], [1, 3, 5, 8, 10], [4, 2, 1, 0], [1, 3, 5, 8, 10], [4, 2, 1, 0], [1, 3, 5, 8, 10], [4, 2, 1, 0]])
if N == 4: check('variant packet 4', solve(*[[[[1, 3], [0, 1, -1]], [[4, 2], [1, 0]], [[1, 3], [0, 1, -1]], [[4, 2], [1, 0]], [[1, 3], [0, 1, -1]], [[4, 2], [1, 0]], [[1, 3], [0, 1, -1]], [[4, 2], [1, 0]], [[1, 3], [0, 1, -1]], [[4, 2], [1, 0]]], 2]), [[1, 3, 5, 8, 10], [4, 2, 1, 0], [1, 3, 5, 8, 10], [4, 2, 1, 0], [1, 3, 5, 8, 10], [4, 2, 1, 0], [1, 3, 5, 8, 10], [4, 2, 1, 0], [1, 3, 5, 8, 10], [4, 2, 1, 0]])
if N == 5: check('variant packet 5', solve(*[[[[1, 3], [0, 1, -1]], [[4, 2], [1, 0]], [[1, 3], [0, 1, -1]], [[4, 2], [1, 0]], [[1, 3], [0, 1, -1]], [[4, 2], [1, 0]], [[1, 3], [0, 1, -1]], [[4, 2], [1, 0]], [[1, 3], [0, 1, -1]], [[4, 2], [1, 0]], [[1, 3], [0, 1, -1]], [[4, 2], [1, 0]]], 2]), [[1, 3, 5, 8, 10], [4, 2, 1, 0], [1, 3, 5, 8, 10], [4, 2, 1, 0], [1, 3, 5, 8, 10], [4, 2, 1, 0], [1, 3, 5, 8, 10], [4, 2, 1, 0], [1, 3, 5, 8, 10], [4, 2, 1, 0], [1, 3, 5, 8, 10], [4, 2, 1, 0]])
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[[1, 3, 4, 8, 11], [4, 2, 7, 9]][[1, 3, 5, 8, 10], [4, 2, 1, 0]]Failed
oracle 2[[5, 6, 8]][[5, 6, 8]]Passed
oracle 3[None, None][None, None]Passed
oracle 4[][]Passed
oracle 5[[0, 0]][[0, 0]]Passed
oracle 6[[-2, -1, -2, -4]][[-2, -1, 1, 2]]Failed
oracle 7[[3], [0, 1]][[3], [0, 1]]Passed
variant packet 1[[1, 3, 4, 8, 11], [4, 2, 7, 9], [1, 3, 4, 8, 11], [4, 2, 7, 9]][[1, 3, 5, 8, 10], [4, 2, 1, 0], [1, 3, 5, 8, 10], [4, 2, 1, 0]]Failed

SHA-256 / a41f9944136de8bddeea8f1b88fcd52044878f3c0e81889c00f5a836eecc94e1

2 / The unsuccessful fix

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

N = 1
observations = []
def solve(packets, order):
    out=[]
    for warmup,residuals in packets:
        if len(warmup)!=order:
            out.append(None)
            continue
        decoded=list(warmup)
        history=list(reversed(warmup))
        for residual in residuals:
            prediction=history[0] if order==1 else history[0]-history[1]
            sample=prediction+residual
            decoded.append(sample)
            history=[sample]+history[:-1]
        out.append(decoded)
    return out
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('oracle 1', solve(*([[[1, 3], [0, 1, -1]], [[4, 2], [1, 0]]], 2)), [[1, 3, 5, 8, 10], [4, 2, 1, 0]])
check('oracle 2', solve(*([[[5], [1, 2]]], 1)), [[5, 6, 8]])
check('oracle 3', solve(*([[[1, 2, 3], [0]], [[1], []]], 2)), [None, None])
check('oracle 4', solve(*([], 2)), [])
check('oracle 5', solve(*([[[0, 0], []]], 2)), [[0, 0]])
check('oracle 6', solve(*([[[-2, -1], [1, -1]]], 2)), [[-2, -1, 1, 2]])
check('oracle 7', solve(*([[[3], []], [[0], [1]]], 1)), [[3], [0, 1]])
if N == 1: check('variant packet 1', solve(*[[[[1, 3], [0, 1, -1]], [[4, 2], [1, 0]], [[1, 3], [0, 1, -1]], [[4, 2], [1, 0]]], 2]), [[1, 3, 5, 8, 10], [4, 2, 1, 0], [1, 3, 5, 8, 10], [4, 2, 1, 0]])
if N == 2: check('variant packet 2', solve(*[[[[1, 3], [0, 1, -1]], [[4, 2], [1, 0]], [[1, 3], [0, 1, -1]], [[4, 2], [1, 0]], [[1, 3], [0, 1, -1]], [[4, 2], [1, 0]]], 2]), [[1, 3, 5, 8, 10], [4, 2, 1, 0], [1, 3, 5, 8, 10], [4, 2, 1, 0], [1, 3, 5, 8, 10], [4, 2, 1, 0]])
if N == 3: check('variant packet 3', solve(*[[[[1, 3], [0, 1, -1]], [[4, 2], [1, 0]], [[1, 3], [0, 1, -1]], [[4, 2], [1, 0]], [[1, 3], [0, 1, -1]], [[4, 2], [1, 0]], [[1, 3], [0, 1, -1]], [[4, 2], [1, 0]]], 2]), [[1, 3, 5, 8, 10], [4, 2, 1, 0], [1, 3, 5, 8, 10], [4, 2, 1, 0], [1, 3, 5, 8, 10], [4, 2, 1, 0], [1, 3, 5, 8, 10], [4, 2, 1, 0]])
if N == 4: check('variant packet 4', solve(*[[[[1, 3], [0, 1, -1]], [[4, 2], [1, 0]], [[1, 3], [0, 1, -1]], [[4, 2], [1, 0]], [[1, 3], [0, 1, -1]], [[4, 2], [1, 0]], [[1, 3], [0, 1, -1]], [[4, 2], [1, 0]], [[1, 3], [0, 1, -1]], [[4, 2], [1, 0]]], 2]), [[1, 3, 5, 8, 10], [4, 2, 1, 0], [1, 3, 5, 8, 10], [4, 2, 1, 0], [1, 3, 5, 8, 10], [4, 2, 1, 0], [1, 3, 5, 8, 10], [4, 2, 1, 0], [1, 3, 5, 8, 10], [4, 2, 1, 0]])
if N == 5: check('variant packet 5', solve(*[[[[1, 3], [0, 1, -1]], [[4, 2], [1, 0]], [[1, 3], [0, 1, -1]], [[4, 2], [1, 0]], [[1, 3], [0, 1, -1]], [[4, 2], [1, 0]], [[1, 3], [0, 1, -1]], [[4, 2], [1, 0]], [[1, 3], [0, 1, -1]], [[4, 2], [1, 0]], [[1, 3], [0, 1, -1]], [[4, 2], [1, 0]]], 2]), [[1, 3, 5, 8, 10], [4, 2, 1, 0], [1, 3, 5, 8, 10], [4, 2, 1, 0], [1, 3, 5, 8, 10], [4, 2, 1, 0], [1, 3, 5, 8, 10], [4, 2, 1, 0], [1, 3, 5, 8, 10], [4, 2, 1, 0], [1, 3, 5, 8, 10], [4, 2, 1, 0]])
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[[1, 3, 2, 0, -3], [4, 2, -1, -3]][[1, 3, 5, 8, 10], [4, 2, 1, 0]]Failed
oracle 2[[5, 6, 8]][[5, 6, 8]]Passed
oracle 3[None, None][None, None]Passed
oracle 4[][]Passed
oracle 5[[0, 0]][[0, 0]]Passed
oracle 6[[-2, -1, 2, 2]][[-2, -1, 1, 2]]Failed
oracle 7[[3], [0, 1]][[3], [0, 1]]Passed
variant packet 1[[1, 3, 2, 0, -3], [4, 2, -1, -3], [1, 3, 2, 0, -3], [4, 2, -1, -3]][[1, 3, 5, 8, 10], [4, 2, 1, 0], [1, 3, 5, 8, 10], [4, 2, 1, 0]]Failed

SHA-256 / f2cf725b78181260e01742707de7d50fcd15fb4c0c381bd9960d06dd79eda25b

3 / The verified repair

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

N = 1
observations = []
def solve(packets, order):
    out=[]
    for warmup,residuals in packets:
        if len(warmup)!=order:
            out.append(None)
            continue
        decoded=list(warmup)
        history=list(reversed(warmup))
        for residual in residuals:
            prediction=history[0] if order==1 else 2*history[0]-history[1]
            sample=prediction+residual
            decoded.append(sample)
            history=[sample]+history[:-1]
        out.append(decoded)
    return out
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('oracle 1', solve(*([[[1, 3], [0, 1, -1]], [[4, 2], [1, 0]]], 2)), [[1, 3, 5, 8, 10], [4, 2, 1, 0]])
check('oracle 2', solve(*([[[5], [1, 2]]], 1)), [[5, 6, 8]])
check('oracle 3', solve(*([[[1, 2, 3], [0]], [[1], []]], 2)), [None, None])
check('oracle 4', solve(*([], 2)), [])
check('oracle 5', solve(*([[[0, 0], []]], 2)), [[0, 0]])
check('oracle 6', solve(*([[[-2, -1], [1, -1]]], 2)), [[-2, -1, 1, 2]])
check('oracle 7', solve(*([[[3], []], [[0], [1]]], 1)), [[3], [0, 1]])
if N == 1: check('variant packet 1', solve(*[[[[1, 3], [0, 1, -1]], [[4, 2], [1, 0]], [[1, 3], [0, 1, -1]], [[4, 2], [1, 0]]], 2]), [[1, 3, 5, 8, 10], [4, 2, 1, 0], [1, 3, 5, 8, 10], [4, 2, 1, 0]])
if N == 2: check('variant packet 2', solve(*[[[[1, 3], [0, 1, -1]], [[4, 2], [1, 0]], [[1, 3], [0, 1, -1]], [[4, 2], [1, 0]], [[1, 3], [0, 1, -1]], [[4, 2], [1, 0]]], 2]), [[1, 3, 5, 8, 10], [4, 2, 1, 0], [1, 3, 5, 8, 10], [4, 2, 1, 0], [1, 3, 5, 8, 10], [4, 2, 1, 0]])
if N == 3: check('variant packet 3', solve(*[[[[1, 3], [0, 1, -1]], [[4, 2], [1, 0]], [[1, 3], [0, 1, -1]], [[4, 2], [1, 0]], [[1, 3], [0, 1, -1]], [[4, 2], [1, 0]], [[1, 3], [0, 1, -1]], [[4, 2], [1, 0]]], 2]), [[1, 3, 5, 8, 10], [4, 2, 1, 0], [1, 3, 5, 8, 10], [4, 2, 1, 0], [1, 3, 5, 8, 10], [4, 2, 1, 0], [1, 3, 5, 8, 10], [4, 2, 1, 0]])
if N == 4: check('variant packet 4', solve(*[[[[1, 3], [0, 1, -1]], [[4, 2], [1, 0]], [[1, 3], [0, 1, -1]], [[4, 2], [1, 0]], [[1, 3], [0, 1, -1]], [[4, 2], [1, 0]], [[1, 3], [0, 1, -1]], [[4, 2], [1, 0]], [[1, 3], [0, 1, -1]], [[4, 2], [1, 0]]], 2]), [[1, 3, 5, 8, 10], [4, 2, 1, 0], [1, 3, 5, 8, 10], [4, 2, 1, 0], [1, 3, 5, 8, 10], [4, 2, 1, 0], [1, 3, 5, 8, 10], [4, 2, 1, 0], [1, 3, 5, 8, 10], [4, 2, 1, 0]])
if N == 5: check('variant packet 5', solve(*[[[[1, 3], [0, 1, -1]], [[4, 2], [1, 0]], [[1, 3], [0, 1, -1]], [[4, 2], [1, 0]], [[1, 3], [0, 1, -1]], [[4, 2], [1, 0]], [[1, 3], [0, 1, -1]], [[4, 2], [1, 0]], [[1, 3], [0, 1, -1]], [[4, 2], [1, 0]], [[1, 3], [0, 1, -1]], [[4, 2], [1, 0]]], 2]), [[1, 3, 5, 8, 10], [4, 2, 1, 0], [1, 3, 5, 8, 10], [4, 2, 1, 0], [1, 3, 5, 8, 10], [4, 2, 1, 0], [1, 3, 5, 8, 10], [4, 2, 1, 0], [1, 3, 5, 8, 10], [4, 2, 1, 0], [1, 3, 5, 8, 10], [4, 2, 1, 0]])
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[[1, 3, 5, 8, 10], [4, 2, 1, 0]][[1, 3, 5, 8, 10], [4, 2, 1, 0]]Passed
oracle 2[[5, 6, 8]][[5, 6, 8]]Passed
oracle 3[None, None][None, None]Passed
oracle 4[][]Passed
oracle 5[[0, 0]][[0, 0]]Passed
oracle 6[[-2, -1, 1, 2]][[-2, -1, 1, 2]]Passed
oracle 7[[3], [0, 1]][[3], [0, 1]]Passed
variant packet 1[[1, 3, 5, 8, 10], [4, 2, 1, 0], [1, 3, 5, 8, 10], [4, 2, 1, 0]][[1, 3, 5, 8, 10], [4, 2, 1, 0], [1, 3, 5, 8, 10], [4, 2, 1, 0]]Passed

SHA-256 / ca2683d1e20a358476bdd1f49d35198e8d91d09bebc61c5522f93dfb327e5f09

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

Case digest / f5cc139cf4a848a951e45a3e97e1e301d4ce3b814c98e971167e3ac0764d78b0