FA-49016 / PCM sample encoding / Open access
Excess code recenter: wire range clamp · case 01
Invalid wire values wrap into in-range amplitudes.
ROOT CAUSE
Invalid wire values wrap into in-range amplitudes.
THE FAILURE
Invalid wire values wrap into in-range amplitudes.
Unsuccessful approach: Clamping at the midpoint discards the entire upper signal 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)-1
out=[]
for code in codes:
bounded=code&limit
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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| oracle 1 | [[-3, -3, 4], [0, -3, 4], [4, -3, 4], [-3, -3, 4]] | [[-3, -3, 4], [0, -3, 4], [4, -3, 4], [4, -3, 4]] | Failed |
| oracle 2 | [[5, -2, 5], [-2, -2, 5], [0, -2, 5]] | [[-2, -2, 5], [-2, -2, 5], [5, -2, 5]] | Failed |
| 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], [-6, -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 | [[-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], [-3, -3, 4], [-3, -3, 4], [0, -3, 4], [4, -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 / ec334c95bc2cd3c7bb6bbbddb36fd8b31289d108d1d277dc491ab7ef3988835a
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(1<<(width-1),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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| oracle 1 | [[-3, -3, 4], [0, -3, 4], [1, -3, 4], [1, -3, 4]] | [[-3, -3, 4], [0, -3, 4], [4, -3, 4], [4, -3, 4]] | Failed |
| oracle 2 | [[-2, -2, 5], [-2, -2, 5], [2, -2, 5]] | [[-2, -2, 5], [-2, -2, 5], [5, -2, 5]] | Failed |
| oracle 3 | [[0, -1, 2], [1, -1, 2], [1, -1, 2]] | [[0, -1, 2], [1, -1, 2], [2, -1, 2]] | Failed |
| oracle 4 | [] | [] | Passed |
| oracle 5 | [[-6, -6, 9], [2, -6, 9], [2, -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 | [[-3, -5, 2], [-1, -5, 2], [-1, -5, 2]] | [[-3, -5, 2], [-1, -5, 2], [2, -5, 2]] | Failed |
| variant packet 1 | [[-3, -3, 4], [0, -3, 4], [1, -3, 4], [1, -3, 4], [-3, -3, 4], [0, -3, 4], [1, -3, 4], [1, -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 / 40f842c7c13a63bf7b915dbefb00cb905000536483443afb80ad110a0a9321f2
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 / 2d492fafbad01dbb0d2140f4dfdc86328e1b722f9e5fde176fe00b02e95ff84f