FA-50276 / PCM sample encoding / Open access
Pcm common trailing zero shift: shift cap · case 01
Wasted-bit field exceeds its declared maximum.
ROOT CAUSE
Wasted-bit field exceeds its declared maximum.
VERIFIED REPAIR
Use the stated conversion contract at shift cap.
Unsuccessful approach: Stopping early leaves an avoidable zero bit in every PCM sample.
Case contract
Losslessly factor the largest capped common trailing-zero count from signed PCM samples; zero samples do not constrain the count and all-silence blocks canonically use zero.
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(samples, maximum):
shift=0
nonzero=[abs(x) for x in samples if x!=0]
if nonzero:
while shift<=maximum and all((x&((1<<(shift+1))-1))==0 for x in nonzero):
shift+=1
coarse=[x>>shift for x in samples]
return [shift,coarse]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('oracle 1', solve(*([8, -12, 0], 5)), [2, [2, -3, 0]])
check('oracle 2', solve(*([0, 0], 4)), [0, [0, 0]])
check('oracle 3', solve(*([8, 6], 4)), [1, [4, 3]])
check('oracle 4', solve(*([], 3)), [0, []])
check('oracle 5', solve(*([-8, -4], 5)), [2, [-2, -1]])
check('oracle 6', solve(*([16, 32], 2)), [2, [4, 8]])
check('oracle 7', solve(*([3, -8], 4)), [0, [3, -8]])
if N == 1: check('variant packet 1', solve(*[[8, -12, 0, 8, -12, 0], 5]), [2, [2, -3, 0, 2, -3, 0]])
if N == 2: check('variant packet 2', solve(*[[8, -12, 0, 8, -12, 0, 8, -12, 0], 5]), [2, [2, -3, 0, 2, -3, 0, 2, -3, 0]])
if N == 3: check('variant packet 3', solve(*[[8, -12, 0, 8, -12, 0, 8, -12, 0, 8, -12, 0], 5]), [2, [2, -3, 0, 2, -3, 0, 2, -3, 0, 2, -3, 0]])
if N == 4: check('variant packet 4', solve(*[[8, -12, 0, 8, -12, 0, 8, -12, 0, 8, -12, 0, 8, -12, 0], 5]), [2, [2, -3, 0, 2, -3, 0, 2, -3, 0, 2, -3, 0, 2, -3, 0]])
if N == 5: check('variant packet 5', solve(*[[8, -12, 0, 8, -12, 0, 8, -12, 0, 8, -12, 0, 8, -12, 0, 8, -12, 0], 5]), [2, [2, -3, 0, 2, -3, 0, 2, -3, 0, 2, -3, 0, 2, -3, 0, 2, -3, 0]])
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 | [2, [2, -3, 0]] | [2, [2, -3, 0]] | Passed |
| oracle 2 | [0, [0, 0]] | [0, [0, 0]] | Passed |
| oracle 3 | [1, [4, 3]] | [1, [4, 3]] | Passed |
| oracle 4 | [0, []] | [0, []] | Passed |
| oracle 5 | [2, [-2, -1]] | [2, [-2, -1]] | Passed |
| oracle 6 | [3, [2, 4]] | [2, [4, 8]] | Failed |
| oracle 7 | [0, [3, -8]] | [0, [3, -8]] | Passed |
| variant packet 1 | [2, [2, -3, 0, 2, -3, 0]] | [2, [2, -3, 0, 2, -3, 0]] | Passed |
SHA-256 / f923d5c5a55fa80a7599f289a44c9c3f27603874387569aaa4845f13920c5280
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(samples, maximum):
shift=0
nonzero=[abs(x) for x in samples if x!=0]
if nonzero:
while shift<max(0,maximum-1) and all((x&((1<<(shift+1))-1))==0 for x in nonzero):
shift+=1
coarse=[x>>shift for x in samples]
return [shift,coarse]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('oracle 1', solve(*([8, -12, 0], 5)), [2, [2, -3, 0]])
check('oracle 2', solve(*([0, 0], 4)), [0, [0, 0]])
check('oracle 3', solve(*([8, 6], 4)), [1, [4, 3]])
check('oracle 4', solve(*([], 3)), [0, []])
check('oracle 5', solve(*([-8, -4], 5)), [2, [-2, -1]])
check('oracle 6', solve(*([16, 32], 2)), [2, [4, 8]])
check('oracle 7', solve(*([3, -8], 4)), [0, [3, -8]])
if N == 1: check('variant packet 1', solve(*[[8, -12, 0, 8, -12, 0], 5]), [2, [2, -3, 0, 2, -3, 0]])
if N == 2: check('variant packet 2', solve(*[[8, -12, 0, 8, -12, 0, 8, -12, 0], 5]), [2, [2, -3, 0, 2, -3, 0, 2, -3, 0]])
if N == 3: check('variant packet 3', solve(*[[8, -12, 0, 8, -12, 0, 8, -12, 0, 8, -12, 0], 5]), [2, [2, -3, 0, 2, -3, 0, 2, -3, 0, 2, -3, 0]])
if N == 4: check('variant packet 4', solve(*[[8, -12, 0, 8, -12, 0, 8, -12, 0, 8, -12, 0, 8, -12, 0], 5]), [2, [2, -3, 0, 2, -3, 0, 2, -3, 0, 2, -3, 0, 2, -3, 0]])
if N == 5: check('variant packet 5', solve(*[[8, -12, 0, 8, -12, 0, 8, -12, 0, 8, -12, 0, 8, -12, 0, 8, -12, 0], 5]), [2, [2, -3, 0, 2, -3, 0, 2, -3, 0, 2, -3, 0, 2, -3, 0, 2, -3, 0]])
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 | [2, [2, -3, 0]] | [2, [2, -3, 0]] | Passed |
| oracle 2 | [0, [0, 0]] | [0, [0, 0]] | Passed |
| oracle 3 | [1, [4, 3]] | [1, [4, 3]] | Passed |
| oracle 4 | [0, []] | [0, []] | Passed |
| oracle 5 | [2, [-2, -1]] | [2, [-2, -1]] | Passed |
| oracle 6 | [1, [8, 16]] | [2, [4, 8]] | Failed |
| oracle 7 | [0, [3, -8]] | [0, [3, -8]] | Passed |
| variant packet 1 | [2, [2, -3, 0, 2, -3, 0]] | [2, [2, -3, 0, 2, -3, 0]] | Passed |
SHA-256 / 62e47fdc38e8e0519a0a500be9f0d0664ec653695a356908d574afe47f71c245
3 / The verified repair
Exit 0"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(samples, maximum):
shift=0
nonzero=[abs(x) for x in samples if x!=0]
if nonzero:
while shift<maximum and all((x&((1<<(shift+1))-1))==0 for x in nonzero):
shift+=1
coarse=[x>>shift for x in samples]
return [shift,coarse]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('oracle 1', solve(*([8, -12, 0], 5)), [2, [2, -3, 0]])
check('oracle 2', solve(*([0, 0], 4)), [0, [0, 0]])
check('oracle 3', solve(*([8, 6], 4)), [1, [4, 3]])
check('oracle 4', solve(*([], 3)), [0, []])
check('oracle 5', solve(*([-8, -4], 5)), [2, [-2, -1]])
check('oracle 6', solve(*([16, 32], 2)), [2, [4, 8]])
check('oracle 7', solve(*([3, -8], 4)), [0, [3, -8]])
if N == 1: check('variant packet 1', solve(*[[8, -12, 0, 8, -12, 0], 5]), [2, [2, -3, 0, 2, -3, 0]])
if N == 2: check('variant packet 2', solve(*[[8, -12, 0, 8, -12, 0, 8, -12, 0], 5]), [2, [2, -3, 0, 2, -3, 0, 2, -3, 0]])
if N == 3: check('variant packet 3', solve(*[[8, -12, 0, 8, -12, 0, 8, -12, 0, 8, -12, 0], 5]), [2, [2, -3, 0, 2, -3, 0, 2, -3, 0, 2, -3, 0]])
if N == 4: check('variant packet 4', solve(*[[8, -12, 0, 8, -12, 0, 8, -12, 0, 8, -12, 0, 8, -12, 0], 5]), [2, [2, -3, 0, 2, -3, 0, 2, -3, 0, 2, -3, 0, 2, -3, 0]])
if N == 5: check('variant packet 5', solve(*[[8, -12, 0, 8, -12, 0, 8, -12, 0, 8, -12, 0, 8, -12, 0, 8, -12, 0], 5]), [2, [2, -3, 0, 2, -3, 0, 2, -3, 0, 2, -3, 0, 2, -3, 0, 2, -3, 0]])
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 | [2, [2, -3, 0]] | [2, [2, -3, 0]] | Passed |
| oracle 2 | [0, [0, 0]] | [0, [0, 0]] | Passed |
| oracle 3 | [1, [4, 3]] | [1, [4, 3]] | Passed |
| oracle 4 | [0, []] | [0, []] | Passed |
| oracle 5 | [2, [-2, -1]] | [2, [-2, -1]] | Passed |
| oracle 6 | [2, [4, 8]] | [2, [4, 8]] | Passed |
| oracle 7 | [0, [3, -8]] | [0, [3, -8]] | Passed |
| variant packet 1 | [2, [2, -3, 0, 2, -3, 0]] | [2, [2, -3, 0, 2, -3, 0]] | Passed |
SHA-256 / 6685802ff7a99ffcc55132b69825144bf3bc94edfbe08b4d6e15a53c618d2c9d
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:07.539720+00:00.
Case digest / c7ea2840b3921205f4bf9e498b9b680a879943bfcfa50cde7f696662eaf092fd