FAILURE MAP
← Case archive

FA-49996 / PCM sample encoding / Open access

Pcm tdm active slots: mask width · case 01

Bits beyond declared TDM slot count create nonexistent channel lanes.

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

ROOT CAUSE

Bits beyond declared TDM slot count create nonexistent channel lanes.

VERIFIED REPAIR

Use the stated conversion contract at mask width.

Unsuccessful approach: Dropping the last slot loses its PCM channel.

Case contract

Stipulated TDM PCM extractor: active mask bits name ascending physical slots; ignore mask bits above slot count and reject incomplete physical frames.

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(frames, active_mask, slots):
    channels=[i for i in range(max(slots,active_mask.bit_length())) if active_mask&(1<<i)]
    out=[]
    for frame in frames:
        if len(frame)<slots:
            out.append(None)
            continue
        out.append([frame[i] if i<len(frame) else None for i in channels])
    return [channels,out]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('oracle 1', solve(*([[10, 20, 30, 40], [1, 2, 3, 4]], 10, 4)), [[1, 3], [[20, 40], [2, 4]]])
check('oracle 2', solve(*([[1, 2]], 8, 4)), [[3], [None]])
check('oracle 3', solve(*([[1, 2, 3]], 0, 3)), [[], [[]]])
check('oracle 4', solve(*([], 3, 4)), [[0, 1], []])
check('oracle 5', solve(*([[1, 2, 3, 4]], 9, 4)), [[0, 3], [[1, 4]]])
check('oracle 6', solve(*([[1, 2]], 1, 2)), [[0], [[1]]])
check('oracle 7', solve(*([[1, 2, 3, 4]], 16, 4)), [[], [[]]])
if N == 1: check('variant packet 1', solve(*[[[10, 20, 30, 40], [1, 2, 3, 4], [10, 20, 30, 40], [1, 2, 3, 4]], 10, 4]), [[1, 3], [[20, 40], [2, 4], [20, 40], [2, 4]]])
if N == 2: check('variant packet 2', solve(*[[[10, 20, 30, 40], [1, 2, 3, 4], [10, 20, 30, 40], [1, 2, 3, 4], [10, 20, 30, 40], [1, 2, 3, 4]], 10, 4]), [[1, 3], [[20, 40], [2, 4], [20, 40], [2, 4], [20, 40], [2, 4]]])
if N == 3: check('variant packet 3', solve(*[[[10, 20, 30, 40], [1, 2, 3, 4], [10, 20, 30, 40], [1, 2, 3, 4], [10, 20, 30, 40], [1, 2, 3, 4], [10, 20, 30, 40], [1, 2, 3, 4]], 10, 4]), [[1, 3], [[20, 40], [2, 4], [20, 40], [2, 4], [20, 40], [2, 4], [20, 40], [2, 4]]])
if N == 4: check('variant packet 4', solve(*[[[10, 20, 30, 40], [1, 2, 3, 4], [10, 20, 30, 40], [1, 2, 3, 4], [10, 20, 30, 40], [1, 2, 3, 4], [10, 20, 30, 40], [1, 2, 3, 4], [10, 20, 30, 40], [1, 2, 3, 4]], 10, 4]), [[1, 3], [[20, 40], [2, 4], [20, 40], [2, 4], [20, 40], [2, 4], [20, 40], [2, 4], [20, 40], [2, 4]]])
if N == 5: check('variant packet 5', solve(*[[[10, 20, 30, 40], [1, 2, 3, 4], [10, 20, 30, 40], [1, 2, 3, 4], [10, 20, 30, 40], [1, 2, 3, 4], [10, 20, 30, 40], [1, 2, 3, 4], [10, 20, 30, 40], [1, 2, 3, 4], [10, 20, 30, 40], [1, 2, 3, 4]], 10, 4]), [[1, 3], [[20, 40], [2, 4], [20, 40], [2, 4], [20, 40], [2, 4], [20, 40], [2, 4], [20, 40], [2, 4], [20, 40], [2, 4]]])
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, 3], [[20, 40], [2, 4]]][[1, 3], [[20, 40], [2, 4]]]Passed
oracle 2[[3], [None]][[3], [None]]Passed
oracle 3[[], [[]]][[], [[]]]Passed
oracle 4[[0, 1], []][[0, 1], []]Passed
oracle 5[[0, 3], [[1, 4]]][[0, 3], [[1, 4]]]Passed
oracle 6[[0], [[1]]][[0], [[1]]]Passed
oracle 7[[4], [[None]]][[], [[]]]Failed
variant packet 1[[1, 3], [[20, 40], [2, 4], [20, 40], [2, 4]]][[1, 3], [[20, 40], [2, 4], [20, 40], [2, 4]]]Passed

SHA-256 / d815de33755a9d0a5793d2c8bc7888a1ce15ea06c16019f2caf4d3e15962c059

2 / The unsuccessful fix

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

N = 1
observations = []
def solve(frames, active_mask, slots):
    channels=[i for i in range(max(0,slots-1)) if active_mask&(1<<i)]
    out=[]
    for frame in frames:
        if len(frame)<slots:
            out.append(None)
            continue
        out.append([frame[i] if i<len(frame) else None for i in channels])
    return [channels,out]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('oracle 1', solve(*([[10, 20, 30, 40], [1, 2, 3, 4]], 10, 4)), [[1, 3], [[20, 40], [2, 4]]])
check('oracle 2', solve(*([[1, 2]], 8, 4)), [[3], [None]])
check('oracle 3', solve(*([[1, 2, 3]], 0, 3)), [[], [[]]])
check('oracle 4', solve(*([], 3, 4)), [[0, 1], []])
check('oracle 5', solve(*([[1, 2, 3, 4]], 9, 4)), [[0, 3], [[1, 4]]])
check('oracle 6', solve(*([[1, 2]], 1, 2)), [[0], [[1]]])
check('oracle 7', solve(*([[1, 2, 3, 4]], 16, 4)), [[], [[]]])
if N == 1: check('variant packet 1', solve(*[[[10, 20, 30, 40], [1, 2, 3, 4], [10, 20, 30, 40], [1, 2, 3, 4]], 10, 4]), [[1, 3], [[20, 40], [2, 4], [20, 40], [2, 4]]])
if N == 2: check('variant packet 2', solve(*[[[10, 20, 30, 40], [1, 2, 3, 4], [10, 20, 30, 40], [1, 2, 3, 4], [10, 20, 30, 40], [1, 2, 3, 4]], 10, 4]), [[1, 3], [[20, 40], [2, 4], [20, 40], [2, 4], [20, 40], [2, 4]]])
if N == 3: check('variant packet 3', solve(*[[[10, 20, 30, 40], [1, 2, 3, 4], [10, 20, 30, 40], [1, 2, 3, 4], [10, 20, 30, 40], [1, 2, 3, 4], [10, 20, 30, 40], [1, 2, 3, 4]], 10, 4]), [[1, 3], [[20, 40], [2, 4], [20, 40], [2, 4], [20, 40], [2, 4], [20, 40], [2, 4]]])
if N == 4: check('variant packet 4', solve(*[[[10, 20, 30, 40], [1, 2, 3, 4], [10, 20, 30, 40], [1, 2, 3, 4], [10, 20, 30, 40], [1, 2, 3, 4], [10, 20, 30, 40], [1, 2, 3, 4], [10, 20, 30, 40], [1, 2, 3, 4]], 10, 4]), [[1, 3], [[20, 40], [2, 4], [20, 40], [2, 4], [20, 40], [2, 4], [20, 40], [2, 4], [20, 40], [2, 4]]])
if N == 5: check('variant packet 5', solve(*[[[10, 20, 30, 40], [1, 2, 3, 4], [10, 20, 30, 40], [1, 2, 3, 4], [10, 20, 30, 40], [1, 2, 3, 4], [10, 20, 30, 40], [1, 2, 3, 4], [10, 20, 30, 40], [1, 2, 3, 4], [10, 20, 30, 40], [1, 2, 3, 4]], 10, 4]), [[1, 3], [[20, 40], [2, 4], [20, 40], [2, 4], [20, 40], [2, 4], [20, 40], [2, 4], [20, 40], [2, 4], [20, 40], [2, 4]]])
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], [[20], [2]]][[1, 3], [[20, 40], [2, 4]]]Failed
oracle 2[[], [None]][[3], [None]]Failed
oracle 3[[], [[]]][[], [[]]]Passed
oracle 4[[0, 1], []][[0, 1], []]Passed
oracle 5[[0], [[1]]][[0, 3], [[1, 4]]]Failed
oracle 6[[0], [[1]]][[0], [[1]]]Passed
oracle 7[[], [[]]][[], [[]]]Passed
variant packet 1[[1], [[20], [2], [20], [2]]][[1, 3], [[20, 40], [2, 4], [20, 40], [2, 4]]]Failed

SHA-256 / b66ca1eddc521c39dc5712438cbee5642c94119dbf12a576cb99214bab715815

3 / The verified repair

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

N = 1
observations = []
def solve(frames, active_mask, slots):
    channels=[i for i in range(slots) if active_mask&(1<<i)]
    out=[]
    for frame in frames:
        if len(frame)<slots:
            out.append(None)
            continue
        out.append([frame[i] if i<len(frame) else None for i in channels])
    return [channels,out]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('oracle 1', solve(*([[10, 20, 30, 40], [1, 2, 3, 4]], 10, 4)), [[1, 3], [[20, 40], [2, 4]]])
check('oracle 2', solve(*([[1, 2]], 8, 4)), [[3], [None]])
check('oracle 3', solve(*([[1, 2, 3]], 0, 3)), [[], [[]]])
check('oracle 4', solve(*([], 3, 4)), [[0, 1], []])
check('oracle 5', solve(*([[1, 2, 3, 4]], 9, 4)), [[0, 3], [[1, 4]]])
check('oracle 6', solve(*([[1, 2]], 1, 2)), [[0], [[1]]])
check('oracle 7', solve(*([[1, 2, 3, 4]], 16, 4)), [[], [[]]])
if N == 1: check('variant packet 1', solve(*[[[10, 20, 30, 40], [1, 2, 3, 4], [10, 20, 30, 40], [1, 2, 3, 4]], 10, 4]), [[1, 3], [[20, 40], [2, 4], [20, 40], [2, 4]]])
if N == 2: check('variant packet 2', solve(*[[[10, 20, 30, 40], [1, 2, 3, 4], [10, 20, 30, 40], [1, 2, 3, 4], [10, 20, 30, 40], [1, 2, 3, 4]], 10, 4]), [[1, 3], [[20, 40], [2, 4], [20, 40], [2, 4], [20, 40], [2, 4]]])
if N == 3: check('variant packet 3', solve(*[[[10, 20, 30, 40], [1, 2, 3, 4], [10, 20, 30, 40], [1, 2, 3, 4], [10, 20, 30, 40], [1, 2, 3, 4], [10, 20, 30, 40], [1, 2, 3, 4]], 10, 4]), [[1, 3], [[20, 40], [2, 4], [20, 40], [2, 4], [20, 40], [2, 4], [20, 40], [2, 4]]])
if N == 4: check('variant packet 4', solve(*[[[10, 20, 30, 40], [1, 2, 3, 4], [10, 20, 30, 40], [1, 2, 3, 4], [10, 20, 30, 40], [1, 2, 3, 4], [10, 20, 30, 40], [1, 2, 3, 4], [10, 20, 30, 40], [1, 2, 3, 4]], 10, 4]), [[1, 3], [[20, 40], [2, 4], [20, 40], [2, 4], [20, 40], [2, 4], [20, 40], [2, 4], [20, 40], [2, 4]]])
if N == 5: check('variant packet 5', solve(*[[[10, 20, 30, 40], [1, 2, 3, 4], [10, 20, 30, 40], [1, 2, 3, 4], [10, 20, 30, 40], [1, 2, 3, 4], [10, 20, 30, 40], [1, 2, 3, 4], [10, 20, 30, 40], [1, 2, 3, 4], [10, 20, 30, 40], [1, 2, 3, 4]], 10, 4]), [[1, 3], [[20, 40], [2, 4], [20, 40], [2, 4], [20, 40], [2, 4], [20, 40], [2, 4], [20, 40], [2, 4], [20, 40], [2, 4]]])
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, 3], [[20, 40], [2, 4]]][[1, 3], [[20, 40], [2, 4]]]Passed
oracle 2[[3], [None]][[3], [None]]Passed
oracle 3[[], [[]]][[], [[]]]Passed
oracle 4[[0, 1], []][[0, 1], []]Passed
oracle 5[[0, 3], [[1, 4]]][[0, 3], [[1, 4]]]Passed
oracle 6[[0], [[1]]][[0], [[1]]]Passed
oracle 7[[], [[]]][[], [[]]]Passed
variant packet 1[[1, 3], [[20, 40], [2, 4], [20, 40], [2, 4]]][[1, 3], [[20, 40], [2, 4], [20, 40], [2, 4]]]Passed

SHA-256 / f7693ccfc98bcfd5d45aa20328bb98c97199afaebe2b84622681230993d219e2

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

Case digest / 242cb4292517c6eaaae85fc3516ebb10641dd69fc26d7375dfaa538672e42bde