FAILURE MAP
← Case archive

FA-50001 / PCM sample encoding / Open access

Pcm tdm active slots: slot frame completeness · case 01

A truncated physical TDM frame passes because only active count is checked.

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

ROOT CAUSE

A truncated physical TDM frame passes because only active count is checked.

VERIFIED REPAIR

Use the stated conversion contract at slot frame completeness.

Unsuccessful approach: Exactly complete slot frames are rejected.

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(slots) if active_mask&(1<<i)]
    out=[]
    for frame in frames:
        if len(frame)<len(channels):
            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]]Failed
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 / 5a23ae9b1285a13b89d6ffa84611ee3a74f45e5c1f2a6dc001cfc637987eb91d

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

SHA-256 / a0df73b1b634a337cf8bc7e1d815f1e9e008255fe9d2af33bb1d6c7c497c9a31

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

Case digest / 8ec4e7459c475aa021a345533e075b6ab546bb3cd59eaca4e147627a5c74e5bf