FAILURE MAP
← Case archive

FA-49971 / PCM sample encoding / Open access

Pcm i2s delayed capture: slot completeness · case 01

A short transport slot is accepted merely because payload bits fit.

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

ROOT CAUSE

A short transport slot is accepted merely because payload bits fit.

VERIFIED REPAIR

Use the stated conversion contract at slot completeness.

Unsuccessful approach: Rejecting equality drops every exactly complete slot.

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)<payload_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[[-1, []]][None]Failed
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 / 84f6615082c0d16b80ce8e77c7fb31a8fccff2d1e144302c1e032916f6c5949d

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: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[None, None][[-6, [0]], [7, [0]]]Failed
oracle 2[None][[1, [1]]]Failed
oracle 3[None][None]Passed
oracle 4[][]Passed
oracle 5[[1, [1]]][[1, [1]]]Passed
oracle 6[None][[-1, [0]]]Failed
oracle 7[[2, [0]]][[2, [0]]]Passed
variant packet 1[None, None, None, None][[-6, [0]], [7, [0]], [-6, [0]], [7, [0]]]Failed

SHA-256 / 1c3f4724c0b98463f84b8f20dda196dbca4cf39637eeabb7285617525dce1d79

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

Case digest / 0e41e681080d4629d48ca91d5ba26d639ebd5143a0edfbc6e8d2db3daf853d16