FAILURE MAP
← Case archive

FA-10941 / Audio channel mixing / Open access

Route channel matrix · case 01

Multiplying row sums mixes each sample through unrelated gains.

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

ROOT CAUSE

Multiplying row sums mixes each sample through unrelated gains.

VERIFIED REPAIR

Apply the explicit PCM/playback contract: Matrix rows are output channels and columns are input channels. Multiply one sample frame by the row-oriented routing matrix.

Unsuccessful approach: Transposing the routing matrix reverses input/output channel roles.

Case contract

Matrix rows are output channels and columns are input channels. Multiply one sample frame by the row-oriented routing matrix.

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(frame, matrix):
    return [sum(frame)*sum(row) for row in matrix]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1',solve(*([1, 2], [[1, 0], [0.5, 0.5]])),[1, 1.5])
check('fixture 2',solve(*([2, 4], [[0, 1], [1, 0]])),[4, 2])
check('fixture 3',solve(*([1, 2], [[1, 1]])),[3])
check('fixture 4',solve(*([0, 0], [[1, 0], [0, 1]])),[0, 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[3, 3.0][1, 1.5]Failed
fixture 2[6, 6][4, 2]Failed
fixture 3[6][3]Failed
fixture 4[0, 0][0, 0]Passed

SHA-256 / 9fa8f20b945816ab3fca1c5c85b7aa9f8b7a98e643ae1f7355ce2e2a6cea5c93

2 / The unsuccessful fix

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json
import math
N = 1
observations = []
def solve(frame, matrix):
    return [sum(sample*gain for sample,gain in zip(frame,row)) for row in zip(*matrix)]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1',solve(*([1, 2], [[1, 0], [0.5, 0.5]])),[1, 1.5])
check('fixture 2',solve(*([2, 4], [[0, 1], [1, 0]])),[4, 2])
check('fixture 3',solve(*([1, 2], [[1, 1]])),[3])
check('fixture 4',solve(*([0, 0], [[1, 0], [0, 1]])),[0, 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[2.0, 1.0][1, 1.5]Failed
fixture 2[4, 2][4, 2]Passed
fixture 3[1, 1][3]Failed
fixture 4[0, 0][0, 0]Passed

SHA-256 / 7882962f683226901908c60501616c4d953d9cc96c0b28ff997190f75e081647

3 / The verified repair

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

SHA-256 / c556616b1cb516aaa2b1bd6e18ac900ef7d8d00ca433efd6a9b7c26d79896e1d

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

Case digest / a69d3445a02334dab515aba22d4dbf6a251cca047f303421ba6811467b255cd9