FAILURE MAP
← Case archive

FA-49726 / PCM sample encoding / Open access

Pcm adaptive nibble reconstruction: adaptation class · case 01

Adaptation loses the highest magnitude bit.

Verified by executionVariant 1 · 8 checks per implementationDownload source bundle ↓JSON ↗

ROOT CAUSE

Adaptation loses the highest magnitude bit.

THE FAILURE

Adaptation loses the highest magnitude bit.

Unsuccessful approach: Shifting the class mixes sign with magnitude.

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&3]))
        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 fixtureActualExpectedOutcome
oracle 1[[1, 4, 9, 16, 23, 34, 34, 23], 23, 0][[1, 4, 9, 16, 23, 39, 37, 6], 6, 15]Failed
oracle 2[[127, 127, 127], 127, 11][[127, 127, 127], 127, 15]Failed
oracle 3[[-128, -128], -128, 13][[-128, -128], -128, 15]Failed
oracle 4[[], 4, 2][[], 4, 2]Passed
oracle 5[[1, 1, 1], 1, 0][[1, 1, 1], 1, 0]Passed
oracle 6[[21, 6, 26, 7], 7, 4][[21, 0, 36, -13], -13, 15]Failed
oracle 7[[0, -3, 3, -2], -2, 1][[0, -3, 3, -2], -2, 1]Passed
variant packet 1[[1, 4, 9, 16, 23, 34, 34, 23, 23, 24, 27, 31, 38, 49, 49, 38], 38, 0][[1, 4, 9, 16, 23, 39, 37, 6, 9, 19, 34, 52, 75, 121, 118, 66], 66, 15]Failed

SHA-256 / 56932e93a782c2e707966e00c61c9c6e4059e437dd67424b27c3268c5fd4e8bb

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&8 else delta
        predictor=max(-128,min(127,predictor))
        step_index=max(0,min(len(steps)-1,step_index+adjust[(code>>1)&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 fixtureActualExpectedOutcome
oracle 1[[1, 4, 9, 16, 23, 34, 34, 18], 18, 10][[1, 4, 9, 16, 23, 39, 37, 6], 6, 15]Failed
oracle 2[[127, 127, 127], 127, 11][[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[[21, 6, 46, 10], 10, 15][[21, 0, 36, -13], -13, 15]Failed
oracle 7[[0, -3, 4, -3], -3, 9][[0, -3, 3, -2], -2, 1]Failed
variant packet 1[[1, 4, 9, 16, 23, 34, 34, 18, 20, 26, 36, 47, 61, 83, 82, 59], 59, 14][[1, 4, 9, 16, 23, 39, 37, 6, 9, 19, 34, 52, 75, 121, 118, 66], 66, 15]Failed

SHA-256 / 392f6837010ce114270f5ba3802ce5748a56be8048aaee685ec75d1b25694373

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 / 020be06ed46a28724a4b6d76438fdc640feb608db4ba9ef887f2e898b5947f8f