FA-10826 / Audio frame buffers / Open access
Deinterleave stereo stride · case 01
Halving the array treats interleaved input as planar.
ROOT CAUSE
Halving the array treats interleaved input as planar.
VERIFIED REPAIR
Apply the explicit PCM/playback contract: Split an even-length interleaved stereo array into left/right planar arrays.
Unsuccessful approach: Correct strides with reversed destinations swap left and right.
Case contract
Split an even-length interleaved stereo array into left/right planar arrays.
Why this case matters
A pure Python local audio pipeline stage with explicit sample formats and frame conventions; no real-time device or signal-spectrum claims.
1 / The failure
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
import math
N = 1
observations = []
def solve(samples):
return [samples[:len(samples)//2],samples[len(samples)//2:]]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1',solve(*([1, 3, 2, 4],)),[[1, 2], [3, 4]])
check('fixture 2',solve(*([],)),[[], []])
check('fixture 3',solve(*([5, 6],)),[[5], [6]])
check('fixture 4',solve(*([-1, 0, 0, 1],)),[[-1, 0], [0, 1]])
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 |
|---|---|---|---|
| fixture 1 | [[1, 3], [2, 4]] | [[1, 2], [3, 4]] | Failed |
| fixture 2 | [[], []] | [[], []] | Passed |
| fixture 3 | [[5], [6]] | [[5], [6]] | Passed |
| fixture 4 | [[-1, 0], [0, 1]] | [[-1, 0], [0, 1]] | Passed |
SHA-256 / 698f3d5cf32516d3cb45dd41681733a229b64cf85f6eb5aee69503bc7453535e
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
import math
N = 1
observations = []
def solve(samples):
return [samples[1::2],samples[::2]]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1',solve(*([1, 3, 2, 4],)),[[1, 2], [3, 4]])
check('fixture 2',solve(*([],)),[[], []])
check('fixture 3',solve(*([5, 6],)),[[5], [6]])
check('fixture 4',solve(*([-1, 0, 0, 1],)),[[-1, 0], [0, 1]])
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 |
|---|---|---|---|
| fixture 1 | [[3, 4], [1, 2]] | [[1, 2], [3, 4]] | Failed |
| fixture 2 | [[], []] | [[], []] | Passed |
| fixture 3 | [[6], [5]] | [[5], [6]] | Failed |
| fixture 4 | [[0, 1], [-1, 0]] | [[-1, 0], [0, 1]] | Failed |
SHA-256 / 038fb33b56db2488d163b09e42529252e8d215f1505798d7183404a81b00ab02
3 / The verified repair
Exit 0"""Failure Map reference implementation. Python standard library only."""
import json
import math
N = 1
observations = []
def solve(samples):
return [samples[::2],samples[1::2]]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1',solve(*([1, 3, 2, 4],)),[[1, 2], [3, 4]])
check('fixture 2',solve(*([],)),[[], []])
check('fixture 3',solve(*([5, 6],)),[[5], [6]])
check('fixture 4',solve(*([-1, 0, 0, 1],)),[[-1, 0], [0, 1]])
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 |
|---|---|---|---|
| fixture 1 | [[1, 2], [3, 4]] | [[1, 2], [3, 4]] | Passed |
| fixture 2 | [[], []] | [[], []] | Passed |
| fixture 3 | [[5], [6]] | [[5], [6]] | Passed |
| fixture 4 | [[-1, 0], [0, 1]] | [[-1, 0], [0, 1]] | Passed |
SHA-256 / 524c079a84a0a6dc84954bb1d79bf0d67ba8ea253f6eff0c2618b66e94465d9e
Verification & scope
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:38:42.532138+00:00.
Case digest / d8d6340cba32507abbc1984aa5040ba07b47824f04a13cd72891817c22cf28bb