FA-50256 / PCM sample encoding / Open access
Pcm biphase mark generation: previous cell state · case 01
Encoder phase state tracks the wrong half-cell.
ROOT CAUSE
Encoder phase state tracks the wrong half-cell.
VERIFIED REPAIR
Use the stated conversion contract at previous cell state.
Unsuccessful approach: Storing logical payload rather than physical level corrupts following transitions.
Case contract
Encode PCM transport payload bits as stipulated biphase-mark half-cells with mandatory boundary transitions and explicit initial/final physical levels.
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(bits, initial):
previous=initial
cells=[]
for bit in bits:
first=1-previous
second=1-first if bit else first
cells.append([first,second])
previous=first
return [cells,previous]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('oracle 1', solve(*([0, 1, 0, 1], 0)), [[[1, 1], [0, 1], [0, 0], [1, 0]], 0])
check('oracle 2', solve(*([1, 1, 1], 1)), [[[0, 1], [0, 1], [0, 1]], 1])
check('oracle 3', solve(*([0, 0], 0)), [[[1, 1], [0, 0]], 0])
check('oracle 4', solve(*([], 1)), [[], 1])
check('oracle 5', solve(*([1], 0)), [[[1, 0]], 0])
check('oracle 6', solve(*([0, 1, 1, 0], 1)), [[[0, 0], [1, 0], [1, 0], [1, 1]], 1])
check('oracle 7', solve(*([0], 1)), [[[0, 0]], 0])
if N == 1: check('variant packet 1', solve(*[[0, 1, 0, 1, 0, 1, 0, 1], 0]), [[[1, 1], [0, 1], [0, 0], [1, 0], [1, 1], [0, 1], [0, 0], [1, 0]], 0])
if N == 2: check('variant packet 2', solve(*[[0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1], 0]), [[[1, 1], [0, 1], [0, 0], [1, 0], [1, 1], [0, 1], [0, 0], [1, 0], [1, 1], [0, 1], [0, 0], [1, 0]], 0])
if N == 3: check('variant packet 3', solve(*[[0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1], 0]), [[[1, 1], [0, 1], [0, 0], [1, 0], [1, 1], [0, 1], [0, 0], [1, 0], [1, 1], [0, 1], [0, 0], [1, 0], [1, 1], [0, 1], [0, 0], [1, 0]], 0])
if N == 4: check('variant packet 4', solve(*[[0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1], 0]), [[[1, 1], [0, 1], [0, 0], [1, 0], [1, 1], [0, 1], [0, 0], [1, 0], [1, 1], [0, 1], [0, 0], [1, 0], [1, 1], [0, 1], [0, 0], [1, 0], [1, 1], [0, 1], [0, 0], [1, 0]], 0])
if N == 5: check('variant packet 5', solve(*[[0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1], 0]), [[[1, 1], [0, 1], [0, 0], [1, 0], [1, 1], [0, 1], [0, 0], [1, 0], [1, 1], [0, 1], [0, 0], [1, 0], [1, 1], [0, 1], [0, 0], [1, 0], [1, 1], [0, 1], [0, 0], [1, 0], [1, 1], [0, 1], [0, 0], [1, 0]], 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, 1], [0, 1], [1, 1], [0, 1]], 0] | [[[1, 1], [0, 1], [0, 0], [1, 0]], 0] | Failed |
| oracle 2 | [[[0, 1], [1, 0], [0, 1]], 0] | [[[0, 1], [0, 1], [0, 1]], 1] | Failed |
| oracle 3 | [[[1, 1], [0, 0]], 0] | [[[1, 1], [0, 0]], 0] | Passed |
| oracle 4 | [[], 1] | [[], 1] | Passed |
| oracle 5 | [[[1, 0]], 1] | [[[1, 0]], 0] | Failed |
| oracle 6 | [[[0, 0], [1, 0], [0, 1], [1, 1]], 1] | [[[0, 0], [1, 0], [1, 0], [1, 1]], 1] | Failed |
| oracle 7 | [[[0, 0]], 0] | [[[0, 0]], 0] | Passed |
| variant packet 1 | [[[1, 1], [0, 1], [1, 1], [0, 1], [1, 1], [0, 1], [1, 1], [0, 1]], 0] | [[[1, 1], [0, 1], [0, 0], [1, 0], [1, 1], [0, 1], [0, 0], [1, 0]], 0] | Failed |
SHA-256 / aa78931058275f622d9e1ad600bfdaa77a3e7c37a824252ff03b4334e76d8a7a
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(bits, initial):
previous=initial
cells=[]
for bit in bits:
first=1-previous
second=1-first if bit else first
cells.append([first,second])
previous=bit
return [cells,previous]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('oracle 1', solve(*([0, 1, 0, 1], 0)), [[[1, 1], [0, 1], [0, 0], [1, 0]], 0])
check('oracle 2', solve(*([1, 1, 1], 1)), [[[0, 1], [0, 1], [0, 1]], 1])
check('oracle 3', solve(*([0, 0], 0)), [[[1, 1], [0, 0]], 0])
check('oracle 4', solve(*([], 1)), [[], 1])
check('oracle 5', solve(*([1], 0)), [[[1, 0]], 0])
check('oracle 6', solve(*([0, 1, 1, 0], 1)), [[[0, 0], [1, 0], [1, 0], [1, 1]], 1])
check('oracle 7', solve(*([0], 1)), [[[0, 0]], 0])
if N == 1: check('variant packet 1', solve(*[[0, 1, 0, 1, 0, 1, 0, 1], 0]), [[[1, 1], [0, 1], [0, 0], [1, 0], [1, 1], [0, 1], [0, 0], [1, 0]], 0])
if N == 2: check('variant packet 2', solve(*[[0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1], 0]), [[[1, 1], [0, 1], [0, 0], [1, 0], [1, 1], [0, 1], [0, 0], [1, 0], [1, 1], [0, 1], [0, 0], [1, 0]], 0])
if N == 3: check('variant packet 3', solve(*[[0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1], 0]), [[[1, 1], [0, 1], [0, 0], [1, 0], [1, 1], [0, 1], [0, 0], [1, 0], [1, 1], [0, 1], [0, 0], [1, 0], [1, 1], [0, 1], [0, 0], [1, 0]], 0])
if N == 4: check('variant packet 4', solve(*[[0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1], 0]), [[[1, 1], [0, 1], [0, 0], [1, 0], [1, 1], [0, 1], [0, 0], [1, 0], [1, 1], [0, 1], [0, 0], [1, 0], [1, 1], [0, 1], [0, 0], [1, 0], [1, 1], [0, 1], [0, 0], [1, 0]], 0])
if N == 5: check('variant packet 5', solve(*[[0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1], 0]), [[[1, 1], [0, 1], [0, 0], [1, 0], [1, 1], [0, 1], [0, 0], [1, 0], [1, 1], [0, 1], [0, 0], [1, 0], [1, 1], [0, 1], [0, 0], [1, 0], [1, 1], [0, 1], [0, 0], [1, 0], [1, 1], [0, 1], [0, 0], [1, 0]], 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, 1], [1, 0], [0, 0], [1, 0]], 1] | [[[1, 1], [0, 1], [0, 0], [1, 0]], 0] | Failed |
| oracle 2 | [[[0, 1], [0, 1], [0, 1]], 1] | [[[0, 1], [0, 1], [0, 1]], 1] | Passed |
| oracle 3 | [[[1, 1], [1, 1]], 0] | [[[1, 1], [0, 0]], 0] | Failed |
| oracle 4 | [[], 1] | [[], 1] | Passed |
| oracle 5 | [[[1, 0]], 1] | [[[1, 0]], 0] | Failed |
| oracle 6 | [[[0, 0], [1, 0], [0, 1], [0, 0]], 0] | [[[0, 0], [1, 0], [1, 0], [1, 1]], 1] | Failed |
| oracle 7 | [[[0, 0]], 0] | [[[0, 0]], 0] | Passed |
| variant packet 1 | [[[1, 1], [1, 0], [0, 0], [1, 0], [0, 0], [1, 0], [0, 0], [1, 0]], 1] | [[[1, 1], [0, 1], [0, 0], [1, 0], [1, 1], [0, 1], [0, 0], [1, 0]], 0] | Failed |
SHA-256 / 7119ee219980b486123d38e68150c95778e7404066f9308711e686ff5d57ec42
3 / The verified repair
Exit 0"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(bits, initial):
previous=initial
cells=[]
for bit in bits:
first=1-previous
second=1-first if bit else first
cells.append([first,second])
previous=second
return [cells,previous]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('oracle 1', solve(*([0, 1, 0, 1], 0)), [[[1, 1], [0, 1], [0, 0], [1, 0]], 0])
check('oracle 2', solve(*([1, 1, 1], 1)), [[[0, 1], [0, 1], [0, 1]], 1])
check('oracle 3', solve(*([0, 0], 0)), [[[1, 1], [0, 0]], 0])
check('oracle 4', solve(*([], 1)), [[], 1])
check('oracle 5', solve(*([1], 0)), [[[1, 0]], 0])
check('oracle 6', solve(*([0, 1, 1, 0], 1)), [[[0, 0], [1, 0], [1, 0], [1, 1]], 1])
check('oracle 7', solve(*([0], 1)), [[[0, 0]], 0])
if N == 1: check('variant packet 1', solve(*[[0, 1, 0, 1, 0, 1, 0, 1], 0]), [[[1, 1], [0, 1], [0, 0], [1, 0], [1, 1], [0, 1], [0, 0], [1, 0]], 0])
if N == 2: check('variant packet 2', solve(*[[0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1], 0]), [[[1, 1], [0, 1], [0, 0], [1, 0], [1, 1], [0, 1], [0, 0], [1, 0], [1, 1], [0, 1], [0, 0], [1, 0]], 0])
if N == 3: check('variant packet 3', solve(*[[0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1], 0]), [[[1, 1], [0, 1], [0, 0], [1, 0], [1, 1], [0, 1], [0, 0], [1, 0], [1, 1], [0, 1], [0, 0], [1, 0], [1, 1], [0, 1], [0, 0], [1, 0]], 0])
if N == 4: check('variant packet 4', solve(*[[0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1], 0]), [[[1, 1], [0, 1], [0, 0], [1, 0], [1, 1], [0, 1], [0, 0], [1, 0], [1, 1], [0, 1], [0, 0], [1, 0], [1, 1], [0, 1], [0, 0], [1, 0], [1, 1], [0, 1], [0, 0], [1, 0]], 0])
if N == 5: check('variant packet 5', solve(*[[0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1], 0]), [[[1, 1], [0, 1], [0, 0], [1, 0], [1, 1], [0, 1], [0, 0], [1, 0], [1, 1], [0, 1], [0, 0], [1, 0], [1, 1], [0, 1], [0, 0], [1, 0], [1, 1], [0, 1], [0, 0], [1, 0], [1, 1], [0, 1], [0, 0], [1, 0]], 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, 1], [0, 1], [0, 0], [1, 0]], 0] | [[[1, 1], [0, 1], [0, 0], [1, 0]], 0] | Passed |
| oracle 2 | [[[0, 1], [0, 1], [0, 1]], 1] | [[[0, 1], [0, 1], [0, 1]], 1] | Passed |
| oracle 3 | [[[1, 1], [0, 0]], 0] | [[[1, 1], [0, 0]], 0] | Passed |
| oracle 4 | [[], 1] | [[], 1] | Passed |
| oracle 5 | [[[1, 0]], 0] | [[[1, 0]], 0] | Passed |
| oracle 6 | [[[0, 0], [1, 0], [1, 0], [1, 1]], 1] | [[[0, 0], [1, 0], [1, 0], [1, 1]], 1] | Passed |
| oracle 7 | [[[0, 0]], 0] | [[[0, 0]], 0] | Passed |
| variant packet 1 | [[[1, 1], [0, 1], [0, 0], [1, 0], [1, 1], [0, 1], [0, 0], [1, 0]], 0] | [[[1, 1], [0, 1], [0, 0], [1, 0], [1, 1], [0, 1], [0, 0], [1, 0]], 0] | Passed |
SHA-256 / 1a49c145d9f1652cf046d3c399ce911012cbf61b4536ba7c02be230603dd8d21
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.416699+00:00.
Case digest / 1c92bca2534730c76379bc8a90ee6ff8087d6f9afaae33f28e5b306438763002