FAILURE MAP
← Case archive

FA-49211 / PCM sample encoding / Open access

Pcm payload valid prefix: payload prefix · case 01

Valid samples are taken from the slot tail instead of its prefix.

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

ROOT CAUSE

Valid samples are taken from the slot tail instead of its prefix.

VERIFIED REPAIR

Use the stated conversion contract at payload prefix.

Unsuccessful approach: Returning the whole slot leaks pad samples into the audio stream.

Case contract

Decode a stipulated fixed-capacity PCM slot whose declared valid prefix is clamped to physical storage; verify zero padding only inside the slot.

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, capacity):
    out=[]
    for declared,payload in packets:
        used=min(max(declared,0),capacity,len(payload))
        data=list(payload[-used:])
        tail=list(payload[used:capacity])
        canonical=all(x==0 for x in tail)
        out.append([data,used,canonical])
    return out
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('oracle 1', solve(*([[2, [1, 2, 0, 0]], [2, [1, 2, 0, 9]]], 4)), [[[1, 2], 2, True], [[1, 2], 2, False]])
check('oracle 2', solve(*([[0, [0, 0]], [-1, [3, 4]]], 2)), [[[], 0, True], [[], 0, False]])
check('oracle 3', solve(*([[5, [1, 2]]], 4)), [[[1, 2], 2, True]])
check('oracle 4', solve(*([[2, [1, 2, 0, 9]]], 3)), [[[1, 2], 2, True]])
check('oracle 5', solve(*([], 4)), [])
check('oracle 6', solve(*([[2, [1, 2]]], 2)), [[[1, 2], 2, True]])
check('oracle 7', solve(*([[8, [1, 2, 3, 4]]], 3)), [[[1, 2, 3], 3, True]])
if N == 1: check('variant packet 1', solve(*[[[2, [1, 2, 0, 0]], [2, [1, 2, 0, 9]], [2, [1, 2, 0, 0]], [2, [1, 2, 0, 9]]], 4]), [[[1, 2], 2, True], [[1, 2], 2, False], [[1, 2], 2, True], [[1, 2], 2, False]])
if N == 2: check('variant packet 2', solve(*[[[2, [1, 2, 0, 0]], [2, [1, 2, 0, 9]], [2, [1, 2, 0, 0]], [2, [1, 2, 0, 9]], [2, [1, 2, 0, 0]], [2, [1, 2, 0, 9]]], 4]), [[[1, 2], 2, True], [[1, 2], 2, False], [[1, 2], 2, True], [[1, 2], 2, False], [[1, 2], 2, True], [[1, 2], 2, False]])
if N == 3: check('variant packet 3', solve(*[[[2, [1, 2, 0, 0]], [2, [1, 2, 0, 9]], [2, [1, 2, 0, 0]], [2, [1, 2, 0, 9]], [2, [1, 2, 0, 0]], [2, [1, 2, 0, 9]], [2, [1, 2, 0, 0]], [2, [1, 2, 0, 9]]], 4]), [[[1, 2], 2, True], [[1, 2], 2, False], [[1, 2], 2, True], [[1, 2], 2, False], [[1, 2], 2, True], [[1, 2], 2, False], [[1, 2], 2, True], [[1, 2], 2, False]])
if N == 4: check('variant packet 4', solve(*[[[2, [1, 2, 0, 0]], [2, [1, 2, 0, 9]], [2, [1, 2, 0, 0]], [2, [1, 2, 0, 9]], [2, [1, 2, 0, 0]], [2, [1, 2, 0, 9]], [2, [1, 2, 0, 0]], [2, [1, 2, 0, 9]], [2, [1, 2, 0, 0]], [2, [1, 2, 0, 9]]], 4]), [[[1, 2], 2, True], [[1, 2], 2, False], [[1, 2], 2, True], [[1, 2], 2, False], [[1, 2], 2, True], [[1, 2], 2, False], [[1, 2], 2, True], [[1, 2], 2, False], [[1, 2], 2, True], [[1, 2], 2, False]])
if N == 5: check('variant packet 5', solve(*[[[2, [1, 2, 0, 0]], [2, [1, 2, 0, 9]], [2, [1, 2, 0, 0]], [2, [1, 2, 0, 9]], [2, [1, 2, 0, 0]], [2, [1, 2, 0, 9]], [2, [1, 2, 0, 0]], [2, [1, 2, 0, 9]], [2, [1, 2, 0, 0]], [2, [1, 2, 0, 9]], [2, [1, 2, 0, 0]], [2, [1, 2, 0, 9]]], 4]), [[[1, 2], 2, True], [[1, 2], 2, False], [[1, 2], 2, True], [[1, 2], 2, False], [[1, 2], 2, True], [[1, 2], 2, False], [[1, 2], 2, True], [[1, 2], 2, False], [[1, 2], 2, True], [[1, 2], 2, False], [[1, 2], 2, True], [[1, 2], 2, False]])
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[[[0, 0], 2, True], [[0, 9], 2, False]][[[1, 2], 2, True], [[1, 2], 2, False]]Failed
oracle 2[[[0, 0], 0, True], [[3, 4], 0, False]][[[], 0, True], [[], 0, False]]Failed
oracle 3[[[1, 2], 2, True]][[[1, 2], 2, True]]Passed
oracle 4[[[0, 9], 2, True]][[[1, 2], 2, True]]Failed
oracle 5[][]Passed
oracle 6[[[1, 2], 2, True]][[[1, 2], 2, True]]Passed
oracle 7[[[2, 3, 4], 3, True]][[[1, 2, 3], 3, True]]Failed
variant packet 1[[[0, 0], 2, True], [[0, 9], 2, False], [[0, 0], 2, True], [[0, 9], 2, False]][[[1, 2], 2, True], [[1, 2], 2, False], [[1, 2], 2, True], [[1, 2], 2, False]]Failed

SHA-256 / 4138e4bd4410f9e1b6153e000d0541967c6f79abddb7a3418c1e46d1f0a99788

2 / The unsuccessful fix

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

N = 1
observations = []
def solve(packets, capacity):
    out=[]
    for declared,payload in packets:
        used=min(max(declared,0),capacity,len(payload))
        data=list(payload)
        tail=list(payload[used:capacity])
        canonical=all(x==0 for x in tail)
        out.append([data,used,canonical])
    return out
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('oracle 1', solve(*([[2, [1, 2, 0, 0]], [2, [1, 2, 0, 9]]], 4)), [[[1, 2], 2, True], [[1, 2], 2, False]])
check('oracle 2', solve(*([[0, [0, 0]], [-1, [3, 4]]], 2)), [[[], 0, True], [[], 0, False]])
check('oracle 3', solve(*([[5, [1, 2]]], 4)), [[[1, 2], 2, True]])
check('oracle 4', solve(*([[2, [1, 2, 0, 9]]], 3)), [[[1, 2], 2, True]])
check('oracle 5', solve(*([], 4)), [])
check('oracle 6', solve(*([[2, [1, 2]]], 2)), [[[1, 2], 2, True]])
check('oracle 7', solve(*([[8, [1, 2, 3, 4]]], 3)), [[[1, 2, 3], 3, True]])
if N == 1: check('variant packet 1', solve(*[[[2, [1, 2, 0, 0]], [2, [1, 2, 0, 9]], [2, [1, 2, 0, 0]], [2, [1, 2, 0, 9]]], 4]), [[[1, 2], 2, True], [[1, 2], 2, False], [[1, 2], 2, True], [[1, 2], 2, False]])
if N == 2: check('variant packet 2', solve(*[[[2, [1, 2, 0, 0]], [2, [1, 2, 0, 9]], [2, [1, 2, 0, 0]], [2, [1, 2, 0, 9]], [2, [1, 2, 0, 0]], [2, [1, 2, 0, 9]]], 4]), [[[1, 2], 2, True], [[1, 2], 2, False], [[1, 2], 2, True], [[1, 2], 2, False], [[1, 2], 2, True], [[1, 2], 2, False]])
if N == 3: check('variant packet 3', solve(*[[[2, [1, 2, 0, 0]], [2, [1, 2, 0, 9]], [2, [1, 2, 0, 0]], [2, [1, 2, 0, 9]], [2, [1, 2, 0, 0]], [2, [1, 2, 0, 9]], [2, [1, 2, 0, 0]], [2, [1, 2, 0, 9]]], 4]), [[[1, 2], 2, True], [[1, 2], 2, False], [[1, 2], 2, True], [[1, 2], 2, False], [[1, 2], 2, True], [[1, 2], 2, False], [[1, 2], 2, True], [[1, 2], 2, False]])
if N == 4: check('variant packet 4', solve(*[[[2, [1, 2, 0, 0]], [2, [1, 2, 0, 9]], [2, [1, 2, 0, 0]], [2, [1, 2, 0, 9]], [2, [1, 2, 0, 0]], [2, [1, 2, 0, 9]], [2, [1, 2, 0, 0]], [2, [1, 2, 0, 9]], [2, [1, 2, 0, 0]], [2, [1, 2, 0, 9]]], 4]), [[[1, 2], 2, True], [[1, 2], 2, False], [[1, 2], 2, True], [[1, 2], 2, False], [[1, 2], 2, True], [[1, 2], 2, False], [[1, 2], 2, True], [[1, 2], 2, False], [[1, 2], 2, True], [[1, 2], 2, False]])
if N == 5: check('variant packet 5', solve(*[[[2, [1, 2, 0, 0]], [2, [1, 2, 0, 9]], [2, [1, 2, 0, 0]], [2, [1, 2, 0, 9]], [2, [1, 2, 0, 0]], [2, [1, 2, 0, 9]], [2, [1, 2, 0, 0]], [2, [1, 2, 0, 9]], [2, [1, 2, 0, 0]], [2, [1, 2, 0, 9]], [2, [1, 2, 0, 0]], [2, [1, 2, 0, 9]]], 4]), [[[1, 2], 2, True], [[1, 2], 2, False], [[1, 2], 2, True], [[1, 2], 2, False], [[1, 2], 2, True], [[1, 2], 2, False], [[1, 2], 2, True], [[1, 2], 2, False], [[1, 2], 2, True], [[1, 2], 2, False], [[1, 2], 2, True], [[1, 2], 2, False]])
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, 0, 0], 2, True], [[1, 2, 0, 9], 2, False]][[[1, 2], 2, True], [[1, 2], 2, False]]Failed
oracle 2[[[0, 0], 0, True], [[3, 4], 0, False]][[[], 0, True], [[], 0, False]]Failed
oracle 3[[[1, 2], 2, True]][[[1, 2], 2, True]]Passed
oracle 4[[[1, 2, 0, 9], 2, True]][[[1, 2], 2, True]]Failed
oracle 5[][]Passed
oracle 6[[[1, 2], 2, True]][[[1, 2], 2, True]]Passed
oracle 7[[[1, 2, 3, 4], 3, True]][[[1, 2, 3], 3, True]]Failed
variant packet 1[[[1, 2, 0, 0], 2, True], [[1, 2, 0, 9], 2, False], [[1, 2, 0, 0], 2, True], [[1, 2, 0, 9], 2, False]][[[1, 2], 2, True], [[1, 2], 2, False], [[1, 2], 2, True], [[1, 2], 2, False]]Failed

SHA-256 / e0c1be0387a48013077afa4799930289aec8c2fc4aa59f5cccce19f64757508b

3 / The verified repair

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

N = 1
observations = []
def solve(packets, capacity):
    out=[]
    for declared,payload in packets:
        used=min(max(declared,0),capacity,len(payload))
        data=list(payload[:used])
        tail=list(payload[used:capacity])
        canonical=all(x==0 for x in tail)
        out.append([data,used,canonical])
    return out
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('oracle 1', solve(*([[2, [1, 2, 0, 0]], [2, [1, 2, 0, 9]]], 4)), [[[1, 2], 2, True], [[1, 2], 2, False]])
check('oracle 2', solve(*([[0, [0, 0]], [-1, [3, 4]]], 2)), [[[], 0, True], [[], 0, False]])
check('oracle 3', solve(*([[5, [1, 2]]], 4)), [[[1, 2], 2, True]])
check('oracle 4', solve(*([[2, [1, 2, 0, 9]]], 3)), [[[1, 2], 2, True]])
check('oracle 5', solve(*([], 4)), [])
check('oracle 6', solve(*([[2, [1, 2]]], 2)), [[[1, 2], 2, True]])
check('oracle 7', solve(*([[8, [1, 2, 3, 4]]], 3)), [[[1, 2, 3], 3, True]])
if N == 1: check('variant packet 1', solve(*[[[2, [1, 2, 0, 0]], [2, [1, 2, 0, 9]], [2, [1, 2, 0, 0]], [2, [1, 2, 0, 9]]], 4]), [[[1, 2], 2, True], [[1, 2], 2, False], [[1, 2], 2, True], [[1, 2], 2, False]])
if N == 2: check('variant packet 2', solve(*[[[2, [1, 2, 0, 0]], [2, [1, 2, 0, 9]], [2, [1, 2, 0, 0]], [2, [1, 2, 0, 9]], [2, [1, 2, 0, 0]], [2, [1, 2, 0, 9]]], 4]), [[[1, 2], 2, True], [[1, 2], 2, False], [[1, 2], 2, True], [[1, 2], 2, False], [[1, 2], 2, True], [[1, 2], 2, False]])
if N == 3: check('variant packet 3', solve(*[[[2, [1, 2, 0, 0]], [2, [1, 2, 0, 9]], [2, [1, 2, 0, 0]], [2, [1, 2, 0, 9]], [2, [1, 2, 0, 0]], [2, [1, 2, 0, 9]], [2, [1, 2, 0, 0]], [2, [1, 2, 0, 9]]], 4]), [[[1, 2], 2, True], [[1, 2], 2, False], [[1, 2], 2, True], [[1, 2], 2, False], [[1, 2], 2, True], [[1, 2], 2, False], [[1, 2], 2, True], [[1, 2], 2, False]])
if N == 4: check('variant packet 4', solve(*[[[2, [1, 2, 0, 0]], [2, [1, 2, 0, 9]], [2, [1, 2, 0, 0]], [2, [1, 2, 0, 9]], [2, [1, 2, 0, 0]], [2, [1, 2, 0, 9]], [2, [1, 2, 0, 0]], [2, [1, 2, 0, 9]], [2, [1, 2, 0, 0]], [2, [1, 2, 0, 9]]], 4]), [[[1, 2], 2, True], [[1, 2], 2, False], [[1, 2], 2, True], [[1, 2], 2, False], [[1, 2], 2, True], [[1, 2], 2, False], [[1, 2], 2, True], [[1, 2], 2, False], [[1, 2], 2, True], [[1, 2], 2, False]])
if N == 5: check('variant packet 5', solve(*[[[2, [1, 2, 0, 0]], [2, [1, 2, 0, 9]], [2, [1, 2, 0, 0]], [2, [1, 2, 0, 9]], [2, [1, 2, 0, 0]], [2, [1, 2, 0, 9]], [2, [1, 2, 0, 0]], [2, [1, 2, 0, 9]], [2, [1, 2, 0, 0]], [2, [1, 2, 0, 9]], [2, [1, 2, 0, 0]], [2, [1, 2, 0, 9]]], 4]), [[[1, 2], 2, True], [[1, 2], 2, False], [[1, 2], 2, True], [[1, 2], 2, False], [[1, 2], 2, True], [[1, 2], 2, False], [[1, 2], 2, True], [[1, 2], 2, False], [[1, 2], 2, True], [[1, 2], 2, False], [[1, 2], 2, True], [[1, 2], 2, False]])
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], 2, True], [[1, 2], 2, False]][[[1, 2], 2, True], [[1, 2], 2, False]]Passed
oracle 2[[[], 0, True], [[], 0, False]][[[], 0, True], [[], 0, False]]Passed
oracle 3[[[1, 2], 2, True]][[[1, 2], 2, True]]Passed
oracle 4[[[1, 2], 2, True]][[[1, 2], 2, True]]Passed
oracle 5[][]Passed
oracle 6[[[1, 2], 2, True]][[[1, 2], 2, True]]Passed
oracle 7[[[1, 2, 3], 3, True]][[[1, 2, 3], 3, True]]Passed
variant packet 1[[[1, 2], 2, True], [[1, 2], 2, False], [[1, 2], 2, True], [[1, 2], 2, False]][[[1, 2], 2, True], [[1, 2], 2, False], [[1, 2], 2, True], [[1, 2], 2, False]]Passed

SHA-256 / 58fac89e06d805610ff0dd7a0d75f794020bb267c8750356b573c3625563e5be

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

Case digest / de5957e8ace3ec2ba204c322177620bb0c4f9bde081a41a4b939164c91c4eca5