FA-50156 / PCM sample encoding / Open access
Pcm lpc residual reconstruction: history shift · case 01
Newest PCM sample is appended to oldest-first position.
ROOT CAUSE
Newest PCM sample is appended to oldest-first position.
VERIFIED REPAIR
Use the stated conversion contract at history shift.
Unsuccessful approach: Keeping old newest samples discards the wrong tap when shifting.
Case contract
Reconstruct bounded integer PCM LPC residuals using newest-first history, floor-divided complete dot products and reconstructed-sample history feedback.
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(residuals, history, coefficients, divisor):
state=list(history)
out=[]
for residual in residuals:
prediction=sum(c*x for c,x in zip(coefficients,state))//divisor
sample=prediction+residual
out.append(sample)
state=state[1:]+[sample]
return [out,state]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('oracle 1', solve(*([1, 2, -1], [3, 1], [2, -1], 1)), [[6, 11, 15], [15, 11]])
check('oracle 2', solve(*([0, 1, -2], [-3, 2], [1, 1], 3)), [[-1, -1, -3], [-3, -1]])
check('oracle 3', solve(*([], [2, 1], [2, -1], 1)), [[], [2, 1]])
check('oracle 4', solve(*([2, 0, 1], [0, 0, 0], [3, -2, 1], 2)), [[2, 3, 3], [3, 3, 2]])
check('oracle 5', solve(*([-1, 3], [5], [1], 2)), [[1, 3], [3]])
check('oracle 6', solve(*([1, 1], [1, 2, 3], [1, 2, 3], 4)), [[4, 4], [4, 4, 1]])
check('oracle 7', solve(*([0, -1], [4, -2], [3, 1], 3)), [[3, 3], [3, 3]])
if N == 1: check('variant packet 1', solve(*[[1, 2, -1, 1, 2, -1], [3, 1], [2, -1], 1]), [[6, 11, 15, 20, 27, 33], [33, 27]])
if N == 2: check('variant packet 2', solve(*[[1, 2, -1, 1, 2, -1, 1, 2, -1], [3, 1], [2, -1], 1]), [[6, 11, 15, 20, 27, 33, 40, 49, 57], [57, 49]])
if N == 3: check('variant packet 3', solve(*[[1, 2, -1, 1, 2, -1, 1, 2, -1, 1, 2, -1], [3, 1], [2, -1], 1]), [[6, 11, 15, 20, 27, 33, 40, 49, 57, 66, 77, 87], [87, 77]])
if N == 4: check('variant packet 4', solve(*[[1, 2, -1, 1, 2, -1, 1, 2, -1, 1, 2, -1, 1, 2, -1], [3, 1], [2, -1], 1]), [[6, 11, 15, 20, 27, 33, 40, 49, 57, 66, 77, 87, 98, 111, 123], [123, 111]])
if N == 5: check('variant packet 5', solve(*[[1, 2, -1, 1, 2, -1, 1, 2, -1, 1, 2, -1, 1, 2, -1, 1, 2, -1], [3, 1], [2, -1], 1]), [[6, 11, 15, 20, 27, 33, 40, 49, 57, 66, 77, 87, 98, 111, 123, 136, 151, 165], [165, 151]])
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, -2, 13], [-2, 13]] | [[6, 11, 15], [15, 11]] | Failed |
| oracle 2 | [[-1, 1, -2], [1, -2]] | [[-1, -1, -3], [-3, -1]] | Failed |
| oracle 3 | [[], [2, 1]] | [[], [2, 1]] | Passed |
| oracle 4 | [[2, 1, -1], [2, 1, -1]] | [[2, 3, 3], [3, 3, 2]] | Failed |
| oracle 5 | [[1, 3], [3]] | [[1, 3], [3]] | Passed |
| oracle 6 | [[4, 6], [3, 4, 6]] | [[4, 4], [4, 4, 1]] | Failed |
| oracle 7 | [[3, -2], [3, -2]] | [[3, 3], [3, 3]] | Failed |
| variant packet 1 | [[6, -2, 13, -16, 44, -77], [44, -77]] | [[6, 11, 15, 20, 27, 33], [33, 27]] | Failed |
SHA-256 / 95e9eb42492e04959f066f47a3c8c8d5444a1c4c01c0e766f13353f99dddc94d
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(residuals, history, coefficients, divisor):
state=list(history)
out=[]
for residual in residuals:
prediction=sum(c*x for c,x in zip(coefficients,state))//divisor
sample=prediction+residual
out.append(sample)
state=[sample]+state[1:]
return [out,state]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('oracle 1', solve(*([1, 2, -1], [3, 1], [2, -1], 1)), [[6, 11, 15], [15, 11]])
check('oracle 2', solve(*([0, 1, -2], [-3, 2], [1, 1], 3)), [[-1, -1, -3], [-3, -1]])
check('oracle 3', solve(*([], [2, 1], [2, -1], 1)), [[], [2, 1]])
check('oracle 4', solve(*([2, 0, 1], [0, 0, 0], [3, -2, 1], 2)), [[2, 3, 3], [3, 3, 2]])
check('oracle 5', solve(*([-1, 3], [5], [1], 2)), [[1, 3], [3]])
check('oracle 6', solve(*([1, 1], [1, 2, 3], [1, 2, 3], 4)), [[4, 4], [4, 4, 1]])
check('oracle 7', solve(*([0, -1], [4, -2], [3, 1], 3)), [[3, 3], [3, 3]])
if N == 1: check('variant packet 1', solve(*[[1, 2, -1, 1, 2, -1], [3, 1], [2, -1], 1]), [[6, 11, 15, 20, 27, 33], [33, 27]])
if N == 2: check('variant packet 2', solve(*[[1, 2, -1, 1, 2, -1, 1, 2, -1], [3, 1], [2, -1], 1]), [[6, 11, 15, 20, 27, 33, 40, 49, 57], [57, 49]])
if N == 3: check('variant packet 3', solve(*[[1, 2, -1, 1, 2, -1, 1, 2, -1, 1, 2, -1], [3, 1], [2, -1], 1]), [[6, 11, 15, 20, 27, 33, 40, 49, 57, 66, 77, 87], [87, 77]])
if N == 4: check('variant packet 4', solve(*[[1, 2, -1, 1, 2, -1, 1, 2, -1, 1, 2, -1, 1, 2, -1], [3, 1], [2, -1], 1]), [[6, 11, 15, 20, 27, 33, 40, 49, 57, 66, 77, 87, 98, 111, 123], [123, 111]])
if N == 5: check('variant packet 5', solve(*[[1, 2, -1, 1, 2, -1, 1, 2, -1, 1, 2, -1, 1, 2, -1, 1, 2, -1], [3, 1], [2, -1], 1]), [[6, 11, 15, 20, 27, 33, 40, 49, 57, 66, 77, 87, 98, 111, 123, 136, 151, 165], [165, 151]])
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, 13, 24], [24, 1]] | [[6, 11, 15], [15, 11]] | Failed |
| oracle 2 | [[-1, 1, -1], [-1, 2]] | [[-1, -1, -3], [-3, -1]] | Failed |
| oracle 3 | [[], [2, 1]] | [[], [2, 1]] | Passed |
| oracle 4 | [[2, 3, 5], [5, 0, 0]] | [[2, 3, 3], [3, 3, 2]] | Failed |
| oracle 5 | [[1, 3], [3]] | [[1, 3], [3]] | Passed |
| oracle 6 | [[4, 5], [5, 2, 3]] | [[4, 4], [4, 4, 1]] | Failed |
| oracle 7 | [[3, 1], [1, -2]] | [[3, 3], [3, 3]] | Failed |
| variant packet 1 | [[6, 13, 24, 48, 97, 192], [192, 1]] | [[6, 11, 15, 20, 27, 33], [33, 27]] | Failed |
SHA-256 / c67930470960047099de1ab2e68327ff4afbd7158880ff38c0d77321448e8ad7
3 / The verified repair
Exit 0"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(residuals, history, coefficients, divisor):
state=list(history)
out=[]
for residual in residuals:
prediction=sum(c*x for c,x in zip(coefficients,state))//divisor
sample=prediction+residual
out.append(sample)
state=[sample]+state[:-1]
return [out,state]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('oracle 1', solve(*([1, 2, -1], [3, 1], [2, -1], 1)), [[6, 11, 15], [15, 11]])
check('oracle 2', solve(*([0, 1, -2], [-3, 2], [1, 1], 3)), [[-1, -1, -3], [-3, -1]])
check('oracle 3', solve(*([], [2, 1], [2, -1], 1)), [[], [2, 1]])
check('oracle 4', solve(*([2, 0, 1], [0, 0, 0], [3, -2, 1], 2)), [[2, 3, 3], [3, 3, 2]])
check('oracle 5', solve(*([-1, 3], [5], [1], 2)), [[1, 3], [3]])
check('oracle 6', solve(*([1, 1], [1, 2, 3], [1, 2, 3], 4)), [[4, 4], [4, 4, 1]])
check('oracle 7', solve(*([0, -1], [4, -2], [3, 1], 3)), [[3, 3], [3, 3]])
if N == 1: check('variant packet 1', solve(*[[1, 2, -1, 1, 2, -1], [3, 1], [2, -1], 1]), [[6, 11, 15, 20, 27, 33], [33, 27]])
if N == 2: check('variant packet 2', solve(*[[1, 2, -1, 1, 2, -1, 1, 2, -1], [3, 1], [2, -1], 1]), [[6, 11, 15, 20, 27, 33, 40, 49, 57], [57, 49]])
if N == 3: check('variant packet 3', solve(*[[1, 2, -1, 1, 2, -1, 1, 2, -1, 1, 2, -1], [3, 1], [2, -1], 1]), [[6, 11, 15, 20, 27, 33, 40, 49, 57, 66, 77, 87], [87, 77]])
if N == 4: check('variant packet 4', solve(*[[1, 2, -1, 1, 2, -1, 1, 2, -1, 1, 2, -1, 1, 2, -1], [3, 1], [2, -1], 1]), [[6, 11, 15, 20, 27, 33, 40, 49, 57, 66, 77, 87, 98, 111, 123], [123, 111]])
if N == 5: check('variant packet 5', solve(*[[1, 2, -1, 1, 2, -1, 1, 2, -1, 1, 2, -1, 1, 2, -1, 1, 2, -1], [3, 1], [2, -1], 1]), [[6, 11, 15, 20, 27, 33, 40, 49, 57, 66, 77, 87, 98, 111, 123, 136, 151, 165], [165, 151]])
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, 11, 15], [15, 11]] | [[6, 11, 15], [15, 11]] | Passed |
| oracle 2 | [[-1, -1, -3], [-3, -1]] | [[-1, -1, -3], [-3, -1]] | Passed |
| oracle 3 | [[], [2, 1]] | [[], [2, 1]] | Passed |
| oracle 4 | [[2, 3, 3], [3, 3, 2]] | [[2, 3, 3], [3, 3, 2]] | Passed |
| oracle 5 | [[1, 3], [3]] | [[1, 3], [3]] | Passed |
| oracle 6 | [[4, 4], [4, 4, 1]] | [[4, 4], [4, 4, 1]] | Passed |
| oracle 7 | [[3, 3], [3, 3]] | [[3, 3], [3, 3]] | Passed |
| variant packet 1 | [[6, 11, 15, 20, 27, 33], [33, 27]] | [[6, 11, 15, 20, 27, 33], [33, 27]] | Passed |
SHA-256 / 13ed7d44c9da9b2358c03834f633d9fe772e00fc1f0d48d294522abee17e3586
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.533759+00:00.
Case digest / 1a928674a9d1644632633dce96d7985f0a7d6bc8e59cc7efe0316d108d3eee8a