{"abstract":"A filter specified with a1 = -1/2 (a decaying pole at +1/2) produces an alternating impulse response.","category":"Digital signal filters","checks":7,"contract":"Input [[b0, b1, b2, a0, a1, a2], samples]; coefficients are rational strings, normalized by a0 (\"a0-zero\" if a0 == 0). y[n] = b0 x[n] + b1 x[n-1] + b2 x[n-2] - a1 y[n-1] - a2 y[n-2] with zero initial state; return outputs as exact fraction strings.","contract_signature":"x","evaluation_group":"w2-digital_signal_filters-biquad-direct-form-one","failed_approach":"The attempted repair subtracts a1 but still adds a2.","family":"w2-digital_signal_filters-biquad-direct-form-one-feedback-sign-convention","id":"FA-91356","implementations":{"attempt":{"sha256":"3bbaa510d9c5becfe51550cbb7477c2d00e433b9ab2769516ee8cc6c26fdbc98","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nfrom fractions import Fraction\nN = 1\nobservations = []\ndef solve(x):\n    b0, b1, b2, a0, a1, a2 = [Fraction(v) for v in x[0]]\n    if a0 == 0:\n        return 'a0-zero'\n    b0, b1, b2, a1, a2 = b0 / a0, b1 / a0, b2 / a0, a1 / a0, a2 / a0\n    x1 = x2 = y1 = y2 = Fraction(0)\n    out = []\n    for s in x[1]:\n        y = b0 * s + b1 * x1 + b2 * x2 - a1 * y1 + a2 * y2\n        x2, x1 = x1, s\n        y2, y1 = y1, y\n        out.append(str(y))\n    return out\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[['regression: pure feedback impulse', [['1', '0', '0', '1', '-1/2', '0'], [1, 0, 0, 0]], ['1', '1/2', '1/4', '1/8']], ['regression: a0 not one', [['2', '1', '0', '2', '1', '1/2'], [2, 0, 0, 1]], ['2', '0', '-1/2', '5/4']], ['regression: second order feedback', [['1', '0', '0', '1', '0', '1/4'], [1, 0, 0, 0, 0]], ['1', '0', '-1/4', '0', '1/16']], ['control: fir only', [['1', '2', '1', '1', '0', '0'], [1, 2, 3]], ['1', '4', '8']], ['control: random biquad 7', [['-3/8', '0', '-1/4', '1', '2', '1/8'], [0, 3]], ['0', '-9/8']], ['control: random biquad 8', [['0', '1/2', '3/4', '-1', '3/4', '0'], [-3, 0]], ['0', '3/2']], ['control: random biquad 30', [['0', '0', '1/8', '1', '0', '-1/2'], [1, -2, 1]], ['0', '0', '1/8']]], [['regression: random biquad 0', [['1/3', '3/4', '1/2', '-1', '2', '1/3'], [2, 2]], ['-2/3', '-7/2']], ['regression: random biquad 1', [['1/8', '-1/4', '3/4', '2', '1/2', '1/8'], [-2, 1, 2, 2, 0, 2]], ['-1/8', '11/32', '-53/64', '223/512', '907/2048', '3019/4096']], ['regression: random biquad 2', [['1/2', '5/4', '1/2', '-1', '-1/2', '-1/2'], [-2, -2, 3, -3, 1]], ['1', '3', '0', '-11/4', '25/8']], ['control: fir only', [['1', '2', '1', '1', '0', '0'], [1, 2, 3]], ['1', '4', '8']], ['control: random biquad 7', [['-3/8', '0', '-1/4', '1', '2', '1/8'], [0, 3]], ['0', '-9/8']], ['control: random biquad 8', [['0', '1/2', '3/4', '-1', '3/4', '0'], [-3, 0]], ['0', '3/2']], ['control: random biquad 30', [['0', '0', '1/8', '1', '0', '-1/2'], [1, -2, 1]], ['0', '0', '1/8']]], [['regression: random biquad 3', [['-3/8', '5/4', '1/2', '2', '5/4', '1/8'], [-2, 0, -1, 3]], ['3/8', '-95/64', '303/512', '-5999/4096']], ['regression: random biquad 4', [['-3/8', '1/3', '-1/2', '2', '1/3', '0'], [-1, 1]], ['3/16', '-37/96']], ['regression: random biquad 5', [['1/2', '0', '-1/2', '-1', '-1/2', '-3/8'], [0, 2, -2, -1, 1]], ['0', '-1', '3/2', '9/8', '-21/8']], ['control: fir only', [['1', '2', '1', '1', '0', '0'], [1, 2, 3]], ['1', '4', '8']], ['control: random biquad 7', [['-3/8', '0', '-1/4', '1', '2', '1/8'], [0, 3]], ['0', '-9/8']], ['control: random biquad 8', [['0', '1/2', '3/4', '-1', '3/4', '0'], [-3, 0]], ['0', '3/2']], ['control: random biquad 30', [['0', '0', '1/8', '1', '0', '-1/2'], [1, -2, 1]], ['0', '0', '1/8']]], [['regression: random biquad 6', [['1/8', '0', '5/4', '1', '-1/2', '5/4'], [1, 1, 1, 0, 3, 2]], ['1/8', '3/16', '21/16', '107/64', '105/128', '-183/128']], ['regression: random biquad 9', [['3/4', '1/3', '1/2', '-1', '0', '1/8'], [-1, -1, 2]], ['3/4', '13/12', '-55/96']], ['regression: random biquad 10', [['3/4', '2', '1/2', '1', '-3/8', '1/3'], [2, 2, -3]], ['3/2', '97/16', '579/128']], ['control: fir only', [['1', '2', '1', '1', '0', '0'], [1, 2, 3]], ['1', '4', '8']], ['control: random biquad 7', [['-3/8', '0', '-1/4', '1', '2', '1/8'], [0, 3]], ['0', '-9/8']], ['control: random biquad 8', [['0', '1/2', '3/4', '-1', '3/4', '0'], [-3, 0]], ['0', '3/2']], ['control: random biquad 30', [['0', '0', '1/8', '1', '0', '-1/2'], [1, -2, 1]], ['0', '0', '1/8']]], [['regression: random biquad 11', [['1/2', '3/4', '0', '1', '1/3', '5/4'], [-3, 3, -3, 0, 2]], ['-3/2', '-1/4', '65/24', '-409/144', '-1243/864']], ['regression: random biquad 12', [['-3/8', '1/3', '5/4', '2', '2', '2'], [2, 2]], ['-3/8', '1/3']], ['regression: random biquad 10', [['3/4', '2', '1/2', '1', '-3/8', '1/3'], [2, 2, -3]], ['3/2', '97/16', '579/128']], ['control: fir only', [['1', '2', '1', '1', '0', '0'], [1, 2, 3]], ['1', '4', '8']], ['control: random biquad 7', [['-3/8', '0', '-1/4', '1', '2', '1/8'], [0, 3]], ['0', '-9/8']], ['control: random biquad 8', [['0', '1/2', '3/4', '-1', '3/4', '0'], [-3, 0]], ['0', '3/2']], ['control: random biquad 30', [['0', '0', '1/8', '1', '0', '-1/2'], [1, -2, 1]], ['0', '0', '1/8']]]]\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":"877ec6b267a3ba80d4af2e99bd997e106478a95c5ef2d6595b95ba0f2c58ca3a","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nfrom fractions import Fraction\nN = 1\nobservations = []\ndef solve(x):\n    b0, b1, b2, a0, a1, a2 = [Fraction(v) for v in x[0]]\n    if a0 == 0:\n        return 'a0-zero'\n    b0, b1, b2, a1, a2 = b0 / a0, b1 / a0, b2 / a0, a1 / a0, a2 / a0\n    x1 = x2 = y1 = y2 = Fraction(0)\n    out = []\n    for s in x[1]:\n        y = b0 * s + b1 * x1 + b2 * x2 + a1 * y1 + a2 * y2\n        x2, x1 = x1, s\n        y2, y1 = y1, y\n        out.append(str(y))\n    return out\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[['regression: pure feedback impulse', [['1', '0', '0', '1', '-1/2', '0'], [1, 0, 0, 0]], ['1', '1/2', '1/4', '1/8']], ['regression: a0 not one', [['2', '1', '0', '2', '1', '1/2'], [2, 0, 0, 1]], ['2', '0', '-1/2', '5/4']], ['regression: second order feedback', [['1', '0', '0', '1', '0', '1/4'], [1, 0, 0, 0, 0]], ['1', '0', '-1/4', '0', '1/16']], ['control: fir only', [['1', '2', '1', '1', '0', '0'], [1, 2, 3]], ['1', '4', '8']], ['control: random biquad 7', [['-3/8', '0', '-1/4', '1', '2', '1/8'], [0, 3]], ['0', '-9/8']], ['control: random biquad 8', [['0', '1/2', '3/4', '-1', '3/4', '0'], [-3, 0]], ['0', '3/2']], ['control: random biquad 30', [['0', '0', '1/8', '1', '0', '-1/2'], [1, -2, 1]], ['0', '0', '1/8']]], [['regression: random biquad 0', [['1/3', '3/4', '1/2', '-1', '2', '1/3'], [2, 2]], ['-2/3', '-7/2']], ['regression: random biquad 1', [['1/8', '-1/4', '3/4', '2', '1/2', '1/8'], [-2, 1, 2, 2, 0, 2]], ['-1/8', '11/32', '-53/64', '223/512', '907/2048', '3019/4096']], ['regression: random biquad 2', [['1/2', '5/4', '1/2', '-1', '-1/2', '-1/2'], [-2, -2, 3, -3, 1]], ['1', '3', '0', '-11/4', '25/8']], ['control: fir only', [['1', '2', '1', '1', '0', '0'], [1, 2, 3]], ['1', '4', '8']], ['control: random biquad 7', [['-3/8', '0', '-1/4', '1', '2', '1/8'], [0, 3]], ['0', '-9/8']], ['control: random biquad 8', [['0', '1/2', '3/4', '-1', '3/4', '0'], [-3, 0]], ['0', '3/2']], ['control: random biquad 30', [['0', '0', '1/8', '1', '0', '-1/2'], [1, -2, 1]], ['0', '0', '1/8']]], [['regression: random biquad 3', [['-3/8', '5/4', '1/2', '2', '5/4', '1/8'], [-2, 0, -1, 3]], ['3/8', '-95/64', '303/512', '-5999/4096']], ['regression: random biquad 4', [['-3/8', '1/3', '-1/2', '2', '1/3', '0'], [-1, 1]], ['3/16', '-37/96']], ['regression: random biquad 5', [['1/2', '0', '-1/2', '-1', '-1/2', '-3/8'], [0, 2, -2, -1, 1]], ['0', '-1', '3/2', '9/8', '-21/8']], ['control: fir only', [['1', '2', '1', '1', '0', '0'], [1, 2, 3]], ['1', '4', '8']], ['control: random biquad 7', [['-3/8', '0', '-1/4', '1', '2', '1/8'], [0, 3]], ['0', '-9/8']], ['control: random biquad 8', [['0', '1/2', '3/4', '-1', '3/4', '0'], [-3, 0]], ['0', '3/2']], ['control: random biquad 30', [['0', '0', '1/8', '1', '0', '-1/2'], [1, -2, 1]], ['0', '0', '1/8']]], [['regression: random biquad 6', [['1/8', '0', '5/4', '1', '-1/2', '5/4'], [1, 1, 1, 0, 3, 2]], ['1/8', '3/16', '21/16', '107/64', '105/128', '-183/128']], ['regression: random biquad 9', [['3/4', '1/3', '1/2', '-1', '0', '1/8'], [-1, -1, 2]], ['3/4', '13/12', '-55/96']], ['regression: random biquad 10', [['3/4', '2', '1/2', '1', '-3/8', '1/3'], [2, 2, -3]], ['3/2', '97/16', '579/128']], ['control: fir only', [['1', '2', '1', '1', '0', '0'], [1, 2, 3]], ['1', '4', '8']], ['control: random biquad 7', [['-3/8', '0', '-1/4', '1', '2', '1/8'], [0, 3]], ['0', '-9/8']], ['control: random biquad 8', [['0', '1/2', '3/4', '-1', '3/4', '0'], [-3, 0]], ['0', '3/2']], ['control: random biquad 30', [['0', '0', '1/8', '1', '0', '-1/2'], [1, -2, 1]], ['0', '0', '1/8']]], [['regression: random biquad 11', [['1/2', '3/4', '0', '1', '1/3', '5/4'], [-3, 3, -3, 0, 2]], ['-3/2', '-1/4', '65/24', '-409/144', '-1243/864']], ['regression: random biquad 12', [['-3/8', '1/3', '5/4', '2', '2', '2'], [2, 2]], ['-3/8', '1/3']], ['regression: random biquad 10', [['3/4', '2', '1/2', '1', '-3/8', '1/3'], [2, 2, -3]], ['3/2', '97/16', '579/128']], ['control: fir only', [['1', '2', '1', '1', '0', '0'], [1, 2, 3]], ['1', '4', '8']], ['control: random biquad 7', [['-3/8', '0', '-1/4', '1', '2', '1/8'], [0, 3]], ['0', '-9/8']], ['control: random biquad 8', [['0', '1/2', '3/4', '-1', '3/4', '0'], [-3, 0]], ['0', '3/2']], ['control: random biquad 30', [['0', '0', '1/8', '1', '0', '-1/2'], [1, -2, 1]], ['0', '0', '1/8']]]]\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-biquad-direct-form-one-feedback-sign-convention","generated_at":"2026-09-29T14:51:35.170526+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"The biquad is the workhorse IIR section; sign, state or normalization slips produce unstable or wrong-gain filters.","root_cause":"The difference equation adds a1 y[n-1] and a2 y[n-2] although the denominator convention requires subtraction.","sha256":"9191f13260bee54bd2dd9061112396ff6c9400f66b17e2a34379824de7cf9490","title":"Biquad adds the feedback terms · 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":41.622,"exit_code":1,"observations":[{"actual":["1","1/2","1/4","1/8"],"check":"regression: pure feedback impulse","expected":["1","1/2","1/4","1/8"],"passed":true},{"actual":["2","0","1/2","3/4"],"check":"regression: a0 not one","expected":["2","0","-1/2","5/4"],"passed":false},{"actual":["1","0","1/4","0","1/16"],"check":"regression: second order feedback","expected":["1","0","-1/4","0","1/16"],"passed":false},{"actual":["1","4","8"],"check":"control: fir only","expected":["1","4","8"],"passed":true},{"actual":["0","-9/8"],"check":"control: random biquad 7","expected":["0","-9/8"],"passed":true},{"actual":["0","3/2"],"check":"control: random biquad 8","expected":["0","3/2"],"passed":true},{"actual":["0","0","1/8"],"check":"control: random biquad 30","expected":["0","0","1/8"],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression: pure feedback impulse\", \"actual\": [\"1\", \"1/2\", \"1/4\", \"1/8\"], \"expected\": [\"1\", \"1/2\", \"1/4\", \"1/8\"], \"passed\": true}, {\"check\": \"regression: a0 not one\", \"actual\": [\"2\", \"0\", \"1/2\", \"3/4\"], \"expected\": [\"2\", \"0\", \"-1/2\", \"5/4\"], \"passed\": false}, {\"check\": \"regression: second order feedback\", \"actual\": [\"1\", \"0\", \"1/4\", \"0\", \"1/16\"], \"expected\": [\"1\", \"0\", \"-1/4\", \"0\", \"1/16\"], \"passed\": false}, {\"check\": \"control: fir only\", \"actual\": [\"1\", \"4\", \"8\"], \"expected\": [\"1\", \"4\", \"8\"], \"passed\": true}, {\"check\": \"control: random biquad 7\", \"actual\": [\"0\", \"-9/8\"], \"expected\": [\"0\", \"-9/8\"], \"passed\": true}, {\"check\": \"control: random biquad 8\", \"actual\": [\"0\", \"3/2\"], \"expected\": [\"0\", \"3/2\"], \"passed\": true}, {\"check\": \"control: random biquad 30\", \"actual\": [\"0\", \"0\", \"1/8\"], \"expected\": [\"0\", \"0\", \"1/8\"], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":45.068,"exit_code":1,"observations":[{"actual":["1","-1/2","1/4","-1/8"],"check":"regression: pure feedback impulse","expected":["1","1/2","1/4","1/8"],"passed":false},{"actual":["2","2","3/2","9/4"],"check":"regression: a0 not one","expected":["2","0","-1/2","5/4"],"passed":false},{"actual":["1","0","1/4","0","1/16"],"check":"regression: second order feedback","expected":["1","0","-1/4","0","1/16"],"passed":false},{"actual":["1","4","8"],"check":"control: fir only","expected":["1","4","8"],"passed":true},{"actual":["0","-9/8"],"check":"control: random biquad 7","expected":["0","-9/8"],"passed":true},{"actual":["0","3/2"],"check":"control: random biquad 8","expected":["0","3/2"],"passed":true},{"actual":["0","0","1/8"],"check":"control: random biquad 30","expected":["0","0","1/8"],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression: pure feedback impulse\", \"actual\": [\"1\", \"-1/2\", \"1/4\", \"-1/8\"], \"expected\": [\"1\", \"1/2\", \"1/4\", \"1/8\"], \"passed\": false}, {\"check\": \"regression: a0 not one\", \"actual\": [\"2\", \"2\", \"3/2\", \"9/4\"], \"expected\": [\"2\", \"0\", \"-1/2\", \"5/4\"], \"passed\": false}, {\"check\": \"regression: second order feedback\", \"actual\": [\"1\", \"0\", \"1/4\", \"0\", \"1/16\"], \"expected\": [\"1\", \"0\", \"-1/4\", \"0\", \"1/16\"], \"passed\": false}, {\"check\": \"control: fir only\", \"actual\": [\"1\", \"4\", \"8\"], \"expected\": [\"1\", \"4\", \"8\"], \"passed\": true}, {\"check\": \"control: random biquad 7\", \"actual\": [\"0\", \"-9/8\"], \"expected\": [\"0\", \"-9/8\"], \"passed\": true}, {\"check\": \"control: random biquad 8\", \"actual\": [\"0\", \"3/2\"], \"expected\": [\"0\", \"3/2\"], \"passed\": true}, {\"check\": \"control: random biquad 30\", \"actual\": [\"0\", \"0\", \"1/8\"], \"expected\": [\"0\", \"0\", \"1/8\"], \"passed\": true}], \"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."}}