FA-49201 / PCM sample encoding / Open access
Pcm payload valid prefix: tail range · case 01
Trailing transport bytes beyond the slot body fail sample padding validation.
ROOT CAUSE
Trailing transport bytes beyond the slot body fail sample padding validation.
VERIFIED REPAIR
Use the stated conversion contract at tail range.
Unsuccessful approach: Inspecting active audio rejects valid nonzero samples as dirty padding.
Case contract
Decode a stipulated fixed-capacity PCM slot whose declared valid prefix is clamped to physical storage; verify zero padding only inside the slot.
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(packets, capacity):
out=[]
for declared,payload in packets:
used=min(max(declared,0),capacity,len(payload))
data=list(payload[:used])
tail=list(payload[used:])
canonical=all(x==0 for x in tail)
out.append([data,used,canonical])
return out
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('oracle 1', solve(*([[2, [1, 2, 0, 0]], [2, [1, 2, 0, 9]]], 4)), [[[1, 2], 2, True], [[1, 2], 2, False]])
check('oracle 2', solve(*([[0, [0, 0]], [-1, [3, 4]]], 2)), [[[], 0, True], [[], 0, False]])
check('oracle 3', solve(*([[5, [1, 2]]], 4)), [[[1, 2], 2, True]])
check('oracle 4', solve(*([[2, [1, 2, 0, 9]]], 3)), [[[1, 2], 2, True]])
check('oracle 5', solve(*([], 4)), [])
check('oracle 6', solve(*([[2, [1, 2]]], 2)), [[[1, 2], 2, True]])
check('oracle 7', solve(*([[8, [1, 2, 3, 4]]], 3)), [[[1, 2, 3], 3, True]])
if N == 1: check('variant packet 1', solve(*[[[2, [1, 2, 0, 0]], [2, [1, 2, 0, 9]], [2, [1, 2, 0, 0]], [2, [1, 2, 0, 9]]], 4]), [[[1, 2], 2, True], [[1, 2], 2, False], [[1, 2], 2, True], [[1, 2], 2, False]])
if N == 2: check('variant packet 2', solve(*[[[2, [1, 2, 0, 0]], [2, [1, 2, 0, 9]], [2, [1, 2, 0, 0]], [2, [1, 2, 0, 9]], [2, [1, 2, 0, 0]], [2, [1, 2, 0, 9]]], 4]), [[[1, 2], 2, True], [[1, 2], 2, False], [[1, 2], 2, True], [[1, 2], 2, False], [[1, 2], 2, True], [[1, 2], 2, False]])
if N == 3: check('variant packet 3', solve(*[[[2, [1, 2, 0, 0]], [2, [1, 2, 0, 9]], [2, [1, 2, 0, 0]], [2, [1, 2, 0, 9]], [2, [1, 2, 0, 0]], [2, [1, 2, 0, 9]], [2, [1, 2, 0, 0]], [2, [1, 2, 0, 9]]], 4]), [[[1, 2], 2, True], [[1, 2], 2, False], [[1, 2], 2, True], [[1, 2], 2, False], [[1, 2], 2, True], [[1, 2], 2, False], [[1, 2], 2, True], [[1, 2], 2, False]])
if N == 4: check('variant packet 4', solve(*[[[2, [1, 2, 0, 0]], [2, [1, 2, 0, 9]], [2, [1, 2, 0, 0]], [2, [1, 2, 0, 9]], [2, [1, 2, 0, 0]], [2, [1, 2, 0, 9]], [2, [1, 2, 0, 0]], [2, [1, 2, 0, 9]], [2, [1, 2, 0, 0]], [2, [1, 2, 0, 9]]], 4]), [[[1, 2], 2, True], [[1, 2], 2, False], [[1, 2], 2, True], [[1, 2], 2, False], [[1, 2], 2, True], [[1, 2], 2, False], [[1, 2], 2, True], [[1, 2], 2, False], [[1, 2], 2, True], [[1, 2], 2, False]])
if N == 5: check('variant packet 5', solve(*[[[2, [1, 2, 0, 0]], [2, [1, 2, 0, 9]], [2, [1, 2, 0, 0]], [2, [1, 2, 0, 9]], [2, [1, 2, 0, 0]], [2, [1, 2, 0, 9]], [2, [1, 2, 0, 0]], [2, [1, 2, 0, 9]], [2, [1, 2, 0, 0]], [2, [1, 2, 0, 9]], [2, [1, 2, 0, 0]], [2, [1, 2, 0, 9]]], 4]), [[[1, 2], 2, True], [[1, 2], 2, False], [[1, 2], 2, True], [[1, 2], 2, False], [[1, 2], 2, True], [[1, 2], 2, False], [[1, 2], 2, True], [[1, 2], 2, False], [[1, 2], 2, True], [[1, 2], 2, False], [[1, 2], 2, True], [[1, 2], 2, False]])
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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| oracle 1 | [[[1, 2], 2, True], [[1, 2], 2, False]] | [[[1, 2], 2, True], [[1, 2], 2, False]] | Passed |
| oracle 2 | [[[], 0, True], [[], 0, False]] | [[[], 0, True], [[], 0, False]] | Passed |
| oracle 3 | [[[1, 2], 2, True]] | [[[1, 2], 2, True]] | Passed |
| oracle 4 | [[[1, 2], 2, False]] | [[[1, 2], 2, True]] | Failed |
| oracle 5 | [] | [] | Passed |
| oracle 6 | [[[1, 2], 2, True]] | [[[1, 2], 2, True]] | Passed |
| oracle 7 | [[[1, 2, 3], 3, False]] | [[[1, 2, 3], 3, True]] | Failed |
| variant packet 1 | [[[1, 2], 2, True], [[1, 2], 2, False], [[1, 2], 2, True], [[1, 2], 2, False]] | [[[1, 2], 2, True], [[1, 2], 2, False], [[1, 2], 2, True], [[1, 2], 2, False]] | Passed |
SHA-256 / e6639a161abf86ea41a58ae82c25468ff85ca6c712ebfa5921844063c54c0acd
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(packets, capacity):
out=[]
for declared,payload in packets:
used=min(max(declared,0),capacity,len(payload))
data=list(payload[:used])
tail=list(payload[:used])
canonical=all(x==0 for x in tail)
out.append([data,used,canonical])
return out
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('oracle 1', solve(*([[2, [1, 2, 0, 0]], [2, [1, 2, 0, 9]]], 4)), [[[1, 2], 2, True], [[1, 2], 2, False]])
check('oracle 2', solve(*([[0, [0, 0]], [-1, [3, 4]]], 2)), [[[], 0, True], [[], 0, False]])
check('oracle 3', solve(*([[5, [1, 2]]], 4)), [[[1, 2], 2, True]])
check('oracle 4', solve(*([[2, [1, 2, 0, 9]]], 3)), [[[1, 2], 2, True]])
check('oracle 5', solve(*([], 4)), [])
check('oracle 6', solve(*([[2, [1, 2]]], 2)), [[[1, 2], 2, True]])
check('oracle 7', solve(*([[8, [1, 2, 3, 4]]], 3)), [[[1, 2, 3], 3, True]])
if N == 1: check('variant packet 1', solve(*[[[2, [1, 2, 0, 0]], [2, [1, 2, 0, 9]], [2, [1, 2, 0, 0]], [2, [1, 2, 0, 9]]], 4]), [[[1, 2], 2, True], [[1, 2], 2, False], [[1, 2], 2, True], [[1, 2], 2, False]])
if N == 2: check('variant packet 2', solve(*[[[2, [1, 2, 0, 0]], [2, [1, 2, 0, 9]], [2, [1, 2, 0, 0]], [2, [1, 2, 0, 9]], [2, [1, 2, 0, 0]], [2, [1, 2, 0, 9]]], 4]), [[[1, 2], 2, True], [[1, 2], 2, False], [[1, 2], 2, True], [[1, 2], 2, False], [[1, 2], 2, True], [[1, 2], 2, False]])
if N == 3: check('variant packet 3', solve(*[[[2, [1, 2, 0, 0]], [2, [1, 2, 0, 9]], [2, [1, 2, 0, 0]], [2, [1, 2, 0, 9]], [2, [1, 2, 0, 0]], [2, [1, 2, 0, 9]], [2, [1, 2, 0, 0]], [2, [1, 2, 0, 9]]], 4]), [[[1, 2], 2, True], [[1, 2], 2, False], [[1, 2], 2, True], [[1, 2], 2, False], [[1, 2], 2, True], [[1, 2], 2, False], [[1, 2], 2, True], [[1, 2], 2, False]])
if N == 4: check('variant packet 4', solve(*[[[2, [1, 2, 0, 0]], [2, [1, 2, 0, 9]], [2, [1, 2, 0, 0]], [2, [1, 2, 0, 9]], [2, [1, 2, 0, 0]], [2, [1, 2, 0, 9]], [2, [1, 2, 0, 0]], [2, [1, 2, 0, 9]], [2, [1, 2, 0, 0]], [2, [1, 2, 0, 9]]], 4]), [[[1, 2], 2, True], [[1, 2], 2, False], [[1, 2], 2, True], [[1, 2], 2, False], [[1, 2], 2, True], [[1, 2], 2, False], [[1, 2], 2, True], [[1, 2], 2, False], [[1, 2], 2, True], [[1, 2], 2, False]])
if N == 5: check('variant packet 5', solve(*[[[2, [1, 2, 0, 0]], [2, [1, 2, 0, 9]], [2, [1, 2, 0, 0]], [2, [1, 2, 0, 9]], [2, [1, 2, 0, 0]], [2, [1, 2, 0, 9]], [2, [1, 2, 0, 0]], [2, [1, 2, 0, 9]], [2, [1, 2, 0, 0]], [2, [1, 2, 0, 9]], [2, [1, 2, 0, 0]], [2, [1, 2, 0, 9]]], 4]), [[[1, 2], 2, True], [[1, 2], 2, False], [[1, 2], 2, True], [[1, 2], 2, False], [[1, 2], 2, True], [[1, 2], 2, False], [[1, 2], 2, True], [[1, 2], 2, False], [[1, 2], 2, True], [[1, 2], 2, False], [[1, 2], 2, True], [[1, 2], 2, False]])
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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| oracle 1 | [[[1, 2], 2, False], [[1, 2], 2, False]] | [[[1, 2], 2, True], [[1, 2], 2, False]] | Failed |
| oracle 2 | [[[], 0, True], [[], 0, True]] | [[[], 0, True], [[], 0, False]] | Failed |
| oracle 3 | [[[1, 2], 2, False]] | [[[1, 2], 2, True]] | Failed |
| oracle 4 | [[[1, 2], 2, False]] | [[[1, 2], 2, True]] | Failed |
| oracle 5 | [] | [] | Passed |
| oracle 6 | [[[1, 2], 2, False]] | [[[1, 2], 2, True]] | Failed |
| oracle 7 | [[[1, 2, 3], 3, False]] | [[[1, 2, 3], 3, True]] | Failed |
| variant packet 1 | [[[1, 2], 2, False], [[1, 2], 2, False], [[1, 2], 2, False], [[1, 2], 2, False]] | [[[1, 2], 2, True], [[1, 2], 2, False], [[1, 2], 2, True], [[1, 2], 2, False]] | Failed |
SHA-256 / 14ced00f908f455818c3f8005eff6274fe9251e56a80de4d68ceb28675787c50
3 / The verified repair
Exit 0"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(packets, capacity):
out=[]
for declared,payload in packets:
used=min(max(declared,0),capacity,len(payload))
data=list(payload[:used])
tail=list(payload[used:capacity])
canonical=all(x==0 for x in tail)
out.append([data,used,canonical])
return out
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('oracle 1', solve(*([[2, [1, 2, 0, 0]], [2, [1, 2, 0, 9]]], 4)), [[[1, 2], 2, True], [[1, 2], 2, False]])
check('oracle 2', solve(*([[0, [0, 0]], [-1, [3, 4]]], 2)), [[[], 0, True], [[], 0, False]])
check('oracle 3', solve(*([[5, [1, 2]]], 4)), [[[1, 2], 2, True]])
check('oracle 4', solve(*([[2, [1, 2, 0, 9]]], 3)), [[[1, 2], 2, True]])
check('oracle 5', solve(*([], 4)), [])
check('oracle 6', solve(*([[2, [1, 2]]], 2)), [[[1, 2], 2, True]])
check('oracle 7', solve(*([[8, [1, 2, 3, 4]]], 3)), [[[1, 2, 3], 3, True]])
if N == 1: check('variant packet 1', solve(*[[[2, [1, 2, 0, 0]], [2, [1, 2, 0, 9]], [2, [1, 2, 0, 0]], [2, [1, 2, 0, 9]]], 4]), [[[1, 2], 2, True], [[1, 2], 2, False], [[1, 2], 2, True], [[1, 2], 2, False]])
if N == 2: check('variant packet 2', solve(*[[[2, [1, 2, 0, 0]], [2, [1, 2, 0, 9]], [2, [1, 2, 0, 0]], [2, [1, 2, 0, 9]], [2, [1, 2, 0, 0]], [2, [1, 2, 0, 9]]], 4]), [[[1, 2], 2, True], [[1, 2], 2, False], [[1, 2], 2, True], [[1, 2], 2, False], [[1, 2], 2, True], [[1, 2], 2, False]])
if N == 3: check('variant packet 3', solve(*[[[2, [1, 2, 0, 0]], [2, [1, 2, 0, 9]], [2, [1, 2, 0, 0]], [2, [1, 2, 0, 9]], [2, [1, 2, 0, 0]], [2, [1, 2, 0, 9]], [2, [1, 2, 0, 0]], [2, [1, 2, 0, 9]]], 4]), [[[1, 2], 2, True], [[1, 2], 2, False], [[1, 2], 2, True], [[1, 2], 2, False], [[1, 2], 2, True], [[1, 2], 2, False], [[1, 2], 2, True], [[1, 2], 2, False]])
if N == 4: check('variant packet 4', solve(*[[[2, [1, 2, 0, 0]], [2, [1, 2, 0, 9]], [2, [1, 2, 0, 0]], [2, [1, 2, 0, 9]], [2, [1, 2, 0, 0]], [2, [1, 2, 0, 9]], [2, [1, 2, 0, 0]], [2, [1, 2, 0, 9]], [2, [1, 2, 0, 0]], [2, [1, 2, 0, 9]]], 4]), [[[1, 2], 2, True], [[1, 2], 2, False], [[1, 2], 2, True], [[1, 2], 2, False], [[1, 2], 2, True], [[1, 2], 2, False], [[1, 2], 2, True], [[1, 2], 2, False], [[1, 2], 2, True], [[1, 2], 2, False]])
if N == 5: check('variant packet 5', solve(*[[[2, [1, 2, 0, 0]], [2, [1, 2, 0, 9]], [2, [1, 2, 0, 0]], [2, [1, 2, 0, 9]], [2, [1, 2, 0, 0]], [2, [1, 2, 0, 9]], [2, [1, 2, 0, 0]], [2, [1, 2, 0, 9]], [2, [1, 2, 0, 0]], [2, [1, 2, 0, 9]], [2, [1, 2, 0, 0]], [2, [1, 2, 0, 9]]], 4]), [[[1, 2], 2, True], [[1, 2], 2, False], [[1, 2], 2, True], [[1, 2], 2, False], [[1, 2], 2, True], [[1, 2], 2, False], [[1, 2], 2, True], [[1, 2], 2, False], [[1, 2], 2, True], [[1, 2], 2, False], [[1, 2], 2, True], [[1, 2], 2, False]])
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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| oracle 1 | [[[1, 2], 2, True], [[1, 2], 2, False]] | [[[1, 2], 2, True], [[1, 2], 2, False]] | Passed |
| oracle 2 | [[[], 0, True], [[], 0, False]] | [[[], 0, True], [[], 0, False]] | Passed |
| oracle 3 | [[[1, 2], 2, True]] | [[[1, 2], 2, True]] | Passed |
| oracle 4 | [[[1, 2], 2, True]] | [[[1, 2], 2, True]] | Passed |
| oracle 5 | [] | [] | Passed |
| oracle 6 | [[[1, 2], 2, True]] | [[[1, 2], 2, True]] | Passed |
| oracle 7 | [[[1, 2, 3], 3, True]] | [[[1, 2, 3], 3, True]] | Passed |
| variant packet 1 | [[[1, 2], 2, True], [[1, 2], 2, False], [[1, 2], 2, True], [[1, 2], 2, False]] | [[[1, 2], 2, True], [[1, 2], 2, False], [[1, 2], 2, True], [[1, 2], 2, False]] | Passed |
SHA-256 / 58fac89e06d805610ff0dd7a0d75f794020bb267c8750356b573c3625563e5be
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:44:57.725435+00:00.
Case digest / 935aec687d384589f34b764f0d4585fbfb2b14daae77804734cec1d03f37cbdd