{"abstract":"Long filters produce outputs that do not match filter-then-downsample.","category":"Digital signal filters","checks":7,"contract":"Input [h, D, samples] (integers). Output y[m] = sum_k h[k] x[mD - k] for m = 0 .. ceil(len/D) - 1 with x = 0 outside the signal, computed through the polyphase split E_p[j] = h[jD + p].","contract_signature":"x","evaluation_group":"w2-digital_signal_filters-polyphase-decimator","failed_approach":"The attempted repair interleaves from the end, h[D-1-p::D], which pairs taps with the wrong phases.","family":"w2-digital_signal_filters-polyphase-decimator-polyphase-split","id":"FA-91541","implementations":{"attempt":{"sha256":"6aec40d2d5227978dc03451cbc0d11656ae648d41bb042099fa6536a7d3bcfa5","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(x):\n    h, D, xs = x\n    L = len(xs)\n    M = (L + D - 1) // D\n    phases = [h[D - 1 - p::D] for p in range(D)]\n    out = []\n    for m in range(M):\n        acc = 0\n        for p in range(D):\n            for j, c in enumerate(phases[p]):\n                idx = (m - j) * D - p\n                if 0 <= idx < L:\n                    acc += c * xs[idx]\n        out.append(acc)\n    return out\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[['regression: impulse through D=2', [[1, 2, 3], 2, [1, 0, 0, 0, 0]], [1, 3, 0]], ['regression: length divisible', [[1, 1], 2, [1, 2, 3, 4]], [1, 5]], ['repair check: first sample matters', [[1], 3, [7, 1, 1, 1]], [7, 1]], ['regression: long filter D=3', [[1, 2, 3, 4, 5], 3, [1, 0, 0, 2, 0, 0, 3]], [1, 6, 11]], ['regression: random polyphase 0', [[2, -1], 2, [3, -3, 4, -2, -3, 5, 1]], [6, 11, -4, -3]], ['regression: random polyphase 1', [[-2, 4, -1, -1, 1, -3], 4, [3, 0, 1, 0, -1, -2]], [-6, 4]], ['regression: random polyphase 2', [[4, 2, 3, -2, 4], 4, [-2, -4, 3, 0, -1, -2, 3, -1]], [-8, 5]]], [['regression: random polyphase 0', [[2, -1], 2, [3, -3, 4, -2, -3, 5, 1]], [6, 11, -4, -3]], ['regression: random polyphase 1', [[-2, 4, -1, -1, 1, -3], 4, [3, 0, 1, 0, -1, -2]], [-6, 4]], ['regression: long filter D=3', [[1, 2, 3, 4, 5], 3, [1, 0, 0, 2, 0, 0, 3]], [1, 6, 11]], ['regression: random polyphase 2', [[4, 2, 3, -2, 4], 4, [-2, -4, 3, 0, -1, -2, 3, -1]], [-8, 5]], ['regression: random polyphase 4', [[0, -1, 1, -1, 4], 3, [3, 2, 5, 3, -1, 0, -3, 2, -1, -2]], [0, -6, 16, 6]], ['regression: random polyphase 5', [[3, 1, -1, 0, -1], 2, [-3, 5, 4, 1]], [-9, 20]], ['regression: random polyphase 6', [[1, -2, 3, 2, -1], 4, [4, 3, 5, -3, -4, -2]], [4, 19]]], [['regression: random polyphase 4', [[0, -1, 1, -1, 4], 3, [3, 2, 5, 3, -1, 0, -3, 2, -1, -2]], [0, -6, 16, 6]], ['regression: random polyphase 5', [[3, 1, -1, 0, -1], 2, [-3, 5, 4, 1]], [-9, 20]], ['regression: random polyphase 1', [[-2, 4, -1, -1, 1, -3], 4, [3, 0, 1, 0, -1, -2]], [-6, 4]], ['regression: random polyphase 0', [[2, -1], 2, [3, -3, 4, -2, -3, 5, 1]], [6, 11, -4, -3]], ['regression: random polyphase 2', [[4, 2, 3, -2, 4], 4, [-2, -4, 3, 0, -1, -2, 3, -1]], [-8, 5]], ['regression: random polyphase 6', [[1, -2, 3, 2, -1], 4, [4, 3, 5, -3, -4, -2]], [4, 19]], ['regression: random polyphase 7', [[1, -1, 0], 4, [4, 5, -2, -1, 0]], [4, 1]]], [['regression: random polyphase 7', [[1, -1, 0], 4, [4, 5, -2, -1, 0]], [4, 1]], ['regression: random polyphase 8', [[-3, 0, 2, 1, 2], 4, [-2, 0, -1, -1, -4, -2, 1]], [6, 6]], ['repair check: random polyphase 3', [[-3], 4, [5, -1, 2, 1, -2]], [-15, 6]], ['regression: random polyphase 1', [[-2, 4, -1, -1, 1, -3], 4, [3, 0, 1, 0, -1, -2]], [-6, 4]], ['regression: random polyphase 2', [[4, 2, 3, -2, 4], 4, [-2, -4, 3, 0, -1, -2, 3, -1]], [-8, 5]], ['regression: random polyphase 4', [[0, -1, 1, -1, 4], 3, [3, 2, 5, 3, -1, 0, -3, 2, -1, -2]], [0, -6, 16, 6]], ['regression: random polyphase 5', [[3, 1, -1, 0, -1], 2, [-3, 5, 4, 1]], [-9, 20]]], [['regression: random polyphase 10', [[3, -1, 1, 0, -2, 2], 4, [3, -3, 0, -3, 2, 1]], [9, 3]], ['regression: random polyphase 11', [[-2, 1, 4, -2, -3], 4, [-1, -4, -2, 5, 4, 5, 3, 1, 0]], [2, 0, -9]], ['regression: random polyphase 5', [[3, 1, -1, 0, -1], 2, [-3, 5, 4, 1]], [-9, 20]], ['regression: random polyphase 2', [[4, 2, 3, -2, 4], 4, [-2, -4, 3, 0, -1, -2, 3, -1]], [-8, 5]], ['regression: random polyphase 4', [[0, -1, 1, -1, 4], 3, [3, 2, 5, 3, -1, 0, -3, 2, -1, -2]], [0, -6, 16, 6]], ['regression: random polyphase 6', [[1, -2, 3, 2, -1], 4, [4, 3, 5, -3, -4, -2]], [4, 19]], ['regression: random polyphase 7', [[1, -1, 0], 4, [4, 5, -2, -1, 0]], [4, 1]]]]\nfor label, args, expected in fixtures[N-1]:\n    check(label, solve(args), expected)\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":"c686e775874a4b0584348e0f37804d4b7e689a8706c53aa1be6b92d97fbcb84e","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(x):\n    h, D, xs = x\n    L = len(xs)\n    M = (L + D - 1) // D\n    phases = [h[p * D:(p + 1) * D] for p in range(D)]\n    out = []\n    for m in range(M):\n        acc = 0\n        for p in range(D):\n            for j, c in enumerate(phases[p]):\n                idx = (m - j) * D - p\n                if 0 <= idx < L:\n                    acc += c * xs[idx]\n        out.append(acc)\n    return out\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[['regression: impulse through D=2', [[1, 2, 3], 2, [1, 0, 0, 0, 0]], [1, 3, 0]], ['regression: length divisible', [[1, 1], 2, [1, 2, 3, 4]], [1, 5]], ['repair check: first sample matters', [[1], 3, [7, 1, 1, 1]], [7, 1]], ['regression: long filter D=3', [[1, 2, 3, 4, 5], 3, [1, 0, 0, 2, 0, 0, 3]], [1, 6, 11]], ['regression: random polyphase 0', [[2, -1], 2, [3, -3, 4, -2, -3, 5, 1]], [6, 11, -4, -3]], ['regression: random polyphase 1', [[-2, 4, -1, -1, 1, -3], 4, [3, 0, 1, 0, -1, -2]], [-6, 4]], ['regression: random polyphase 2', [[4, 2, 3, -2, 4], 4, [-2, -4, 3, 0, -1, -2, 3, -1]], [-8, 5]]], [['regression: random polyphase 0', [[2, -1], 2, [3, -3, 4, -2, -3, 5, 1]], [6, 11, -4, -3]], ['regression: random polyphase 1', [[-2, 4, -1, -1, 1, -3], 4, [3, 0, 1, 0, -1, -2]], [-6, 4]], ['regression: long filter D=3', [[1, 2, 3, 4, 5], 3, [1, 0, 0, 2, 0, 0, 3]], [1, 6, 11]], ['regression: random polyphase 2', [[4, 2, 3, -2, 4], 4, [-2, -4, 3, 0, -1, -2, 3, -1]], [-8, 5]], ['regression: random polyphase 4', [[0, -1, 1, -1, 4], 3, [3, 2, 5, 3, -1, 0, -3, 2, -1, -2]], [0, -6, 16, 6]], ['regression: random polyphase 5', [[3, 1, -1, 0, -1], 2, [-3, 5, 4, 1]], [-9, 20]], ['regression: random polyphase 6', [[1, -2, 3, 2, -1], 4, [4, 3, 5, -3, -4, -2]], [4, 19]]], [['regression: random polyphase 4', [[0, -1, 1, -1, 4], 3, [3, 2, 5, 3, -1, 0, -3, 2, -1, -2]], [0, -6, 16, 6]], ['regression: random polyphase 5', [[3, 1, -1, 0, -1], 2, [-3, 5, 4, 1]], [-9, 20]], ['regression: random polyphase 1', [[-2, 4, -1, -1, 1, -3], 4, [3, 0, 1, 0, -1, -2]], [-6, 4]], ['regression: random polyphase 0', [[2, -1], 2, [3, -3, 4, -2, -3, 5, 1]], [6, 11, -4, -3]], ['regression: random polyphase 2', [[4, 2, 3, -2, 4], 4, [-2, -4, 3, 0, -1, -2, 3, -1]], [-8, 5]], ['regression: random polyphase 6', [[1, -2, 3, 2, -1], 4, [4, 3, 5, -3, -4, -2]], [4, 19]], ['regression: random polyphase 7', [[1, -1, 0], 4, [4, 5, -2, -1, 0]], [4, 1]]], [['regression: random polyphase 7', [[1, -1, 0], 4, [4, 5, -2, -1, 0]], [4, 1]], ['regression: random polyphase 8', [[-3, 0, 2, 1, 2], 4, [-2, 0, -1, -1, -4, -2, 1]], [6, 6]], ['repair check: random polyphase 3', [[-3], 4, [5, -1, 2, 1, -2]], [-15, 6]], ['regression: random polyphase 1', [[-2, 4, -1, -1, 1, -3], 4, [3, 0, 1, 0, -1, -2]], [-6, 4]], ['regression: random polyphase 2', [[4, 2, 3, -2, 4], 4, [-2, -4, 3, 0, -1, -2, 3, -1]], [-8, 5]], ['regression: random polyphase 4', [[0, -1, 1, -1, 4], 3, [3, 2, 5, 3, -1, 0, -3, 2, -1, -2]], [0, -6, 16, 6]], ['regression: random polyphase 5', [[3, 1, -1, 0, -1], 2, [-3, 5, 4, 1]], [-9, 20]]], [['regression: random polyphase 10', [[3, -1, 1, 0, -2, 2], 4, [3, -3, 0, -3, 2, 1]], [9, 3]], ['regression: random polyphase 11', [[-2, 1, 4, -2, -3], 4, [-1, -4, -2, 5, 4, 5, 3, 1, 0]], [2, 0, -9]], ['regression: random polyphase 5', [[3, 1, -1, 0, -1], 2, [-3, 5, 4, 1]], [-9, 20]], ['regression: random polyphase 2', [[4, 2, 3, -2, 4], 4, [-2, -4, 3, 0, -1, -2, 3, -1]], [-8, 5]], ['regression: random polyphase 4', [[0, -1, 1, -1, 4], 3, [3, 2, 5, 3, -1, 0, -3, 2, -1, -2]], [0, -6, 16, 6]], ['regression: random polyphase 6', [[1, -2, 3, 2, -1], 4, [4, 3, 5, -3, -4, -2]], [4, 19]], ['regression: random polyphase 7', [[1, -1, 0], 4, [4, 5, -2, -1, 0]], [4, 1]]]]\nfor label, args, expected in fixtures[N-1]:\n    check(label, solve(args), expected)\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":"A deterministic bounded teaching model with a stipulated toy contract; exact rational arithmetic or fixed-decimal rounding keeps outputs strict JSON. It is not a production DSP library and claims no standards conformance. 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":"w2-digital_signal_filters-polyphase-decimator-polyphase-split","generated_at":"2026-09-29T14:51:36.919714+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"Polyphase decimators avoid computing discarded outputs; commutator and phase-split slips alias the output.","root_cause":"Branch p takes h[pD:(p+1)D] instead of every D-th tap starting at p.","sha256":"541f3317fe98a30f8f8b1f856f78ba4088720a449b17621fbb69a4adaffc5650","title":"Polyphase decimator splits the filter into contiguous blocks · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verified":true,"visibility":"public","verification":{"attempt":{"elapsed_ms":37.658,"exit_code":1,"observations":[{"actual":[2,0,0],"check":"regression: impulse through D=2","expected":[1,3,0],"passed":false},{"actual":[1,5],"check":"regression: length divisible","expected":[1,5],"passed":true},{"actual":[0,1],"check":"repair check: first sample matters","expected":[7,1],"passed":false},{"actual":[3,6,9],"check":"regression: long filter D=3","expected":[1,6,11],"passed":false},{"actual":[-3,-10,-1,9],"check":"regression: random polyphase 0","expected":[6,11,-4,-3],"passed":false},{"actual":[-3,5],"check":"regression: random polyphase 1","expected":[-6,4],"passed":false},{"actual":[4,-8],"check":"regression: random polyphase 2","expected":[-8,5],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression: impulse through D=2\", \"actual\": [2, 0, 0], \"expected\": [1, 3, 0], \"passed\": false}, {\"check\": \"regression: length divisible\", \"actual\": [1, 5], \"expected\": [1, 5], \"passed\": true}, {\"check\": \"repair check: first sample matters\", \"actual\": [0, 1], \"expected\": [7, 1], \"passed\": false}, {\"check\": \"regression: long filter D=3\", \"actual\": [3, 6, 9], \"expected\": [1, 6, 11], \"passed\": false}, {\"check\": \"regression: random polyphase 0\", \"actual\": [-3, -10, -1, 9], \"expected\": [6, 11, -4, -3], \"passed\": false}, {\"check\": \"regression: random polyphase 1\", \"actual\": [-3, 5], \"expected\": [-6, 4], \"passed\": false}, {\"check\": \"regression: random polyphase 2\", \"actual\": [4, -8], \"expected\": [-8, 5], \"passed\": false}], \"passed\": false}\n"},"broken":{"elapsed_ms":38.97,"exit_code":1,"observations":[{"actual":[1,2,0],"check":"regression: impulse through D=2","expected":[1,3,0],"passed":false},{"actual":[1,4],"check":"regression: length divisible","expected":[1,5],"passed":false},{"actual":[7,1],"check":"repair check: first sample matters","expected":[7,1],"passed":true},{"actual":[1,4,10],"check":"regression: long filter D=3","expected":[1,6,11],"passed":false},{"actual":[6,5,-10,5],"check":"regression: random polyphase 0","expected":[6,11,-4,-3],"passed":false},{"actual":[-6,14],"check":"regression: random polyphase 1","expected":[-6,4],"passed":false},{"actual":[-8,-8],"check":"regression: random polyphase 2","expected":[-8,5],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression: impulse through D=2\", \"actual\": [1, 2, 0], \"expected\": [1, 3, 0], \"passed\": false}, {\"check\": \"regression: length divisible\", \"actual\": [1, 4], \"expected\": [1, 5], \"passed\": false}, {\"check\": \"repair check: first sample matters\", \"actual\": [7, 1], \"expected\": [7, 1], \"passed\": true}, {\"check\": \"regression: long filter D=3\", \"actual\": [1, 4, 10], \"expected\": [1, 6, 11], \"passed\": false}, {\"check\": \"regression: random polyphase 0\", \"actual\": [6, 5, -10, 5], \"expected\": [6, 11, -4, -3], \"passed\": false}, {\"check\": \"regression: random polyphase 1\", \"actual\": [-6, 14], \"expected\": [-6, 4], \"passed\": false}, {\"check\": \"regression: random polyphase 2\", \"actual\": [-8, -8], \"expected\": [-8, 5], \"passed\": false}], \"passed\": false}\n"}},"member_only":{"stages":["fixed"],"fields":["implementations.fixed","verification.fixed","harness","repair"],"note":"The verified repair, its recorded checks, the repair description, and the scoring harness are available to members."}}