FA-10841 / Audio frame buffers / Open access
Retain partial frame carry · case 01
Chunk processing discards the previous incomplete frame and current trailing samples.
ROOT CAUSE
Chunk processing discards the previous incomplete frame and current trailing samples.
VERIFIED REPAIR
Apply the explicit PCM/playback contract: Prepend prior partial-frame samples, emit all complete frames, and retain trailing samples as carry; channel count is positive.
Unsuccessful approach: Emitting all samples sends incomplete frames to the downstream consumer.
Case contract
Prepend prior partial-frame samples, emit all complete frames, and retain trailing samples as carry; channel count is positive.
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(carry, chunk, channels):
return [list(chunk[:(len(chunk)//channels)*channels]),[]]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1',solve(*([1], [2, 3, 4], 2)),[[1, 2, 3, 4], []])
check('fixture 2',solve(*([], [1, 2, 3], 2)),[[1, 2], [3]])
check('fixture 3',solve(*([1], [], 2)),[[], [1]])
check('fixture 4',solve(*([], [], 2)),[[], []])
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 | [[2, 3], []] | [[1, 2, 3, 4], []] | Failed |
| fixture 2 | [[1, 2], []] | [[1, 2], [3]] | Failed |
| fixture 3 | [[], []] | [[], [1]] | Failed |
| fixture 4 | [[], []] | [[], []] | Passed |
SHA-256 / 0b382b9fca4489a43e10ce3bbe3bd4f7e946f71690c29c975934ab03c0d267bb
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
import math
N = 1
observations = []
def solve(carry, chunk, channels):
return [list(carry)+list(chunk),[]]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1',solve(*([1], [2, 3, 4], 2)),[[1, 2, 3, 4], []])
check('fixture 2',solve(*([], [1, 2, 3], 2)),[[1, 2], [3]])
check('fixture 3',solve(*([1], [], 2)),[[], [1]])
check('fixture 4',solve(*([], [], 2)),[[], []])
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 | [[1, 2, 3], []] | [[1, 2], [3]] | Failed |
| fixture 3 | [[1], []] | [[], [1]] | Failed |
| fixture 4 | [[], []] | [[], []] | Passed |
SHA-256 / 7dae65ae2a3f08bd5e799bf4a260844c25fe5c6e443ead9bafe72114d695a3ec
3 / The verified repair
Exit 0"""Failure Map reference implementation. Python standard library only."""
import json
import math
N = 1
observations = []
def solve(carry, chunk, channels):
return [(list(carry)+list(chunk))[:((len(carry)+len(chunk))//channels)*channels],(list(carry)+list(chunk))[((len(carry)+len(chunk))//channels)*channels:]]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1',solve(*([1], [2, 3, 4], 2)),[[1, 2, 3, 4], []])
check('fixture 2',solve(*([], [1, 2, 3], 2)),[[1, 2], [3]])
check('fixture 3',solve(*([1], [], 2)),[[], [1]])
check('fixture 4',solve(*([], [], 2)),[[], []])
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 | [[1, 2], [3]] | [[1, 2], [3]] | Passed |
| fixture 3 | [[], [1]] | [[], [1]] | Passed |
| fixture 4 | [[], []] | [[], []] | Passed |
SHA-256 / afcc5e0efa3335cc166016c37f32f9a4c268bfd877c28b3eef869b8f505b6052
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.619135+00:00.
Case digest / 16b6cfa49680f2d95b77f4ac7e1684a37232529afdf9e93f849a1fd11d899d91