FAILURE MAP
← Case archive

FA-50331 / PCM sample encoding / Open access

Pcm adaptive channel blocks: tail position · case 01

Unconsumed channel tails are replaced by consumed prefixes.

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

ROOT CAUSE

Unconsumed channel tails are replaced by consumed prefixes.

VERIFIED REPAIR

Use the stated conversion contract at tail position.

Unsuccessful approach: Dropping a remainder sample loses data needed by the next block.

Case contract

Assemble independently decoded adaptive PCM channel blocks into complete frames, returning per-channel unconsumed tails; require exact channel descriptors.

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(blocks, channels):
    out=[]
    for lane_chunks in blocks:
        if len(lane_chunks)!=channels:
            out.append(None)
            continue
        counts=[len(x) for x in lane_chunks]
        complete=min(counts) if counts else 0
        frames=[[(lane_chunks[c][i] if c<len(lane_chunks) and i<len(lane_chunks[c]) else None) for c in range(channels)] for i in range(complete)]
        tails=[list(x[:complete]) for x in lane_chunks]
        out.append([frames,tails])
    return out
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('oracle 1', solve(*([[[1, 2, 3], [4, 5]]], 2)), [[[[1, 4], [2, 5]], [[3], []]]])
check('oracle 2', solve(*([[[1], [2], [3]], [[1, 2]]], 2)), [None, None])
check('oracle 3', solve(*([[[1, 2], [3, 4]]], 2)), [[[[1, 3], [2, 4]], [[], []]]])
check('oracle 4', solve(*([], 2)), [])
check('oracle 5', solve(*([[[], []]], 2)), [[[], [[], []]]])
check('oracle 6', solve(*([[[1, 2, 3]]], 1)), [[[[1], [2], [3]], [[]]]])
check('oracle 7', solve(*([[[]]], 1)), [[[], [[]]]])
if N == 1: check('variant packet 1', solve(*[[[[1, 2, 3], [4, 5]], [[1, 2, 3], [4, 5]]], 2]), [[[[1, 4], [2, 5]], [[3], []]], [[[1, 4], [2, 5]], [[3], []]]])
if N == 2: check('variant packet 2', solve(*[[[[1, 2, 3], [4, 5]], [[1, 2, 3], [4, 5]], [[1, 2, 3], [4, 5]]], 2]), [[[[1, 4], [2, 5]], [[3], []]], [[[1, 4], [2, 5]], [[3], []]], [[[1, 4], [2, 5]], [[3], []]]])
if N == 3: check('variant packet 3', solve(*[[[[1, 2, 3], [4, 5]], [[1, 2, 3], [4, 5]], [[1, 2, 3], [4, 5]], [[1, 2, 3], [4, 5]]], 2]), [[[[1, 4], [2, 5]], [[3], []]], [[[1, 4], [2, 5]], [[3], []]], [[[1, 4], [2, 5]], [[3], []]], [[[1, 4], [2, 5]], [[3], []]]])
if N == 4: check('variant packet 4', solve(*[[[[1, 2, 3], [4, 5]], [[1, 2, 3], [4, 5]], [[1, 2, 3], [4, 5]], [[1, 2, 3], [4, 5]], [[1, 2, 3], [4, 5]]], 2]), [[[[1, 4], [2, 5]], [[3], []]], [[[1, 4], [2, 5]], [[3], []]], [[[1, 4], [2, 5]], [[3], []]], [[[1, 4], [2, 5]], [[3], []]], [[[1, 4], [2, 5]], [[3], []]]])
if N == 5: check('variant packet 5', solve(*[[[[1, 2, 3], [4, 5]], [[1, 2, 3], [4, 5]], [[1, 2, 3], [4, 5]], [[1, 2, 3], [4, 5]], [[1, 2, 3], [4, 5]], [[1, 2, 3], [4, 5]]], 2]), [[[[1, 4], [2, 5]], [[3], []]], [[[1, 4], [2, 5]], [[3], []]], [[[1, 4], [2, 5]], [[3], []]], [[[1, 4], [2, 5]], [[3], []]], [[[1, 4], [2, 5]], [[3], []]], [[[1, 4], [2, 5]], [[3], []]]])
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, 4], [2, 5]], [[1, 2], [4, 5]]]][[[[1, 4], [2, 5]], [[3], []]]]Failed
oracle 2[None, None][None, None]Passed
oracle 3[[[[1, 3], [2, 4]], [[1, 2], [3, 4]]]][[[[1, 3], [2, 4]], [[], []]]]Failed
oracle 4[][]Passed
oracle 5[[[], [[], []]]][[[], [[], []]]]Passed
oracle 6[[[[1], [2], [3]], [[1, 2, 3]]]][[[[1], [2], [3]], [[]]]]Failed
oracle 7[[[], [[]]]][[[], [[]]]]Passed
variant packet 1[[[[1, 4], [2, 5]], [[1, 2], [4, 5]]], [[[1, 4], [2, 5]], [[1, 2], [4, 5]]]][[[[1, 4], [2, 5]], [[3], []]], [[[1, 4], [2, 5]], [[3], []]]]Failed

SHA-256 / 0c69299f34efb6512358a1297adbe6190c4391bf6263aa02195152536e3b9f25

2 / The unsuccessful fix

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

N = 1
observations = []
def solve(blocks, channels):
    out=[]
    for lane_chunks in blocks:
        if len(lane_chunks)!=channels:
            out.append(None)
            continue
        counts=[len(x) for x in lane_chunks]
        complete=min(counts) if counts else 0
        frames=[[(lane_chunks[c][i] if c<len(lane_chunks) and i<len(lane_chunks[c]) else None) for c in range(channels)] for i in range(complete)]
        tails=[list(x[complete+1:]) for x in lane_chunks]
        out.append([frames,tails])
    return out
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('oracle 1', solve(*([[[1, 2, 3], [4, 5]]], 2)), [[[[1, 4], [2, 5]], [[3], []]]])
check('oracle 2', solve(*([[[1], [2], [3]], [[1, 2]]], 2)), [None, None])
check('oracle 3', solve(*([[[1, 2], [3, 4]]], 2)), [[[[1, 3], [2, 4]], [[], []]]])
check('oracle 4', solve(*([], 2)), [])
check('oracle 5', solve(*([[[], []]], 2)), [[[], [[], []]]])
check('oracle 6', solve(*([[[1, 2, 3]]], 1)), [[[[1], [2], [3]], [[]]]])
check('oracle 7', solve(*([[[]]], 1)), [[[], [[]]]])
if N == 1: check('variant packet 1', solve(*[[[[1, 2, 3], [4, 5]], [[1, 2, 3], [4, 5]]], 2]), [[[[1, 4], [2, 5]], [[3], []]], [[[1, 4], [2, 5]], [[3], []]]])
if N == 2: check('variant packet 2', solve(*[[[[1, 2, 3], [4, 5]], [[1, 2, 3], [4, 5]], [[1, 2, 3], [4, 5]]], 2]), [[[[1, 4], [2, 5]], [[3], []]], [[[1, 4], [2, 5]], [[3], []]], [[[1, 4], [2, 5]], [[3], []]]])
if N == 3: check('variant packet 3', solve(*[[[[1, 2, 3], [4, 5]], [[1, 2, 3], [4, 5]], [[1, 2, 3], [4, 5]], [[1, 2, 3], [4, 5]]], 2]), [[[[1, 4], [2, 5]], [[3], []]], [[[1, 4], [2, 5]], [[3], []]], [[[1, 4], [2, 5]], [[3], []]], [[[1, 4], [2, 5]], [[3], []]]])
if N == 4: check('variant packet 4', solve(*[[[[1, 2, 3], [4, 5]], [[1, 2, 3], [4, 5]], [[1, 2, 3], [4, 5]], [[1, 2, 3], [4, 5]], [[1, 2, 3], [4, 5]]], 2]), [[[[1, 4], [2, 5]], [[3], []]], [[[1, 4], [2, 5]], [[3], []]], [[[1, 4], [2, 5]], [[3], []]], [[[1, 4], [2, 5]], [[3], []]], [[[1, 4], [2, 5]], [[3], []]]])
if N == 5: check('variant packet 5', solve(*[[[[1, 2, 3], [4, 5]], [[1, 2, 3], [4, 5]], [[1, 2, 3], [4, 5]], [[1, 2, 3], [4, 5]], [[1, 2, 3], [4, 5]], [[1, 2, 3], [4, 5]]], 2]), [[[[1, 4], [2, 5]], [[3], []]], [[[1, 4], [2, 5]], [[3], []]], [[[1, 4], [2, 5]], [[3], []]], [[[1, 4], [2, 5]], [[3], []]], [[[1, 4], [2, 5]], [[3], []]], [[[1, 4], [2, 5]], [[3], []]]])
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, 4], [2, 5]], [[], []]]][[[[1, 4], [2, 5]], [[3], []]]]Failed
oracle 2[None, None][None, None]Passed
oracle 3[[[[1, 3], [2, 4]], [[], []]]][[[[1, 3], [2, 4]], [[], []]]]Passed
oracle 4[][]Passed
oracle 5[[[], [[], []]]][[[], [[], []]]]Passed
oracle 6[[[[1], [2], [3]], [[]]]][[[[1], [2], [3]], [[]]]]Passed
oracle 7[[[], [[]]]][[[], [[]]]]Passed
variant packet 1[[[[1, 4], [2, 5]], [[], []]], [[[1, 4], [2, 5]], [[], []]]][[[[1, 4], [2, 5]], [[3], []]], [[[1, 4], [2, 5]], [[3], []]]]Failed

SHA-256 / a1724dd13fcf4d568c89149a6be08d3d67885c338cd97762618f7854c18b5018

3 / The verified repair

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

N = 1
observations = []
def solve(blocks, channels):
    out=[]
    for lane_chunks in blocks:
        if len(lane_chunks)!=channels:
            out.append(None)
            continue
        counts=[len(x) for x in lane_chunks]
        complete=min(counts) if counts else 0
        frames=[[(lane_chunks[c][i] if c<len(lane_chunks) and i<len(lane_chunks[c]) else None) for c in range(channels)] for i in range(complete)]
        tails=[list(x[complete:]) for x in lane_chunks]
        out.append([frames,tails])
    return out
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('oracle 1', solve(*([[[1, 2, 3], [4, 5]]], 2)), [[[[1, 4], [2, 5]], [[3], []]]])
check('oracle 2', solve(*([[[1], [2], [3]], [[1, 2]]], 2)), [None, None])
check('oracle 3', solve(*([[[1, 2], [3, 4]]], 2)), [[[[1, 3], [2, 4]], [[], []]]])
check('oracle 4', solve(*([], 2)), [])
check('oracle 5', solve(*([[[], []]], 2)), [[[], [[], []]]])
check('oracle 6', solve(*([[[1, 2, 3]]], 1)), [[[[1], [2], [3]], [[]]]])
check('oracle 7', solve(*([[[]]], 1)), [[[], [[]]]])
if N == 1: check('variant packet 1', solve(*[[[[1, 2, 3], [4, 5]], [[1, 2, 3], [4, 5]]], 2]), [[[[1, 4], [2, 5]], [[3], []]], [[[1, 4], [2, 5]], [[3], []]]])
if N == 2: check('variant packet 2', solve(*[[[[1, 2, 3], [4, 5]], [[1, 2, 3], [4, 5]], [[1, 2, 3], [4, 5]]], 2]), [[[[1, 4], [2, 5]], [[3], []]], [[[1, 4], [2, 5]], [[3], []]], [[[1, 4], [2, 5]], [[3], []]]])
if N == 3: check('variant packet 3', solve(*[[[[1, 2, 3], [4, 5]], [[1, 2, 3], [4, 5]], [[1, 2, 3], [4, 5]], [[1, 2, 3], [4, 5]]], 2]), [[[[1, 4], [2, 5]], [[3], []]], [[[1, 4], [2, 5]], [[3], []]], [[[1, 4], [2, 5]], [[3], []]], [[[1, 4], [2, 5]], [[3], []]]])
if N == 4: check('variant packet 4', solve(*[[[[1, 2, 3], [4, 5]], [[1, 2, 3], [4, 5]], [[1, 2, 3], [4, 5]], [[1, 2, 3], [4, 5]], [[1, 2, 3], [4, 5]]], 2]), [[[[1, 4], [2, 5]], [[3], []]], [[[1, 4], [2, 5]], [[3], []]], [[[1, 4], [2, 5]], [[3], []]], [[[1, 4], [2, 5]], [[3], []]], [[[1, 4], [2, 5]], [[3], []]]])
if N == 5: check('variant packet 5', solve(*[[[[1, 2, 3], [4, 5]], [[1, 2, 3], [4, 5]], [[1, 2, 3], [4, 5]], [[1, 2, 3], [4, 5]], [[1, 2, 3], [4, 5]], [[1, 2, 3], [4, 5]]], 2]), [[[[1, 4], [2, 5]], [[3], []]], [[[1, 4], [2, 5]], [[3], []]], [[[1, 4], [2, 5]], [[3], []]], [[[1, 4], [2, 5]], [[3], []]], [[[1, 4], [2, 5]], [[3], []]], [[[1, 4], [2, 5]], [[3], []]]])
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, 4], [2, 5]], [[3], []]]][[[[1, 4], [2, 5]], [[3], []]]]Passed
oracle 2[None, None][None, None]Passed
oracle 3[[[[1, 3], [2, 4]], [[], []]]][[[[1, 3], [2, 4]], [[], []]]]Passed
oracle 4[][]Passed
oracle 5[[[], [[], []]]][[[], [[], []]]]Passed
oracle 6[[[[1], [2], [3]], [[]]]][[[[1], [2], [3]], [[]]]]Passed
oracle 7[[[], [[]]]][[[], [[]]]]Passed
variant packet 1[[[[1, 4], [2, 5]], [[3], []]], [[[1, 4], [2, 5]], [[3], []]]][[[[1, 4], [2, 5]], [[3], []]], [[[1, 4], [2, 5]], [[3], []]]]Passed

SHA-256 / abc4902b14b6deec7cf5f0a55fd1f38d4dd160266db60861d4525c99e78c934d

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

Case digest / 8b21cc0772146798f8cbcc12d0f7fb289aa4926bf59e559cfb02191f33212ee2