FA-48876 / PCM sample encoding / Open access
Subbyte code reader: declared limit · case 01
Tail padding is decoded as additional samples beyond declared count.
ROOT CAUSE
Tail padding is decoded as additional samples beyond declared count.
VERIFIED REPAIR
Use the stated conversion contract at declared limit.
Unsuccessful approach: Limiting every packet to one sample discards valid declared fields.
Case contract
Read up to declared unsigned packed fields after a bit prefix; incomplete fields are ignored, and report cursor in bits from packet start.
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(octets, width, count, prefix_bits):
bits = [(byte >> (7-j)) & 1 for byte in octets for j in range(8)]
bits = bits[prefix_bits:]
available = len(bits)//width
count = available
values=[]
for i in range(count):
values.append(sum(bits[i*width+j] << (width-1-j) for j in range(width)))
consumed = prefix_bits+count*width
return [values,consumed]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('oracle 1', solve(*([179, 144], 3, 3, 2)), [[6, 3, 4], 11])
check('oracle 2', solve(*([255], 2, 2, 0)), [[3, 3], 4])
check('oracle 3', solve(*([0], 1, 8, 0)), [[0, 0, 0, 0, 0, 0, 0, 0], 8])
check('oracle 4', solve(*([], 3, 0, 0)), [[], 0])
check('oracle 5', solve(*([160], 3, 1, 1)), [[2], 4])
check('oracle 6', solve(*([18, 52], 4, 2, 4)), [[2, 3], 12])
check('oracle 7', solve(*([255], 3, 5, 1)), [[7, 7], 7])
if N == 1: check('variant packet 1', solve(*[[179, 144, 179, 144], 3, 6, 2]), [[6, 3, 4, 4, 1, 3], 20])
if N == 2: check('variant packet 2', solve(*[[179, 144, 179, 144, 179, 144], 3, 9, 2]), [[6, 3, 4, 4, 1, 3, 1, 6, 2], 29])
if N == 3: check('variant packet 3', solve(*[[179, 144, 179, 144, 179, 144, 179, 144], 3, 12, 2]), [[6, 3, 4, 4, 1, 3, 1, 6, 2, 0, 5, 4], 38])
if N == 4: check('variant packet 4', solve(*[[179, 144, 179, 144, 179, 144, 179, 144, 179, 144], 3, 15, 2]), [[6, 3, 4, 4, 1, 3, 1, 6, 2, 0, 5, 4, 7, 1, 0], 47])
if N == 5: check('variant packet 5', solve(*[[179, 144, 179, 144, 179, 144, 179, 144, 179, 144, 179, 144], 3, 18, 2]), [[6, 3, 4, 4, 1, 3, 1, 6, 2, 0, 5, 4, 7, 1, 0, 2, 6, 3], 56])
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 | [[6, 3, 4, 4], 14] | [[6, 3, 4], 11] | Failed |
| oracle 2 | [[3, 3, 3, 3], 8] | [[3, 3], 4] | Failed |
| oracle 3 | [[0, 0, 0, 0, 0, 0, 0, 0], 8] | [[0, 0, 0, 0, 0, 0, 0, 0], 8] | Passed |
| oracle 4 | [[], 0] | [[], 0] | Passed |
| oracle 5 | [[2, 0], 7] | [[2], 4] | Failed |
| oracle 6 | [[2, 3, 4], 16] | [[2, 3], 12] | Failed |
| oracle 7 | [[7, 7], 7] | [[7, 7], 7] | Passed |
| variant packet 1 | [[6, 3, 4, 4, 1, 3, 1, 6, 2, 0], 32] | [[6, 3, 4, 4, 1, 3], 20] | Failed |
SHA-256 / 6b63d5eeff16d57e08de3176dcc1f5d9edf8fc902cff4c2d654ec6fe06f9d2c6
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(octets, width, count, prefix_bits):
bits = [(byte >> (7-j)) & 1 for byte in octets for j in range(8)]
bits = bits[prefix_bits:]
available = len(bits)//width
count = min(1,count,available)
values=[]
for i in range(count):
values.append(sum(bits[i*width+j] << (width-1-j) for j in range(width)))
consumed = prefix_bits+count*width
return [values,consumed]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('oracle 1', solve(*([179, 144], 3, 3, 2)), [[6, 3, 4], 11])
check('oracle 2', solve(*([255], 2, 2, 0)), [[3, 3], 4])
check('oracle 3', solve(*([0], 1, 8, 0)), [[0, 0, 0, 0, 0, 0, 0, 0], 8])
check('oracle 4', solve(*([], 3, 0, 0)), [[], 0])
check('oracle 5', solve(*([160], 3, 1, 1)), [[2], 4])
check('oracle 6', solve(*([18, 52], 4, 2, 4)), [[2, 3], 12])
check('oracle 7', solve(*([255], 3, 5, 1)), [[7, 7], 7])
if N == 1: check('variant packet 1', solve(*[[179, 144, 179, 144], 3, 6, 2]), [[6, 3, 4, 4, 1, 3], 20])
if N == 2: check('variant packet 2', solve(*[[179, 144, 179, 144, 179, 144], 3, 9, 2]), [[6, 3, 4, 4, 1, 3, 1, 6, 2], 29])
if N == 3: check('variant packet 3', solve(*[[179, 144, 179, 144, 179, 144, 179, 144], 3, 12, 2]), [[6, 3, 4, 4, 1, 3, 1, 6, 2, 0, 5, 4], 38])
if N == 4: check('variant packet 4', solve(*[[179, 144, 179, 144, 179, 144, 179, 144, 179, 144], 3, 15, 2]), [[6, 3, 4, 4, 1, 3, 1, 6, 2, 0, 5, 4, 7, 1, 0], 47])
if N == 5: check('variant packet 5', solve(*[[179, 144, 179, 144, 179, 144, 179, 144, 179, 144, 179, 144], 3, 18, 2]), [[6, 3, 4, 4, 1, 3, 1, 6, 2, 0, 5, 4, 7, 1, 0, 2, 6, 3], 56])
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 | [[6], 5] | [[6, 3, 4], 11] | Failed |
| oracle 2 | [[3], 2] | [[3, 3], 4] | Failed |
| oracle 3 | [[0], 1] | [[0, 0, 0, 0, 0, 0, 0, 0], 8] | Failed |
| oracle 4 | [[], 0] | [[], 0] | Passed |
| oracle 5 | [[2], 4] | [[2], 4] | Passed |
| oracle 6 | [[2], 8] | [[2, 3], 12] | Failed |
| oracle 7 | [[7], 4] | [[7, 7], 7] | Failed |
| variant packet 1 | [[6], 5] | [[6, 3, 4, 4, 1, 3], 20] | Failed |
SHA-256 / a3645e535f9267bac733bcfb230833eb3d72811bc4e5dea3f193d242c73add07
3 / The verified repair
Exit 0"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(octets, width, count, prefix_bits):
bits = [(byte >> (7-j)) & 1 for byte in octets for j in range(8)]
bits = bits[prefix_bits:]
available = len(bits)//width
count = min(count,available)
values=[]
for i in range(count):
values.append(sum(bits[i*width+j] << (width-1-j) for j in range(width)))
consumed = prefix_bits+count*width
return [values,consumed]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('oracle 1', solve(*([179, 144], 3, 3, 2)), [[6, 3, 4], 11])
check('oracle 2', solve(*([255], 2, 2, 0)), [[3, 3], 4])
check('oracle 3', solve(*([0], 1, 8, 0)), [[0, 0, 0, 0, 0, 0, 0, 0], 8])
check('oracle 4', solve(*([], 3, 0, 0)), [[], 0])
check('oracle 5', solve(*([160], 3, 1, 1)), [[2], 4])
check('oracle 6', solve(*([18, 52], 4, 2, 4)), [[2, 3], 12])
check('oracle 7', solve(*([255], 3, 5, 1)), [[7, 7], 7])
if N == 1: check('variant packet 1', solve(*[[179, 144, 179, 144], 3, 6, 2]), [[6, 3, 4, 4, 1, 3], 20])
if N == 2: check('variant packet 2', solve(*[[179, 144, 179, 144, 179, 144], 3, 9, 2]), [[6, 3, 4, 4, 1, 3, 1, 6, 2], 29])
if N == 3: check('variant packet 3', solve(*[[179, 144, 179, 144, 179, 144, 179, 144], 3, 12, 2]), [[6, 3, 4, 4, 1, 3, 1, 6, 2, 0, 5, 4], 38])
if N == 4: check('variant packet 4', solve(*[[179, 144, 179, 144, 179, 144, 179, 144, 179, 144], 3, 15, 2]), [[6, 3, 4, 4, 1, 3, 1, 6, 2, 0, 5, 4, 7, 1, 0], 47])
if N == 5: check('variant packet 5', solve(*[[179, 144, 179, 144, 179, 144, 179, 144, 179, 144, 179, 144], 3, 18, 2]), [[6, 3, 4, 4, 1, 3, 1, 6, 2, 0, 5, 4, 7, 1, 0, 2, 6, 3], 56])
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 | [[6, 3, 4], 11] | [[6, 3, 4], 11] | Passed |
| oracle 2 | [[3, 3], 4] | [[3, 3], 4] | Passed |
| oracle 3 | [[0, 0, 0, 0, 0, 0, 0, 0], 8] | [[0, 0, 0, 0, 0, 0, 0, 0], 8] | Passed |
| oracle 4 | [[], 0] | [[], 0] | Passed |
| oracle 5 | [[2], 4] | [[2], 4] | Passed |
| oracle 6 | [[2, 3], 12] | [[2, 3], 12] | Passed |
| oracle 7 | [[7, 7], 7] | [[7, 7], 7] | Passed |
| variant packet 1 | [[6, 3, 4, 4, 1, 3], 20] | [[6, 3, 4, 4, 1, 3], 20] | Passed |
SHA-256 / cd726691cc1aff69384aab8691bb0919dabb00a31cadcbed47a90409541c3525
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:54.696951+00:00.
Case digest / 2a1128aa9ebed254c084ad1b932d6ef171ec8e617b0cf94f00b3a8ea7ab2bbe3