FA-10886 / Audio channel mixing / Open access
Stereo downmix average · case 01
Adding two full-scale channels doubles expected mono loudness.
ROOT CAUSE
Adding two full-scale channels doubles expected mono loudness.
VERIFIED REPAIR
Apply the explicit PCM/playback contract: Downmix two-channel normalized frames with equal one-half gains and no clipping.
Unsuccessful approach: Taking only the left channel discards right-only audio.
Case contract
Downmix two-channel normalized frames with equal one-half gains and no clipping.
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):
return [left+right for left,right in frames]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1',solve(*([[1, 1], [1, -1]],)),[1, 0])
check('fixture 2',solve(*([[0.5, 0]],)),[0.25])
check('fixture 3',solve(*([],)),[])
check('fixture 4',solve(*([[0, -1]],)),[-0.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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| fixture 1 | [2, 0] | [1, 0] | Failed |
| fixture 2 | [0.5] | [0.25] | Failed |
| fixture 3 | [] | [] | Passed |
| fixture 4 | [-1] | [-0.5] | Failed |
SHA-256 / 4770bea03ae3d1b5956943f7c9bdb7625d53989bdbd52ce13a1cba848beedb3a
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
import math
N = 1
observations = []
def solve(frames):
return [left for left,right in frames]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1',solve(*([[1, 1], [1, -1]],)),[1, 0])
check('fixture 2',solve(*([[0.5, 0]],)),[0.25])
check('fixture 3',solve(*([],)),[])
check('fixture 4',solve(*([[0, -1]],)),[-0.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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| fixture 1 | [1, 1] | [1, 0] | Failed |
| fixture 2 | [0.5] | [0.25] | Failed |
| fixture 3 | [] | [] | Passed |
| fixture 4 | [0] | [-0.5] | Failed |
SHA-256 / 7a622d9899b0d2c1a153c7f97d0b566ed69282e18162b2817d6efe970e2a4eea
3 / The verified repair
Exit 0"""Failure Map reference implementation. Python standard library only."""
import json
import math
N = 1
observations = []
def solve(frames):
return [(left+right)/2 for left,right in frames]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1',solve(*([[1, 1], [1, -1]],)),[1, 0])
check('fixture 2',solve(*([[0.5, 0]],)),[0.25])
check('fixture 3',solve(*([],)),[])
check('fixture 4',solve(*([[0, -1]],)),[-0.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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| fixture 1 | [1.0, 0.0] | [1, 0] | Passed |
| fixture 2 | [0.25] | [0.25] | Passed |
| fixture 3 | [] | [] | Passed |
| fixture 4 | [-0.5] | [-0.5] | Passed |
SHA-256 / bb844e511b96924af21e60ec16d18867d4b2c6b34224b05f3b8fd93230292ffb
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.114510+00:00.
Case digest / ca8df0441d3be8dfd9b6322c6bf57368784cff779c8235172e6c46d4a996f35d