FAILURE MAP
← Case archive

FA-49231 / PCM sample encoding / Open access

Pcm delta reconstruction: reconstructed output · case 01

Residual codes are returned instead of reconstructed amplitudes.

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

ROOT CAUSE

Residual codes are returned instead of reconstructed amplitudes.

VERIFIED REPAIR

Use the stated conversion contract at reconstructed output.

Unsuccessful approach: Emitting the pre-update predictor delays the waveform one sample.

Case contract

Reconstruct bounded delta-coded PCM from a seed and explicit sample-index resets before residual application, returning the continuation predictor.

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(deltas, initial, reset_positions):
    previous=initial
    out=[]
    for i,delta in enumerate(deltas):
        if i in reset_positions:
            previous=initial
        previous+=delta
        out.append(delta)
    return [out,previous]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('oracle 1', solve(*([2, -1, 3], 10, [])), [[12, 11, 14], 14])
check('oracle 2', solve(*([1, 2, 3, 4], 5, [2])), [[6, 8, 8, 12], 12])
check('oracle 3', solve(*([], 7, [])), [[], 7])
check('oracle 4', solve(*([0, 0], -3, [0])), [[-3, -3], -3])
check('oracle 5', solve(*([-2, 4, -1], 0, [1])), [[-2, 4, 3], 3])
check('oracle 6', solve(*([3], 2, [])), [[5], 5])
check('oracle 7', solve(*([1, 1, 1], 1, [0, 1, 2])), [[2, 2, 2], 2])
if N == 1: check('variant packet 1', solve(*[[2, -1, 3, 2, -1, 3], 10, []]), [[12, 11, 14, 16, 15, 18], 18])
if N == 2: check('variant packet 2', solve(*[[2, -1, 3, 2, -1, 3, 2, -1, 3], 10, []]), [[12, 11, 14, 16, 15, 18, 20, 19, 22], 22])
if N == 3: check('variant packet 3', solve(*[[2, -1, 3, 2, -1, 3, 2, -1, 3, 2, -1, 3], 10, []]), [[12, 11, 14, 16, 15, 18, 20, 19, 22, 24, 23, 26], 26])
if N == 4: check('variant packet 4', solve(*[[2, -1, 3, 2, -1, 3, 2, -1, 3, 2, -1, 3, 2, -1, 3], 10, []]), [[12, 11, 14, 16, 15, 18, 20, 19, 22, 24, 23, 26, 28, 27, 30], 30])
if N == 5: check('variant packet 5', solve(*[[2, -1, 3, 2, -1, 3, 2, -1, 3, 2, -1, 3, 2, -1, 3, 2, -1, 3], 10, []]), [[12, 11, 14, 16, 15, 18, 20, 19, 22, 24, 23, 26, 28, 27, 30, 32, 31, 34], 34])
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[[2, -1, 3], 14][[12, 11, 14], 14]Failed
oracle 2[[1, 2, 3, 4], 12][[6, 8, 8, 12], 12]Failed
oracle 3[[], 7][[], 7]Passed
oracle 4[[0, 0], -3][[-3, -3], -3]Failed
oracle 5[[-2, 4, -1], 3][[-2, 4, 3], 3]Failed
oracle 6[[3], 5][[5], 5]Failed
oracle 7[[1, 1, 1], 2][[2, 2, 2], 2]Failed
variant packet 1[[2, -1, 3, 2, -1, 3], 18][[12, 11, 14, 16, 15, 18], 18]Failed

SHA-256 / 1ae86efaa0f8b7dbb09873745855545583c2d3d154536755fb4a0575dba885d7

2 / The unsuccessful fix

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

N = 1
observations = []
def solve(deltas, initial, reset_positions):
    previous=initial
    out=[]
    for i,delta in enumerate(deltas):
        if i in reset_positions:
            previous=initial
        previous+=delta
        out.append(previous-delta)
    return [out,previous]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('oracle 1', solve(*([2, -1, 3], 10, [])), [[12, 11, 14], 14])
check('oracle 2', solve(*([1, 2, 3, 4], 5, [2])), [[6, 8, 8, 12], 12])
check('oracle 3', solve(*([], 7, [])), [[], 7])
check('oracle 4', solve(*([0, 0], -3, [0])), [[-3, -3], -3])
check('oracle 5', solve(*([-2, 4, -1], 0, [1])), [[-2, 4, 3], 3])
check('oracle 6', solve(*([3], 2, [])), [[5], 5])
check('oracle 7', solve(*([1, 1, 1], 1, [0, 1, 2])), [[2, 2, 2], 2])
if N == 1: check('variant packet 1', solve(*[[2, -1, 3, 2, -1, 3], 10, []]), [[12, 11, 14, 16, 15, 18], 18])
if N == 2: check('variant packet 2', solve(*[[2, -1, 3, 2, -1, 3, 2, -1, 3], 10, []]), [[12, 11, 14, 16, 15, 18, 20, 19, 22], 22])
if N == 3: check('variant packet 3', solve(*[[2, -1, 3, 2, -1, 3, 2, -1, 3, 2, -1, 3], 10, []]), [[12, 11, 14, 16, 15, 18, 20, 19, 22, 24, 23, 26], 26])
if N == 4: check('variant packet 4', solve(*[[2, -1, 3, 2, -1, 3, 2, -1, 3, 2, -1, 3, 2, -1, 3], 10, []]), [[12, 11, 14, 16, 15, 18, 20, 19, 22, 24, 23, 26, 28, 27, 30], 30])
if N == 5: check('variant packet 5', solve(*[[2, -1, 3, 2, -1, 3, 2, -1, 3, 2, -1, 3, 2, -1, 3, 2, -1, 3], 10, []]), [[12, 11, 14, 16, 15, 18, 20, 19, 22, 24, 23, 26, 28, 27, 30, 32, 31, 34], 34])
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[[10, 12, 11], 14][[12, 11, 14], 14]Failed
oracle 2[[5, 6, 5, 8], 12][[6, 8, 8, 12], 12]Failed
oracle 3[[], 7][[], 7]Passed
oracle 4[[-3, -3], -3][[-3, -3], -3]Passed
oracle 5[[0, 0, 4], 3][[-2, 4, 3], 3]Failed
oracle 6[[2], 5][[5], 5]Failed
oracle 7[[1, 1, 1], 2][[2, 2, 2], 2]Failed
variant packet 1[[10, 12, 11, 14, 16, 15], 18][[12, 11, 14, 16, 15, 18], 18]Failed

SHA-256 / 2490fc2b3a2fb6c4d4797bb311e68e1f974b986790fc6fa6f652d848ecdb8eed

3 / The verified repair

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

N = 1
observations = []
def solve(deltas, initial, reset_positions):
    previous=initial
    out=[]
    for i,delta in enumerate(deltas):
        if i in reset_positions:
            previous=initial
        previous+=delta
        out.append(previous)
    return [out,previous]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('oracle 1', solve(*([2, -1, 3], 10, [])), [[12, 11, 14], 14])
check('oracle 2', solve(*([1, 2, 3, 4], 5, [2])), [[6, 8, 8, 12], 12])
check('oracle 3', solve(*([], 7, [])), [[], 7])
check('oracle 4', solve(*([0, 0], -3, [0])), [[-3, -3], -3])
check('oracle 5', solve(*([-2, 4, -1], 0, [1])), [[-2, 4, 3], 3])
check('oracle 6', solve(*([3], 2, [])), [[5], 5])
check('oracle 7', solve(*([1, 1, 1], 1, [0, 1, 2])), [[2, 2, 2], 2])
if N == 1: check('variant packet 1', solve(*[[2, -1, 3, 2, -1, 3], 10, []]), [[12, 11, 14, 16, 15, 18], 18])
if N == 2: check('variant packet 2', solve(*[[2, -1, 3, 2, -1, 3, 2, -1, 3], 10, []]), [[12, 11, 14, 16, 15, 18, 20, 19, 22], 22])
if N == 3: check('variant packet 3', solve(*[[2, -1, 3, 2, -1, 3, 2, -1, 3, 2, -1, 3], 10, []]), [[12, 11, 14, 16, 15, 18, 20, 19, 22, 24, 23, 26], 26])
if N == 4: check('variant packet 4', solve(*[[2, -1, 3, 2, -1, 3, 2, -1, 3, 2, -1, 3, 2, -1, 3], 10, []]), [[12, 11, 14, 16, 15, 18, 20, 19, 22, 24, 23, 26, 28, 27, 30], 30])
if N == 5: check('variant packet 5', solve(*[[2, -1, 3, 2, -1, 3, 2, -1, 3, 2, -1, 3, 2, -1, 3, 2, -1, 3], 10, []]), [[12, 11, 14, 16, 15, 18, 20, 19, 22, 24, 23, 26, 28, 27, 30, 32, 31, 34], 34])
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[[12, 11, 14], 14][[12, 11, 14], 14]Passed
oracle 2[[6, 8, 8, 12], 12][[6, 8, 8, 12], 12]Passed
oracle 3[[], 7][[], 7]Passed
oracle 4[[-3, -3], -3][[-3, -3], -3]Passed
oracle 5[[-2, 4, 3], 3][[-2, 4, 3], 3]Passed
oracle 6[[5], 5][[5], 5]Passed
oracle 7[[2, 2, 2], 2][[2, 2, 2], 2]Passed
variant packet 1[[12, 11, 14, 16, 15, 18], 18][[12, 11, 14, 16, 15, 18], 18]Passed

SHA-256 / 7a2542fc018856e5d2479ea2204d465ae6c94048c48d0793d6c34727392a72b4

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

Case digest / 79b2539494a2ce167c8088bad824f561dbd81dfd13565eaeea1f67dbf0961f08