FAILURE MAP
← Case archive

FA-49436 / PCM sample encoding / Open access

Pcm sparse impulses: sample amplitude · case 01

Absolute PCM event values are interpreted as offsets from silence.

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

ROOT CAUSE

Absolute PCM event values are interpreted as offsets from silence.

VERIFIED REPAIR

Use the stated conversion contract at sample amplitude.

Unsuccessful approach: Subtracting silence applies an unrequested recentering conversion.

Case contract

Reconstruct a sparse PCM packet into a fixed sample span using explicit silence, ignore out-of-range events and apply duplicate positions in arrival order.

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(events, length, zero):
    out=[zero]*length
    for index,value in events:
        if 0<=index<length:
            out[index]=value+zero
    return out
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('oracle 1', solve(*([[0, 130], [3, 129]], 4, 128)), [130, 128, 128, 129])
check('oracle 2', solve(*([[1, 5], [1, 7]], 3, 0)), [0, 7, 0])
check('oracle 3', solve(*([[-1, 3], [1, 4]], 3, 0)), [0, 4, 0])
check('oracle 4', solve(*([], 3, 128)), [128, 128, 128])
check('oracle 5', solve(*([[3, 7], [0, 2]], 3, 0)), [2, 0, 0])
check('oracle 6', solve(*([], 0, 128)), [])
check('oracle 7', solve(*([[0, 128], [0, 129]], 1, 128)), [129])
if N == 1: check('variant packet 1', solve(*[[[0, 130], [3, 129], [0, 130], [3, 129]], 5, 128]), [130, 128, 128, 129, 128])
if N == 2: check('variant packet 2', solve(*[[[0, 130], [3, 129], [0, 130], [3, 129], [0, 130], [3, 129]], 6, 128]), [130, 128, 128, 129, 128, 128])
if N == 3: check('variant packet 3', solve(*[[[0, 130], [3, 129], [0, 130], [3, 129], [0, 130], [3, 129], [0, 130], [3, 129]], 7, 128]), [130, 128, 128, 129, 128, 128, 128])
if N == 4: check('variant packet 4', solve(*[[[0, 130], [3, 129], [0, 130], [3, 129], [0, 130], [3, 129], [0, 130], [3, 129], [0, 130], [3, 129]], 8, 128]), [130, 128, 128, 129, 128, 128, 128, 128])
if N == 5: check('variant packet 5', solve(*[[[0, 130], [3, 129], [0, 130], [3, 129], [0, 130], [3, 129], [0, 130], [3, 129], [0, 130], [3, 129], [0, 130], [3, 129]], 9, 128]), [130, 128, 128, 129, 128, 128, 128, 128, 128])
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[258, 128, 128, 257][130, 128, 128, 129]Failed
oracle 2[0, 7, 0][0, 7, 0]Passed
oracle 3[0, 4, 0][0, 4, 0]Passed
oracle 4[128, 128, 128][128, 128, 128]Passed
oracle 5[2, 0, 0][2, 0, 0]Passed
oracle 6[][]Passed
oracle 7[257][129]Failed
variant packet 1[258, 128, 128, 257, 128][130, 128, 128, 129, 128]Failed

SHA-256 / fa22b20ba8f99dbe8fc089bbfc9e6563bb5bf4423f19d3ffe52e38c1ca42e3d2

2 / The unsuccessful fix

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

N = 1
observations = []
def solve(events, length, zero):
    out=[zero]*length
    for index,value in events:
        if 0<=index<length:
            out[index]=value-zero
    return out
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('oracle 1', solve(*([[0, 130], [3, 129]], 4, 128)), [130, 128, 128, 129])
check('oracle 2', solve(*([[1, 5], [1, 7]], 3, 0)), [0, 7, 0])
check('oracle 3', solve(*([[-1, 3], [1, 4]], 3, 0)), [0, 4, 0])
check('oracle 4', solve(*([], 3, 128)), [128, 128, 128])
check('oracle 5', solve(*([[3, 7], [0, 2]], 3, 0)), [2, 0, 0])
check('oracle 6', solve(*([], 0, 128)), [])
check('oracle 7', solve(*([[0, 128], [0, 129]], 1, 128)), [129])
if N == 1: check('variant packet 1', solve(*[[[0, 130], [3, 129], [0, 130], [3, 129]], 5, 128]), [130, 128, 128, 129, 128])
if N == 2: check('variant packet 2', solve(*[[[0, 130], [3, 129], [0, 130], [3, 129], [0, 130], [3, 129]], 6, 128]), [130, 128, 128, 129, 128, 128])
if N == 3: check('variant packet 3', solve(*[[[0, 130], [3, 129], [0, 130], [3, 129], [0, 130], [3, 129], [0, 130], [3, 129]], 7, 128]), [130, 128, 128, 129, 128, 128, 128])
if N == 4: check('variant packet 4', solve(*[[[0, 130], [3, 129], [0, 130], [3, 129], [0, 130], [3, 129], [0, 130], [3, 129], [0, 130], [3, 129]], 8, 128]), [130, 128, 128, 129, 128, 128, 128, 128])
if N == 5: check('variant packet 5', solve(*[[[0, 130], [3, 129], [0, 130], [3, 129], [0, 130], [3, 129], [0, 130], [3, 129], [0, 130], [3, 129], [0, 130], [3, 129]], 9, 128]), [130, 128, 128, 129, 128, 128, 128, 128, 128])
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, 128, 128, 1][130, 128, 128, 129]Failed
oracle 2[0, 7, 0][0, 7, 0]Passed
oracle 3[0, 4, 0][0, 4, 0]Passed
oracle 4[128, 128, 128][128, 128, 128]Passed
oracle 5[2, 0, 0][2, 0, 0]Passed
oracle 6[][]Passed
oracle 7[1][129]Failed
variant packet 1[2, 128, 128, 1, 128][130, 128, 128, 129, 128]Failed

SHA-256 / a5ebeebd7ddcbbbe77fcb2bd5637721119c3a064de59a20a8dfadedd11e74ea5

3 / The verified repair

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

N = 1
observations = []
def solve(events, length, zero):
    out=[zero]*length
    for index,value in events:
        if 0<=index<length:
            out[index]=value
    return out
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('oracle 1', solve(*([[0, 130], [3, 129]], 4, 128)), [130, 128, 128, 129])
check('oracle 2', solve(*([[1, 5], [1, 7]], 3, 0)), [0, 7, 0])
check('oracle 3', solve(*([[-1, 3], [1, 4]], 3, 0)), [0, 4, 0])
check('oracle 4', solve(*([], 3, 128)), [128, 128, 128])
check('oracle 5', solve(*([[3, 7], [0, 2]], 3, 0)), [2, 0, 0])
check('oracle 6', solve(*([], 0, 128)), [])
check('oracle 7', solve(*([[0, 128], [0, 129]], 1, 128)), [129])
if N == 1: check('variant packet 1', solve(*[[[0, 130], [3, 129], [0, 130], [3, 129]], 5, 128]), [130, 128, 128, 129, 128])
if N == 2: check('variant packet 2', solve(*[[[0, 130], [3, 129], [0, 130], [3, 129], [0, 130], [3, 129]], 6, 128]), [130, 128, 128, 129, 128, 128])
if N == 3: check('variant packet 3', solve(*[[[0, 130], [3, 129], [0, 130], [3, 129], [0, 130], [3, 129], [0, 130], [3, 129]], 7, 128]), [130, 128, 128, 129, 128, 128, 128])
if N == 4: check('variant packet 4', solve(*[[[0, 130], [3, 129], [0, 130], [3, 129], [0, 130], [3, 129], [0, 130], [3, 129], [0, 130], [3, 129]], 8, 128]), [130, 128, 128, 129, 128, 128, 128, 128])
if N == 5: check('variant packet 5', solve(*[[[0, 130], [3, 129], [0, 130], [3, 129], [0, 130], [3, 129], [0, 130], [3, 129], [0, 130], [3, 129], [0, 130], [3, 129]], 9, 128]), [130, 128, 128, 129, 128, 128, 128, 128, 128])
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[130, 128, 128, 129][130, 128, 128, 129]Passed
oracle 2[0, 7, 0][0, 7, 0]Passed
oracle 3[0, 4, 0][0, 4, 0]Passed
oracle 4[128, 128, 128][128, 128, 128]Passed
oracle 5[2, 0, 0][2, 0, 0]Passed
oracle 6[][]Passed
oracle 7[129][129]Passed
variant packet 1[130, 128, 128, 129, 128][130, 128, 128, 129, 128]Passed

SHA-256 / d4d329f9b7f97e81ef35b06cea7cef9c1050f94f1d687a1bc126e5f206eaf9b3

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

Case digest / cf7311deaaebcb477cbcfa6bd8ff90a60df4839d38796ac7614985252e95218d