FA-49451 / PCM sample encoding / Open access
Pcm progressive refinement: missing refinement · case 01
Absent refinement bits are replaced with maximum positive low bits.
ROOT CAUSE
Absent refinement bits are replaced with maximum positive low bits.
VERIFIED REPAIR
Use the stated conversion contract at missing refinement.
Unsuccessful approach: Holding the last refinement value fabricates low bits for later samples.
Case contract
Restore PCM from arithmetic-shift coarse samples and optional unsigned low-bit refinements; missing refinement bits are zero and out-of-field residual bits are masked.
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(coarse, residuals, missing_bits):
scale=1<<missing_bits
out=[]
for index,base in enumerate(coarse):
tail=residuals[index] if index<len(residuals) else scale-1
tail &= scale-1
out.append(base*scale+tail)
return out
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('oracle 1', solve(*([1, -2, 3], [3, 1, 2], 2)), [7, -7, 14])
check('oracle 2', solve(*([-1, 0], [7, 4], 2)), [-1, 0])
check('oracle 3', solve(*([2, 3, 4], [1], 3)), [17, 24, 32])
check('oracle 4', solve(*([], [], 2)), [])
check('oracle 5', solve(*([1, -1], [0, 0], 0)), [1, -1])
check('oracle 6', solve(*([0, 0], [3, -1], 2)), [3, 3])
check('oracle 7', solve(*([3, -3], [2, 1], 1)), [6, -5])
if N == 1: check('variant packet 1', solve(*[[1, -2, 3, 1, -2, 3], [3, 1, 2], 2]), [7, -7, 14, 4, -8, 12])
if N == 2: check('variant packet 2', solve(*[[1, -2, 3, 1, -2, 3, 1, -2, 3], [3, 1, 2], 2]), [7, -7, 14, 4, -8, 12, 4, -8, 12])
if N == 3: check('variant packet 3', solve(*[[1, -2, 3, 1, -2, 3, 1, -2, 3, 1, -2, 3], [3, 1, 2], 2]), [7, -7, 14, 4, -8, 12, 4, -8, 12, 4, -8, 12])
if N == 4: check('variant packet 4', solve(*[[1, -2, 3, 1, -2, 3, 1, -2, 3, 1, -2, 3, 1, -2, 3], [3, 1, 2], 2]), [7, -7, 14, 4, -8, 12, 4, -8, 12, 4, -8, 12, 4, -8, 12])
if N == 5: check('variant packet 5', solve(*[[1, -2, 3, 1, -2, 3, 1, -2, 3, 1, -2, 3, 1, -2, 3, 1, -2, 3], [3, 1, 2], 2]), [7, -7, 14, 4, -8, 12, 4, -8, 12, 4, -8, 12, 4, -8, 12, 4, -8, 12])
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 | [7, -7, 14] | [7, -7, 14] | Passed |
| oracle 2 | [-1, 0] | [-1, 0] | Passed |
| oracle 3 | [17, 31, 39] | [17, 24, 32] | Failed |
| oracle 4 | [] | [] | Passed |
| oracle 5 | [1, -1] | [1, -1] | Passed |
| oracle 6 | [3, 3] | [3, 3] | Passed |
| oracle 7 | [6, -5] | [6, -5] | Passed |
| variant packet 1 | [7, -7, 14, 7, -5, 15] | [7, -7, 14, 4, -8, 12] | Failed |
SHA-256 / 43fffc9e1efd1f2332e9521e5be130e263540edb5830271974c958487c551205
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(coarse, residuals, missing_bits):
scale=1<<missing_bits
out=[]
for index,base in enumerate(coarse):
tail=residuals[index] if index<len(residuals) else (residuals[-1] if residuals else 0)
tail &= scale-1
out.append(base*scale+tail)
return out
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('oracle 1', solve(*([1, -2, 3], [3, 1, 2], 2)), [7, -7, 14])
check('oracle 2', solve(*([-1, 0], [7, 4], 2)), [-1, 0])
check('oracle 3', solve(*([2, 3, 4], [1], 3)), [17, 24, 32])
check('oracle 4', solve(*([], [], 2)), [])
check('oracle 5', solve(*([1, -1], [0, 0], 0)), [1, -1])
check('oracle 6', solve(*([0, 0], [3, -1], 2)), [3, 3])
check('oracle 7', solve(*([3, -3], [2, 1], 1)), [6, -5])
if N == 1: check('variant packet 1', solve(*[[1, -2, 3, 1, -2, 3], [3, 1, 2], 2]), [7, -7, 14, 4, -8, 12])
if N == 2: check('variant packet 2', solve(*[[1, -2, 3, 1, -2, 3, 1, -2, 3], [3, 1, 2], 2]), [7, -7, 14, 4, -8, 12, 4, -8, 12])
if N == 3: check('variant packet 3', solve(*[[1, -2, 3, 1, -2, 3, 1, -2, 3, 1, -2, 3], [3, 1, 2], 2]), [7, -7, 14, 4, -8, 12, 4, -8, 12, 4, -8, 12])
if N == 4: check('variant packet 4', solve(*[[1, -2, 3, 1, -2, 3, 1, -2, 3, 1, -2, 3, 1, -2, 3], [3, 1, 2], 2]), [7, -7, 14, 4, -8, 12, 4, -8, 12, 4, -8, 12, 4, -8, 12])
if N == 5: check('variant packet 5', solve(*[[1, -2, 3, 1, -2, 3, 1, -2, 3, 1, -2, 3, 1, -2, 3, 1, -2, 3], [3, 1, 2], 2]), [7, -7, 14, 4, -8, 12, 4, -8, 12, 4, -8, 12, 4, -8, 12, 4, -8, 12])
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 | [7, -7, 14] | [7, -7, 14] | Passed |
| oracle 2 | [-1, 0] | [-1, 0] | Passed |
| oracle 3 | [17, 25, 33] | [17, 24, 32] | Failed |
| oracle 4 | [] | [] | Passed |
| oracle 5 | [1, -1] | [1, -1] | Passed |
| oracle 6 | [3, 3] | [3, 3] | Passed |
| oracle 7 | [6, -5] | [6, -5] | Passed |
| variant packet 1 | [7, -7, 14, 6, -6, 14] | [7, -7, 14, 4, -8, 12] | Failed |
SHA-256 / a13fb1c73d30433846a2152b89a3e6ef269fb4196526f9c5904022595bf99448
3 / The verified repair
Exit 0"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(coarse, residuals, missing_bits):
scale=1<<missing_bits
out=[]
for index,base in enumerate(coarse):
tail=residuals[index] if index<len(residuals) else 0
tail &= scale-1
out.append(base*scale+tail)
return out
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('oracle 1', solve(*([1, -2, 3], [3, 1, 2], 2)), [7, -7, 14])
check('oracle 2', solve(*([-1, 0], [7, 4], 2)), [-1, 0])
check('oracle 3', solve(*([2, 3, 4], [1], 3)), [17, 24, 32])
check('oracle 4', solve(*([], [], 2)), [])
check('oracle 5', solve(*([1, -1], [0, 0], 0)), [1, -1])
check('oracle 6', solve(*([0, 0], [3, -1], 2)), [3, 3])
check('oracle 7', solve(*([3, -3], [2, 1], 1)), [6, -5])
if N == 1: check('variant packet 1', solve(*[[1, -2, 3, 1, -2, 3], [3, 1, 2], 2]), [7, -7, 14, 4, -8, 12])
if N == 2: check('variant packet 2', solve(*[[1, -2, 3, 1, -2, 3, 1, -2, 3], [3, 1, 2], 2]), [7, -7, 14, 4, -8, 12, 4, -8, 12])
if N == 3: check('variant packet 3', solve(*[[1, -2, 3, 1, -2, 3, 1, -2, 3, 1, -2, 3], [3, 1, 2], 2]), [7, -7, 14, 4, -8, 12, 4, -8, 12, 4, -8, 12])
if N == 4: check('variant packet 4', solve(*[[1, -2, 3, 1, -2, 3, 1, -2, 3, 1, -2, 3, 1, -2, 3], [3, 1, 2], 2]), [7, -7, 14, 4, -8, 12, 4, -8, 12, 4, -8, 12, 4, -8, 12])
if N == 5: check('variant packet 5', solve(*[[1, -2, 3, 1, -2, 3, 1, -2, 3, 1, -2, 3, 1, -2, 3, 1, -2, 3], [3, 1, 2], 2]), [7, -7, 14, 4, -8, 12, 4, -8, 12, 4, -8, 12, 4, -8, 12, 4, -8, 12])
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 | [7, -7, 14] | [7, -7, 14] | Passed |
| oracle 2 | [-1, 0] | [-1, 0] | Passed |
| oracle 3 | [17, 24, 32] | [17, 24, 32] | Passed |
| oracle 4 | [] | [] | Passed |
| oracle 5 | [1, -1] | [1, -1] | Passed |
| oracle 6 | [3, 3] | [3, 3] | Passed |
| oracle 7 | [6, -5] | [6, -5] | Passed |
| variant packet 1 | [7, -7, 14, 4, -8, 12] | [7, -7, 14, 4, -8, 12] | Passed |
SHA-256 / 8bea1a4700c378aff21411c9a049fc5b0a4e68405eb7934ec7cfee54df52d31f
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:00.185298+00:00.
Case digest / 0d5399ec5e95fd7c54d380f046d6b0ef8fe868afcf8ac6fb78133394f138b845