FAILURE MAP
← Case archive

FA-10891 / Audio channel mixing / Open access

Mix pad shorter source · case 01

Zip truncation loses the longer source tail.

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

ROOT CAUSE

Zip truncation loses the longer source tail.

VERIFIED REPAIR

Apply the explicit PCM/playback contract: Mix two mono arrays into the longer duration, treating samples beyond either source end as zero; no saturation.

Unsuccessful approach: Using only the first source length still loses a longer second source.

Case contract

Mix two mono arrays into the longer duration, treating samples beyond either source end as zero; no saturation.

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(left, right):
    return [a+b for a,b in zip(left,right)]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1',solve(*([1, 2, 3], [4])),[5, 2, 3])
check('fixture 2',solve(*([1], [2, 3])),[3, 3])
check('fixture 3',solve(*([], [1])),[1])
check('fixture 4',solve(*([], [])),[])
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[5][5, 2, 3]Failed
fixture 2[3][3, 3]Failed
fixture 3[][1]Failed
fixture 4[][]Passed

SHA-256 / 9d36ee529ed71a7b1c71ad7f0ff451cb11695e1d376555fc117d2549368454ec

2 / The unsuccessful fix

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

SHA-256 / 611fb7535a87a091b48ad79b63a4589d79ff182b22b5461cc1cea3259a0f5004

3 / The verified repair

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

SHA-256 / 32ac0b8ebfd6d1f63c928a8ccd15dc7b7749bf3d9853b1816936a120140f6549

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

Case digest / 92a89e291343c8e1582f9672abe31677cae9b1a5d087c064f2df044941333ac1