FA-50121 / PCM sample encoding / Open access
Pcm escaped residuals: literal consumption · case 01
Escaped literal is decoded again as the next residual token.
ROOT CAUSE
Escaped literal is decoded again as the next residual token.
VERIFIED REPAIR
Use the stated conversion contract at literal consumption.
Unsuccessful approach: Consuming two tokens skips the following residual.
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+=0
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, 40, 38], 38, 'ok'] | [[11, 20, 18], 18, 'ok'] | Failed |
| oracle 2 | [[-5, -10, -8], -8, 'ok'] | [[-5, -3], -3, 'ok'] | Failed |
| 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, 6, 8, 16], 16, 'ok'] | [[3, 8], 8, 'ok'] | Failed |
| variant packet 1 | [[11, 20, 40, 38, 39, 20, 40, 38], 38, 'ok'] | [[11, 20, 18, 19, 20, 18], 18, 'ok'] | Failed |
SHA-256 / 53ec140561eb21da18402baad35c627b6c43e9bfe13a5f5563a95ee012ce808a
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,previous,'truncated']
previous=tokens[cursor]
cursor+=2
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], 20, 'ok'] | [[11, 20, 18], 18, 'ok'] | Failed |
| oracle 2 | [[-5], -5, 'ok'] | [[-5, -3], -3, 'ok'] | Failed |
| 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, 11], 11, 'ok'] | [[3, 8], 8, 'ok'] | Failed |
| variant packet 1 | [[11, 20, 21, 20], 20, 'ok'] | [[11, 20, 18, 19, 20, 18], 18, 'ok'] | Failed |
SHA-256 / 0bf9a785848c290e50d264dc2430af76e585e06473d6b242944ab3e8f51e8a51
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.240942+00:00.
Case digest / 9f7be54e92befcc27002d6ce2218917ef7d5598d9b3be763387ddbaaad188801