{"abstract":"Inverting a selected channel applies polarity inversion to every channel.","category":"Audio channel mixing","checks":4,"contract":"Invert the sign of samples only on selected channel indices, preserving frame layout and unselected channels; use floating or unbounded integer intermediates.","evaluation_group":"xaud-polarity-invert-selected-channels","failed_approach":"Rectifying magnitudes removes negative waveform halves instead of inverting polarity.","family":"xaud-polarity-invert-selected-channels","id":"FA-11026","implementations":{"attempt":{"sha256":"572785ae17489175cabe62e07f769e692612868c7074b557df8d6b94c1b56a68","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport math\nN = 1\nobservations = []\ndef solve(frames, selected):\n    return [[abs(x) if c in selected else x for c,x in enumerate(frame)] for frame in frames]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('fixture 1',solve(*([[1, -2], [-3, 4]], [0])),[[-1, -2], [3, 4]])\ncheck('fixture 2',solve(*([[1, -2]], [])),[[1, -2]])\ncheck('fixture 3',solve(*([[1, -2]], [0, 1])),[[-1, 2]])\ncheck('fixture 4',solve(*([], [0])),[])\nprint(json.dumps({\"observations\": observations, \"passed\": all(x[\"passed\"] for x in observations)}, ensure_ascii=False))\nraise SystemExit(0 if all(x[\"passed\"] for x in observations) else 1)\n"},"broken":{"sha256":"7245d281c91207078a1488398a18c54956364a79a7b859729ec65b113c0d7970","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport math\nN = 1\nobservations = []\ndef solve(frames, selected):\n    return [[-x for x in frame] for frame in frames]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('fixture 1',solve(*([[1, -2], [-3, 4]], [0])),[[-1, -2], [3, 4]])\ncheck('fixture 2',solve(*([[1, -2]], [])),[[1, -2]])\ncheck('fixture 3',solve(*([[1, -2]], [0, 1])),[[-1, 2]])\ncheck('fixture 4',solve(*([], [0])),[])\nprint(json.dumps({\"observations\": observations, \"passed\": all(x[\"passed\"] for x in observations)}, ensure_ascii=False))\nraise SystemExit(0 if all(x[\"passed\"] for x in observations) else 1)\n"},"fixed":{"sha256":"d7c03ae30b6a5b6558c862e5a6b9607b04eb779fdc153f3a5b38858217b20014","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport math\nN = 1\nobservations = []\ndef solve(frames, selected):\n    return [[-x if c in selected else x for c,x in enumerate(frame)] for frame in frames]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('fixture 1',solve(*([[1, -2], [-3, 4]], [0])),[[-1, -2], [3, 4]])\ncheck('fixture 2',solve(*([[1, -2]], [])),[[1, -2]])\ncheck('fixture 3',solve(*([[1, -2]], [0, 1])),[[-1, 2]])\ncheck('fixture 4',solve(*([], [0])),[])\nprint(json.dumps({\"observations\": observations, \"passed\": all(x[\"passed\"] for x in observations)}, ensure_ascii=False))\nraise SystemExit(0 if all(x[\"passed\"] for x in observations) else 1)\n"}},"limitations":" 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.","method":"Deterministic executable model with adversarial boundary fixtures.","provenance":{"created_by":"Failure Map","dependencies":"Python standard library","family":"xaud-polarity-invert-selected-channels","generated_at":"2026-09-29T14:38:44.340555+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"A pure Python local audio pipeline stage with explicit sample formats and frame conventions; no real-time device or signal-spectrum claims.","repair":"Apply the explicit PCM/playback contract: Invert the sign of samples only on selected channel indices, preserving frame layout and unselected channels; use floating or unbounded integer intermediates.","root_cause":"Inverting a selected channel applies polarity inversion to every channel.","sha256":"b188820cbd49e718dd31696ffed2604ac79bf47bc5108bc4ae8a200f8240b048","title":"Polarity invert selected channels · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":36.959,"exit_code":1,"observations":[{"actual":[[1,-2],[3,4]],"check":"fixture 1","expected":[[-1,-2],[3,4]],"passed":false},{"actual":[[1,-2]],"check":"fixture 2","expected":[[1,-2]],"passed":true},{"actual":[[1,2]],"check":"fixture 3","expected":[[-1,2]],"passed":false},{"actual":[],"check":"fixture 4","expected":[],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"fixture 1\", \"actual\": [[1, -2], [3, 4]], \"expected\": [[-1, -2], [3, 4]], \"passed\": false}, {\"check\": \"fixture 2\", \"actual\": [[1, -2]], \"expected\": [[1, -2]], \"passed\": true}, {\"check\": \"fixture 3\", \"actual\": [[1, 2]], \"expected\": [[-1, 2]], \"passed\": false}, {\"check\": \"fixture 4\", \"actual\": [], \"expected\": [], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":41.095,"exit_code":1,"observations":[{"actual":[[-1,2],[3,-4]],"check":"fixture 1","expected":[[-1,-2],[3,4]],"passed":false},{"actual":[[-1,2]],"check":"fixture 2","expected":[[1,-2]],"passed":false},{"actual":[[-1,2]],"check":"fixture 3","expected":[[-1,2]],"passed":true},{"actual":[],"check":"fixture 4","expected":[],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"fixture 1\", \"actual\": [[-1, 2], [3, -4]], \"expected\": [[-1, -2], [3, 4]], \"passed\": false}, {\"check\": \"fixture 2\", \"actual\": [[-1, 2]], \"expected\": [[1, -2]], \"passed\": false}, {\"check\": \"fixture 3\", \"actual\": [[-1, 2]], \"expected\": [[-1, 2]], \"passed\": true}, {\"check\": \"fixture 4\", \"actual\": [], \"expected\": [], \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":39.895,"exit_code":0,"observations":[{"actual":[[-1,-2],[3,4]],"check":"fixture 1","expected":[[-1,-2],[3,4]],"passed":true},{"actual":[[1,-2]],"check":"fixture 2","expected":[[1,-2]],"passed":true},{"actual":[[-1,2]],"check":"fixture 3","expected":[[-1,2]],"passed":true},{"actual":[],"check":"fixture 4","expected":[],"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"fixture 1\", \"actual\": [[-1, -2], [3, 4]], \"expected\": [[-1, -2], [3, 4]], \"passed\": true}, {\"check\": \"fixture 2\", \"actual\": [[1, -2]], \"expected\": [[1, -2]], \"passed\": true}, {\"check\": \"fixture 3\", \"actual\": [[-1, 2]], \"expected\": [[-1, 2]], \"passed\": true}, {\"check\": \"fixture 4\", \"actual\": [], \"expected\": [], \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}