FA-50136 / PCM sample encoding / Open access
Pcm escaped residuals: escape recognition · case 01
Out-of-band residual values are incorrectly treated as escape symbols.
ROOT CAUSE
Out-of-band residual values are incorrectly treated as escape symbols.
VERIFIED REPAIR
Use the stated conversion contract at escape recognition.
Unsuccessful approach: Treating zero residual as escape breaks constant-signal runs.
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,'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, 9], 9, 'ok'] | [[9, 18, 18], 18, 'ok'] | Failed |
| 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 / 4fdfcefa2b2d517ed972d7eb5d754c771711f3f3844dec104ef6a804b70a5b20
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==0:
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, 110, 130, 128], 128, 'ok'] | [[11, 20, 18], 18, 'ok'] | Failed |
| oracle 2 | [[100, 95, 97], 97, 'ok'] | [[-5, -3], -3, 'ok'] | Failed |
| oracle 3 | [[4, 103], 103, 'ok'] | [[4], 4, 'truncated'] | Failed |
| oracle 4 | [[], 4, 'ok'] | [[], 4, 'ok'] | Passed |
| oracle 5 | [[1], 1, 'truncated'] | [[2, 3, 3], 3, 'ok'] | Failed |
| oracle 6 | [[9, 18], 18, 'truncated'] | [[9, 18, 18], 18, 'ok'] | Failed |
| oracle 7 | [[7, 10, 17, 25], 25, 'ok'] | [[3, 8], 8, 'ok'] | Failed |
| variant packet 1 | [[11, 110, 130, 128, 129, 228, 248, 246], 246, 'ok'] | [[11, 20, 18, 19, 20, 18], 18, 'ok'] | Failed |
SHA-256 / 983404e9a29b424159c56e729f7e73319e61a9e0eff8efa882554184125b712b
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.281104+00:00.
Case digest / 8782cf51661ff00d9f5e49976e4159575d6de6d8bdfcdb9f26e4573774ac73d2