FAILURE MAP
← Case archive

FA-49986 / PCM sample encoding / Open access

Pcm i2s delayed capture: unused tail · case 01

Pad inspection includes the last PCM payload bit.

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

ROOT CAUSE

Pad inspection includes the last PCM payload bit.

VERIFIED REPAIR

Use the stated conversion contract at unused tail.

Unsuccessful approach: Inspecting beyond the declared slot consumes bits belonging to later transport data.

Case contract

Capture a stipulated I2S-like slot with one delay clock, MSB-first signed PCM payload and explicit trailing slot bits; reject incomplete slots.

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(slots, payload_bits, slot_bits):
    out=[]
    for bits in slots:
        field=bits[1:1+payload_bits]
        if len(bits)<slot_bits or len(field)!=payload_bits:
            out.append(None)
            continue
        code=sum(bit<<(payload_bits-1-i) for i,bit in enumerate(field))
        sample=code-(1<<payload_bits) if field[0] else code
        tail=bits[payload_bits:slot_bits]
        out.append([sample,tail])
    return out
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('oracle 1', solve(*([[0, 1, 0, 1, 0, 0], [1, 0, 1, 1, 1, 0]], 4, 6)), [[-6, [0]], [7, [0]]])
check('oracle 2', solve(*([[0, 0, 0, 1, 1]], 3, 5)), [[1, [1]]])
check('oracle 3', solve(*([[1, 1, 1, 1]], 3, 5)), [None])
check('oracle 4', solve(*([], 4, 6)), [])
check('oracle 5', solve(*([[1, 0, 0, 0, 1, 1, 1]], 4, 6)), [[1, [1]]])
check('oracle 6', solve(*([[0, 1, 0]], 1, 3)), [[-1, [0]]])
check('oracle 7', solve(*([[0, 0, 1, 0, 0, 1]], 3, 5)), [[2, [0]]])
if N == 1: check('variant packet 1', solve(*[[[0, 1, 0, 1, 0, 0], [1, 0, 1, 1, 1, 0], [0, 1, 0, 1, 0, 0], [1, 0, 1, 1, 1, 0]], 4, 6]), [[-6, [0]], [7, [0]], [-6, [0]], [7, [0]]])
if N == 2: check('variant packet 2', solve(*[[[0, 1, 0, 1, 0, 0], [1, 0, 1, 1, 1, 0], [0, 1, 0, 1, 0, 0], [1, 0, 1, 1, 1, 0], [0, 1, 0, 1, 0, 0], [1, 0, 1, 1, 1, 0]], 4, 6]), [[-6, [0]], [7, [0]], [-6, [0]], [7, [0]], [-6, [0]], [7, [0]]])
if N == 3: check('variant packet 3', solve(*[[[0, 1, 0, 1, 0, 0], [1, 0, 1, 1, 1, 0], [0, 1, 0, 1, 0, 0], [1, 0, 1, 1, 1, 0], [0, 1, 0, 1, 0, 0], [1, 0, 1, 1, 1, 0], [0, 1, 0, 1, 0, 0], [1, 0, 1, 1, 1, 0]], 4, 6]), [[-6, [0]], [7, [0]], [-6, [0]], [7, [0]], [-6, [0]], [7, [0]], [-6, [0]], [7, [0]]])
if N == 4: check('variant packet 4', solve(*[[[0, 1, 0, 1, 0, 0], [1, 0, 1, 1, 1, 0], [0, 1, 0, 1, 0, 0], [1, 0, 1, 1, 1, 0], [0, 1, 0, 1, 0, 0], [1, 0, 1, 1, 1, 0], [0, 1, 0, 1, 0, 0], [1, 0, 1, 1, 1, 0], [0, 1, 0, 1, 0, 0], [1, 0, 1, 1, 1, 0]], 4, 6]), [[-6, [0]], [7, [0]], [-6, [0]], [7, [0]], [-6, [0]], [7, [0]], [-6, [0]], [7, [0]], [-6, [0]], [7, [0]]])
if N == 5: check('variant packet 5', solve(*[[[0, 1, 0, 1, 0, 0], [1, 0, 1, 1, 1, 0], [0, 1, 0, 1, 0, 0], [1, 0, 1, 1, 1, 0], [0, 1, 0, 1, 0, 0], [1, 0, 1, 1, 1, 0], [0, 1, 0, 1, 0, 0], [1, 0, 1, 1, 1, 0], [0, 1, 0, 1, 0, 0], [1, 0, 1, 1, 1, 0], [0, 1, 0, 1, 0, 0], [1, 0, 1, 1, 1, 0]], 4, 6]), [[-6, [0]], [7, [0]], [-6, [0]], [7, [0]], [-6, [0]], [7, [0]], [-6, [0]], [7, [0]], [-6, [0]], [7, [0]], [-6, [0]], [7, [0]]])
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[[-6, [0, 0]], [7, [1, 0]]][[-6, [0]], [7, [0]]]Failed
oracle 2[[1, [1, 1]]][[1, [1]]]Failed
oracle 3[None][None]Passed
oracle 4[][]Passed
oracle 5[[1, [1, 1]]][[1, [1]]]Failed
oracle 6[[-1, [1, 0]]][[-1, [0]]]Failed
oracle 7[[2, [0, 0]]][[2, [0]]]Failed
variant packet 1[[-6, [0, 0]], [7, [1, 0]], [-6, [0, 0]], [7, [1, 0]]][[-6, [0]], [7, [0]], [-6, [0]], [7, [0]]]Failed

SHA-256 / 290dd226737d2c7e672dabfdf0636a4147857d8b3bc6427b6ca697d01625739b

2 / The unsuccessful fix

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

N = 1
observations = []
def solve(slots, payload_bits, slot_bits):
    out=[]
    for bits in slots:
        field=bits[1:1+payload_bits]
        if len(bits)<slot_bits or len(field)!=payload_bits:
            out.append(None)
            continue
        code=sum(bit<<(payload_bits-1-i) for i,bit in enumerate(field))
        sample=code-(1<<payload_bits) if field[0] else code
        tail=bits[1+payload_bits:]
        out.append([sample,tail])
    return out
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('oracle 1', solve(*([[0, 1, 0, 1, 0, 0], [1, 0, 1, 1, 1, 0]], 4, 6)), [[-6, [0]], [7, [0]]])
check('oracle 2', solve(*([[0, 0, 0, 1, 1]], 3, 5)), [[1, [1]]])
check('oracle 3', solve(*([[1, 1, 1, 1]], 3, 5)), [None])
check('oracle 4', solve(*([], 4, 6)), [])
check('oracle 5', solve(*([[1, 0, 0, 0, 1, 1, 1]], 4, 6)), [[1, [1]]])
check('oracle 6', solve(*([[0, 1, 0]], 1, 3)), [[-1, [0]]])
check('oracle 7', solve(*([[0, 0, 1, 0, 0, 1]], 3, 5)), [[2, [0]]])
if N == 1: check('variant packet 1', solve(*[[[0, 1, 0, 1, 0, 0], [1, 0, 1, 1, 1, 0], [0, 1, 0, 1, 0, 0], [1, 0, 1, 1, 1, 0]], 4, 6]), [[-6, [0]], [7, [0]], [-6, [0]], [7, [0]]])
if N == 2: check('variant packet 2', solve(*[[[0, 1, 0, 1, 0, 0], [1, 0, 1, 1, 1, 0], [0, 1, 0, 1, 0, 0], [1, 0, 1, 1, 1, 0], [0, 1, 0, 1, 0, 0], [1, 0, 1, 1, 1, 0]], 4, 6]), [[-6, [0]], [7, [0]], [-6, [0]], [7, [0]], [-6, [0]], [7, [0]]])
if N == 3: check('variant packet 3', solve(*[[[0, 1, 0, 1, 0, 0], [1, 0, 1, 1, 1, 0], [0, 1, 0, 1, 0, 0], [1, 0, 1, 1, 1, 0], [0, 1, 0, 1, 0, 0], [1, 0, 1, 1, 1, 0], [0, 1, 0, 1, 0, 0], [1, 0, 1, 1, 1, 0]], 4, 6]), [[-6, [0]], [7, [0]], [-6, [0]], [7, [0]], [-6, [0]], [7, [0]], [-6, [0]], [7, [0]]])
if N == 4: check('variant packet 4', solve(*[[[0, 1, 0, 1, 0, 0], [1, 0, 1, 1, 1, 0], [0, 1, 0, 1, 0, 0], [1, 0, 1, 1, 1, 0], [0, 1, 0, 1, 0, 0], [1, 0, 1, 1, 1, 0], [0, 1, 0, 1, 0, 0], [1, 0, 1, 1, 1, 0], [0, 1, 0, 1, 0, 0], [1, 0, 1, 1, 1, 0]], 4, 6]), [[-6, [0]], [7, [0]], [-6, [0]], [7, [0]], [-6, [0]], [7, [0]], [-6, [0]], [7, [0]], [-6, [0]], [7, [0]]])
if N == 5: check('variant packet 5', solve(*[[[0, 1, 0, 1, 0, 0], [1, 0, 1, 1, 1, 0], [0, 1, 0, 1, 0, 0], [1, 0, 1, 1, 1, 0], [0, 1, 0, 1, 0, 0], [1, 0, 1, 1, 1, 0], [0, 1, 0, 1, 0, 0], [1, 0, 1, 1, 1, 0], [0, 1, 0, 1, 0, 0], [1, 0, 1, 1, 1, 0], [0, 1, 0, 1, 0, 0], [1, 0, 1, 1, 1, 0]], 4, 6]), [[-6, [0]], [7, [0]], [-6, [0]], [7, [0]], [-6, [0]], [7, [0]], [-6, [0]], [7, [0]], [-6, [0]], [7, [0]], [-6, [0]], [7, [0]]])
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[[-6, [0]], [7, [0]]][[-6, [0]], [7, [0]]]Passed
oracle 2[[1, [1]]][[1, [1]]]Passed
oracle 3[None][None]Passed
oracle 4[][]Passed
oracle 5[[1, [1, 1]]][[1, [1]]]Failed
oracle 6[[-1, [0]]][[-1, [0]]]Passed
oracle 7[[2, [0, 1]]][[2, [0]]]Failed
variant packet 1[[-6, [0]], [7, [0]], [-6, [0]], [7, [0]]][[-6, [0]], [7, [0]], [-6, [0]], [7, [0]]]Passed

SHA-256 / 1dd5ea51ce5404af44ef50915d13f737be8660c9c55d2eb9042cd66af76344e6

3 / The verified repair

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

N = 1
observations = []
def solve(slots, payload_bits, slot_bits):
    out=[]
    for bits in slots:
        field=bits[1:1+payload_bits]
        if len(bits)<slot_bits or len(field)!=payload_bits:
            out.append(None)
            continue
        code=sum(bit<<(payload_bits-1-i) for i,bit in enumerate(field))
        sample=code-(1<<payload_bits) if field[0] else code
        tail=bits[1+payload_bits:slot_bits]
        out.append([sample,tail])
    return out
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('oracle 1', solve(*([[0, 1, 0, 1, 0, 0], [1, 0, 1, 1, 1, 0]], 4, 6)), [[-6, [0]], [7, [0]]])
check('oracle 2', solve(*([[0, 0, 0, 1, 1]], 3, 5)), [[1, [1]]])
check('oracle 3', solve(*([[1, 1, 1, 1]], 3, 5)), [None])
check('oracle 4', solve(*([], 4, 6)), [])
check('oracle 5', solve(*([[1, 0, 0, 0, 1, 1, 1]], 4, 6)), [[1, [1]]])
check('oracle 6', solve(*([[0, 1, 0]], 1, 3)), [[-1, [0]]])
check('oracle 7', solve(*([[0, 0, 1, 0, 0, 1]], 3, 5)), [[2, [0]]])
if N == 1: check('variant packet 1', solve(*[[[0, 1, 0, 1, 0, 0], [1, 0, 1, 1, 1, 0], [0, 1, 0, 1, 0, 0], [1, 0, 1, 1, 1, 0]], 4, 6]), [[-6, [0]], [7, [0]], [-6, [0]], [7, [0]]])
if N == 2: check('variant packet 2', solve(*[[[0, 1, 0, 1, 0, 0], [1, 0, 1, 1, 1, 0], [0, 1, 0, 1, 0, 0], [1, 0, 1, 1, 1, 0], [0, 1, 0, 1, 0, 0], [1, 0, 1, 1, 1, 0]], 4, 6]), [[-6, [0]], [7, [0]], [-6, [0]], [7, [0]], [-6, [0]], [7, [0]]])
if N == 3: check('variant packet 3', solve(*[[[0, 1, 0, 1, 0, 0], [1, 0, 1, 1, 1, 0], [0, 1, 0, 1, 0, 0], [1, 0, 1, 1, 1, 0], [0, 1, 0, 1, 0, 0], [1, 0, 1, 1, 1, 0], [0, 1, 0, 1, 0, 0], [1, 0, 1, 1, 1, 0]], 4, 6]), [[-6, [0]], [7, [0]], [-6, [0]], [7, [0]], [-6, [0]], [7, [0]], [-6, [0]], [7, [0]]])
if N == 4: check('variant packet 4', solve(*[[[0, 1, 0, 1, 0, 0], [1, 0, 1, 1, 1, 0], [0, 1, 0, 1, 0, 0], [1, 0, 1, 1, 1, 0], [0, 1, 0, 1, 0, 0], [1, 0, 1, 1, 1, 0], [0, 1, 0, 1, 0, 0], [1, 0, 1, 1, 1, 0], [0, 1, 0, 1, 0, 0], [1, 0, 1, 1, 1, 0]], 4, 6]), [[-6, [0]], [7, [0]], [-6, [0]], [7, [0]], [-6, [0]], [7, [0]], [-6, [0]], [7, [0]], [-6, [0]], [7, [0]]])
if N == 5: check('variant packet 5', solve(*[[[0, 1, 0, 1, 0, 0], [1, 0, 1, 1, 1, 0], [0, 1, 0, 1, 0, 0], [1, 0, 1, 1, 1, 0], [0, 1, 0, 1, 0, 0], [1, 0, 1, 1, 1, 0], [0, 1, 0, 1, 0, 0], [1, 0, 1, 1, 1, 0], [0, 1, 0, 1, 0, 0], [1, 0, 1, 1, 1, 0], [0, 1, 0, 1, 0, 0], [1, 0, 1, 1, 1, 0]], 4, 6]), [[-6, [0]], [7, [0]], [-6, [0]], [7, [0]], [-6, [0]], [7, [0]], [-6, [0]], [7, [0]], [-6, [0]], [7, [0]], [-6, [0]], [7, [0]]])
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[[-6, [0]], [7, [0]]][[-6, [0]], [7, [0]]]Passed
oracle 2[[1, [1]]][[1, [1]]]Passed
oracle 3[None][None]Passed
oracle 4[][]Passed
oracle 5[[1, [1]]][[1, [1]]]Passed
oracle 6[[-1, [0]]][[-1, [0]]]Passed
oracle 7[[2, [0]]][[2, [0]]]Passed
variant packet 1[[-6, [0]], [7, [0]], [-6, [0]], [7, [0]]][[-6, [0]], [7, [0]], [-6, [0]], [7, [0]]]Passed

SHA-256 / c02033517ac1c68106ee95b9a277ec9286001c78ae30e3f34579e5b8496ed32d

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

Case digest / d3e3c879fb9ac0436bf5944dd8bcb63a4b6a348f5ce86fa7095e87d5fa3fe970