FAILURE MAP
← Case archive

FA-49426 / PCM sample encoding / Open access

Pcm sparse impulses: last sample bound · case 01

Final in-range impulse is excluded.

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

ROOT CAUSE

Final in-range impulse is excluded.

VERIFIED REPAIR

Use the stated conversion contract at last sample bound.

Unsuccessful approach: Excluding position zero loses the first audible sample.

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<max(0,length-1):
            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, 128][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[128][129]Failed
variant packet 1[130, 128, 128, 129, 128][130, 128, 128, 129, 128]Passed

SHA-256 / 752cb487d24271e575c1ae1067ef6606d3c9483824b80ede3ceca3ab35b90527

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
    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[128, 128, 128, 129][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[0, 0, 0][2, 0, 0]Failed
oracle 6[][]Passed
oracle 7[128][129]Failed
variant packet 1[128, 128, 128, 129, 128][130, 128, 128, 129, 128]Failed

SHA-256 / 25ba6b07f498b9487e3227f01d68e165fd400c18e18a1a52d72a99f1857e0022

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

Case digest / cb4a97a672d8e09e7047529688849e0b21d669e6de2f07ce89c52bc373943465