FAILURE MAP
← Case archive

FA-49036 / PCM sample encoding / Open access

Excess code recenter: inclusive wire end · case 01

The invalid code just beyond the field is treated as a valid endpoint.

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

ROOT CAUSE

The invalid code just beyond the field is treated as a valid endpoint.

THE FAILURE

The invalid code just beyond the field is treated as a valid endpoint.

Unsuccessful approach: Using a signed maximum halves the declared unsigned code range.

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
    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, 5], [0, -3, 5], [4, -3, 5], [5, -3, 5]][[-3, -3, 4], [0, -3, 4], [4, -3, 4], [4, -3, 4]]Failed
oracle 2[[-2, -2, 6], [-2, -2, 6], [6, -2, 6]][[-2, -2, 5], [-2, -2, 5], [5, -2, 5]]Failed
oracle 3[[0, -1, 3], [1, -1, 3], [2, -1, 3]][[0, -1, 2], [1, -1, 2], [2, -1, 2]]Failed
oracle 4[][]Passed
oracle 5[[-6, -6, 10], [9, -6, 10], [10, -6, 10]][[-6, -6, 9], [9, -6, 9], [9, -6, 9]]Failed
oracle 6[[0, 0, 2], [1, 0, 2]][[0, 0, 1], [1, 0, 1]]Failed
oracle 7[[-3, -5, 3], [-1, -5, 3], [2, -5, 3]][[-3, -5, 2], [-1, -5, 2], [2, -5, 2]]Failed
variant packet 1[[-3, -3, 5], [0, -3, 5], [4, -3, 5], [5, -3, 5], [-3, -3, 5], [0, -3, 5], [4, -3, 5], [5, -3, 5]][[-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 / 2d03263cbd67f46535f38f4e348f65fe86cdb7225cf99b916020753d082976c0

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))-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, 0], [0, -3, 0], [0, -3, 0], [0, -3, 0]][[-3, -3, 4], [0, -3, 4], [4, -3, 4], [4, -3, 4]]Failed
oracle 2[[-2, -2, 1], [-2, -2, 1], [1, -2, 1]][[-2, -2, 5], [-2, -2, 5], [5, -2, 5]]Failed
oracle 3[[0, -1, 0], [0, -1, 0], [0, -1, 0]][[0, -1, 2], [1, -1, 2], [2, -1, 2]]Failed
oracle 4[][]Passed
oracle 5[[-6, -6, 1], [1, -6, 1], [1, -6, 1]][[-6, -6, 9], [9, -6, 9], [9, -6, 9]]Failed
oracle 6[[0, 0, 0], [0, 0, 0]][[0, 0, 1], [1, 0, 1]]Failed
oracle 7[[-3, -5, -2], [-2, -5, -2], [-2, -5, -2]][[-3, -5, 2], [-1, -5, 2], [2, -5, 2]]Failed
variant packet 1[[-3, -3, 0], [0, -3, 0], [0, -3, 0], [0, -3, 0], [-3, -3, 0], [0, -3, 0], [0, -3, 0], [0, -3, 0]][[-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 / 78b5001beff712dc361bfa9af9278b96116bed9cb28736b49fefbfdb29dba323

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

Case digest / 45c3e6caebd18174841da38dbf34bbb2a82de097836016187f1abc89f04c81f6