FA-10306 / Observability / Open access
Alert evaluation state transition: Disabled alert rules keep evaluating · case 01
Disabled alert rules keep evaluating.
ROOT CAUSE
The implementation substitutes if False: for if not enabled:, so disabled alert rules keep evaluating.
VERIFIED REPAIR
Stop evaluation and clear count when disabled.
Unsuccessful approach: The attempted repair substitutes if enabled:. Fixture 1 still yields ('firing', 3) instead of ('disabled', 0).
Case contract
Disabled rules become disabled; absent observations become no-data; explicit evaluation error becomes error; values above threshold become firing after required consecutive count, otherwise pending; healthy observations reset count to zero.
Why this case matters
An offline model of alert evaluation state transition, suitable for testing build and release tooling without external services.
1 / The failure
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(enabled, value, error, threshold, count, required):
if False: return ('disabled', 0)
if error: return ('error', count)
if value is None: return ('no-data', count)
if value <= threshold: return ('ok', 0)
count += 1
return ('firing' if count >= required else 'pending', count)
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve(False, 9, False, 5, 2, 3), ('disabled', 0))
check('fixture 2', solve(True, 9, True, 5, 2, 3), ('error', 2))
check('fixture 3', solve(True, None, False, 5, 2, 3), ('no-data', 2))
check('fixture 4', solve(True, 5, False, 5, 2, 3), ('ok', 0))
check('fixture 5', solve(True, 4, False, 5, 2, 3), ('ok', 0))
check('fixture 6', solve(True, 6, False, 5, 1, 3), ('pending', 2))
check('fixture 7', solve(True, 6, False, 5, 2, 3), ('firing', 3))
check('fixture 8', solve(True, 6, False, 5, 3, 3), ('firing', 4))
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| fixture 1 | ['firing', 3] | ['disabled', 0] | Failed |
| fixture 2 | ['error', 2] | ['error', 2] | Passed |
| fixture 3 | ['no-data', 2] | ['no-data', 2] | Passed |
| fixture 4 | ['ok', 0] | ['ok', 0] | Passed |
| fixture 5 | ['ok', 0] | ['ok', 0] | Passed |
| fixture 6 | ['pending', 2] | ['pending', 2] | Passed |
| fixture 7 | ['firing', 3] | ['firing', 3] | Passed |
| fixture 8 | ['firing', 4] | ['firing', 4] | Passed |
SHA-256 / 07560247ea305738e553f14605f0256d920b9cf6deca24264478fe68ecb27efc
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(enabled, value, error, threshold, count, required):
if enabled: return ('disabled', 0)
if error: return ('error', count)
if value is None: return ('no-data', count)
if value <= threshold: return ('ok', 0)
count += 1
return ('firing' if count >= required else 'pending', count)
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve(False, 9, False, 5, 2, 3), ('disabled', 0))
check('fixture 2', solve(True, 9, True, 5, 2, 3), ('error', 2))
check('fixture 3', solve(True, None, False, 5, 2, 3), ('no-data', 2))
check('fixture 4', solve(True, 5, False, 5, 2, 3), ('ok', 0))
check('fixture 5', solve(True, 4, False, 5, 2, 3), ('ok', 0))
check('fixture 6', solve(True, 6, False, 5, 1, 3), ('pending', 2))
check('fixture 7', solve(True, 6, False, 5, 2, 3), ('firing', 3))
check('fixture 8', solve(True, 6, False, 5, 3, 3), ('firing', 4))
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| fixture 1 | ['firing', 3] | ['disabled', 0] | Failed |
| fixture 2 | ['disabled', 0] | ['error', 2] | Failed |
| fixture 3 | ['disabled', 0] | ['no-data', 2] | Failed |
| fixture 4 | ['disabled', 0] | ['ok', 0] | Failed |
| fixture 5 | ['disabled', 0] | ['ok', 0] | Failed |
| fixture 6 | ['disabled', 0] | ['pending', 2] | Failed |
| fixture 7 | ['disabled', 0] | ['firing', 3] | Failed |
| fixture 8 | ['disabled', 0] | ['firing', 4] | Failed |
SHA-256 / 17ebeb04e3c340d185c35a9e0830ceecadfc9de5a667cbf17d05dd3b01a57c6a
3 / The verified repair
Exit 0"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(enabled, value, error, threshold, count, required):
if not enabled: return ('disabled', 0)
if error: return ('error', count)
if value is None: return ('no-data', count)
if value <= threshold: return ('ok', 0)
count += 1
return ('firing' if count >= required else 'pending', count)
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve(False, 9, False, 5, 2, 3), ('disabled', 0))
check('fixture 2', solve(True, 9, True, 5, 2, 3), ('error', 2))
check('fixture 3', solve(True, None, False, 5, 2, 3), ('no-data', 2))
check('fixture 4', solve(True, 5, False, 5, 2, 3), ('ok', 0))
check('fixture 5', solve(True, 4, False, 5, 2, 3), ('ok', 0))
check('fixture 6', solve(True, 6, False, 5, 1, 3), ('pending', 2))
check('fixture 7', solve(True, 6, False, 5, 2, 3), ('firing', 3))
check('fixture 8', solve(True, 6, False, 5, 3, 3), ('firing', 4))
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| fixture 1 | ['disabled', 0] | ['disabled', 0] | Passed |
| fixture 2 | ['error', 2] | ['error', 2] | Passed |
| fixture 3 | ['no-data', 2] | ['no-data', 2] | Passed |
| fixture 4 | ['ok', 0] | ['ok', 0] | Passed |
| fixture 5 | ['ok', 0] | ['ok', 0] | Passed |
| fixture 6 | ['pending', 2] | ['pending', 2] | Passed |
| fixture 7 | ['firing', 3] | ['firing', 3] | Passed |
| fixture 8 | ['firing', 4] | ['firing', 4] | Passed |
SHA-256 / 35c4b559190c1ca2e050e8d7eb5ff1ba4510b8a78cb28644c58185ff701d959c
Verification & scope
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.
Observations recorded using Python 3.12.14 at 2026-09-29T14:38:37.847210+00:00.
Case digest / 442ca7958c53b5961ddfaca76f3a746c166e1134e04939b1f1f7be649ade4efe