FA-48881 / PCM sample encoding / Open access
Subbyte code reader: field stride · case 01
Field starts advance one bit instead of the code width.
ROOT CAUSE
Field starts advance one bit instead of the code width.
VERIFIED REPAIR
Use the stated conversion contract at field stride.
Unsuccessful approach: Restarting the cursor replays the first sample for every field.
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 = min(count,available)
values=[]
for i in range(count):
values.append(sum(bits[i+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, 4, 1], 11] | [[6, 3, 4], 11] | Failed |
| 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, 4], 12] | [[2, 3], 12] | Failed |
| oracle 7 | [[7, 7], 7] | [[7, 7], 7] | Passed |
| variant packet 1 | [[6, 4, 1, 3, 7, 6], 20] | [[6, 3, 4, 4, 1, 3], 20] | Failed |
SHA-256 / df86c3ca412e14b1b1030bead7cc7333ed0d4056a1c02f7b2a3709a324dfcd02
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(count,available)
values=[]
for i in range(count):
values.append(sum(bits[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, 6, 6], 11] | [[6, 3, 4], 11] | Failed |
| 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, 2], 12] | [[2, 3], 12] | Failed |
| oracle 7 | [[7, 7], 7] | [[7, 7], 7] | Passed |
| variant packet 1 | [[6, 6, 6, 6, 6, 6], 20] | [[6, 3, 4, 4, 1, 3], 20] | Failed |
SHA-256 / a85ba395a0808c2446351771644529b17028ace6422af29be94cfdcaf757e49b
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.694653+00:00.
Case digest / 749aa049f087357dc55b8e00bada4eb670e97ba7257d2e5716017117104c0b86