FAILURE MAP
← Case archive

FA-49221 / PCM sample encoding / Open access

Pcm delta reconstruction: reset before delta · case 01

Predictor reset takes effect one sample late.

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

ROOT CAUSE

Predictor reset takes effect one sample late.

VERIFIED REPAIR

Use the stated conversion contract at reset before delta.

Unsuccessful approach: Moving reset one sample early discards the preceding reconstructed sample.

Case contract

Reconstruct bounded delta-coded PCM from a seed and explicit sample-index resets before residual application, returning the continuation predictor.

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(deltas, initial, reset_positions):
    previous=initial
    out=[]
    for i,delta in enumerate(deltas):
        if i-1 in reset_positions:
            previous=initial
        previous+=delta
        out.append(previous)
    return [out,previous]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('oracle 1', solve(*([2, -1, 3], 10, [])), [[12, 11, 14], 14])
check('oracle 2', solve(*([1, 2, 3, 4], 5, [2])), [[6, 8, 8, 12], 12])
check('oracle 3', solve(*([], 7, [])), [[], 7])
check('oracle 4', solve(*([0, 0], -3, [0])), [[-3, -3], -3])
check('oracle 5', solve(*([-2, 4, -1], 0, [1])), [[-2, 4, 3], 3])
check('oracle 6', solve(*([3], 2, [])), [[5], 5])
check('oracle 7', solve(*([1, 1, 1], 1, [0, 1, 2])), [[2, 2, 2], 2])
if N == 1: check('variant packet 1', solve(*[[2, -1, 3, 2, -1, 3], 10, []]), [[12, 11, 14, 16, 15, 18], 18])
if N == 2: check('variant packet 2', solve(*[[2, -1, 3, 2, -1, 3, 2, -1, 3], 10, []]), [[12, 11, 14, 16, 15, 18, 20, 19, 22], 22])
if N == 3: check('variant packet 3', solve(*[[2, -1, 3, 2, -1, 3, 2, -1, 3, 2, -1, 3], 10, []]), [[12, 11, 14, 16, 15, 18, 20, 19, 22, 24, 23, 26], 26])
if N == 4: check('variant packet 4', solve(*[[2, -1, 3, 2, -1, 3, 2, -1, 3, 2, -1, 3, 2, -1, 3], 10, []]), [[12, 11, 14, 16, 15, 18, 20, 19, 22, 24, 23, 26, 28, 27, 30], 30])
if N == 5: check('variant packet 5', solve(*[[2, -1, 3, 2, -1, 3, 2, -1, 3, 2, -1, 3, 2, -1, 3, 2, -1, 3], 10, []]), [[12, 11, 14, 16, 15, 18, 20, 19, 22, 24, 23, 26, 28, 27, 30, 32, 31, 34], 34])
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[[12, 11, 14], 14][[12, 11, 14], 14]Passed
oracle 2[[6, 8, 11, 9], 9][[6, 8, 8, 12], 12]Failed
oracle 3[[], 7][[], 7]Passed
oracle 4[[-3, -3], -3][[-3, -3], -3]Passed
oracle 5[[-2, 2, -1], -1][[-2, 4, 3], 3]Failed
oracle 6[[5], 5][[5], 5]Passed
oracle 7[[2, 2, 2], 2][[2, 2, 2], 2]Passed
variant packet 1[[12, 11, 14, 16, 15, 18], 18][[12, 11, 14, 16, 15, 18], 18]Passed

SHA-256 / 9de18fdf25a4038737fab7638bebc11fad03f6ae35a7fad2762574134e219750

2 / The unsuccessful fix

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(deltas, initial, reset_positions):
    previous=initial
    out=[]
    for i,delta in enumerate(deltas):
        if i+1 in reset_positions:
            previous=initial
        previous+=delta
        out.append(previous)
    return [out,previous]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('oracle 1', solve(*([2, -1, 3], 10, [])), [[12, 11, 14], 14])
check('oracle 2', solve(*([1, 2, 3, 4], 5, [2])), [[6, 8, 8, 12], 12])
check('oracle 3', solve(*([], 7, [])), [[], 7])
check('oracle 4', solve(*([0, 0], -3, [0])), [[-3, -3], -3])
check('oracle 5', solve(*([-2, 4, -1], 0, [1])), [[-2, 4, 3], 3])
check('oracle 6', solve(*([3], 2, [])), [[5], 5])
check('oracle 7', solve(*([1, 1, 1], 1, [0, 1, 2])), [[2, 2, 2], 2])
if N == 1: check('variant packet 1', solve(*[[2, -1, 3, 2, -1, 3], 10, []]), [[12, 11, 14, 16, 15, 18], 18])
if N == 2: check('variant packet 2', solve(*[[2, -1, 3, 2, -1, 3, 2, -1, 3], 10, []]), [[12, 11, 14, 16, 15, 18, 20, 19, 22], 22])
if N == 3: check('variant packet 3', solve(*[[2, -1, 3, 2, -1, 3, 2, -1, 3, 2, -1, 3], 10, []]), [[12, 11, 14, 16, 15, 18, 20, 19, 22, 24, 23, 26], 26])
if N == 4: check('variant packet 4', solve(*[[2, -1, 3, 2, -1, 3, 2, -1, 3, 2, -1, 3, 2, -1, 3], 10, []]), [[12, 11, 14, 16, 15, 18, 20, 19, 22, 24, 23, 26, 28, 27, 30], 30])
if N == 5: check('variant packet 5', solve(*[[2, -1, 3, 2, -1, 3, 2, -1, 3, 2, -1, 3, 2, -1, 3, 2, -1, 3], 10, []]), [[12, 11, 14, 16, 15, 18, 20, 19, 22, 24, 23, 26, 28, 27, 30, 32, 31, 34], 34])
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[[12, 11, 14], 14][[12, 11, 14], 14]Passed
oracle 2[[6, 7, 10, 14], 14][[6, 8, 8, 12], 12]Failed
oracle 3[[], 7][[], 7]Passed
oracle 4[[-3, -3], -3][[-3, -3], -3]Passed
oracle 5[[-2, 2, 1], 1][[-2, 4, 3], 3]Failed
oracle 6[[5], 5][[5], 5]Passed
oracle 7[[2, 2, 3], 3][[2, 2, 2], 2]Failed
variant packet 1[[12, 11, 14, 16, 15, 18], 18][[12, 11, 14, 16, 15, 18], 18]Passed

SHA-256 / 09b0f4925606049cf3c745e26835f341001fc90861956f07e6ed48ab70cd3fb9

3 / The verified repair

Exit 0
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(deltas, initial, reset_positions):
    previous=initial
    out=[]
    for i,delta in enumerate(deltas):
        if i in reset_positions:
            previous=initial
        previous+=delta
        out.append(previous)
    return [out,previous]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('oracle 1', solve(*([2, -1, 3], 10, [])), [[12, 11, 14], 14])
check('oracle 2', solve(*([1, 2, 3, 4], 5, [2])), [[6, 8, 8, 12], 12])
check('oracle 3', solve(*([], 7, [])), [[], 7])
check('oracle 4', solve(*([0, 0], -3, [0])), [[-3, -3], -3])
check('oracle 5', solve(*([-2, 4, -1], 0, [1])), [[-2, 4, 3], 3])
check('oracle 6', solve(*([3], 2, [])), [[5], 5])
check('oracle 7', solve(*([1, 1, 1], 1, [0, 1, 2])), [[2, 2, 2], 2])
if N == 1: check('variant packet 1', solve(*[[2, -1, 3, 2, -1, 3], 10, []]), [[12, 11, 14, 16, 15, 18], 18])
if N == 2: check('variant packet 2', solve(*[[2, -1, 3, 2, -1, 3, 2, -1, 3], 10, []]), [[12, 11, 14, 16, 15, 18, 20, 19, 22], 22])
if N == 3: check('variant packet 3', solve(*[[2, -1, 3, 2, -1, 3, 2, -1, 3, 2, -1, 3], 10, []]), [[12, 11, 14, 16, 15, 18, 20, 19, 22, 24, 23, 26], 26])
if N == 4: check('variant packet 4', solve(*[[2, -1, 3, 2, -1, 3, 2, -1, 3, 2, -1, 3, 2, -1, 3], 10, []]), [[12, 11, 14, 16, 15, 18, 20, 19, 22, 24, 23, 26, 28, 27, 30], 30])
if N == 5: check('variant packet 5', solve(*[[2, -1, 3, 2, -1, 3, 2, -1, 3, 2, -1, 3, 2, -1, 3, 2, -1, 3], 10, []]), [[12, 11, 14, 16, 15, 18, 20, 19, 22, 24, 23, 26, 28, 27, 30, 32, 31, 34], 34])
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[[12, 11, 14], 14][[12, 11, 14], 14]Passed
oracle 2[[6, 8, 8, 12], 12][[6, 8, 8, 12], 12]Passed
oracle 3[[], 7][[], 7]Passed
oracle 4[[-3, -3], -3][[-3, -3], -3]Passed
oracle 5[[-2, 4, 3], 3][[-2, 4, 3], 3]Passed
oracle 6[[5], 5][[5], 5]Passed
oracle 7[[2, 2, 2], 2][[2, 2, 2], 2]Passed
variant packet 1[[12, 11, 14, 16, 15, 18], 18][[12, 11, 14, 16, 15, 18], 18]Passed

SHA-256 / 7a2542fc018856e5d2479ea2204d465ae6c94048c48d0793d6c34727392a72b4

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:44:57.927447+00:00.

Case digest / d063c92d838355246cb9fe5dfaf1756851262e4287fd5b7fd9964dcd1b6931aa