FA-50271 / PCM sample encoding / Open access
Pcm common trailing zero shift: shared divisibility · case 01
One divisible PCM sample permits destructive shifting of another sample.
ROOT CAUSE
One divisible PCM sample permits destructive shifting of another sample.
VERIFIED REPAIR
Use the stated conversion contract at shared divisibility.
Unsuccessful approach: Requiring two clear upcoming bits stops one removable bit too early.
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 any((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 | [3, [1, -2, 0]] | [2, [2, -3, 0]] | Failed |
| oracle 2 | [0, [0, 0]] | [0, [0, 0]] | Passed |
| oracle 3 | [3, [1, 0]] | [1, [4, 3]] | Failed |
| oracle 4 | [0, []] | [0, []] | Passed |
| oracle 5 | [3, [-1, -1]] | [2, [-2, -1]] | Failed |
| oracle 6 | [2, [4, 8]] | [2, [4, 8]] | Passed |
| oracle 7 | [3, [0, -1]] | [0, [3, -8]] | Failed |
| variant packet 1 | [3, [1, -2, 0, 1, -2, 0]] | [2, [2, -3, 0, 2, -3, 0]] | Failed |
SHA-256 / 298cda36a97775caf875e4bc21405ab5b92280335b6a16076557630dd8799ccb
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<maximum and all((x&((1<<(shift+2))-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 | [1, [4, -6, 0]] | [2, [2, -3, 0]] | Failed |
| oracle 2 | [0, [0, 0]] | [0, [0, 0]] | Passed |
| oracle 3 | [0, [8, 6]] | [1, [4, 3]] | Failed |
| oracle 4 | [0, []] | [0, []] | Passed |
| oracle 5 | [1, [-4, -2]] | [2, [-2, -1]] | Failed |
| oracle 6 | [2, [4, 8]] | [2, [4, 8]] | Passed |
| oracle 7 | [0, [3, -8]] | [0, [3, -8]] | Passed |
| variant packet 1 | [1, [4, -6, 0, 4, -6, 0]] | [2, [2, -3, 0, 2, -3, 0]] | Failed |
SHA-256 / 4c1e721b781c36231e7a2c185bee7bb305e89981ddb48f165be67662985da40b
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.536692+00:00.
Case digest / 09a5953478996e8611d18d0c7ce0834649334ed62494249e3a309dc0aa005db1