FA-10896 / Audio channel mixing / Open access
Mix saturate after sum · case 01
Summed audio exceeds normalized output range.
ROOT CAUSE
Summed audio exceeds normalized output range.
VERIFIED REPAIR
Apply the explicit PCM/playback contract: Mix equal-length sources of finite intermediate amplitudes and clamp each final mixed sample into [-1,1].
Unsuccessful approach: Clipping each source before summation changes cancellation and still permits summed overflow.
Case contract
Mix equal-length sources of finite intermediate amplitudes and clamp each final mixed sample into [-1,1].
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(sources):
return [sum(frame) for frame in zip(*sources)] if sources else []
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1',solve(*([[0.75, 0.5], [0.75, -0.5]],)),[1, 0])
check('fixture 2',solve(*([[2], [-1]],)),[1])
check('fixture 3',solve(*([],)),[])
check('fixture 4',solve(*([[0.25], [0.25]],)),[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.5, 0.0] | [1, 0] | Failed |
| fixture 2 | [1] | [1] | Passed |
| fixture 3 | [] | [] | Passed |
| fixture 4 | [0.5] | [0.5] | Passed |
SHA-256 / a146b4d0be5f794ad1b22539c4d694cad87d914dc635bf95b890f82d5e245ff3
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
import math
N = 1
observations = []
def solve(sources):
return [sum(max(-1,min(1,x)) for x in frame) for frame in zip(*sources)] if sources else []
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1',solve(*([[0.75, 0.5], [0.75, -0.5]],)),[1, 0])
check('fixture 2',solve(*([[2], [-1]],)),[1])
check('fixture 3',solve(*([],)),[])
check('fixture 4',solve(*([[0.25], [0.25]],)),[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.5, 0.0] | [1, 0] | Failed |
| fixture 2 | [0] | [1] | Failed |
| fixture 3 | [] | [] | Passed |
| fixture 4 | [0.5] | [0.5] | Passed |
SHA-256 / 0e56b3477f608fa8b2dd60236e5a14a6eb88ae76013265dd8556215bc35d89d6
3 / The verified repair
Exit 0"""Failure Map reference implementation. Python standard library only."""
import json
import math
N = 1
observations = []
def solve(sources):
return [max(-1,min(1,sum(frame))) for frame in zip(*sources)] if sources else []
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1',solve(*([[0.75, 0.5], [0.75, -0.5]],)),[1, 0])
check('fixture 2',solve(*([[2], [-1]],)),[1])
check('fixture 3',solve(*([],)),[])
check('fixture 4',solve(*([[0.25], [0.25]],)),[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] | [1, 0] | Passed |
| fixture 2 | [1] | [1] | Passed |
| fixture 3 | [] | [] | Passed |
| fixture 4 | [0.5] | [0.5] | Passed |
SHA-256 / 73c79af0e91dd7c0844f85aa4a4dd3bc71fb4386ea016cd7b19f1dfc523b1a59
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.150650+00:00.
Case digest / 266e3c5f453eb52879222a57b50b9a3c699f9f4bc72d612af804c12509f5a882