FAILURE MAP
← Case archive

FA-49761 / PCM sample encoding / Open access

Pcm adaptive nibble selection: reconstructed feedback · case 01

Encoder feeds the unquantized source into predictor state, diverging from decoder.

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

ROOT CAUSE

Encoder feeds the unquantized source into predictor state, diverging from decoder.

VERIFIED REPAIR

Use the stated conversion contract at reconstructed feedback.

Unsuccessful approach: Feeding leftover residual instead of reconstructed delta also diverges.

Case contract

Bounded fixed-step adaptive-nibble PCM encoder: greedy magnitude bits, a half-bin base, and predictor feedback from reconstructed rather than original amplitudes.

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(samples, predictor, step):
    out=[]
    for sample in samples:
        difference=sample-predictor
        sign=8 if difference<0 else 0
        magnitude=abs(difference)
        code=0
        restored=step//8
        for bit,part in [(4,step),(2,step//2),(1,step//4)]:
            if magnitude>=part:
                code|=bit
                magnitude-=part
                restored+=part
        predictor=sample
        out.append(sign|code)
    return [out,predictor]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('oracle 1', solve(*([2, 6, -4, 10], 0, 8)), [[1, 1, 13, 7], 10])
check('oracle 2', solve(*([10, 10, 10], 3, 12)), [[2, 0, 8], 10])
check('oracle 3', solve(*([-5, -10, 0], 0, 8)), [[10, 10, 5], 1])
check('oracle 4', solve(*([], 4, 8)), [[], 4])
check('oracle 5', solve(*([0, 1, 2, 3], 0, 16)), [[0, 8, 0, 0], 4])
check('oracle 6', solve(*([8, 16, 24], 0, 8)), [[4, 3, 4], 25])
check('oracle 7', solve(*([6, -6, 6], 1, 4)), [[5, 15, 7], 6])
if N == 1: check('variant packet 1', solve(*[[2, 6, -4, 10, 2, 6, -4, 10], 0, 8]), [[1, 1, 13, 7, 12, 2, 13, 7], 10])
if N == 2: check('variant packet 2', solve(*[[2, 6, -4, 10, 2, 6, -4, 10, 2, 6, -4, 10], 0, 8]), [[1, 1, 13, 7, 12, 2, 13, 7, 12, 2, 13, 7], 10])
if N == 3: check('variant packet 3', solve(*[[2, 6, -4, 10, 2, 6, -4, 10, 2, 6, -4, 10, 2, 6, -4, 10], 0, 8]), [[1, 1, 13, 7, 12, 2, 13, 7, 12, 2, 13, 7, 12, 2, 13, 7], 10])
if N == 4: check('variant packet 4', solve(*[[2, 6, -4, 10, 2, 6, -4, 10, 2, 6, -4, 10, 2, 6, -4, 10, 2, 6, -4, 10], 0, 8]), [[1, 1, 13, 7, 12, 2, 13, 7, 12, 2, 13, 7, 12, 2, 13, 7, 12, 2, 13, 7], 10])
if N == 5: check('variant packet 5', solve(*[[2, 6, -4, 10, 2, 6, -4, 10, 2, 6, -4, 10, 2, 6, -4, 10, 2, 6, -4, 10, 2, 6, -4, 10], 0, 8]), [[1, 1, 13, 7, 12, 2, 13, 7, 12, 2, 13, 7, 12, 2, 13, 7, 12, 2, 13, 7, 12, 2, 13, 7], 10])
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, 2, 13, 7], 10][[1, 1, 13, 7], 10]Failed
oracle 2[[2, 0, 0], 10][[2, 0, 8], 10]Failed
oracle 3[[10, 10, 5], 0][[10, 10, 5], 1]Failed
oracle 4[[], 4][[], 4]Passed
oracle 5[[0, 0, 0, 0], 3][[0, 8, 0, 0], 4]Failed
oracle 6[[4, 4, 4], 24][[4, 3, 4], 25]Failed
oracle 7[[5, 15, 7], 6][[5, 15, 7], 6]Passed
variant packet 1[[1, 2, 13, 7, 12, 2, 13, 7], 10][[1, 1, 13, 7, 12, 2, 13, 7], 10]Failed

SHA-256 / 02143e51b6b38509fda149180df9ecc56b13dd81b3e556bdbfdc36914ba94e69

2 / The unsuccessful fix

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

N = 1
observations = []
def solve(samples, predictor, step):
    out=[]
    for sample in samples:
        difference=sample-predictor
        sign=8 if difference<0 else 0
        magnitude=abs(difference)
        code=0
        restored=step//8
        for bit,part in [(4,step),(2,step//2),(1,step//4)]:
            if magnitude>=part:
                code|=bit
                magnitude-=part
                restored+=part
        predictor+=-magnitude if sign else magnitude
        out.append(sign|code)
    return [out,predictor]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('oracle 1', solve(*([2, 6, -4, 10], 0, 8)), [[1, 1, 13, 7], 10])
check('oracle 2', solve(*([10, 10, 10], 3, 12)), [[2, 0, 8], 10])
check('oracle 3', solve(*([-5, -10, 0], 0, 8)), [[10, 10, 5], 1])
check('oracle 4', solve(*([], 4, 8)), [[], 4])
check('oracle 5', solve(*([0, 1, 2, 3], 0, 16)), [[0, 8, 0, 0], 4])
check('oracle 6', solve(*([8, 16, 24], 0, 8)), [[4, 3, 4], 25])
check('oracle 7', solve(*([6, -6, 6], 1, 4)), [[5, 15, 7], 6])
if N == 1: check('variant packet 1', solve(*[[2, 6, -4, 10, 2, 6, -4, 10], 0, 8]), [[1, 1, 13, 7, 12, 2, 13, 7], 10])
if N == 2: check('variant packet 2', solve(*[[2, 6, -4, 10, 2, 6, -4, 10, 2, 6, -4, 10], 0, 8]), [[1, 1, 13, 7, 12, 2, 13, 7, 12, 2, 13, 7], 10])
if N == 3: check('variant packet 3', solve(*[[2, 6, -4, 10, 2, 6, -4, 10, 2, 6, -4, 10, 2, 6, -4, 10], 0, 8]), [[1, 1, 13, 7, 12, 2, 13, 7, 12, 2, 13, 7, 12, 2, 13, 7], 10])
if N == 4: check('variant packet 4', solve(*[[2, 6, -4, 10, 2, 6, -4, 10, 2, 6, -4, 10, 2, 6, -4, 10, 2, 6, -4, 10], 0, 8]), [[1, 1, 13, 7, 12, 2, 13, 7, 12, 2, 13, 7, 12, 2, 13, 7, 12, 2, 13, 7], 10])
if N == 5: check('variant packet 5', solve(*[[2, 6, -4, 10, 2, 6, -4, 10, 2, 6, -4, 10, 2, 6, -4, 10, 2, 6, -4, 10, 2, 6, -4, 10], 0, 8]), [[1, 1, 13, 7, 12, 2, 13, 7, 12, 2, 13, 7, 12, 2, 13, 7, 12, 2, 13, 7, 12, 2, 13, 7], 10])
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, 10, 5], 0][[1, 1, 13, 7], 10]Failed
oracle 2[[2, 2, 2], 4][[2, 0, 8], 10]Failed
oracle 3[[10, 12, 1], -2][[10, 10, 5], 1]Failed
oracle 4[[], 4][[], 4]Passed
oracle 5[[0, 0, 0, 0], 3][[0, 8, 0, 0], 4]Failed
oracle 6[[4, 7, 7], 10][[4, 3, 4], 25]Failed
oracle 7[[5, 15, 5], 1][[5, 15, 7], 6]Failed
variant packet 1[[1, 3, 10, 5, 1, 3, 10, 5], 0][[1, 1, 13, 7, 12, 2, 13, 7], 10]Failed

SHA-256 / 35d2921283527dcb39ee20182c2230f5322a3a5d97c0927faca3d274f6dfc5e9

3 / The verified repair

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

N = 1
observations = []
def solve(samples, predictor, step):
    out=[]
    for sample in samples:
        difference=sample-predictor
        sign=8 if difference<0 else 0
        magnitude=abs(difference)
        code=0
        restored=step//8
        for bit,part in [(4,step),(2,step//2),(1,step//4)]:
            if magnitude>=part:
                code|=bit
                magnitude-=part
                restored+=part
        predictor+=-restored if sign else restored
        out.append(sign|code)
    return [out,predictor]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('oracle 1', solve(*([2, 6, -4, 10], 0, 8)), [[1, 1, 13, 7], 10])
check('oracle 2', solve(*([10, 10, 10], 3, 12)), [[2, 0, 8], 10])
check('oracle 3', solve(*([-5, -10, 0], 0, 8)), [[10, 10, 5], 1])
check('oracle 4', solve(*([], 4, 8)), [[], 4])
check('oracle 5', solve(*([0, 1, 2, 3], 0, 16)), [[0, 8, 0, 0], 4])
check('oracle 6', solve(*([8, 16, 24], 0, 8)), [[4, 3, 4], 25])
check('oracle 7', solve(*([6, -6, 6], 1, 4)), [[5, 15, 7], 6])
if N == 1: check('variant packet 1', solve(*[[2, 6, -4, 10, 2, 6, -4, 10], 0, 8]), [[1, 1, 13, 7, 12, 2, 13, 7], 10])
if N == 2: check('variant packet 2', solve(*[[2, 6, -4, 10, 2, 6, -4, 10, 2, 6, -4, 10], 0, 8]), [[1, 1, 13, 7, 12, 2, 13, 7, 12, 2, 13, 7], 10])
if N == 3: check('variant packet 3', solve(*[[2, 6, -4, 10, 2, 6, -4, 10, 2, 6, -4, 10, 2, 6, -4, 10], 0, 8]), [[1, 1, 13, 7, 12, 2, 13, 7, 12, 2, 13, 7, 12, 2, 13, 7], 10])
if N == 4: check('variant packet 4', solve(*[[2, 6, -4, 10, 2, 6, -4, 10, 2, 6, -4, 10, 2, 6, -4, 10, 2, 6, -4, 10], 0, 8]), [[1, 1, 13, 7, 12, 2, 13, 7, 12, 2, 13, 7, 12, 2, 13, 7, 12, 2, 13, 7], 10])
if N == 5: check('variant packet 5', solve(*[[2, 6, -4, 10, 2, 6, -4, 10, 2, 6, -4, 10, 2, 6, -4, 10, 2, 6, -4, 10, 2, 6, -4, 10], 0, 8]), [[1, 1, 13, 7, 12, 2, 13, 7, 12, 2, 13, 7, 12, 2, 13, 7, 12, 2, 13, 7, 12, 2, 13, 7], 10])
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, 1, 13, 7], 10][[1, 1, 13, 7], 10]Passed
oracle 2[[2, 0, 8], 10][[2, 0, 8], 10]Passed
oracle 3[[10, 10, 5], 1][[10, 10, 5], 1]Passed
oracle 4[[], 4][[], 4]Passed
oracle 5[[0, 8, 0, 0], 4][[0, 8, 0, 0], 4]Passed
oracle 6[[4, 3, 4], 25][[4, 3, 4], 25]Passed
oracle 7[[5, 15, 7], 6][[5, 15, 7], 6]Passed
variant packet 1[[1, 1, 13, 7, 12, 2, 13, 7], 10][[1, 1, 13, 7, 12, 2, 13, 7], 10]Passed

SHA-256 / 534d9e881616e3a48d8bf1858d3373a1afd0e6587667e3ba78af3402ed89fa60

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

Case digest / 89bf27abcaa40356be564634f61a6512c71f26bb3a69917f312b8cc7ded3521a