FA-50126 / PCM sample encoding / Open access
Pcm escaped residuals: truncated escape · case 01
A dangling PCM escape is falsely reported as a complete packet.
ROOT CAUSE
A dangling PCM escape is falsely reported as a complete packet.
VERIFIED REPAIR
Use the stated conversion contract at truncated escape.
Unsuccessful approach: Reporting seed rather than last reconstructed predictor loses valid prefix continuation.
Case contract
Decode a stipulated PCM residual stream with an escape token followed by an absolute sample anchor; report a dangling escape without losing valid prefix state.
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(tokens, initial, escape):
out=[]
previous=initial
cursor=0
while cursor<len(tokens):
token=tokens[cursor]
cursor+=1
if token==escape:
if cursor==len(tokens):
return [out,previous,'ok']
previous=tokens[cursor]
cursor+=1
else:
previous+=token
out.append(previous)
return [out,previous,'ok']
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('oracle 1', solve(*([1, 99, 20, -2], 10, 99)), [[11, 20, 18], 18, 'ok'])
check('oracle 2', solve(*([99, -5, 2], 1, 99)), [[-5, -3], -3, 'ok'])
check('oracle 3', solve(*([1, 99], 3, 99)), [[4], 4, 'truncated'])
check('oracle 4', solve(*([], 4, 99)), [[], 4, 'ok'])
check('oracle 5', solve(*([0, 1, 0], 2, 99)), [[2, 3, 3], 3, 'ok'])
check('oracle 6', solve(*([8, 9, 0], 1, 7)), [[9, 18, 18], 18, 'ok'])
check('oracle 7', solve(*([7, 3, 7, 8], 0, 7)), [[3, 8], 8, 'ok'])
if N == 1: check('variant packet 1', solve(*[[1, 99, 20, -2, 1, 99, 20, -2], 10, 99]), [[11, 20, 18, 19, 20, 18], 18, 'ok'])
if N == 2: check('variant packet 2', solve(*[[1, 99, 20, -2, 1, 99, 20, -2, 1, 99, 20, -2], 10, 99]), [[11, 20, 18, 19, 20, 18, 19, 20, 18], 18, 'ok'])
if N == 3: check('variant packet 3', solve(*[[1, 99, 20, -2, 1, 99, 20, -2, 1, 99, 20, -2, 1, 99, 20, -2], 10, 99]), [[11, 20, 18, 19, 20, 18, 19, 20, 18, 19, 20, 18], 18, 'ok'])
if N == 4: check('variant packet 4', solve(*[[1, 99, 20, -2, 1, 99, 20, -2, 1, 99, 20, -2, 1, 99, 20, -2, 1, 99, 20, -2], 10, 99]), [[11, 20, 18, 19, 20, 18, 19, 20, 18, 19, 20, 18, 19, 20, 18], 18, 'ok'])
if N == 5: check('variant packet 5', solve(*[[1, 99, 20, -2, 1, 99, 20, -2, 1, 99, 20, -2, 1, 99, 20, -2, 1, 99, 20, -2, 1, 99, 20, -2], 10, 99]), [[11, 20, 18, 19, 20, 18, 19, 20, 18, 19, 20, 18, 19, 20, 18, 19, 20, 18], 18, 'ok'])
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 | [[11, 20, 18], 18, 'ok'] | [[11, 20, 18], 18, 'ok'] | Passed |
| oracle 2 | [[-5, -3], -3, 'ok'] | [[-5, -3], -3, 'ok'] | Passed |
| oracle 3 | [[4], 4, 'ok'] | [[4], 4, 'truncated'] | Failed |
| oracle 4 | [[], 4, 'ok'] | [[], 4, 'ok'] | Passed |
| oracle 5 | [[2, 3, 3], 3, 'ok'] | [[2, 3, 3], 3, 'ok'] | Passed |
| oracle 6 | [[9, 18, 18], 18, 'ok'] | [[9, 18, 18], 18, 'ok'] | Passed |
| oracle 7 | [[3, 8], 8, 'ok'] | [[3, 8], 8, 'ok'] | Passed |
| variant packet 1 | [[11, 20, 18, 19, 20, 18], 18, 'ok'] | [[11, 20, 18, 19, 20, 18], 18, 'ok'] | Passed |
SHA-256 / b03d32785adac18ceb01b9b4e375f9bca5a33817259d027f964df2d9ad72e9a6
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(tokens, initial, escape):
out=[]
previous=initial
cursor=0
while cursor<len(tokens):
token=tokens[cursor]
cursor+=1
if token==escape:
if cursor==len(tokens):
return [out,initial,'truncated']
previous=tokens[cursor]
cursor+=1
else:
previous+=token
out.append(previous)
return [out,previous,'ok']
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('oracle 1', solve(*([1, 99, 20, -2], 10, 99)), [[11, 20, 18], 18, 'ok'])
check('oracle 2', solve(*([99, -5, 2], 1, 99)), [[-5, -3], -3, 'ok'])
check('oracle 3', solve(*([1, 99], 3, 99)), [[4], 4, 'truncated'])
check('oracle 4', solve(*([], 4, 99)), [[], 4, 'ok'])
check('oracle 5', solve(*([0, 1, 0], 2, 99)), [[2, 3, 3], 3, 'ok'])
check('oracle 6', solve(*([8, 9, 0], 1, 7)), [[9, 18, 18], 18, 'ok'])
check('oracle 7', solve(*([7, 3, 7, 8], 0, 7)), [[3, 8], 8, 'ok'])
if N == 1: check('variant packet 1', solve(*[[1, 99, 20, -2, 1, 99, 20, -2], 10, 99]), [[11, 20, 18, 19, 20, 18], 18, 'ok'])
if N == 2: check('variant packet 2', solve(*[[1, 99, 20, -2, 1, 99, 20, -2, 1, 99, 20, -2], 10, 99]), [[11, 20, 18, 19, 20, 18, 19, 20, 18], 18, 'ok'])
if N == 3: check('variant packet 3', solve(*[[1, 99, 20, -2, 1, 99, 20, -2, 1, 99, 20, -2, 1, 99, 20, -2], 10, 99]), [[11, 20, 18, 19, 20, 18, 19, 20, 18, 19, 20, 18], 18, 'ok'])
if N == 4: check('variant packet 4', solve(*[[1, 99, 20, -2, 1, 99, 20, -2, 1, 99, 20, -2, 1, 99, 20, -2, 1, 99, 20, -2], 10, 99]), [[11, 20, 18, 19, 20, 18, 19, 20, 18, 19, 20, 18, 19, 20, 18], 18, 'ok'])
if N == 5: check('variant packet 5', solve(*[[1, 99, 20, -2, 1, 99, 20, -2, 1, 99, 20, -2, 1, 99, 20, -2, 1, 99, 20, -2, 1, 99, 20, -2], 10, 99]), [[11, 20, 18, 19, 20, 18, 19, 20, 18, 19, 20, 18, 19, 20, 18, 19, 20, 18], 18, 'ok'])
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 | [[11, 20, 18], 18, 'ok'] | [[11, 20, 18], 18, 'ok'] | Passed |
| oracle 2 | [[-5, -3], -3, 'ok'] | [[-5, -3], -3, 'ok'] | Passed |
| oracle 3 | [[4], 3, 'truncated'] | [[4], 4, 'truncated'] | Failed |
| oracle 4 | [[], 4, 'ok'] | [[], 4, 'ok'] | Passed |
| oracle 5 | [[2, 3, 3], 3, 'ok'] | [[2, 3, 3], 3, 'ok'] | Passed |
| oracle 6 | [[9, 18, 18], 18, 'ok'] | [[9, 18, 18], 18, 'ok'] | Passed |
| oracle 7 | [[3, 8], 8, 'ok'] | [[3, 8], 8, 'ok'] | Passed |
| variant packet 1 | [[11, 20, 18, 19, 20, 18], 18, 'ok'] | [[11, 20, 18, 19, 20, 18], 18, 'ok'] | Passed |
SHA-256 / 8cb9ce607b72f90b61244d75e305f9dd9d8df732c1fa001cdc67ab37c9d38215
3 / The verified repair
Exit 0"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(tokens, initial, escape):
out=[]
previous=initial
cursor=0
while cursor<len(tokens):
token=tokens[cursor]
cursor+=1
if token==escape:
if cursor==len(tokens):
return [out,previous,'truncated']
previous=tokens[cursor]
cursor+=1
else:
previous+=token
out.append(previous)
return [out,previous,'ok']
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('oracle 1', solve(*([1, 99, 20, -2], 10, 99)), [[11, 20, 18], 18, 'ok'])
check('oracle 2', solve(*([99, -5, 2], 1, 99)), [[-5, -3], -3, 'ok'])
check('oracle 3', solve(*([1, 99], 3, 99)), [[4], 4, 'truncated'])
check('oracle 4', solve(*([], 4, 99)), [[], 4, 'ok'])
check('oracle 5', solve(*([0, 1, 0], 2, 99)), [[2, 3, 3], 3, 'ok'])
check('oracle 6', solve(*([8, 9, 0], 1, 7)), [[9, 18, 18], 18, 'ok'])
check('oracle 7', solve(*([7, 3, 7, 8], 0, 7)), [[3, 8], 8, 'ok'])
if N == 1: check('variant packet 1', solve(*[[1, 99, 20, -2, 1, 99, 20, -2], 10, 99]), [[11, 20, 18, 19, 20, 18], 18, 'ok'])
if N == 2: check('variant packet 2', solve(*[[1, 99, 20, -2, 1, 99, 20, -2, 1, 99, 20, -2], 10, 99]), [[11, 20, 18, 19, 20, 18, 19, 20, 18], 18, 'ok'])
if N == 3: check('variant packet 3', solve(*[[1, 99, 20, -2, 1, 99, 20, -2, 1, 99, 20, -2, 1, 99, 20, -2], 10, 99]), [[11, 20, 18, 19, 20, 18, 19, 20, 18, 19, 20, 18], 18, 'ok'])
if N == 4: check('variant packet 4', solve(*[[1, 99, 20, -2, 1, 99, 20, -2, 1, 99, 20, -2, 1, 99, 20, -2, 1, 99, 20, -2], 10, 99]), [[11, 20, 18, 19, 20, 18, 19, 20, 18, 19, 20, 18, 19, 20, 18], 18, 'ok'])
if N == 5: check('variant packet 5', solve(*[[1, 99, 20, -2, 1, 99, 20, -2, 1, 99, 20, -2, 1, 99, 20, -2, 1, 99, 20, -2, 1, 99, 20, -2], 10, 99]), [[11, 20, 18, 19, 20, 18, 19, 20, 18, 19, 20, 18, 19, 20, 18, 19, 20, 18], 18, 'ok'])
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 | [[11, 20, 18], 18, 'ok'] | [[11, 20, 18], 18, 'ok'] | Passed |
| oracle 2 | [[-5, -3], -3, 'ok'] | [[-5, -3], -3, 'ok'] | Passed |
| oracle 3 | [[4], 4, 'truncated'] | [[4], 4, 'truncated'] | Passed |
| oracle 4 | [[], 4, 'ok'] | [[], 4, 'ok'] | Passed |
| oracle 5 | [[2, 3, 3], 3, 'ok'] | [[2, 3, 3], 3, 'ok'] | Passed |
| oracle 6 | [[9, 18, 18], 18, 'ok'] | [[9, 18, 18], 18, 'ok'] | Passed |
| oracle 7 | [[3, 8], 8, 'ok'] | [[3, 8], 8, 'ok'] | Passed |
| variant packet 1 | [[11, 20, 18, 19, 20, 18], 18, 'ok'] | [[11, 20, 18, 19, 20, 18], 18, 'ok'] | Passed |
SHA-256 / 8fb1ef408938fe1aaa436580f6ed38ab4209efae2a48f494c76437794a8db3ec
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:06.250477+00:00.
Case digest / fb236dc6e46397ca105aad15d409ebd77bfca8e8e7eb6372c9887802e2e2da13