FA-50151 / PCM sample encoding / Open access
Pcm lpc residual reconstruction: residual addition · case 01
LPC residual sign is inverted.
ROOT CAUSE
LPC residual sign is inverted.
THE FAILURE
LPC residual sign is inverted.
Unsuccessful approach: Returning only residuals discards the predicted signal.
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=[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 | [[4, 3, 3], [3, 3]] | [[6, 11, 15], [15, 11]] | Failed |
| oracle 2 | [[-1, -3, 0], [0, -3]] | [[-1, -1, -3], [-3, -1]] | Failed |
| oracle 3 | [[], [2, 1]] | [[], [2, 1]] | Passed |
| oracle 4 | [[-2, -3, -4], [-4, -3, -2]] | [[2, 3, 3], [3, 3, 2]] | Failed |
| oracle 5 | [[3, -2], [-2]] | [[1, 3], [3]] | Failed |
| oracle 6 | [[2, 1], [1, 2, 1]] | [[4, 4], [4, 4, 1]] | Failed |
| oracle 7 | [[3, 5], [5, 3]] | [[3, 3], [3, 3]] | Failed |
| variant packet 1 | [[4, 3, 3, 2, -1, -3], [-3, -1]] | [[6, 11, 15, 20, 27, 33], [33, 27]] | Failed |
SHA-256 / 69feb603406e1a60acb8e5c2deeaace3fe8d98fa6e7e8839bd3fdf7c8c284504
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=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 | [[1, 2, -1], [-1, 2]] | [[6, 11, 15], [15, 11]] | Failed |
| oracle 2 | [[0, 1, -2], [-2, 1]] | [[-1, -1, -3], [-3, -1]] | Failed |
| oracle 3 | [[], [2, 1]] | [[], [2, 1]] | Passed |
| oracle 4 | [[2, 0, 1], [1, 0, 2]] | [[2, 3, 3], [3, 3, 2]] | Failed |
| oracle 5 | [[-1, 3], [3]] | [[1, 3], [3]] | Failed |
| oracle 6 | [[1, 1], [1, 1, 1]] | [[4, 4], [4, 4, 1]] | Failed |
| oracle 7 | [[0, -1], [-1, 0]] | [[3, 3], [3, 3]] | Failed |
| variant packet 1 | [[1, 2, -1, 1, 2, -1], [-1, 2]] | [[6, 11, 15, 20, 27, 33], [33, 27]] | Failed |
SHA-256 / 9d4d0fba6042d379117828cf74e012ee67ddc065ff8da053e5bbc9b1a20609a4
HELD IN THE MEMBER ARCHIVE
The verified repair and its recorded checks are member-only.
This mechanism has 8 recorded checks per implementation. The open-access tier publishes the failure and the unsuccessful fix; the repaired source that passes every check, and the observations that prove it, are available to members.
Every case sharing this mechanism uses the same contract and the same repair, so this one record is held back for all of them.
Member access is invitation-based. Sign in with your invited account to inspect the repair.
Sign in to the archive ↗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.619573+00:00.
Case digest / f7232777a69302e338cd24cb9d8aca28923c3c52fa7ef43e1e47e7453a66c681