FA-49721 / PCM sample encoding / Open access
Pcm adaptive nibble reconstruction: sign code · case 01
Adaptive nibble polarity is reversed.
ROOT CAUSE
Adaptive nibble polarity is reversed.
THE FAILURE
Adaptive nibble polarity is reversed.
Unsuccessful approach: Reading a magnitude bit as sign couples polarity to step size.
Case contract
Stipulated bounded adaptive differential PCM nibble model with a 16-entry step table, magnitude adaptation, signed predictor saturation and exported predictor/index state.
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(codes, predictor, step_index):
steps=[7,8,9,10,11,12,13,14,16,17,19,21,23,25,28,31]
adjust=[-1,-1,-1,-1,2,4,6,8]
out=[]
for code in codes:
step=steps[step_index]
delta=step//8
if code&1: delta+=step//4
if code&2: delta+=step//2
if code&4: delta+=step
predictor+=delta if code&8 else -delta
predictor=max(-128,min(127,predictor))
step_index=max(0,min(len(steps)-1,step_index+adjust[code&7]))
out.append(predictor)
return [out,predictor,step_index]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('oracle 1', solve(*([0, 1, 2, 3, 4, 7, 8, 15], 0, 4)), [[1, 4, 9, 16, 23, 39, 37, 6], 6, 15])
check('oracle 2', solve(*([7, 7, 7], 120, 14)), [[127, 127, 127], 127, 15])
check('oracle 3', solve(*([15, 15], -120, 15)), [[-128, -128], -128, 15])
check('oracle 4', solve(*([], 4, 2)), [[], 4, 2])
check('oracle 5', solve(*([0, 0, 0], 0, 1)), [[1, 1, 1], 1, 0])
check('oracle 6', solve(*([4, 12, 6, 14], 3, 8)), [[21, 0, 36, -13], -13, 15])
check('oracle 7', solve(*([1, 9, 2, 10], -4, 5)), [[0, -3, 3, -2], -2, 1])
if N == 1: check('variant packet 1', solve(*[[0, 1, 2, 3, 4, 7, 8, 15, 0, 1, 2, 3, 4, 7, 8, 15], 0, 4]), [[1, 4, 9, 16, 23, 39, 37, 6, 9, 19, 34, 52, 75, 121, 118, 66], 66, 15])
if N == 2: check('variant packet 2', solve(*[[0, 1, 2, 3, 4, 7, 8, 15, 0, 1, 2, 3, 4, 7, 8, 15, 0, 1, 2, 3, 4, 7, 8, 15], 0, 4]), [[1, 4, 9, 16, 23, 39, 37, 6, 9, 19, 34, 52, 75, 121, 118, 66, 69, 79, 94, 112, 127, 127, 124, 72], 72, 15])
if N == 3: check('variant packet 3', solve(*[[0, 1, 2, 3, 4, 7, 8, 15, 0, 1, 2, 3, 4, 7, 8, 15, 0, 1, 2, 3, 4, 7, 8, 15, 0, 1, 2, 3, 4, 7, 8, 15], 0, 4]), [[1, 4, 9, 16, 23, 39, 37, 6, 9, 19, 34, 52, 75, 121, 118, 66, 69, 79, 94, 112, 127, 127, 124, 72, 75, 85, 100, 118, 127, 127, 124, 72], 72, 15])
if N == 4: check('variant packet 4', solve(*[[0, 1, 2, 3, 4, 7, 8, 15, 0, 1, 2, 3, 4, 7, 8, 15, 0, 1, 2, 3, 4, 7, 8, 15, 0, 1, 2, 3, 4, 7, 8, 15, 0, 1, 2, 3, 4, 7, 8, 15], 0, 4]), [[1, 4, 9, 16, 23, 39, 37, 6, 9, 19, 34, 52, 75, 121, 118, 66, 69, 79, 94, 112, 127, 127, 124, 72, 75, 85, 100, 118, 127, 127, 124, 72, 75, 85, 100, 118, 127, 127, 124, 72], 72, 15])
if N == 5: check('variant packet 5', solve(*[[0, 1, 2, 3, 4, 7, 8, 15, 0, 1, 2, 3, 4, 7, 8, 15, 0, 1, 2, 3, 4, 7, 8, 15, 0, 1, 2, 3, 4, 7, 8, 15, 0, 1, 2, 3, 4, 7, 8, 15, 0, 1, 2, 3, 4, 7, 8, 15], 0, 4]), [[1, 4, 9, 16, 23, 39, 37, 6, 9, 19, 34, 52, 75, 121, 118, 66, 69, 79, 94, 112, 127, 127, 124, 72, 75, 85, 100, 118, 127, 127, 124, 72, 75, 85, 100, 118, 127, 127, 124, 72, 75, 85, 100, 118, 127, 127, 124, 72], 72, 15])
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, -4, -9, -16, -23, -39, -37, -6], -6, 15] | [[1, 4, 9, 16, 23, 39, 37, 6], 6, 15] | Failed |
| oracle 2 | [[68, 12, -44], -44, 15] | [[127, 127, 127], 127, 15] | Failed |
| oracle 3 | [[-64, -8], -8, 15] | [[-128, -128], -128, 15] | Failed |
| oracle 4 | [[], 4, 2] | [[], 4, 2] | Passed |
| oracle 5 | [[-1, -1, -1], -1, 0] | [[1, 1, 1], 1, 0] | Failed |
| oracle 6 | [[-15, 6, -30, 19], 19, 15] | [[21, 0, 36, -13], -13, 15] | Failed |
| oracle 7 | [[-8, -5, -11, -6], -6, 1] | [[0, -3, 3, -2], -2, 1] | Failed |
| variant packet 1 | [[-1, -4, -9, -16, -23, -39, -37, -6, -9, -19, -34, -52, -75, -121, -118, -66], -66, 15] | [[1, 4, 9, 16, 23, 39, 37, 6, 9, 19, 34, 52, 75, 121, 118, 66], 66, 15] | Failed |
SHA-256 / e587229a48fd52e75c54e33bcaed5699b7fca933bacd1ec57bb2c4ddd9afa2c8
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(codes, predictor, step_index):
steps=[7,8,9,10,11,12,13,14,16,17,19,21,23,25,28,31]
adjust=[-1,-1,-1,-1,2,4,6,8]
out=[]
for code in codes:
step=steps[step_index]
delta=step//8
if code&1: delta+=step//4
if code&2: delta+=step//2
if code&4: delta+=step
predictor+=-delta if code&4 else delta
predictor=max(-128,min(127,predictor))
step_index=max(0,min(len(steps)-1,step_index+adjust[code&7]))
out.append(predictor)
return [out,predictor,step_index]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('oracle 1', solve(*([0, 1, 2, 3, 4, 7, 8, 15], 0, 4)), [[1, 4, 9, 16, 23, 39, 37, 6], 6, 15])
check('oracle 2', solve(*([7, 7, 7], 120, 14)), [[127, 127, 127], 127, 15])
check('oracle 3', solve(*([15, 15], -120, 15)), [[-128, -128], -128, 15])
check('oracle 4', solve(*([], 4, 2)), [[], 4, 2])
check('oracle 5', solve(*([0, 0, 0], 0, 1)), [[1, 1, 1], 1, 0])
check('oracle 6', solve(*([4, 12, 6, 14], 3, 8)), [[21, 0, 36, -13], -13, 15])
check('oracle 7', solve(*([1, 9, 2, 10], -4, 5)), [[0, -3, 3, -2], -2, 1])
if N == 1: check('variant packet 1', solve(*[[0, 1, 2, 3, 4, 7, 8, 15, 0, 1, 2, 3, 4, 7, 8, 15], 0, 4]), [[1, 4, 9, 16, 23, 39, 37, 6, 9, 19, 34, 52, 75, 121, 118, 66], 66, 15])
if N == 2: check('variant packet 2', solve(*[[0, 1, 2, 3, 4, 7, 8, 15, 0, 1, 2, 3, 4, 7, 8, 15, 0, 1, 2, 3, 4, 7, 8, 15], 0, 4]), [[1, 4, 9, 16, 23, 39, 37, 6, 9, 19, 34, 52, 75, 121, 118, 66, 69, 79, 94, 112, 127, 127, 124, 72], 72, 15])
if N == 3: check('variant packet 3', solve(*[[0, 1, 2, 3, 4, 7, 8, 15, 0, 1, 2, 3, 4, 7, 8, 15, 0, 1, 2, 3, 4, 7, 8, 15, 0, 1, 2, 3, 4, 7, 8, 15], 0, 4]), [[1, 4, 9, 16, 23, 39, 37, 6, 9, 19, 34, 52, 75, 121, 118, 66, 69, 79, 94, 112, 127, 127, 124, 72, 75, 85, 100, 118, 127, 127, 124, 72], 72, 15])
if N == 4: check('variant packet 4', solve(*[[0, 1, 2, 3, 4, 7, 8, 15, 0, 1, 2, 3, 4, 7, 8, 15, 0, 1, 2, 3, 4, 7, 8, 15, 0, 1, 2, 3, 4, 7, 8, 15, 0, 1, 2, 3, 4, 7, 8, 15], 0, 4]), [[1, 4, 9, 16, 23, 39, 37, 6, 9, 19, 34, 52, 75, 121, 118, 66, 69, 79, 94, 112, 127, 127, 124, 72, 75, 85, 100, 118, 127, 127, 124, 72, 75, 85, 100, 118, 127, 127, 124, 72], 72, 15])
if N == 5: check('variant packet 5', solve(*[[0, 1, 2, 3, 4, 7, 8, 15, 0, 1, 2, 3, 4, 7, 8, 15, 0, 1, 2, 3, 4, 7, 8, 15, 0, 1, 2, 3, 4, 7, 8, 15, 0, 1, 2, 3, 4, 7, 8, 15, 0, 1, 2, 3, 4, 7, 8, 15], 0, 4]), [[1, 4, 9, 16, 23, 39, 37, 6, 9, 19, 34, 52, 75, 121, 118, 66, 69, 79, 94, 112, 127, 127, 124, 72, 75, 85, 100, 118, 127, 127, 124, 72, 75, 85, 100, 118, 127, 127, 124, 72, 75, 85, 100, 118, 127, 127, 124, 72], 72, 15])
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, 4, 9, 16, 9, -7, -5, -36], -36, 15] | [[1, 4, 9, 16, 23, 39, 37, 6], 6, 15] | Failed |
| oracle 2 | [[68, 12, -44], -44, 15] | [[127, 127, 127], 127, 15] | Failed |
| oracle 3 | [[-128, -128], -128, 15] | [[-128, -128], -128, 15] | Passed |
| oracle 4 | [[], 4, 2] | [[], 4, 2] | Passed |
| oracle 5 | [[1, 1, 1], 1, 0] | [[1, 1, 1], 1, 0] | Passed |
| oracle 6 | [[-15, -36, -72, -121], -121, 15] | [[21, 0, 36, -13], -13, 15] | Failed |
| oracle 7 | [[0, 3, 9, 14], 14, 1] | [[0, -3, 3, -2], -2, 1] | Failed |
| variant packet 1 | [[1, 4, 9, 16, 9, -7, -5, -36, -33, -23, -8, 10, -13, -59, -56, -108], -108, 15] | [[1, 4, 9, 16, 23, 39, 37, 6, 9, 19, 34, 52, 75, 121, 118, 66], 66, 15] | Failed |
SHA-256 / e6159573123842f56f1bfa6de0cf3414ef2a24bb1708894650b483cd01919487
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:02.746337+00:00.
Case digest / 4c83a05cd0d2cb5a035a74b875096df99046fb1885c6d9bc57cddaac17501192