{"abstract":"alpha = 32768 (pass-through) returns \"bad-alpha\".","category":"Digital signal filters","checks":7,"contract":"Input [alpha, samples]; alpha is Q15 in [0, 32768] (\"bad-alpha\" otherwise). Inputs are saturated to int16; y += ((x - y) * alpha + 2**14) >> 15 (round half up on the Q15 product via arithmetic shift), starting at y = 0. Return the integer outputs.","evaluation_group":"w2-digital_signal_filters-q15-one-pole-smoother","failed_approach":"The attempted repair makes the upper bound inclusive but excludes alpha = 0 (hold).","family":"w2-digital_signal_filters-q15-one-pole-smoother-alpha-range-check","id":"FA-91491","implementations":{"attempt":{"sha256":"c4aca503b1be2b5c93c46351a8acda9b52f46a32aef26b934db4895dd4b9dcb1","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(x):\n    alpha, xs = x\n    if not 0 < alpha <= 32768:\n        return 'bad-alpha'\n    y = 0\n    out = []\n    for v in xs:\n        v = max(-32768, min(32767, v))\n        y = y + (((v - y) * alpha + (1 << 14)) >> 15)\n        out.append(y)\n    return out\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[['regression: alpha one', [32768, [100, -5, 7]], [100, -5, 7]], ['regression: random smoother 2', [32768, [-33, 20874, -43, 6, -28]], [-33, 20874, -43, 6, -28]], ['repair check: alpha zero', [0, [5, 5]], [0, 0]], ['control: negative step', [16384, [-1, -1, -1]], [0, 0, 0]], ['control: input beyond range', [16384, [40000, 40000, -40000]], [16384, 24576, -4096]], ['control: bad alpha', [40000, [1]], 'bad-alpha'], ['control: small negative tie', [16384, [-3, 0, 0]], [-1, 0, 0]]], [['regression: random smoother 5', [32768, [5, 7014, 39535]], [5, 7014, 32767]], ['regression: random smoother 9', [32768, [-37759, -22144, -45]], [-32768, -22144, -45]], ['repair check: alpha zero', [0, [5, 5]], [0, 0]], ['control: random smoother 0', [24576, [-8, -38976, 37]], [-6, -24577, -6116]], ['control: random smoother 1', [8192, [38, 13765]], [10, 3449]], ['control: random smoother 4', [8192, [20, -2539]], [5, -631]], ['control: random smoother 6', [8192, [16294, 2, -779, 14009]], [4074, 3056, 2097, 5075]]], [['regression: random smoother 24', [32768, [-19, -16, -18365, 21638, -14929]], [-19, -16, -18365, 21638, -14929]], ['regression: random smoother 26', [32768, [-4554, -6260, -33961]], [-4554, -6260, -32768]], ['repair check: alpha zero', [0, [5, 5]], [0, 0]], ['control: random smoother 7', [1000, [-8425, 39]], [-257, -248]], ['control: random smoother 8', [30000, [45, -46]], [41, -39]], ['control: random smoother 11', [24576, [12306, -35386, 1164, 8403, 12704, 26]], [9230, -22268, -4694, 5129, 10810, 2722]], ['control: random smoother 12', [16384, [-15862, 2530, 35915]], [-7931, -2700, 15034]]], [['regression: alpha one', [32768, [100, -5, 7]], [100, -5, 7]], ['regression: random smoother 2', [32768, [-33, 20874, -43, 6, -28]], [-33, 20874, -43, 6, -28]], ['repair check: alpha zero', [0, [5, 5]], [0, 0]], ['control: random smoother 13', [8192, [-8, -27561]], [-2, -6892]], ['control: random smoother 14', [24576, [-12991, -22604, 32, -18621, -30, -36, -10331]], [-9743, -19389, -4823, -15171, -3815, -981, -7993]], ['control: random smoother 15', [30000, [13636, -12457, -1, -11, 49, 0]], [12484, -10350, -875, -84, 38, 3]], ['control: random smoother 16', [8192, [-12962, 19012, 49, -24286]], [-3240, 2323, 1755, -4755]]], [['regression: random smoother 5', [32768, [5, 7014, 39535]], [5, 7014, 32767]], ['regression: random smoother 9', [32768, [-37759, -22144, -45]], [-32768, -22144, -45]], ['repair check: alpha zero', [0, [5, 5]], [0, 0]], ['control: random smoother 17', [16384, [-8485, -763, -9, 25855, -11982, -28816, 38]], [-4242, -2502, -1255, 12300, 159, -14328, -7145]], ['control: random smoother 18', [24576, [-8497, -36]], [-6373, -1620]], ['control: random smoother 19', [24576, [-1436, -36936, -26, 4657, 23423, 50]], [-1077, -24845, -6231, 1935, 18051, 4550]], ['control: random smoother 20', [16384, [6, -12155, -29083, 31]], [3, -6076, -17579, -8774]]]]\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":"7b1a5b37f34ecde12b59a34b4fb45923edb288612e73cb811490104347b5f89f","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(x):\n    alpha, xs = x\n    if not 0 <= alpha < 32768:\n        return 'bad-alpha'\n    y = 0\n    out = []\n    for v in xs:\n        v = max(-32768, min(32767, v))\n        y = y + (((v - y) * alpha + (1 << 14)) >> 15)\n        out.append(y)\n    return out\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[['regression: alpha one', [32768, [100, -5, 7]], [100, -5, 7]], ['regression: random smoother 2', [32768, [-33, 20874, -43, 6, -28]], [-33, 20874, -43, 6, -28]], ['repair check: alpha zero', [0, [5, 5]], [0, 0]], ['control: negative step', [16384, [-1, -1, -1]], [0, 0, 0]], ['control: input beyond range', [16384, [40000, 40000, -40000]], [16384, 24576, -4096]], ['control: bad alpha', [40000, [1]], 'bad-alpha'], ['control: small negative tie', [16384, [-3, 0, 0]], [-1, 0, 0]]], [['regression: random smoother 5', [32768, [5, 7014, 39535]], [5, 7014, 32767]], ['regression: random smoother 9', [32768, [-37759, -22144, -45]], [-32768, -22144, -45]], ['repair check: alpha zero', [0, [5, 5]], [0, 0]], ['control: random smoother 0', [24576, [-8, -38976, 37]], [-6, -24577, -6116]], ['control: random smoother 1', [8192, [38, 13765]], [10, 3449]], ['control: random smoother 4', [8192, [20, -2539]], [5, -631]], ['control: random smoother 6', [8192, [16294, 2, -779, 14009]], [4074, 3056, 2097, 5075]]], [['regression: random smoother 24', [32768, [-19, -16, -18365, 21638, -14929]], [-19, -16, -18365, 21638, -14929]], ['regression: random smoother 26', [32768, [-4554, -6260, -33961]], [-4554, -6260, -32768]], ['repair check: alpha zero', [0, [5, 5]], [0, 0]], ['control: random smoother 7', [1000, [-8425, 39]], [-257, -248]], ['control: random smoother 8', [30000, [45, -46]], [41, -39]], ['control: random smoother 11', [24576, [12306, -35386, 1164, 8403, 12704, 26]], [9230, -22268, -4694, 5129, 10810, 2722]], ['control: random smoother 12', [16384, [-15862, 2530, 35915]], [-7931, -2700, 15034]]], [['regression: alpha one', [32768, [100, -5, 7]], [100, -5, 7]], ['regression: random smoother 2', [32768, [-33, 20874, -43, 6, -28]], [-33, 20874, -43, 6, -28]], ['repair check: alpha zero', [0, [5, 5]], [0, 0]], ['control: random smoother 13', [8192, [-8, -27561]], [-2, -6892]], ['control: random smoother 14', [24576, [-12991, -22604, 32, -18621, -30, -36, -10331]], [-9743, -19389, -4823, -15171, -3815, -981, -7993]], ['control: random smoother 15', [30000, [13636, -12457, -1, -11, 49, 0]], [12484, -10350, -875, -84, 38, 3]], ['control: random smoother 16', [8192, [-12962, 19012, 49, -24286]], [-3240, 2323, 1755, -4755]]], [['regression: random smoother 5', [32768, [5, 7014, 39535]], [5, 7014, 32767]], ['regression: random smoother 9', [32768, [-37759, -22144, -45]], [-32768, -22144, -45]], ['repair check: alpha zero', [0, [5, 5]], [0, 0]], ['control: random smoother 17', [16384, [-8485, -763, -9, 25855, -11982, -28816, 38]], [-4242, -2502, -1255, 12300, 159, -14328, -7145]], ['control: random smoother 18', [24576, [-8497, -36]], [-6373, -1620]], ['control: random smoother 19', [24576, [-1436, -36936, -26, 4657, 23423, 50]], [-1077, -24845, -6231, 1935, 18051, 4550]], ['control: random smoother 20', [16384, [6, -12155, -29083, 31]], [3, -6076, -17579, -8774]]]]\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":"8a28fd137a3283c70902661dad52ab3dd35e487e097b20ea210773898e37a07f","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(x):\n    alpha, xs = x\n    if not 0 <= alpha <= 32768:\n        return 'bad-alpha'\n    y = 0\n    out = []\n    for v in xs:\n        v = max(-32768, min(32767, v))\n        y = y + (((v - y) * alpha + (1 << 14)) >> 15)\n        out.append(y)\n    return out\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[['regression: alpha one', [32768, [100, -5, 7]], [100, -5, 7]], ['regression: random smoother 2', [32768, [-33, 20874, -43, 6, -28]], [-33, 20874, -43, 6, -28]], ['repair check: alpha zero', [0, [5, 5]], [0, 0]], ['control: negative step', [16384, [-1, -1, -1]], [0, 0, 0]], ['control: input beyond range', [16384, [40000, 40000, -40000]], [16384, 24576, -4096]], ['control: bad alpha', [40000, [1]], 'bad-alpha'], ['control: small negative tie', [16384, [-3, 0, 0]], [-1, 0, 0]]], [['regression: random smoother 5', [32768, [5, 7014, 39535]], [5, 7014, 32767]], ['regression: random smoother 9', [32768, [-37759, -22144, -45]], [-32768, -22144, -45]], ['repair check: alpha zero', [0, [5, 5]], [0, 0]], ['control: random smoother 0', [24576, [-8, -38976, 37]], [-6, -24577, -6116]], ['control: random smoother 1', [8192, [38, 13765]], [10, 3449]], ['control: random smoother 4', [8192, [20, -2539]], [5, -631]], ['control: random smoother 6', [8192, [16294, 2, -779, 14009]], [4074, 3056, 2097, 5075]]], [['regression: random smoother 24', [32768, [-19, -16, -18365, 21638, -14929]], [-19, -16, -18365, 21638, -14929]], ['regression: random smoother 26', [32768, [-4554, -6260, -33961]], [-4554, -6260, -32768]], ['repair check: alpha zero', [0, [5, 5]], [0, 0]], ['control: random smoother 7', [1000, [-8425, 39]], [-257, -248]], ['control: random smoother 8', [30000, [45, -46]], [41, -39]], ['control: random smoother 11', [24576, [12306, -35386, 1164, 8403, 12704, 26]], [9230, -22268, -4694, 5129, 10810, 2722]], ['control: random smoother 12', [16384, [-15862, 2530, 35915]], [-7931, -2700, 15034]]], [['regression: alpha one', [32768, [100, -5, 7]], [100, -5, 7]], ['regression: random smoother 2', [32768, [-33, 20874, -43, 6, -28]], [-33, 20874, -43, 6, -28]], ['repair check: alpha zero', [0, [5, 5]], [0, 0]], ['control: random smoother 13', [8192, [-8, -27561]], [-2, -6892]], ['control: random smoother 14', [24576, [-12991, -22604, 32, -18621, -30, -36, -10331]], [-9743, -19389, -4823, -15171, -3815, -981, -7993]], ['control: random smoother 15', [30000, [13636, -12457, -1, -11, 49, 0]], [12484, -10350, -875, -84, 38, 3]], ['control: random smoother 16', [8192, [-12962, 19012, 49, -24286]], [-3240, 2323, 1755, -4755]]], [['regression: random smoother 5', [32768, [5, 7014, 39535]], [5, 7014, 32767]], ['regression: random smoother 9', [32768, [-37759, -22144, -45]], [-32768, -22144, -45]], ['repair check: alpha zero', [0, [5, 5]], [0, 0]], ['control: random smoother 17', [16384, [-8485, -763, -9, 25855, -11982, -28816, 38]], [-4242, -2502, -1255, 12300, 159, -14328, -7145]], ['control: random smoother 18', [24576, [-8497, -36]], [-6373, -1620]], ['control: random smoother 19', [24576, [-1436, -36936, -26, 4657, 23423, 50]], [-1077, -24845, -6231, 1935, 18051, 4550]], ['control: random smoother 20', [16384, [6, -12155, -29083, 31]], [3, -6076, -17579, -8774]]]]\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-q15-one-pole-smoother-alpha-range-check","generated_at":"2026-09-29T14:51:36.386314+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"Fixed-point exponential smoothers run on microcontrollers; rounding direction and saturation slips cause bias and limit cycles.","repair":"Accept alpha in the closed interval [0, 32768].","root_cause":"The upper bound check is exclusive.","sha256":"b1c053b34a845ea23b2777b9a180b06970816a8e9ed172d8effdc97f0b9bc59c","title":"Q15 smoother rejects alpha = 1.0 · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":37.241,"exit_code":1,"observations":[{"actual":[100,-5,7],"check":"regression: alpha one","expected":[100,-5,7],"passed":true},{"actual":[-33,20874,-43,6,-28],"check":"regression: random smoother 2","expected":[-33,20874,-43,6,-28],"passed":true},{"actual":"bad-alpha","check":"repair check: alpha zero","expected":[0,0],"passed":false},{"actual":[0,0,0],"check":"control: negative step","expected":[0,0,0],"passed":true},{"actual":[16384,24576,-4096],"check":"control: input beyond range","expected":[16384,24576,-4096],"passed":true},{"actual":"bad-alpha","check":"control: bad alpha","expected":"bad-alpha","passed":true},{"actual":[-1,0,0],"check":"control: small negative tie","expected":[-1,0,0],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression: alpha one\", \"actual\": [100, -5, 7], \"expected\": [100, -5, 7], \"passed\": true}, {\"check\": \"regression: random smoother 2\", \"actual\": [-33, 20874, -43, 6, -28], \"expected\": [-33, 20874, -43, 6, -28], \"passed\": true}, {\"check\": \"repair check: alpha zero\", \"actual\": \"bad-alpha\", \"expected\": [0, 0], \"passed\": false}, {\"check\": \"control: negative step\", \"actual\": [0, 0, 0], \"expected\": [0, 0, 0], \"passed\": true}, {\"check\": \"control: input beyond range\", \"actual\": [16384, 24576, -4096], \"expected\": [16384, 24576, -4096], \"passed\": true}, {\"check\": \"control: bad alpha\", \"actual\": \"bad-alpha\", \"expected\": \"bad-alpha\", \"passed\": true}, {\"check\": \"control: small negative tie\", \"actual\": [-1, 0, 0], \"expected\": [-1, 0, 0], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":40.426,"exit_code":1,"observations":[{"actual":"bad-alpha","check":"regression: alpha one","expected":[100,-5,7],"passed":false},{"actual":"bad-alpha","check":"regression: random smoother 2","expected":[-33,20874,-43,6,-28],"passed":false},{"actual":[0,0],"check":"repair check: alpha zero","expected":[0,0],"passed":true},{"actual":[0,0,0],"check":"control: negative step","expected":[0,0,0],"passed":true},{"actual":[16384,24576,-4096],"check":"control: input beyond range","expected":[16384,24576,-4096],"passed":true},{"actual":"bad-alpha","check":"control: bad alpha","expected":"bad-alpha","passed":true},{"actual":[-1,0,0],"check":"control: small negative tie","expected":[-1,0,0],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression: alpha one\", \"actual\": \"bad-alpha\", \"expected\": [100, -5, 7], \"passed\": false}, {\"check\": \"regression: random smoother 2\", \"actual\": \"bad-alpha\", \"expected\": [-33, 20874, -43, 6, -28], \"passed\": false}, {\"check\": \"repair check: alpha zero\", \"actual\": [0, 0], \"expected\": [0, 0], \"passed\": true}, {\"check\": \"control: negative step\", \"actual\": [0, 0, 0], \"expected\": [0, 0, 0], \"passed\": true}, {\"check\": \"control: input beyond range\", \"actual\": [16384, 24576, -4096], \"expected\": [16384, 24576, -4096], \"passed\": true}, {\"check\": \"control: bad alpha\", \"actual\": \"bad-alpha\", \"expected\": \"bad-alpha\", \"passed\": true}, {\"check\": \"control: small negative tie\", \"actual\": [-1, 0, 0], \"expected\": [-1, 0, 0], \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":39.969,"exit_code":0,"observations":[{"actual":[100,-5,7],"check":"regression: alpha one","expected":[100,-5,7],"passed":true},{"actual":[-33,20874,-43,6,-28],"check":"regression: random smoother 2","expected":[-33,20874,-43,6,-28],"passed":true},{"actual":[0,0],"check":"repair check: alpha zero","expected":[0,0],"passed":true},{"actual":[0,0,0],"check":"control: negative step","expected":[0,0,0],"passed":true},{"actual":[16384,24576,-4096],"check":"control: input beyond range","expected":[16384,24576,-4096],"passed":true},{"actual":"bad-alpha","check":"control: bad alpha","expected":"bad-alpha","passed":true},{"actual":[-1,0,0],"check":"control: small negative tie","expected":[-1,0,0],"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression: alpha one\", \"actual\": [100, -5, 7], \"expected\": [100, -5, 7], \"passed\": true}, {\"check\": \"regression: random smoother 2\", \"actual\": [-33, 20874, -43, 6, -28], \"expected\": [-33, 20874, -43, 6, -28], \"passed\": true}, {\"check\": \"repair check: alpha zero\", \"actual\": [0, 0], \"expected\": [0, 0], \"passed\": true}, {\"check\": \"control: negative step\", \"actual\": [0, 0, 0], \"expected\": [0, 0, 0], \"passed\": true}, {\"check\": \"control: input beyond range\", \"actual\": [16384, 24576, -4096], \"expected\": [16384, 24576, -4096], \"passed\": true}, {\"check\": \"control: bad alpha\", \"actual\": \"bad-alpha\", \"expected\": \"bad-alpha\", \"passed\": true}, {\"check\": \"control: small negative tie\", \"actual\": [-1, 0, 0], \"expected\": [-1, 0, 0], \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}