FA-50181 / PCM sample encoding / Open access
Pcm residual partition seeds: residual direction · case 01
Residual sign is reversed inside PCM partitions.
ROOT CAUSE
Residual sign is reversed inside PCM partitions.
VERIFIED REPAIR
Use the stated conversion contract at residual direction.
Unsuccessful approach: Replacing state with residual skips integration.
Case contract
PCM residual partitions optionally replace predictor with an absolute seed; continuation partitions ignore their seed field and empty partitions retain state transitions.
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(partitions, initial):
state=initial
out=[]
for reset,seed,residuals in partitions:
if reset:
state=seed
section=[]
for residual in residuals:
state-=residual
section.append(state)
out.append(section)
return [out,state]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('oracle 1', solve(*([[True, 10, [1, 2]], [False, 99, [-1]]], 0)), [[[11, 13], [12]], 12])
check('oracle 2', solve(*([[True, 0, [2]], [False, 5, [1]]], 7)), [[[2], [3]], 3])
check('oracle 3', solve(*([[True, 4, []], [False, 0, [1]]], 0)), [[[], [5]], 5])
check('oracle 4', solve(*([], 3)), [[], 3])
check('oracle 5', solve(*([[False, 99, [1, 1]]], 2)), [[[3, 4]], 4])
check('oracle 6', solve(*([[True, -3, [-1, 2]]], 5)), [[[-4, -2]], -2])
check('oracle 7', solve(*([[False, 0, []]], 4)), [[[]], 4])
if N == 1: check('variant packet 1', solve(*[[[True, 10, [1, 2]], [False, 99, [-1]], [True, 10, [1, 2]], [False, 99, [-1]]], 0]), [[[11, 13], [12], [11, 13], [12]], 12])
if N == 2: check('variant packet 2', solve(*[[[True, 10, [1, 2]], [False, 99, [-1]], [True, 10, [1, 2]], [False, 99, [-1]], [True, 10, [1, 2]], [False, 99, [-1]]], 0]), [[[11, 13], [12], [11, 13], [12], [11, 13], [12]], 12])
if N == 3: check('variant packet 3', solve(*[[[True, 10, [1, 2]], [False, 99, [-1]], [True, 10, [1, 2]], [False, 99, [-1]], [True, 10, [1, 2]], [False, 99, [-1]], [True, 10, [1, 2]], [False, 99, [-1]]], 0]), [[[11, 13], [12], [11, 13], [12], [11, 13], [12], [11, 13], [12]], 12])
if N == 4: check('variant packet 4', solve(*[[[True, 10, [1, 2]], [False, 99, [-1]], [True, 10, [1, 2]], [False, 99, [-1]], [True, 10, [1, 2]], [False, 99, [-1]], [True, 10, [1, 2]], [False, 99, [-1]], [True, 10, [1, 2]], [False, 99, [-1]]], 0]), [[[11, 13], [12], [11, 13], [12], [11, 13], [12], [11, 13], [12], [11, 13], [12]], 12])
if N == 5: check('variant packet 5', solve(*[[[True, 10, [1, 2]], [False, 99, [-1]], [True, 10, [1, 2]], [False, 99, [-1]], [True, 10, [1, 2]], [False, 99, [-1]], [True, 10, [1, 2]], [False, 99, [-1]], [True, 10, [1, 2]], [False, 99, [-1]], [True, 10, [1, 2]], [False, 99, [-1]]], 0]), [[[11, 13], [12], [11, 13], [12], [11, 13], [12], [11, 13], [12], [11, 13], [12], [11, 13], [12]], 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 | [[[9, 7], [8]], 8] | [[[11, 13], [12]], 12] | Failed |
| oracle 2 | [[[-2], [-3]], -3] | [[[2], [3]], 3] | Failed |
| oracle 3 | [[[], [3]], 3] | [[[], [5]], 5] | Failed |
| oracle 4 | [[], 3] | [[], 3] | Passed |
| oracle 5 | [[[1, 0]], 0] | [[[3, 4]], 4] | Failed |
| oracle 6 | [[[-2, -4]], -4] | [[[-4, -2]], -2] | Failed |
| oracle 7 | [[[]], 4] | [[[]], 4] | Passed |
| variant packet 1 | [[[9, 7], [8], [9, 7], [8]], 8] | [[[11, 13], [12], [11, 13], [12]], 12] | Failed |
SHA-256 / 986cb893853ea313919698390ff53c854c8e5368c61a120b8926a6454137872c
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(partitions, initial):
state=initial
out=[]
for reset,seed,residuals in partitions:
if reset:
state=seed
section=[]
for residual in residuals:
state=residual
section.append(state)
out.append(section)
return [out,state]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('oracle 1', solve(*([[True, 10, [1, 2]], [False, 99, [-1]]], 0)), [[[11, 13], [12]], 12])
check('oracle 2', solve(*([[True, 0, [2]], [False, 5, [1]]], 7)), [[[2], [3]], 3])
check('oracle 3', solve(*([[True, 4, []], [False, 0, [1]]], 0)), [[[], [5]], 5])
check('oracle 4', solve(*([], 3)), [[], 3])
check('oracle 5', solve(*([[False, 99, [1, 1]]], 2)), [[[3, 4]], 4])
check('oracle 6', solve(*([[True, -3, [-1, 2]]], 5)), [[[-4, -2]], -2])
check('oracle 7', solve(*([[False, 0, []]], 4)), [[[]], 4])
if N == 1: check('variant packet 1', solve(*[[[True, 10, [1, 2]], [False, 99, [-1]], [True, 10, [1, 2]], [False, 99, [-1]]], 0]), [[[11, 13], [12], [11, 13], [12]], 12])
if N == 2: check('variant packet 2', solve(*[[[True, 10, [1, 2]], [False, 99, [-1]], [True, 10, [1, 2]], [False, 99, [-1]], [True, 10, [1, 2]], [False, 99, [-1]]], 0]), [[[11, 13], [12], [11, 13], [12], [11, 13], [12]], 12])
if N == 3: check('variant packet 3', solve(*[[[True, 10, [1, 2]], [False, 99, [-1]], [True, 10, [1, 2]], [False, 99, [-1]], [True, 10, [1, 2]], [False, 99, [-1]], [True, 10, [1, 2]], [False, 99, [-1]]], 0]), [[[11, 13], [12], [11, 13], [12], [11, 13], [12], [11, 13], [12]], 12])
if N == 4: check('variant packet 4', solve(*[[[True, 10, [1, 2]], [False, 99, [-1]], [True, 10, [1, 2]], [False, 99, [-1]], [True, 10, [1, 2]], [False, 99, [-1]], [True, 10, [1, 2]], [False, 99, [-1]], [True, 10, [1, 2]], [False, 99, [-1]]], 0]), [[[11, 13], [12], [11, 13], [12], [11, 13], [12], [11, 13], [12], [11, 13], [12]], 12])
if N == 5: check('variant packet 5', solve(*[[[True, 10, [1, 2]], [False, 99, [-1]], [True, 10, [1, 2]], [False, 99, [-1]], [True, 10, [1, 2]], [False, 99, [-1]], [True, 10, [1, 2]], [False, 99, [-1]], [True, 10, [1, 2]], [False, 99, [-1]], [True, 10, [1, 2]], [False, 99, [-1]]], 0]), [[[11, 13], [12], [11, 13], [12], [11, 13], [12], [11, 13], [12], [11, 13], [12], [11, 13], [12]], 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 | [[[1, 2], [-1]], -1] | [[[11, 13], [12]], 12] | Failed |
| oracle 2 | [[[2], [1]], 1] | [[[2], [3]], 3] | Failed |
| oracle 3 | [[[], [1]], 1] | [[[], [5]], 5] | Failed |
| oracle 4 | [[], 3] | [[], 3] | Passed |
| oracle 5 | [[[1, 1]], 1] | [[[3, 4]], 4] | Failed |
| oracle 6 | [[[-1, 2]], 2] | [[[-4, -2]], -2] | Failed |
| oracle 7 | [[[]], 4] | [[[]], 4] | Passed |
| variant packet 1 | [[[1, 2], [-1], [1, 2], [-1]], -1] | [[[11, 13], [12], [11, 13], [12]], 12] | Failed |
SHA-256 / 34f6322b2d57a98733cd458ba665c81afabf143f6da73ef689c6499b77445875
3 / The verified repair
Exit 0"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(partitions, initial):
state=initial
out=[]
for reset,seed,residuals in partitions:
if reset:
state=seed
section=[]
for residual in residuals:
state+=residual
section.append(state)
out.append(section)
return [out,state]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('oracle 1', solve(*([[True, 10, [1, 2]], [False, 99, [-1]]], 0)), [[[11, 13], [12]], 12])
check('oracle 2', solve(*([[True, 0, [2]], [False, 5, [1]]], 7)), [[[2], [3]], 3])
check('oracle 3', solve(*([[True, 4, []], [False, 0, [1]]], 0)), [[[], [5]], 5])
check('oracle 4', solve(*([], 3)), [[], 3])
check('oracle 5', solve(*([[False, 99, [1, 1]]], 2)), [[[3, 4]], 4])
check('oracle 6', solve(*([[True, -3, [-1, 2]]], 5)), [[[-4, -2]], -2])
check('oracle 7', solve(*([[False, 0, []]], 4)), [[[]], 4])
if N == 1: check('variant packet 1', solve(*[[[True, 10, [1, 2]], [False, 99, [-1]], [True, 10, [1, 2]], [False, 99, [-1]]], 0]), [[[11, 13], [12], [11, 13], [12]], 12])
if N == 2: check('variant packet 2', solve(*[[[True, 10, [1, 2]], [False, 99, [-1]], [True, 10, [1, 2]], [False, 99, [-1]], [True, 10, [1, 2]], [False, 99, [-1]]], 0]), [[[11, 13], [12], [11, 13], [12], [11, 13], [12]], 12])
if N == 3: check('variant packet 3', solve(*[[[True, 10, [1, 2]], [False, 99, [-1]], [True, 10, [1, 2]], [False, 99, [-1]], [True, 10, [1, 2]], [False, 99, [-1]], [True, 10, [1, 2]], [False, 99, [-1]]], 0]), [[[11, 13], [12], [11, 13], [12], [11, 13], [12], [11, 13], [12]], 12])
if N == 4: check('variant packet 4', solve(*[[[True, 10, [1, 2]], [False, 99, [-1]], [True, 10, [1, 2]], [False, 99, [-1]], [True, 10, [1, 2]], [False, 99, [-1]], [True, 10, [1, 2]], [False, 99, [-1]], [True, 10, [1, 2]], [False, 99, [-1]]], 0]), [[[11, 13], [12], [11, 13], [12], [11, 13], [12], [11, 13], [12], [11, 13], [12]], 12])
if N == 5: check('variant packet 5', solve(*[[[True, 10, [1, 2]], [False, 99, [-1]], [True, 10, [1, 2]], [False, 99, [-1]], [True, 10, [1, 2]], [False, 99, [-1]], [True, 10, [1, 2]], [False, 99, [-1]], [True, 10, [1, 2]], [False, 99, [-1]], [True, 10, [1, 2]], [False, 99, [-1]]], 0]), [[[11, 13], [12], [11, 13], [12], [11, 13], [12], [11, 13], [12], [11, 13], [12], [11, 13], [12]], 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 | [[[11, 13], [12]], 12] | [[[11, 13], [12]], 12] | Passed |
| oracle 2 | [[[2], [3]], 3] | [[[2], [3]], 3] | Passed |
| oracle 3 | [[[], [5]], 5] | [[[], [5]], 5] | Passed |
| oracle 4 | [[], 3] | [[], 3] | Passed |
| oracle 5 | [[[3, 4]], 4] | [[[3, 4]], 4] | Passed |
| oracle 6 | [[[-4, -2]], -2] | [[[-4, -2]], -2] | Passed |
| oracle 7 | [[[]], 4] | [[[]], 4] | Passed |
| variant packet 1 | [[[11, 13], [12], [11, 13], [12]], 12] | [[[11, 13], [12], [11, 13], [12]], 12] | Passed |
SHA-256 / 9db0e32dd0a9f4b2466e8b228582dfc277b2739ac65d890b0d6b6e869ad85988
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.742066+00:00.
Case digest / 6a16d1d6db95eca022879688cbc03dd081f63ac1ef647099fe8c0334969f2b0d