FA-10321 / Observability / Open access
Alert evaluation state transition: Threshold equality starts an alert · case 01
Threshold equality starts an alert.
ROOT CAUSE
The implementation substitutes value < threshold for value <= threshold, so threshold equality starts an alert.
THE FAILURE
The implementation substitutes value < threshold for value <= threshold, so threshold equality starts an alert.
Unsuccessful approach: The attempted repair substitutes value == threshold. Fixture 5 still yields ('firing', 3) instead of ('ok', 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 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 | ['firing', 3] | ['ok', 0] | Failed |
| 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 / e0dd862a9679612c515d1de04a4658d75ea5c440d2ca3adbff5d7dbf748f0454
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 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 | ['firing', 3] | ['ok', 0] | Failed |
| fixture 6 | ['pending', 2] | ['pending', 2] | Passed |
| fixture 7 | ['firing', 3] | ['firing', 3] | Passed |
| fixture 8 | ['firing', 4] | ['firing', 4] | Passed |
SHA-256 / 6cfdf0966b42f0c5baccc419bfe8ba5a0afc720529791dc47495e8a611e717b2
HELD IN THE MEMBER ARCHIVE
The verified repair and its recorded checks are member-only.
This mechanism has 8 recorded checks per implementation. The open-access tier publishes the failure and the unsuccessful fix; the repaired source that passes every check, and the observations that prove it, are available to members.
Every case sharing this mechanism uses the same contract and the same repair, so this one record is held back for all of them.
Member access is invitation-based. Sign in with your invited account to inspect the repair.
Sign in to the archive ↗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:38.005466+00:00.
Case digest / ac4ff4aeaa29b7bfa9d6c5b36455e0517339ff88990a804d136ce4d91c854460