FAILURE MAP
← Case archive

FA-49021 / PCM sample encoding / Open access

Excess code recenter: declared zero · case 01

A calibrated PCM zero code is replaced by a hard-coded midpoint.

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

ROOT CAUSE

A calibrated PCM zero code is replaced by a hard-coded midpoint.

VERIFIED REPAIR

Use the stated conversion contract at declared zero.

Unsuccessful approach: Adding the calibration offset moves silence away from zero.

Case contract

Recenter bounded unsigned PCM around an explicitly calibrated zero code and report asymmetric representable headroom; clamp invalid code inputs before recentering.

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, width, zero_code):
    limit=(1<<width)-1
    out=[]
    for code in codes:
        bounded=max(0,min(limit,code))
        delta=bounded-(1<<(width-1))
        low=-zero_code
        high=limit-zero_code
        out.append([delta,low,high])
    return out
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('oracle 1', solve(*([0, 3, 7, 8], 3, 3)), [[-3, -3, 4], [0, -3, 4], [4, -3, 4], [4, -3, 4]])
check('oracle 2', solve(*([-1, 0, 10], 3, 2)), [[-2, -2, 5], [-2, -2, 5], [5, -2, 5]])
check('oracle 3', solve(*([1, 2, 3], 2, 1)), [[0, -1, 2], [1, -1, 2], [2, -1, 2]])
check('oracle 4', solve(*([], 4, 5)), [])
check('oracle 5', solve(*([0, 15, 16], 4, 6)), [[-6, -6, 9], [9, -6, 9], [9, -6, 9]])
check('oracle 6', solve(*([0, 1], 1, 0)), [[0, 0, 1], [1, 0, 1]])
check('oracle 7', solve(*([2, 4, 7], 3, 5)), [[-3, -5, 2], [-1, -5, 2], [2, -5, 2]])
if N == 1: check('variant packet 1', solve(*[[0, 3, 7, 8, 0, 3, 7, 8], 3, 3]), [[-3, -3, 4], [0, -3, 4], [4, -3, 4], [4, -3, 4], [-3, -3, 4], [0, -3, 4], [4, -3, 4], [4, -3, 4]])
if N == 2: check('variant packet 2', solve(*[[0, 3, 7, 8, 0, 3, 7, 8, 0, 3, 7, 8], 3, 3]), [[-3, -3, 4], [0, -3, 4], [4, -3, 4], [4, -3, 4], [-3, -3, 4], [0, -3, 4], [4, -3, 4], [4, -3, 4], [-3, -3, 4], [0, -3, 4], [4, -3, 4], [4, -3, 4]])
if N == 3: check('variant packet 3', solve(*[[0, 3, 7, 8, 0, 3, 7, 8, 0, 3, 7, 8, 0, 3, 7, 8], 3, 3]), [[-3, -3, 4], [0, -3, 4], [4, -3, 4], [4, -3, 4], [-3, -3, 4], [0, -3, 4], [4, -3, 4], [4, -3, 4], [-3, -3, 4], [0, -3, 4], [4, -3, 4], [4, -3, 4], [-3, -3, 4], [0, -3, 4], [4, -3, 4], [4, -3, 4]])
if N == 4: check('variant packet 4', solve(*[[0, 3, 7, 8, 0, 3, 7, 8, 0, 3, 7, 8, 0, 3, 7, 8, 0, 3, 7, 8], 3, 3]), [[-3, -3, 4], [0, -3, 4], [4, -3, 4], [4, -3, 4], [-3, -3, 4], [0, -3, 4], [4, -3, 4], [4, -3, 4], [-3, -3, 4], [0, -3, 4], [4, -3, 4], [4, -3, 4], [-3, -3, 4], [0, -3, 4], [4, -3, 4], [4, -3, 4], [-3, -3, 4], [0, -3, 4], [4, -3, 4], [4, -3, 4]])
if N == 5: check('variant packet 5', solve(*[[0, 3, 7, 8, 0, 3, 7, 8, 0, 3, 7, 8, 0, 3, 7, 8, 0, 3, 7, 8, 0, 3, 7, 8], 3, 3]), [[-3, -3, 4], [0, -3, 4], [4, -3, 4], [4, -3, 4], [-3, -3, 4], [0, -3, 4], [4, -3, 4], [4, -3, 4], [-3, -3, 4], [0, -3, 4], [4, -3, 4], [4, -3, 4], [-3, -3, 4], [0, -3, 4], [4, -3, 4], [4, -3, 4], [-3, -3, 4], [0, -3, 4], [4, -3, 4], [4, -3, 4], [-3, -3, 4], [0, -3, 4], [4, -3, 4], [4, -3, 4]])
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[[-4, -3, 4], [-1, -3, 4], [3, -3, 4], [3, -3, 4]][[-3, -3, 4], [0, -3, 4], [4, -3, 4], [4, -3, 4]]Failed
oracle 2[[-4, -2, 5], [-4, -2, 5], [3, -2, 5]][[-2, -2, 5], [-2, -2, 5], [5, -2, 5]]Failed
oracle 3[[-1, -1, 2], [0, -1, 2], [1, -1, 2]][[0, -1, 2], [1, -1, 2], [2, -1, 2]]Failed
oracle 4[][]Passed
oracle 5[[-8, -6, 9], [7, -6, 9], [7, -6, 9]][[-6, -6, 9], [9, -6, 9], [9, -6, 9]]Failed
oracle 6[[-1, 0, 1], [0, 0, 1]][[0, 0, 1], [1, 0, 1]]Failed
oracle 7[[-2, -5, 2], [0, -5, 2], [3, -5, 2]][[-3, -5, 2], [-1, -5, 2], [2, -5, 2]]Failed
variant packet 1[[-4, -3, 4], [-1, -3, 4], [3, -3, 4], [3, -3, 4], [-4, -3, 4], [-1, -3, 4], [3, -3, 4], [3, -3, 4]][[-3, -3, 4], [0, -3, 4], [4, -3, 4], [4, -3, 4], [-3, -3, 4], [0, -3, 4], [4, -3, 4], [4, -3, 4]]Failed

SHA-256 / 5e9fcd182fda0cc156119914c91fd4210d0259e401704de51fdebffa06a74d65

2 / The unsuccessful fix

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

N = 1
observations = []
def solve(codes, width, zero_code):
    limit=(1<<width)-1
    out=[]
    for code in codes:
        bounded=max(0,min(limit,code))
        delta=bounded+zero_code
        low=-zero_code
        high=limit-zero_code
        out.append([delta,low,high])
    return out
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('oracle 1', solve(*([0, 3, 7, 8], 3, 3)), [[-3, -3, 4], [0, -3, 4], [4, -3, 4], [4, -3, 4]])
check('oracle 2', solve(*([-1, 0, 10], 3, 2)), [[-2, -2, 5], [-2, -2, 5], [5, -2, 5]])
check('oracle 3', solve(*([1, 2, 3], 2, 1)), [[0, -1, 2], [1, -1, 2], [2, -1, 2]])
check('oracle 4', solve(*([], 4, 5)), [])
check('oracle 5', solve(*([0, 15, 16], 4, 6)), [[-6, -6, 9], [9, -6, 9], [9, -6, 9]])
check('oracle 6', solve(*([0, 1], 1, 0)), [[0, 0, 1], [1, 0, 1]])
check('oracle 7', solve(*([2, 4, 7], 3, 5)), [[-3, -5, 2], [-1, -5, 2], [2, -5, 2]])
if N == 1: check('variant packet 1', solve(*[[0, 3, 7, 8, 0, 3, 7, 8], 3, 3]), [[-3, -3, 4], [0, -3, 4], [4, -3, 4], [4, -3, 4], [-3, -3, 4], [0, -3, 4], [4, -3, 4], [4, -3, 4]])
if N == 2: check('variant packet 2', solve(*[[0, 3, 7, 8, 0, 3, 7, 8, 0, 3, 7, 8], 3, 3]), [[-3, -3, 4], [0, -3, 4], [4, -3, 4], [4, -3, 4], [-3, -3, 4], [0, -3, 4], [4, -3, 4], [4, -3, 4], [-3, -3, 4], [0, -3, 4], [4, -3, 4], [4, -3, 4]])
if N == 3: check('variant packet 3', solve(*[[0, 3, 7, 8, 0, 3, 7, 8, 0, 3, 7, 8, 0, 3, 7, 8], 3, 3]), [[-3, -3, 4], [0, -3, 4], [4, -3, 4], [4, -3, 4], [-3, -3, 4], [0, -3, 4], [4, -3, 4], [4, -3, 4], [-3, -3, 4], [0, -3, 4], [4, -3, 4], [4, -3, 4], [-3, -3, 4], [0, -3, 4], [4, -3, 4], [4, -3, 4]])
if N == 4: check('variant packet 4', solve(*[[0, 3, 7, 8, 0, 3, 7, 8, 0, 3, 7, 8, 0, 3, 7, 8, 0, 3, 7, 8], 3, 3]), [[-3, -3, 4], [0, -3, 4], [4, -3, 4], [4, -3, 4], [-3, -3, 4], [0, -3, 4], [4, -3, 4], [4, -3, 4], [-3, -3, 4], [0, -3, 4], [4, -3, 4], [4, -3, 4], [-3, -3, 4], [0, -3, 4], [4, -3, 4], [4, -3, 4], [-3, -3, 4], [0, -3, 4], [4, -3, 4], [4, -3, 4]])
if N == 5: check('variant packet 5', solve(*[[0, 3, 7, 8, 0, 3, 7, 8, 0, 3, 7, 8, 0, 3, 7, 8, 0, 3, 7, 8, 0, 3, 7, 8], 3, 3]), [[-3, -3, 4], [0, -3, 4], [4, -3, 4], [4, -3, 4], [-3, -3, 4], [0, -3, 4], [4, -3, 4], [4, -3, 4], [-3, -3, 4], [0, -3, 4], [4, -3, 4], [4, -3, 4], [-3, -3, 4], [0, -3, 4], [4, -3, 4], [4, -3, 4], [-3, -3, 4], [0, -3, 4], [4, -3, 4], [4, -3, 4], [-3, -3, 4], [0, -3, 4], [4, -3, 4], [4, -3, 4]])
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[[3, -3, 4], [6, -3, 4], [10, -3, 4], [10, -3, 4]][[-3, -3, 4], [0, -3, 4], [4, -3, 4], [4, -3, 4]]Failed
oracle 2[[2, -2, 5], [2, -2, 5], [9, -2, 5]][[-2, -2, 5], [-2, -2, 5], [5, -2, 5]]Failed
oracle 3[[2, -1, 2], [3, -1, 2], [4, -1, 2]][[0, -1, 2], [1, -1, 2], [2, -1, 2]]Failed
oracle 4[][]Passed
oracle 5[[6, -6, 9], [21, -6, 9], [21, -6, 9]][[-6, -6, 9], [9, -6, 9], [9, -6, 9]]Failed
oracle 6[[0, 0, 1], [1, 0, 1]][[0, 0, 1], [1, 0, 1]]Passed
oracle 7[[7, -5, 2], [9, -5, 2], [12, -5, 2]][[-3, -5, 2], [-1, -5, 2], [2, -5, 2]]Failed
variant packet 1[[3, -3, 4], [6, -3, 4], [10, -3, 4], [10, -3, 4], [3, -3, 4], [6, -3, 4], [10, -3, 4], [10, -3, 4]][[-3, -3, 4], [0, -3, 4], [4, -3, 4], [4, -3, 4], [-3, -3, 4], [0, -3, 4], [4, -3, 4], [4, -3, 4]]Failed

SHA-256 / b98d5dfebe439787e03668d6e06ec79d0329a74edf8cfd9e16a6e0d02606e2e1

3 / The verified repair

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

N = 1
observations = []
def solve(codes, width, zero_code):
    limit=(1<<width)-1
    out=[]
    for code in codes:
        bounded=max(0,min(limit,code))
        delta=bounded-zero_code
        low=-zero_code
        high=limit-zero_code
        out.append([delta,low,high])
    return out
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('oracle 1', solve(*([0, 3, 7, 8], 3, 3)), [[-3, -3, 4], [0, -3, 4], [4, -3, 4], [4, -3, 4]])
check('oracle 2', solve(*([-1, 0, 10], 3, 2)), [[-2, -2, 5], [-2, -2, 5], [5, -2, 5]])
check('oracle 3', solve(*([1, 2, 3], 2, 1)), [[0, -1, 2], [1, -1, 2], [2, -1, 2]])
check('oracle 4', solve(*([], 4, 5)), [])
check('oracle 5', solve(*([0, 15, 16], 4, 6)), [[-6, -6, 9], [9, -6, 9], [9, -6, 9]])
check('oracle 6', solve(*([0, 1], 1, 0)), [[0, 0, 1], [1, 0, 1]])
check('oracle 7', solve(*([2, 4, 7], 3, 5)), [[-3, -5, 2], [-1, -5, 2], [2, -5, 2]])
if N == 1: check('variant packet 1', solve(*[[0, 3, 7, 8, 0, 3, 7, 8], 3, 3]), [[-3, -3, 4], [0, -3, 4], [4, -3, 4], [4, -3, 4], [-3, -3, 4], [0, -3, 4], [4, -3, 4], [4, -3, 4]])
if N == 2: check('variant packet 2', solve(*[[0, 3, 7, 8, 0, 3, 7, 8, 0, 3, 7, 8], 3, 3]), [[-3, -3, 4], [0, -3, 4], [4, -3, 4], [4, -3, 4], [-3, -3, 4], [0, -3, 4], [4, -3, 4], [4, -3, 4], [-3, -3, 4], [0, -3, 4], [4, -3, 4], [4, -3, 4]])
if N == 3: check('variant packet 3', solve(*[[0, 3, 7, 8, 0, 3, 7, 8, 0, 3, 7, 8, 0, 3, 7, 8], 3, 3]), [[-3, -3, 4], [0, -3, 4], [4, -3, 4], [4, -3, 4], [-3, -3, 4], [0, -3, 4], [4, -3, 4], [4, -3, 4], [-3, -3, 4], [0, -3, 4], [4, -3, 4], [4, -3, 4], [-3, -3, 4], [0, -3, 4], [4, -3, 4], [4, -3, 4]])
if N == 4: check('variant packet 4', solve(*[[0, 3, 7, 8, 0, 3, 7, 8, 0, 3, 7, 8, 0, 3, 7, 8, 0, 3, 7, 8], 3, 3]), [[-3, -3, 4], [0, -3, 4], [4, -3, 4], [4, -3, 4], [-3, -3, 4], [0, -3, 4], [4, -3, 4], [4, -3, 4], [-3, -3, 4], [0, -3, 4], [4, -3, 4], [4, -3, 4], [-3, -3, 4], [0, -3, 4], [4, -3, 4], [4, -3, 4], [-3, -3, 4], [0, -3, 4], [4, -3, 4], [4, -3, 4]])
if N == 5: check('variant packet 5', solve(*[[0, 3, 7, 8, 0, 3, 7, 8, 0, 3, 7, 8, 0, 3, 7, 8, 0, 3, 7, 8, 0, 3, 7, 8], 3, 3]), [[-3, -3, 4], [0, -3, 4], [4, -3, 4], [4, -3, 4], [-3, -3, 4], [0, -3, 4], [4, -3, 4], [4, -3, 4], [-3, -3, 4], [0, -3, 4], [4, -3, 4], [4, -3, 4], [-3, -3, 4], [0, -3, 4], [4, -3, 4], [4, -3, 4], [-3, -3, 4], [0, -3, 4], [4, -3, 4], [4, -3, 4], [-3, -3, 4], [0, -3, 4], [4, -3, 4], [4, -3, 4]])
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[[-3, -3, 4], [0, -3, 4], [4, -3, 4], [4, -3, 4]][[-3, -3, 4], [0, -3, 4], [4, -3, 4], [4, -3, 4]]Passed
oracle 2[[-2, -2, 5], [-2, -2, 5], [5, -2, 5]][[-2, -2, 5], [-2, -2, 5], [5, -2, 5]]Passed
oracle 3[[0, -1, 2], [1, -1, 2], [2, -1, 2]][[0, -1, 2], [1, -1, 2], [2, -1, 2]]Passed
oracle 4[][]Passed
oracle 5[[-6, -6, 9], [9, -6, 9], [9, -6, 9]][[-6, -6, 9], [9, -6, 9], [9, -6, 9]]Passed
oracle 6[[0, 0, 1], [1, 0, 1]][[0, 0, 1], [1, 0, 1]]Passed
oracle 7[[-3, -5, 2], [-1, -5, 2], [2, -5, 2]][[-3, -5, 2], [-1, -5, 2], [2, -5, 2]]Passed
variant packet 1[[-3, -3, 4], [0, -3, 4], [4, -3, 4], [4, -3, 4], [-3, -3, 4], [0, -3, 4], [4, -3, 4], [4, -3, 4]][[-3, -3, 4], [0, -3, 4], [4, -3, 4], [4, -3, 4], [-3, -3, 4], [0, -3, 4], [4, -3, 4], [4, -3, 4]]Passed

SHA-256 / 4bee2d113c8af57521233324d4c110375fb668889d8937d131525b924361fd69

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

Case digest / 5e08ae2c8cdf833e505e487fa190cd50a7e52560667bf890d0491a093affb5b8