FAILURE MAP
← Case archive

FA-10856 / Audio frame buffers / Open access

Replace one channel · case 01

A mono channel update overwrites every channel in its frame.

Verified by executionVariant 1 · 4 checks per implementationDownload source bundle ↓JSON ↗

ROOT CAUSE

A mono channel update overwrites every channel in its frame.

VERIFIED REPAIR

Apply the explicit PCM/playback contract: Replace one valid channel in every frame with corresponding per-frame values; values length equals frame count.

Unsuccessful approach: Repeating the first replacement sample loses the replacement waveform over time.

Case contract

Replace one valid channel in every frame with corresponding per-frame values; values length equals frame count.

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(frames, channel, values):
    return [[values[i] for x in frame] for i,frame in enumerate(frames)]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1',solve(*([[1, 2], [3, 4]], 1, [8, 9])),[[1, 8], [3, 9]])
check('fixture 2',solve(*([[1, 2]], 0, [0])),[[0, 2]])
check('fixture 3',solve(*([], 0, [])),[])
check('fixture 4',solve(*([[1], [2]], 0, [4, 5])),[[4], [5]])
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 fixtureActualExpectedOutcome
fixture 1[[8, 8], [9, 9]][[1, 8], [3, 9]]Failed
fixture 2[[0, 0]][[0, 2]]Failed
fixture 3[][]Passed
fixture 4[[4], [5]][[4], [5]]Passed

SHA-256 / 60ad1ac977bd0b9f0589dcf35fec4986e36baccbc59db64bb5372f8160c16705

2 / The unsuccessful fix

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json
import math
N = 1
observations = []
def solve(frames, channel, values):
    return [[values[0] if c==channel else x for c,x in enumerate(frame)] for frame in frames]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1',solve(*([[1, 2], [3, 4]], 1, [8, 9])),[[1, 8], [3, 9]])
check('fixture 2',solve(*([[1, 2]], 0, [0])),[[0, 2]])
check('fixture 3',solve(*([], 0, [])),[])
check('fixture 4',solve(*([[1], [2]], 0, [4, 5])),[[4], [5]])
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 fixtureActualExpectedOutcome
fixture 1[[1, 8], [3, 8]][[1, 8], [3, 9]]Failed
fixture 2[[0, 2]][[0, 2]]Passed
fixture 3[][]Passed
fixture 4[[4], [4]][[4], [5]]Failed

SHA-256 / dff29e4ee8541d791705dd4483806df9c0aa931da8c3679308a06d48d954fa05

3 / The verified repair

Exit 0
"""Failure Map reference implementation. Python standard library only."""
import json
import math
N = 1
observations = []
def solve(frames, channel, values):
    return [[values[i] if c==channel else x for c,x in enumerate(frame)] for i,frame in enumerate(frames)]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1',solve(*([[1, 2], [3, 4]], 1, [8, 9])),[[1, 8], [3, 9]])
check('fixture 2',solve(*([[1, 2]], 0, [0])),[[0, 2]])
check('fixture 3',solve(*([], 0, [])),[])
check('fixture 4',solve(*([[1], [2]], 0, [4, 5])),[[4], [5]])
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 fixtureActualExpectedOutcome
fixture 1[[1, 8], [3, 9]][[1, 8], [3, 9]]Passed
fixture 2[[0, 2]][[0, 2]]Passed
fixture 3[][]Passed
fixture 4[[4], [5]][[4], [5]]Passed

SHA-256 / 7ce5a6f9fda5c0b1160414087c1e28c976a485bf519320d997eecfc77463a2e7

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.858577+00:00.

Case digest / 10b66e80c9c5d87789f5e3db217511cf9c23fa6d0aafe434887f3fd033d6996c