FAILURE MAP
← Case archive

FA-10861 / Audio frame buffers / Open access

Mono to multichannel duplication · case 01

Duplicating the whole waveform produces channel-major storage.

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

ROOT CAUSE

Duplicating the whole waveform produces channel-major storage.

VERIFIED REPAIR

Apply the explicit PCM/playback contract: Expand each mono sample to a frame of nonnegative channel count; output is frame-major.

Unsuccessful approach: Keeping singleton frames ignores the requested output channel count.

Case contract

Expand each mono sample to a frame of nonnegative channel count; output is frame-major.

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, channels):
    return [list(samples) for i in range(channels)]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1',solve(*([1, 2], 3)),[[1, 1, 1], [2, 2, 2]])
check('fixture 2',solve(*([], 2)),[])
check('fixture 3',solve(*([5], 1)),[[5]])
check('fixture 4',solve(*([1, 2], 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 fixtureActualExpectedOutcome
fixture 1[[1, 2], [1, 2], [1, 2]][[1, 1, 1], [2, 2, 2]]Failed
fixture 2[[], []][]Failed
fixture 3[[5]][[5]]Passed
fixture 4[][[], []]Failed

SHA-256 / a724fd5cb11080c6b24a429c72f62d39435b175c31a66804cad5167d488b7873

2 / The unsuccessful fix

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

SHA-256 / 907735aa36c9c8fad5f8b6d573b7a17b7dfd6bf6459e4b2090b93352306ba757

3 / The verified repair

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

SHA-256 / dc57b8f7e054a57b10f30472816b5e2c4387b00ebf707cb76c6b4fcfa78dc552

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

Case digest / c00d15c7d86c7c9a0c9b9df49b8f218e73d8c770c3e87537475e09bb4be129d0