{"abstract":"A response that dips below eps, rebounds and dips again is truncated while still ringing.","category":"Digital signal filters","checks":7,"contract":"Input [b, a, eps, maxlen, hold]; normalize by a0 (\"bad-a0\"), compute the impulse response exactly and stop after hold consecutive samples with |h| < eps, counted only once n >= len(b) - 1 (any non-quiet sample resets the count), or at maxlen. Return the kept samples as fraction strings.","evaluation_group":"w2-digital_signal_filters-iir-impulse-truncation","failed_approach":"The attempted repair only decrements the counter on a loud sample.","family":"w2-digital_signal_filters-iir-impulse-truncation-quiet-run-reset","id":"FA-91771","implementations":{"attempt":{"sha256":"af17930c16e9fa84e130ca1e0e5dac1180e0851bf263eb168dca35e6bd7cda1a","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nfrom fractions import Fraction\nN = 1\nobservations = []\ndef solve(x):\n    b = [Fraction(v) for v in x[0]]\n    a = [Fraction(v) for v in x[1]]\n    eps, maxlen, hold = Fraction(x[2]), x[3], x[4]\n    if not a or a[0] == 0:\n        return 'bad-a0'\n    b = [v / a[0] for v in b]\n    a = [v / a[0] for v in a]\n    h = []\n    quiet = 0\n    for n in range(maxlen):\n        acc = b[n] if n < len(b) else Fraction(0)\n        for k in range(1, len(a)):\n            if n - k >= 0:\n                acc -= a[k] * h[n - k]\n        h.append(acc)\n        if n >= len(b) - 1 and abs(acc) < eps:\n            quiet += 1\n            if quiet >= hold:\n                break\n        else:\n            quiet = max(quiet - 1, 0)\n    return [str(v) for v in h]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[['regression: noisy tail resets hold', [['1'], ['1', '0', '1/4'], '1/10', 12, 3], ['1', '0', '-1/4', '0', '1/16', '0']], ['regression: sparse echo hold 4', [['1'], ['1', '0', '0', '0', '-1/2'], '1/3', 20, 4], ['1', '0', '0', '0', '1/2', '0', '0', '0', '1/4']], ['regression: sparse echo hold 3', [['1'], ['1', '0', '0', '-1/2'], '1/3', 20, 3], ['1', '0', '0', '1/2', '0', '0', '1/4']], ['control: negative alternating tail', [['1'], ['1', '1/2'], '1/8', 12, 2], ['1', '-1/2', '1/4', '-1/8', '1/16', '-1/32']], ['control: exact epsilon boundary', [['1'], ['1', '-1/2'], '1/8', 12, 1], ['1', '1/2', '1/4', '1/8', '1/16']], ['control: zero taps inside fir part', [['1', '0', '0', '1'], ['1', '-1/2'], '1/100', 12, 1], ['1', '1/2', '1/4', '9/8', '9/16', '9/32', '9/64', '9/128', '9/256', '9/512', '9/1024']], ['control: a0 not one', [['2', '1'], ['2', '-1'], '1/16', 10, 2], ['1', '1', '1/2', '1/4', '1/8', '1/16', '1/32', '1/64']]], [['regression: sparse negative echo hold 3', [['2'], ['1', '0', '0', '1/2'], '1/2', 20, 3], ['2', '0', '0', '-1', '0', '0', '1/2', '0', '0', '-1/4']], ['regression: noisy tail resets hold', [['1'], ['1', '0', '1/4'], '1/10', 12, 3], ['1', '0', '-1/4', '0', '1/16', '0']], ['regression: sparse echo hold 4', [['1'], ['1', '0', '0', '0', '-1/2'], '1/3', 20, 4], ['1', '0', '0', '0', '1/2', '0', '0', '0', '1/4']], ['control: bad a0', [['1'], ['0', '1'], '1/8', 5, 1], 'bad-a0'], ['control: gap inside numerator', [['1', '0', '1'], ['1'], '1/2', 8, 1], ['1', '0', '1', '0']], ['control: gap inside numerator with pole', [['1', '0', '0', '2'], ['1', '1/4'], '1/8', 10, 1], ['1', '-1/4', '1/16', '127/64', '-127/256', '127/1024']], ['control: two gaps in numerator', [['1', '0', '0', '-1'], ['1'], '1/2', 8, 2], ['1', '0', '0', '-1', '0', '0']]], [['regression: sparse echo hold 3', [['1'], ['1', '0', '0', '-1/2'], '1/3', 20, 3], ['1', '0', '0', '1/2', '0', '0', '1/4']], ['regression: sparse negative echo hold 3', [['2'], ['1', '0', '0', '1/2'], '1/2', 20, 3], ['2', '0', '0', '-1', '0', '0', '1/2', '0', '0', '-1/4']], ['regression: sparse echo hold 4', [['1'], ['1', '0', '0', '0', '-1/2'], '1/3', 20, 4], ['1', '0', '0', '0', '1/2', '0', '0', '0', '1/4']], ['control: random impulse 0', [['0', '1', '1'], ['2', '1/2', '1/3'], '1/16', 9, 3], ['0', '1/2', '3/8', '-17/96', '-7/384', '157/4608', '-101/18432']], ['control: random impulse 1', [['1', '1/2', '2'], ['-1', '1/3'], '1/16', 7, 1], ['-1', '-5/6', '-41/18', '-41/54', '-41/162', '-41/486', '-41/1458']], ['control: random impulse 2', [['0', '1/2', '-1'], ['1', '1/2'], '1/4', 8, 3], ['0', '1/2', '-5/4', '5/8', '-5/16', '5/32', '-5/64', '5/128']], ['control: random impulse 3', [['-1', '-1', '1/2'], ['-1', '-1/4'], '1/8', 12, 3], ['1', '3/4', '-11/16', '11/64', '-11/256', '11/1024', '-11/4096']]], [['regression: sparse echo hold 4', [['1'], ['1', '0', '0', '0', '-1/2'], '1/3', 20, 4], ['1', '0', '0', '0', '1/2', '0', '0', '0', '1/4']], ['regression: sparse echo hold 3', [['1'], ['1', '0', '0', '-1/2'], '1/3', 20, 3], ['1', '0', '0', '1/2', '0', '0', '1/4']], ['regression: sparse negative echo hold 3', [['2'], ['1', '0', '0', '1/2'], '1/2', 20, 3], ['2', '0', '0', '-1', '0', '0', '1/2', '0', '0', '-1/4']], ['control: random impulse 4', [['2'], ['-1', '1/4'], '1/10', 9, 1], ['-2', '-1/2', '-1/8', '-1/32']], ['control: random impulse 5', [['1'], ['-1', '1/3'], '1/8', 9, 2], ['-1', '-1/3', '-1/9', '-1/27']], ['control: random impulse 6', [['-1', '1', '-1'], ['1', '1/2', '1/2'], '1/16', 9, 3], ['-1', '3/2', '-5/4', '-1/8', '11/16', '-9/32', '-13/64', '31/128', '-5/256']], ['control: random impulse 7', [['-1', '1', '-1'], ['1', '1/2'], '1/16', 11, 3], ['-1', '3/2', '-7/4', '7/8', '-7/16', '7/32', '-7/64', '7/128', '-7/256', '7/512']]], [['regression: noisy tail resets hold', [['1'], ['1', '0', '1/4'], '1/10', 12, 3], ['1', '0', '-1/4', '0', '1/16', '0']], ['regression: sparse echo hold 4', [['1'], ['1', '0', '0', '0', '-1/2'], '1/3', 20, 4], ['1', '0', '0', '0', '1/2', '0', '0', '0', '1/4']], ['regression: sparse negative echo hold 3', [['2'], ['1', '0', '0', '1/2'], '1/2', 20, 3], ['2', '0', '0', '-1', '0', '0', '1/2', '0', '0', '-1/4']], ['control: random impulse 8', [['1/2', '2', '-1'], ['-1', '1/4'], '1/8', 5, 1], ['-1/2', '-17/8', '15/32', '15/128']], ['control: random impulse 9', [['1'], ['-1', '1/4'], '1/8', 9, 3], ['-1', '-1/4', '-1/16', '-1/64', '-1/256']], ['control: random impulse 10', [['-1'], ['-1', '-1/4', '0'], '1/16', 12, 1], ['1', '-1/4', '1/16', '-1/64']], ['control: random impulse 11', [['-1', '0'], ['2', '-1/2', '-1/2'], '1/10', 6, 2], ['-1/2', '-1/8', '-5/32', '-9/128', '-29/512']]]]\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":"1e41cb1bb75cf78eba902ba7c5fc4d6358e7db811776eb618ccebe33033d1ef4","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nfrom fractions import Fraction\nN = 1\nobservations = []\ndef solve(x):\n    b = [Fraction(v) for v in x[0]]\n    a = [Fraction(v) for v in x[1]]\n    eps, maxlen, hold = Fraction(x[2]), x[3], x[4]\n    if not a or a[0] == 0:\n        return 'bad-a0'\n    b = [v / a[0] for v in b]\n    a = [v / a[0] for v in a]\n    h = []\n    quiet = 0\n    for n in range(maxlen):\n        acc = b[n] if n < len(b) else Fraction(0)\n        for k in range(1, len(a)):\n            if n - k >= 0:\n                acc -= a[k] * h[n - k]\n        h.append(acc)\n        if n >= len(b) - 1 and abs(acc) < eps:\n            quiet += 1\n            if quiet >= hold:\n                break\n        else:\n            pass\n    return [str(v) for v in h]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[['regression: noisy tail resets hold', [['1'], ['1', '0', '1/4'], '1/10', 12, 3], ['1', '0', '-1/4', '0', '1/16', '0']], ['regression: sparse echo hold 4', [['1'], ['1', '0', '0', '0', '-1/2'], '1/3', 20, 4], ['1', '0', '0', '0', '1/2', '0', '0', '0', '1/4']], ['regression: sparse echo hold 3', [['1'], ['1', '0', '0', '-1/2'], '1/3', 20, 3], ['1', '0', '0', '1/2', '0', '0', '1/4']], ['control: negative alternating tail', [['1'], ['1', '1/2'], '1/8', 12, 2], ['1', '-1/2', '1/4', '-1/8', '1/16', '-1/32']], ['control: exact epsilon boundary', [['1'], ['1', '-1/2'], '1/8', 12, 1], ['1', '1/2', '1/4', '1/8', '1/16']], ['control: zero taps inside fir part', [['1', '0', '0', '1'], ['1', '-1/2'], '1/100', 12, 1], ['1', '1/2', '1/4', '9/8', '9/16', '9/32', '9/64', '9/128', '9/256', '9/512', '9/1024']], ['control: a0 not one', [['2', '1'], ['2', '-1'], '1/16', 10, 2], ['1', '1', '1/2', '1/4', '1/8', '1/16', '1/32', '1/64']]], [['regression: sparse negative echo hold 3', [['2'], ['1', '0', '0', '1/2'], '1/2', 20, 3], ['2', '0', '0', '-1', '0', '0', '1/2', '0', '0', '-1/4']], ['regression: noisy tail resets hold', [['1'], ['1', '0', '1/4'], '1/10', 12, 3], ['1', '0', '-1/4', '0', '1/16', '0']], ['regression: sparse echo hold 4', [['1'], ['1', '0', '0', '0', '-1/2'], '1/3', 20, 4], ['1', '0', '0', '0', '1/2', '0', '0', '0', '1/4']], ['control: bad a0', [['1'], ['0', '1'], '1/8', 5, 1], 'bad-a0'], ['control: gap inside numerator', [['1', '0', '1'], ['1'], '1/2', 8, 1], ['1', '0', '1', '0']], ['control: gap inside numerator with pole', [['1', '0', '0', '2'], ['1', '1/4'], '1/8', 10, 1], ['1', '-1/4', '1/16', '127/64', '-127/256', '127/1024']], ['control: two gaps in numerator', [['1', '0', '0', '-1'], ['1'], '1/2', 8, 2], ['1', '0', '0', '-1', '0', '0']]], [['regression: sparse echo hold 3', [['1'], ['1', '0', '0', '-1/2'], '1/3', 20, 3], ['1', '0', '0', '1/2', '0', '0', '1/4']], ['regression: sparse negative echo hold 3', [['2'], ['1', '0', '0', '1/2'], '1/2', 20, 3], ['2', '0', '0', '-1', '0', '0', '1/2', '0', '0', '-1/4']], ['regression: sparse echo hold 4', [['1'], ['1', '0', '0', '0', '-1/2'], '1/3', 20, 4], ['1', '0', '0', '0', '1/2', '0', '0', '0', '1/4']], ['control: random impulse 0', [['0', '1', '1'], ['2', '1/2', '1/3'], '1/16', 9, 3], ['0', '1/2', '3/8', '-17/96', '-7/384', '157/4608', '-101/18432']], ['control: random impulse 1', [['1', '1/2', '2'], ['-1', '1/3'], '1/16', 7, 1], ['-1', '-5/6', '-41/18', '-41/54', '-41/162', '-41/486', '-41/1458']], ['control: random impulse 2', [['0', '1/2', '-1'], ['1', '1/2'], '1/4', 8, 3], ['0', '1/2', '-5/4', '5/8', '-5/16', '5/32', '-5/64', '5/128']], ['control: random impulse 3', [['-1', '-1', '1/2'], ['-1', '-1/4'], '1/8', 12, 3], ['1', '3/4', '-11/16', '11/64', '-11/256', '11/1024', '-11/4096']]], [['regression: sparse echo hold 4', [['1'], ['1', '0', '0', '0', '-1/2'], '1/3', 20, 4], ['1', '0', '0', '0', '1/2', '0', '0', '0', '1/4']], ['regression: sparse echo hold 3', [['1'], ['1', '0', '0', '-1/2'], '1/3', 20, 3], ['1', '0', '0', '1/2', '0', '0', '1/4']], ['regression: sparse negative echo hold 3', [['2'], ['1', '0', '0', '1/2'], '1/2', 20, 3], ['2', '0', '0', '-1', '0', '0', '1/2', '0', '0', '-1/4']], ['control: random impulse 4', [['2'], ['-1', '1/4'], '1/10', 9, 1], ['-2', '-1/2', '-1/8', '-1/32']], ['control: random impulse 5', [['1'], ['-1', '1/3'], '1/8', 9, 2], ['-1', '-1/3', '-1/9', '-1/27']], ['control: random impulse 6', [['-1', '1', '-1'], ['1', '1/2', '1/2'], '1/16', 9, 3], ['-1', '3/2', '-5/4', '-1/8', '11/16', '-9/32', '-13/64', '31/128', '-5/256']], ['control: random impulse 7', [['-1', '1', '-1'], ['1', '1/2'], '1/16', 11, 3], ['-1', '3/2', '-7/4', '7/8', '-7/16', '7/32', '-7/64', '7/128', '-7/256', '7/512']]], [['regression: noisy tail resets hold', [['1'], ['1', '0', '1/4'], '1/10', 12, 3], ['1', '0', '-1/4', '0', '1/16', '0']], ['regression: sparse echo hold 4', [['1'], ['1', '0', '0', '0', '-1/2'], '1/3', 20, 4], ['1', '0', '0', '0', '1/2', '0', '0', '0', '1/4']], ['regression: sparse negative echo hold 3', [['2'], ['1', '0', '0', '1/2'], '1/2', 20, 3], ['2', '0', '0', '-1', '0', '0', '1/2', '0', '0', '-1/4']], ['control: random impulse 8', [['1/2', '2', '-1'], ['-1', '1/4'], '1/8', 5, 1], ['-1/2', '-17/8', '15/32', '15/128']], ['control: random impulse 9', [['1'], ['-1', '1/4'], '1/8', 9, 3], ['-1', '-1/4', '-1/16', '-1/64', '-1/256']], ['control: random impulse 10', [['-1'], ['-1', '-1/4', '0'], '1/16', 12, 1], ['1', '-1/4', '1/16', '-1/64']], ['control: random impulse 11', [['-1', '0'], ['2', '-1/2', '-1/2'], '1/10', 6, 2], ['-1/2', '-1/8', '-5/32', '-9/128', '-29/512']]]]\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"},"fixed":{"sha256":"f2893cb37c24aa95897f1857023ea324816ea464a6a1394089ea2523c8dd0ea1","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nfrom fractions import Fraction\nN = 1\nobservations = []\ndef solve(x):\n    b = [Fraction(v) for v in x[0]]\n    a = [Fraction(v) for v in x[1]]\n    eps, maxlen, hold = Fraction(x[2]), x[3], x[4]\n    if not a or a[0] == 0:\n        return 'bad-a0'\n    b = [v / a[0] for v in b]\n    a = [v / a[0] for v in a]\n    h = []\n    quiet = 0\n    for n in range(maxlen):\n        acc = b[n] if n < len(b) else Fraction(0)\n        for k in range(1, len(a)):\n            if n - k >= 0:\n                acc -= a[k] * h[n - k]\n        h.append(acc)\n        if n >= len(b) - 1 and abs(acc) < eps:\n            quiet += 1\n            if quiet >= hold:\n                break\n        else:\n            quiet = 0\n    return [str(v) for v in h]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[['regression: noisy tail resets hold', [['1'], ['1', '0', '1/4'], '1/10', 12, 3], ['1', '0', '-1/4', '0', '1/16', '0']], ['regression: sparse echo hold 4', [['1'], ['1', '0', '0', '0', '-1/2'], '1/3', 20, 4], ['1', '0', '0', '0', '1/2', '0', '0', '0', '1/4']], ['regression: sparse echo hold 3', [['1'], ['1', '0', '0', '-1/2'], '1/3', 20, 3], ['1', '0', '0', '1/2', '0', '0', '1/4']], ['control: negative alternating tail', [['1'], ['1', '1/2'], '1/8', 12, 2], ['1', '-1/2', '1/4', '-1/8', '1/16', '-1/32']], ['control: exact epsilon boundary', [['1'], ['1', '-1/2'], '1/8', 12, 1], ['1', '1/2', '1/4', '1/8', '1/16']], ['control: zero taps inside fir part', [['1', '0', '0', '1'], ['1', '-1/2'], '1/100', 12, 1], ['1', '1/2', '1/4', '9/8', '9/16', '9/32', '9/64', '9/128', '9/256', '9/512', '9/1024']], ['control: a0 not one', [['2', '1'], ['2', '-1'], '1/16', 10, 2], ['1', '1', '1/2', '1/4', '1/8', '1/16', '1/32', '1/64']]], [['regression: sparse negative echo hold 3', [['2'], ['1', '0', '0', '1/2'], '1/2', 20, 3], ['2', '0', '0', '-1', '0', '0', '1/2', '0', '0', '-1/4']], ['regression: noisy tail resets hold', [['1'], ['1', '0', '1/4'], '1/10', 12, 3], ['1', '0', '-1/4', '0', '1/16', '0']], ['regression: sparse echo hold 4', [['1'], ['1', '0', '0', '0', '-1/2'], '1/3', 20, 4], ['1', '0', '0', '0', '1/2', '0', '0', '0', '1/4']], ['control: bad a0', [['1'], ['0', '1'], '1/8', 5, 1], 'bad-a0'], ['control: gap inside numerator', [['1', '0', '1'], ['1'], '1/2', 8, 1], ['1', '0', '1', '0']], ['control: gap inside numerator with pole', [['1', '0', '0', '2'], ['1', '1/4'], '1/8', 10, 1], ['1', '-1/4', '1/16', '127/64', '-127/256', '127/1024']], ['control: two gaps in numerator', [['1', '0', '0', '-1'], ['1'], '1/2', 8, 2], ['1', '0', '0', '-1', '0', '0']]], [['regression: sparse echo hold 3', [['1'], ['1', '0', '0', '-1/2'], '1/3', 20, 3], ['1', '0', '0', '1/2', '0', '0', '1/4']], ['regression: sparse negative echo hold 3', [['2'], ['1', '0', '0', '1/2'], '1/2', 20, 3], ['2', '0', '0', '-1', '0', '0', '1/2', '0', '0', '-1/4']], ['regression: sparse echo hold 4', [['1'], ['1', '0', '0', '0', '-1/2'], '1/3', 20, 4], ['1', '0', '0', '0', '1/2', '0', '0', '0', '1/4']], ['control: random impulse 0', [['0', '1', '1'], ['2', '1/2', '1/3'], '1/16', 9, 3], ['0', '1/2', '3/8', '-17/96', '-7/384', '157/4608', '-101/18432']], ['control: random impulse 1', [['1', '1/2', '2'], ['-1', '1/3'], '1/16', 7, 1], ['-1', '-5/6', '-41/18', '-41/54', '-41/162', '-41/486', '-41/1458']], ['control: random impulse 2', [['0', '1/2', '-1'], ['1', '1/2'], '1/4', 8, 3], ['0', '1/2', '-5/4', '5/8', '-5/16', '5/32', '-5/64', '5/128']], ['control: random impulse 3', [['-1', '-1', '1/2'], ['-1', '-1/4'], '1/8', 12, 3], ['1', '3/4', '-11/16', '11/64', '-11/256', '11/1024', '-11/4096']]], [['regression: sparse echo hold 4', [['1'], ['1', '0', '0', '0', '-1/2'], '1/3', 20, 4], ['1', '0', '0', '0', '1/2', '0', '0', '0', '1/4']], ['regression: sparse echo hold 3', [['1'], ['1', '0', '0', '-1/2'], '1/3', 20, 3], ['1', '0', '0', '1/2', '0', '0', '1/4']], ['regression: sparse negative echo hold 3', [['2'], ['1', '0', '0', '1/2'], '1/2', 20, 3], ['2', '0', '0', '-1', '0', '0', '1/2', '0', '0', '-1/4']], ['control: random impulse 4', [['2'], ['-1', '1/4'], '1/10', 9, 1], ['-2', '-1/2', '-1/8', '-1/32']], ['control: random impulse 5', [['1'], ['-1', '1/3'], '1/8', 9, 2], ['-1', '-1/3', '-1/9', '-1/27']], ['control: random impulse 6', [['-1', '1', '-1'], ['1', '1/2', '1/2'], '1/16', 9, 3], ['-1', '3/2', '-5/4', '-1/8', '11/16', '-9/32', '-13/64', '31/128', '-5/256']], ['control: random impulse 7', [['-1', '1', '-1'], ['1', '1/2'], '1/16', 11, 3], ['-1', '3/2', '-7/4', '7/8', '-7/16', '7/32', '-7/64', '7/128', '-7/256', '7/512']]], [['regression: noisy tail resets hold', [['1'], ['1', '0', '1/4'], '1/10', 12, 3], ['1', '0', '-1/4', '0', '1/16', '0']], ['regression: sparse echo hold 4', [['1'], ['1', '0', '0', '0', '-1/2'], '1/3', 20, 4], ['1', '0', '0', '0', '1/2', '0', '0', '0', '1/4']], ['regression: sparse negative echo hold 3', [['2'], ['1', '0', '0', '1/2'], '1/2', 20, 3], ['2', '0', '0', '-1', '0', '0', '1/2', '0', '0', '-1/4']], ['control: random impulse 8', [['1/2', '2', '-1'], ['-1', '1/4'], '1/8', 5, 1], ['-1/2', '-17/8', '15/32', '15/128']], ['control: random impulse 9', [['1'], ['-1', '1/4'], '1/8', 9, 3], ['-1', '-1/4', '-1/16', '-1/64', '-1/256']], ['control: random impulse 10', [['-1'], ['-1', '-1/4', '0'], '1/16', 12, 1], ['1', '-1/4', '1/16', '-1/64']], ['control: random impulse 11', [['-1', '0'], ['2', '-1/2', '-1/2'], '1/10', 6, 2], ['-1/2', '-1/8', '-5/32', '-9/128', '-29/512']]]]\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-iir-impulse-truncation-quiet-run-reset","generated_at":"2026-09-29T14:51:38.963512+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"FIR approximations of IIR filters truncate the impulse response; wrong stop rules cut real energy or run forever.","repair":"Reset the counter whenever a sample is not quiet.","root_cause":"The quiet counter is never reset by a loud sample, so non-consecutive quiet samples add up.","sha256":"bc0618f3b5af579bac1fc54d916be2a7de5c7a869b2a3c798deae8d91ee90205","title":"Impulse truncation counts quiet samples cumulatively · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":42.571,"exit_code":1,"observations":[{"actual":["1","0","-1/4","0","1/16","0"],"check":"regression: noisy tail resets hold","expected":["1","0","-1/4","0","1/16","0"],"passed":true},{"actual":["1","0","0","0","1/2","0","0"],"check":"regression: sparse echo hold 4","expected":["1","0","0","0","1/2","0","0","0","1/4"],"passed":false},{"actual":["1","0","0","1/2","0","0"],"check":"regression: sparse echo hold 3","expected":["1","0","0","1/2","0","0","1/4"],"passed":false},{"actual":["1","-1/2","1/4","-1/8","1/16","-1/32"],"check":"control: negative alternating tail","expected":["1","-1/2","1/4","-1/8","1/16","-1/32"],"passed":true},{"actual":["1","1/2","1/4","1/8","1/16"],"check":"control: exact epsilon boundary","expected":["1","1/2","1/4","1/8","1/16"],"passed":true},{"actual":["1","1/2","1/4","9/8","9/16","9/32","9/64","9/128","9/256","9/512","9/1024"],"check":"control: zero taps inside fir part","expected":["1","1/2","1/4","9/8","9/16","9/32","9/64","9/128","9/256","9/512","9/1024"],"passed":true},{"actual":["1","1","1/2","1/4","1/8","1/16","1/32","1/64"],"check":"control: a0 not one","expected":["1","1","1/2","1/4","1/8","1/16","1/32","1/64"],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression: noisy tail resets hold\", \"actual\": [\"1\", \"0\", \"-1/4\", \"0\", \"1/16\", \"0\"], \"expected\": [\"1\", \"0\", \"-1/4\", \"0\", \"1/16\", \"0\"], \"passed\": true}, {\"check\": \"regression: sparse echo hold 4\", \"actual\": [\"1\", \"0\", \"0\", \"0\", \"1/2\", \"0\", \"0\"], \"expected\": [\"1\", \"0\", \"0\", \"0\", \"1/2\", \"0\", \"0\", \"0\", \"1/4\"], \"passed\": false}, {\"check\": \"regression: sparse echo hold 3\", \"actual\": [\"1\", \"0\", \"0\", \"1/2\", \"0\", \"0\"], \"expected\": [\"1\", \"0\", \"0\", \"1/2\", \"0\", \"0\", \"1/4\"], \"passed\": false}, {\"check\": \"control: negative alternating tail\", \"actual\": [\"1\", \"-1/2\", \"1/4\", \"-1/8\", \"1/16\", \"-1/32\"], \"expected\": [\"1\", \"-1/2\", \"1/4\", \"-1/8\", \"1/16\", \"-1/32\"], \"passed\": true}, {\"check\": \"control: exact epsilon boundary\", \"actual\": [\"1\", \"1/2\", \"1/4\", \"1/8\", \"1/16\"], \"expected\": [\"1\", \"1/2\", \"1/4\", \"1/8\", \"1/16\"], \"passed\": true}, {\"check\": \"control: zero taps inside fir part\", \"actual\": [\"1\", \"1/2\", \"1/4\", \"9/8\", \"9/16\", \"9/32\", \"9/64\", \"9/128\", \"9/256\", \"9/512\", \"9/1024\"], \"expected\": [\"1\", \"1/2\", \"1/4\", \"9/8\", \"9/16\", \"9/32\", \"9/64\", \"9/128\", \"9/256\", \"9/512\", \"9/1024\"], \"passed\": true}, {\"check\": \"control: a0 not one\", \"actual\": [\"1\", \"1\", \"1/2\", \"1/4\", \"1/8\", \"1/16\", \"1/32\", \"1/64\"], \"expected\": [\"1\", \"1\", \"1/2\", \"1/4\", \"1/8\", \"1/16\", \"1/32\", \"1/64\"], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":40.835,"exit_code":1,"observations":[{"actual":["1","0","-1/4","0","1/16"],"check":"regression: noisy tail resets hold","expected":["1","0","-1/4","0","1/16","0"],"passed":false},{"actual":["1","0","0","0","1/2","0"],"check":"regression: sparse echo hold 4","expected":["1","0","0","0","1/2","0","0","0","1/4"],"passed":false},{"actual":["1","0","0","1/2","0"],"check":"regression: sparse echo hold 3","expected":["1","0","0","1/2","0","0","1/4"],"passed":false},{"actual":["1","-1/2","1/4","-1/8","1/16","-1/32"],"check":"control: negative alternating tail","expected":["1","-1/2","1/4","-1/8","1/16","-1/32"],"passed":true},{"actual":["1","1/2","1/4","1/8","1/16"],"check":"control: exact epsilon boundary","expected":["1","1/2","1/4","1/8","1/16"],"passed":true},{"actual":["1","1/2","1/4","9/8","9/16","9/32","9/64","9/128","9/256","9/512","9/1024"],"check":"control: zero taps inside fir part","expected":["1","1/2","1/4","9/8","9/16","9/32","9/64","9/128","9/256","9/512","9/1024"],"passed":true},{"actual":["1","1","1/2","1/4","1/8","1/16","1/32","1/64"],"check":"control: a0 not one","expected":["1","1","1/2","1/4","1/8","1/16","1/32","1/64"],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression: noisy tail resets hold\", \"actual\": [\"1\", \"0\", \"-1/4\", \"0\", \"1/16\"], \"expected\": [\"1\", \"0\", \"-1/4\", \"0\", \"1/16\", \"0\"], \"passed\": false}, {\"check\": \"regression: sparse echo hold 4\", \"actual\": [\"1\", \"0\", \"0\", \"0\", \"1/2\", \"0\"], \"expected\": [\"1\", \"0\", \"0\", \"0\", \"1/2\", \"0\", \"0\", \"0\", \"1/4\"], \"passed\": false}, {\"check\": \"regression: sparse echo hold 3\", \"actual\": [\"1\", \"0\", \"0\", \"1/2\", \"0\"], \"expected\": [\"1\", \"0\", \"0\", \"1/2\", \"0\", \"0\", \"1/4\"], \"passed\": false}, {\"check\": \"control: negative alternating tail\", \"actual\": [\"1\", \"-1/2\", \"1/4\", \"-1/8\", \"1/16\", \"-1/32\"], \"expected\": [\"1\", \"-1/2\", \"1/4\", \"-1/8\", \"1/16\", \"-1/32\"], \"passed\": true}, {\"check\": \"control: exact epsilon boundary\", \"actual\": [\"1\", \"1/2\", \"1/4\", \"1/8\", \"1/16\"], \"expected\": [\"1\", \"1/2\", \"1/4\", \"1/8\", \"1/16\"], \"passed\": true}, {\"check\": \"control: zero taps inside fir part\", \"actual\": [\"1\", \"1/2\", \"1/4\", \"9/8\", \"9/16\", \"9/32\", \"9/64\", \"9/128\", \"9/256\", \"9/512\", \"9/1024\"], \"expected\": [\"1\", \"1/2\", \"1/4\", \"9/8\", \"9/16\", \"9/32\", \"9/64\", \"9/128\", \"9/256\", \"9/512\", \"9/1024\"], \"passed\": true}, {\"check\": \"control: a0 not one\", \"actual\": [\"1\", \"1\", \"1/2\", \"1/4\", \"1/8\", \"1/16\", \"1/32\", \"1/64\"], \"expected\": [\"1\", \"1\", \"1/2\", \"1/4\", \"1/8\", \"1/16\", \"1/32\", \"1/64\"], \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":41.19,"exit_code":0,"observations":[{"actual":["1","0","-1/4","0","1/16","0"],"check":"regression: noisy tail resets hold","expected":["1","0","-1/4","0","1/16","0"],"passed":true},{"actual":["1","0","0","0","1/2","0","0","0","1/4"],"check":"regression: sparse echo hold 4","expected":["1","0","0","0","1/2","0","0","0","1/4"],"passed":true},{"actual":["1","0","0","1/2","0","0","1/4"],"check":"regression: sparse echo hold 3","expected":["1","0","0","1/2","0","0","1/4"],"passed":true},{"actual":["1","-1/2","1/4","-1/8","1/16","-1/32"],"check":"control: negative alternating tail","expected":["1","-1/2","1/4","-1/8","1/16","-1/32"],"passed":true},{"actual":["1","1/2","1/4","1/8","1/16"],"check":"control: exact epsilon boundary","expected":["1","1/2","1/4","1/8","1/16"],"passed":true},{"actual":["1","1/2","1/4","9/8","9/16","9/32","9/64","9/128","9/256","9/512","9/1024"],"check":"control: zero taps inside fir part","expected":["1","1/2","1/4","9/8","9/16","9/32","9/64","9/128","9/256","9/512","9/1024"],"passed":true},{"actual":["1","1","1/2","1/4","1/8","1/16","1/32","1/64"],"check":"control: a0 not one","expected":["1","1","1/2","1/4","1/8","1/16","1/32","1/64"],"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression: noisy tail resets hold\", \"actual\": [\"1\", \"0\", \"-1/4\", \"0\", \"1/16\", \"0\"], \"expected\": [\"1\", \"0\", \"-1/4\", \"0\", \"1/16\", \"0\"], \"passed\": true}, {\"check\": \"regression: sparse echo hold 4\", \"actual\": [\"1\", \"0\", \"0\", \"0\", \"1/2\", \"0\", \"0\", \"0\", \"1/4\"], \"expected\": [\"1\", \"0\", \"0\", \"0\", \"1/2\", \"0\", \"0\", \"0\", \"1/4\"], \"passed\": true}, {\"check\": \"regression: sparse echo hold 3\", \"actual\": [\"1\", \"0\", \"0\", \"1/2\", \"0\", \"0\", \"1/4\"], \"expected\": [\"1\", \"0\", \"0\", \"1/2\", \"0\", \"0\", \"1/4\"], \"passed\": true}, {\"check\": \"control: negative alternating tail\", \"actual\": [\"1\", \"-1/2\", \"1/4\", \"-1/8\", \"1/16\", \"-1/32\"], \"expected\": [\"1\", \"-1/2\", \"1/4\", \"-1/8\", \"1/16\", \"-1/32\"], \"passed\": true}, {\"check\": \"control: exact epsilon boundary\", \"actual\": [\"1\", \"1/2\", \"1/4\", \"1/8\", \"1/16\"], \"expected\": [\"1\", \"1/2\", \"1/4\", \"1/8\", \"1/16\"], \"passed\": true}, {\"check\": \"control: zero taps inside fir part\", \"actual\": [\"1\", \"1/2\", \"1/4\", \"9/8\", \"9/16\", \"9/32\", \"9/64\", \"9/128\", \"9/256\", \"9/512\", \"9/1024\"], \"expected\": [\"1\", \"1/2\", \"1/4\", \"9/8\", \"9/16\", \"9/32\", \"9/64\", \"9/128\", \"9/256\", \"9/512\", \"9/1024\"], \"passed\": true}, {\"check\": \"control: a0 not one\", \"actual\": [\"1\", \"1\", \"1/2\", \"1/4\", \"1/8\", \"1/16\", \"1/32\", \"1/64\"], \"expected\": [\"1\", \"1\", \"1/2\", \"1/4\", \"1/8\", \"1/16\", \"1/32\", \"1/64\"], \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}