FA-10906 / Audio channel mixing / Open access
Gain ramp reaches final frame · case 01
Dividing by sample count never reaches the requested final gain.
ROOT CAUSE
Dividing by sample count never reaches the requested final gain.
VERIFIED REPAIR
Apply the explicit PCM/playback contract: Apply a linear gain ramp including start on the first and end on the last of two or more samples; a singleton uses end gain.
Unsuccessful approach: A constant starting gain ignores the ramp entirely.
Case contract
Apply a linear gain ramp including start on the first and end on the last of two or more samples; a singleton uses end gain.
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, start, end):
return [x*(start+(end-start)*i/len(samples)) for i,x in enumerate(samples)]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1',solve(*([1, 1, 1], 0, 1)),[0, 0.5, 1])
check('fixture 2',solve(*([2], 0, 1)),[2])
check('fixture 3',solve(*([], 0, 1)),[])
check('fixture 4',solve(*([1, 1], 1, 0)),[1, 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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| fixture 1 | [0.0, 0.3333333333333333, 0.6666666666666666] | [0, 0.5, 1] | Failed |
| fixture 2 | [0.0] | [2] | Failed |
| fixture 3 | [] | [] | Passed |
| fixture 4 | [1.0, 0.5] | [1, 0] | Failed |
SHA-256 / bfc0056050a77033ad07d723644eaa4c90efcc42fd8f15448fa8d091dd9e5866
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
import math
N = 1
observations = []
def solve(samples, start, end):
return [x*start 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, 1, 1], 0, 1)),[0, 0.5, 1])
check('fixture 2',solve(*([2], 0, 1)),[2])
check('fixture 3',solve(*([], 0, 1)),[])
check('fixture 4',solve(*([1, 1], 1, 0)),[1, 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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| fixture 1 | [0, 0, 0] | [0, 0.5, 1] | Failed |
| fixture 2 | [0] | [2] | Failed |
| fixture 3 | [] | [] | Passed |
| fixture 4 | [1, 1] | [1, 0] | Failed |
SHA-256 / 7bbee627e11a5433edc66fc69e3ad7054c2637c27395d970906ae1bec36aaa2f
3 / The verified repair
Exit 0"""Failure Map reference implementation. Python standard library only."""
import json
import math
N = 1
observations = []
def solve(samples, start, end):
return [x*(start+(end-start)*i/(len(samples)-1)) for i,x in enumerate(samples)] if len(samples)>1 else ([samples[0]*end] if samples else [])
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1',solve(*([1, 1, 1], 0, 1)),[0, 0.5, 1])
check('fixture 2',solve(*([2], 0, 1)),[2])
check('fixture 3',solve(*([], 0, 1)),[])
check('fixture 4',solve(*([1, 1], 1, 0)),[1, 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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| fixture 1 | [0.0, 0.5, 1.0] | [0, 0.5, 1] | Passed |
| fixture 2 | [2] | [2] | Passed |
| fixture 3 | [] | [] | Passed |
| fixture 4 | [1.0, 0.0] | [1, 0] | Passed |
SHA-256 / b967e945d750c9024300d82419bd5cedad916c3549109cf68391dc4fd7f911e3
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.231432+00:00.
Case digest / 168c7b642532074fbc5bd5a6930af1ff3ab7dbd11dd867a757b4ed3c77512550