FA-72196 / Error-correcting codes / Open access
Row retirement counts uncorrectable errors like corrected ones · case 01
Rows with an uncorrectable error stay in service until the threshold is reached.
ROOT CAUSE
The immediate-retirement branch for "ue" events is missing.
VERIFIED REPAIR
Retire the row at the time of any uncorrectable error.
Unsuccessful approach: Retiring on "ue" only when the row already has corrected errors misses first-time failures.
Case contract
Memory-controller ECC policy. events are [time, row, kind] with kind "ce" (corrected) or "ue" (uncorrectable), processed in time order (stable for equal times). A "ue" retires its row immediately. A "ce" is added to the row's history, entries at or before time - window expire, and the row retires when the remaining count reaches the threshold. Events for a retired row are ignored. Return sorted [row, retirement time] pairs.
Why this case matters
Servers retire DRAM rows that show repeated corrected errors before they turn uncorrectable.
1 / The failure
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(events, window, threshold):
retired = {}
hist = {}
for t, row, kind in sorted(events, key=lambda e: e[0]):
if row in retired:
continue
h = [x for x in hist.get(row, []) if x > t - window] + [t]
hist[row] = h
if len(h) >= threshold:
retired[row] = t
return sorted([rw, tm] for rw, tm in retired.items())
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['regression [[[21, 9, "ce"], [27, 2, "ue"], [0, 2, "ue"], [21, 1, "ce"], [9, 10...', [[[21, 9, 'ce'], [27, 2, 'ue'], [0, 2, 'ue'], [21, 1, 'ce'], [9, 10, 'ce'], [0, 1, 'ce']], 5, 2], [[2, 0]]], ['regression [[[39, 3, "ce"], [20, 10, "ce"], [16, 1, "ce"], [20, 10, "ce"], [22...', [[[39, 3, 'ce'], [20, 10, 'ce'], [16, 1, 'ce'], [20, 10, 'ce'], [22, 3, 'ue'], [40, 10, 'ce'], [15, 10, 'ce']], 5, 3], [[3, 22]]], ['control [[[14, 10, "ce"], [33, 1, "ce"], [3, 9, "ce"], [11, 1, "ce"], [9, 2...', [[[14, 10, 'ce'], [33, 1, 'ce'], [3, 9, 'ce'], [11, 1, 'ce'], [9, 2, 'ce'], [7, 9, 'ce'], [29, 3, 'ce'], [27, 1, 'ce']], 10, 3], []], ['control [[[38, 2, "ce"], [26, 10, "ce"], [5, 1, "ce"], [32, 2, "ce"]], 5, 3]', [[[38, 2, 'ce'], [26, 10, 'ce'], [5, 1, 'ce'], [32, 2, 'ce']], 5, 3], []], ['control [[[39, 10, "ce"], [4, 3, "ce"], [20, 2, "ce"], [33, 1, "ce"]], 15, 3]', [[[39, 10, 'ce'], [4, 3, 'ce'], [20, 2, 'ce'], [33, 1, 'ce']], 15, 3], []], ['control [[[0, 1, "ce"], [10, 1, "ce"], [20, 1, "ce"]], 10, 2]', [[[0, 1, 'ce'], [10, 1, 'ce'], [20, 1, 'ce']], 10, 2], []], ['control [[[0, 1, "ce"], [9, 1, "ce"]], 10, 2]', [[[0, 1, 'ce'], [9, 1, 'ce']], 10, 2], [[1, 9]]], ['control [[[3, 1, "ce"], [1, 1, "ce"], [2, 4, "ce"]], 5, 2]', [[[3, 1, 'ce'], [1, 1, 'ce'], [2, 4, 'ce']], 5, 2], [[1, 3]]]], [['regression [[[2, 10, "ue"], [35, 1, "ce"], [6, 3, "ue"], [37, 10, "ce"]], 10, 3]', [[[2, 10, 'ue'], [35, 1, 'ce'], [6, 3, 'ue'], [37, 10, 'ce']], 10, 3], [[3, 6], [10, 2]]], ['regression [[[5, 9, "ce"], [3, 10, "ue"], [23, 1, "ce"]], 15, 3]', [[[5, 9, 'ce'], [3, 10, 'ue'], [23, 1, 'ce']], 15, 3], [[10, 3]]], ['control [[[3, 1, "ce"], [1, 1, "ce"], [2, 4, "ce"]], 5, 2]', [[[3, 1, 'ce'], [1, 1, 'ce'], [2, 4, 'ce']], 5, 2], [[1, 3]]], ['control [[[0, 1, "ce"], [1, 2, "ce"], [2, 3, "ce"]], 10, 2]', [[[0, 1, 'ce'], [1, 2, 'ce'], [2, 3, 'ce']], 10, 2], []], ['control [[[0, 8, "ce"], [1, 9, "ce"]], 10, 2]', [[[0, 8, 'ce'], [1, 9, 'ce']], 10, 2], []], ['control [[], 10, 2]', [[], 10, 2], []], ['control [[[14, 10, "ce"], [33, 1, "ce"], [3, 9, "ce"], [11, 1, "ce"], [9, 2...', [[[14, 10, 'ce'], [33, 1, 'ce'], [3, 9, 'ce'], [11, 1, 'ce'], [9, 2, 'ce'], [7, 9, 'ce'], [29, 3, 'ce'], [27, 1, 'ce']], 10, 3], []], ['control [[[38, 2, "ce"], [26, 10, "ce"], [5, 1, "ce"], [32, 2, "ce"]], 5, 3]', [[[38, 2, 'ce'], [26, 10, 'ce'], [5, 1, 'ce'], [32, 2, 'ce']], 5, 3], []]], [['regression [[[30, 1, "ce"], [30, 1, "ce"], [0, 3, "ce"], [16, 1, "ue"], [21, 3...', [[[30, 1, 'ce'], [30, 1, 'ce'], [0, 3, 'ce'], [16, 1, 'ue'], [21, 3, 'ue'], [33, 3, 'ce'], [30, 3, 'ue'], [29, 9, 'ue'], [1, 9, 'ce']], 15, 2], [[1, 16], [3, 21], [9, 29]]], ['regression [[[3, 3, "ue"], [24, 2, "ce"], [16, 1, "ue"], [12, 3, "ce"], [18, 3...', [[[3, 3, 'ue'], [24, 2, 'ce'], [16, 1, 'ue'], [12, 3, 'ce'], [18, 3, 'ce'], [3, 1, 'ce'], [2, 3, 'ce']], 5, 3], [[1, 16], [3, 3]]], ['partial-repair [[[32, 2, "ce"], [16, 10, "ue"], [26, 1, "ue"], [3, 10, "ce"], [1, ...', [[[32, 2, 'ce'], [16, 10, 'ue'], [26, 1, 'ue'], [3, 10, 'ce'], [1, 2, 'ce']], 10, 3], [[1, 26], [10, 16]]], ['partial-repair [[[15, 3, "ce"], [35, 9, "ce"], [0, 3, "ue"]], 5, 2]', [[[15, 3, 'ce'], [35, 9, 'ce'], [0, 3, 'ue']], 5, 2], [[3, 0]]], ['control [[[38, 2, "ce"], [26, 10, "ce"], [5, 1, "ce"], [32, 2, "ce"]], 5, 3]', [[[38, 2, 'ce'], [26, 10, 'ce'], [5, 1, 'ce'], [32, 2, 'ce']], 5, 3], []], ['control [[[39, 10, "ce"], [4, 3, "ce"], [20, 2, "ce"], [33, 1, "ce"]], 15, 3]', [[[39, 10, 'ce'], [4, 3, 'ce'], [20, 2, 'ce'], [33, 1, 'ce']], 15, 3], []], ['control [[[0, 1, "ce"], [10, 1, "ce"], [20, 1, "ce"]], 10, 2]', [[[0, 1, 'ce'], [10, 1, 'ce'], [20, 1, 'ce']], 10, 2], []], ['control [[[0, 1, "ce"], [9, 1, "ce"]], 10, 2]', [[[0, 1, 'ce'], [9, 1, 'ce']], 10, 2], [[1, 9]]]], [['regression [[[15, 3, "ce"], [35, 9, "ce"], [0, 3, "ue"]], 5, 2]', [[[15, 3, 'ce'], [35, 9, 'ce'], [0, 3, 'ue']], 5, 2], [[3, 0]]], ['regression [[[27, 3, "ce"], [2, 1, "ce"], [8, 1, "ce"], [28, 10, "ce"], [25, 1...', [[[27, 3, 'ce'], [2, 1, 'ce'], [8, 1, 'ce'], [28, 10, 'ce'], [25, 1, 'ce'], [19, 10, 'ce'], [8, 2, 'ue'], [7, 10, 'ce']], 5, 2], [[2, 8]]], ['partial-repair [[[3, 2, "ue"], [11, 1, "ce"], [29, 1, "ce"], [28, 3, "ce"]], 5, 2]', [[[3, 2, 'ue'], [11, 1, 'ce'], [29, 1, 'ce'], [28, 3, 'ce']], 5, 2], [[2, 3]]], ['partial-repair [[[2, 3, "ce"], [35, 9, "ce"], [27, 2, "ce"], [40, 10, "ce"], [38, ...', [[[2, 3, 'ce'], [35, 9, 'ce'], [27, 2, 'ce'], [40, 10, 'ce'], [38, 3, 'ce'], [23, 3, 'ue'], [7, 10, 'ce'], [29, 9, 'ue']], 15, 3], [[3, 23], [9, 29]]], ['control [[[0, 1, "ce"], [1, 2, "ce"], [2, 3, "ce"]], 10, 2]', [[[0, 1, 'ce'], [1, 2, 'ce'], [2, 3, 'ce']], 10, 2], []], ['control [[[0, 8, "ce"], [1, 9, "ce"]], 10, 2]', [[[0, 8, 'ce'], [1, 9, 'ce']], 10, 2], []], ['control [[], 10, 2]', [[], 10, 2], []], ['control [[[14, 10, "ce"], [33, 1, "ce"], [3, 9, "ce"], [11, 1, "ce"], [9, 2...', [[[14, 10, 'ce'], [33, 1, 'ce'], [3, 9, 'ce'], [11, 1, 'ce'], [9, 2, 'ce'], [7, 9, 'ce'], [29, 3, 'ce'], [27, 1, 'ce']], 10, 3], []]], [['regression [[[2, 3, "ce"], [35, 9, "ce"], [27, 2, "ce"], [40, 10, "ce"], [38, ...', [[[2, 3, 'ce'], [35, 9, 'ce'], [27, 2, 'ce'], [40, 10, 'ce'], [38, 3, 'ce'], [23, 3, 'ue'], [7, 10, 'ce'], [29, 9, 'ue']], 15, 3], [[3, 23], [9, 29]]], ['regression [[[12, 3, "ce"], [37, 2, "ce"], [33, 1, "ce"], [12, 10, "ce"], [4, ...', [[[12, 3, 'ce'], [37, 2, 'ce'], [33, 1, 'ce'], [12, 10, 'ce'], [4, 3, 'ce'], [7, 10, 'ce'], [34, 1, 'ue'], [1, 1, 'ce'], [11, 3, 'ce']], 5, 3], [[1, 34]]], ['partial-repair [[[5, 2, "ue"], [6, 2, "ce"], [7, 2, "ue"]], 10, 3]', [[[5, 2, 'ue'], [6, 2, 'ce'], [7, 2, 'ue']], 10, 3], [[2, 5]]], ['partial-repair [[[21, 9, "ce"], [27, 2, "ue"], [0, 2, "ue"], [21, 1, "ce"], [9, 10...', [[[21, 9, 'ce'], [27, 2, 'ue'], [0, 2, 'ue'], [21, 1, 'ce'], [9, 10, 'ce'], [0, 1, 'ce']], 5, 2], [[2, 0]]], ['control [[[39, 10, "ce"], [4, 3, "ce"], [20, 2, "ce"], [33, 1, "ce"]], 15, 3]', [[[39, 10, 'ce'], [4, 3, 'ce'], [20, 2, 'ce'], [33, 1, 'ce']], 15, 3], []], ['control [[[0, 1, "ce"], [10, 1, "ce"], [20, 1, "ce"]], 10, 2]', [[[0, 1, 'ce'], [10, 1, 'ce'], [20, 1, 'ce']], 10, 2], []], ['control [[[0, 1, "ce"], [9, 1, "ce"]], 10, 2]', [[[0, 1, 'ce'], [9, 1, 'ce']], 10, 2], [[1, 9]]], ['control [[[3, 1, "ce"], [1, 1, "ce"], [2, 4, "ce"]], 5, 2]', [[[3, 1, 'ce'], [1, 1, 'ce'], [2, 4, 'ce']], 5, 2], [[1, 3]]]]]
for label, args, expected in fixtures[N - 1]:
check(label, solve(*args), expected)
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 |
|---|---|---|---|
| regression [[[21, 9, "ce"], [27, 2, "ue"], [0, 2, "ue"], [21, 1, "ce"], [9, 10... | [] | [[2, 0]] | Failed |
| regression [[[39, 3, "ce"], [20, 10, "ce"], [16, 1, "ce"], [20, 10, "ce"], [22... | [] | [[3, 22]] | Failed |
| control [[[14, 10, "ce"], [33, 1, "ce"], [3, 9, "ce"], [11, 1, "ce"], [9, 2... | [] | [] | Passed |
| control [[[38, 2, "ce"], [26, 10, "ce"], [5, 1, "ce"], [32, 2, "ce"]], 5, 3] | [] | [] | Passed |
| control [[[39, 10, "ce"], [4, 3, "ce"], [20, 2, "ce"], [33, 1, "ce"]], 15, 3] | [] | [] | Passed |
| control [[[0, 1, "ce"], [10, 1, "ce"], [20, 1, "ce"]], 10, 2] | [] | [] | Passed |
| control [[[0, 1, "ce"], [9, 1, "ce"]], 10, 2] | [[1, 9]] | [[1, 9]] | Passed |
| control [[[3, 1, "ce"], [1, 1, "ce"], [2, 4, "ce"]], 5, 2] | [[1, 3]] | [[1, 3]] | Passed |
SHA-256 / a20d80b25aab761d3bda26c9aa38a15a45ced7a4c0fd3c64a0ebddee649cca8e
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(events, window, threshold):
retired = {}
hist = {}
for t, row, kind in sorted(events, key=lambda e: e[0]):
if row in retired:
continue
if kind == 'ue' and row in hist:
retired[row] = t
continue
h = [x for x in hist.get(row, []) if x > t - window] + [t]
hist[row] = h
if len(h) >= threshold:
retired[row] = t
return sorted([rw, tm] for rw, tm in retired.items())
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['regression [[[21, 9, "ce"], [27, 2, "ue"], [0, 2, "ue"], [21, 1, "ce"], [9, 10...', [[[21, 9, 'ce'], [27, 2, 'ue'], [0, 2, 'ue'], [21, 1, 'ce'], [9, 10, 'ce'], [0, 1, 'ce']], 5, 2], [[2, 0]]], ['regression [[[39, 3, "ce"], [20, 10, "ce"], [16, 1, "ce"], [20, 10, "ce"], [22...', [[[39, 3, 'ce'], [20, 10, 'ce'], [16, 1, 'ce'], [20, 10, 'ce'], [22, 3, 'ue'], [40, 10, 'ce'], [15, 10, 'ce']], 5, 3], [[3, 22]]], ['control [[[14, 10, "ce"], [33, 1, "ce"], [3, 9, "ce"], [11, 1, "ce"], [9, 2...', [[[14, 10, 'ce'], [33, 1, 'ce'], [3, 9, 'ce'], [11, 1, 'ce'], [9, 2, 'ce'], [7, 9, 'ce'], [29, 3, 'ce'], [27, 1, 'ce']], 10, 3], []], ['control [[[38, 2, "ce"], [26, 10, "ce"], [5, 1, "ce"], [32, 2, "ce"]], 5, 3]', [[[38, 2, 'ce'], [26, 10, 'ce'], [5, 1, 'ce'], [32, 2, 'ce']], 5, 3], []], ['control [[[39, 10, "ce"], [4, 3, "ce"], [20, 2, "ce"], [33, 1, "ce"]], 15, 3]', [[[39, 10, 'ce'], [4, 3, 'ce'], [20, 2, 'ce'], [33, 1, 'ce']], 15, 3], []], ['control [[[0, 1, "ce"], [10, 1, "ce"], [20, 1, "ce"]], 10, 2]', [[[0, 1, 'ce'], [10, 1, 'ce'], [20, 1, 'ce']], 10, 2], []], ['control [[[0, 1, "ce"], [9, 1, "ce"]], 10, 2]', [[[0, 1, 'ce'], [9, 1, 'ce']], 10, 2], [[1, 9]]], ['control [[[3, 1, "ce"], [1, 1, "ce"], [2, 4, "ce"]], 5, 2]', [[[3, 1, 'ce'], [1, 1, 'ce'], [2, 4, 'ce']], 5, 2], [[1, 3]]]], [['regression [[[2, 10, "ue"], [35, 1, "ce"], [6, 3, "ue"], [37, 10, "ce"]], 10, 3]', [[[2, 10, 'ue'], [35, 1, 'ce'], [6, 3, 'ue'], [37, 10, 'ce']], 10, 3], [[3, 6], [10, 2]]], ['regression [[[5, 9, "ce"], [3, 10, "ue"], [23, 1, "ce"]], 15, 3]', [[[5, 9, 'ce'], [3, 10, 'ue'], [23, 1, 'ce']], 15, 3], [[10, 3]]], ['control [[[3, 1, "ce"], [1, 1, "ce"], [2, 4, "ce"]], 5, 2]', [[[3, 1, 'ce'], [1, 1, 'ce'], [2, 4, 'ce']], 5, 2], [[1, 3]]], ['control [[[0, 1, "ce"], [1, 2, "ce"], [2, 3, "ce"]], 10, 2]', [[[0, 1, 'ce'], [1, 2, 'ce'], [2, 3, 'ce']], 10, 2], []], ['control [[[0, 8, "ce"], [1, 9, "ce"]], 10, 2]', [[[0, 8, 'ce'], [1, 9, 'ce']], 10, 2], []], ['control [[], 10, 2]', [[], 10, 2], []], ['control [[[14, 10, "ce"], [33, 1, "ce"], [3, 9, "ce"], [11, 1, "ce"], [9, 2...', [[[14, 10, 'ce'], [33, 1, 'ce'], [3, 9, 'ce'], [11, 1, 'ce'], [9, 2, 'ce'], [7, 9, 'ce'], [29, 3, 'ce'], [27, 1, 'ce']], 10, 3], []], ['control [[[38, 2, "ce"], [26, 10, "ce"], [5, 1, "ce"], [32, 2, "ce"]], 5, 3]', [[[38, 2, 'ce'], [26, 10, 'ce'], [5, 1, 'ce'], [32, 2, 'ce']], 5, 3], []]], [['regression [[[30, 1, "ce"], [30, 1, "ce"], [0, 3, "ce"], [16, 1, "ue"], [21, 3...', [[[30, 1, 'ce'], [30, 1, 'ce'], [0, 3, 'ce'], [16, 1, 'ue'], [21, 3, 'ue'], [33, 3, 'ce'], [30, 3, 'ue'], [29, 9, 'ue'], [1, 9, 'ce']], 15, 2], [[1, 16], [3, 21], [9, 29]]], ['regression [[[3, 3, "ue"], [24, 2, "ce"], [16, 1, "ue"], [12, 3, "ce"], [18, 3...', [[[3, 3, 'ue'], [24, 2, 'ce'], [16, 1, 'ue'], [12, 3, 'ce'], [18, 3, 'ce'], [3, 1, 'ce'], [2, 3, 'ce']], 5, 3], [[1, 16], [3, 3]]], ['partial-repair [[[32, 2, "ce"], [16, 10, "ue"], [26, 1, "ue"], [3, 10, "ce"], [1, ...', [[[32, 2, 'ce'], [16, 10, 'ue'], [26, 1, 'ue'], [3, 10, 'ce'], [1, 2, 'ce']], 10, 3], [[1, 26], [10, 16]]], ['partial-repair [[[15, 3, "ce"], [35, 9, "ce"], [0, 3, "ue"]], 5, 2]', [[[15, 3, 'ce'], [35, 9, 'ce'], [0, 3, 'ue']], 5, 2], [[3, 0]]], ['control [[[38, 2, "ce"], [26, 10, "ce"], [5, 1, "ce"], [32, 2, "ce"]], 5, 3]', [[[38, 2, 'ce'], [26, 10, 'ce'], [5, 1, 'ce'], [32, 2, 'ce']], 5, 3], []], ['control [[[39, 10, "ce"], [4, 3, "ce"], [20, 2, "ce"], [33, 1, "ce"]], 15, 3]', [[[39, 10, 'ce'], [4, 3, 'ce'], [20, 2, 'ce'], [33, 1, 'ce']], 15, 3], []], ['control [[[0, 1, "ce"], [10, 1, "ce"], [20, 1, "ce"]], 10, 2]', [[[0, 1, 'ce'], [10, 1, 'ce'], [20, 1, 'ce']], 10, 2], []], ['control [[[0, 1, "ce"], [9, 1, "ce"]], 10, 2]', [[[0, 1, 'ce'], [9, 1, 'ce']], 10, 2], [[1, 9]]]], [['regression [[[15, 3, "ce"], [35, 9, "ce"], [0, 3, "ue"]], 5, 2]', [[[15, 3, 'ce'], [35, 9, 'ce'], [0, 3, 'ue']], 5, 2], [[3, 0]]], ['regression [[[27, 3, "ce"], [2, 1, "ce"], [8, 1, "ce"], [28, 10, "ce"], [25, 1...', [[[27, 3, 'ce'], [2, 1, 'ce'], [8, 1, 'ce'], [28, 10, 'ce'], [25, 1, 'ce'], [19, 10, 'ce'], [8, 2, 'ue'], [7, 10, 'ce']], 5, 2], [[2, 8]]], ['partial-repair [[[3, 2, "ue"], [11, 1, "ce"], [29, 1, "ce"], [28, 3, "ce"]], 5, 2]', [[[3, 2, 'ue'], [11, 1, 'ce'], [29, 1, 'ce'], [28, 3, 'ce']], 5, 2], [[2, 3]]], ['partial-repair [[[2, 3, "ce"], [35, 9, "ce"], [27, 2, "ce"], [40, 10, "ce"], [38, ...', [[[2, 3, 'ce'], [35, 9, 'ce'], [27, 2, 'ce'], [40, 10, 'ce'], [38, 3, 'ce'], [23, 3, 'ue'], [7, 10, 'ce'], [29, 9, 'ue']], 15, 3], [[3, 23], [9, 29]]], ['control [[[0, 1, "ce"], [1, 2, "ce"], [2, 3, "ce"]], 10, 2]', [[[0, 1, 'ce'], [1, 2, 'ce'], [2, 3, 'ce']], 10, 2], []], ['control [[[0, 8, "ce"], [1, 9, "ce"]], 10, 2]', [[[0, 8, 'ce'], [1, 9, 'ce']], 10, 2], []], ['control [[], 10, 2]', [[], 10, 2], []], ['control [[[14, 10, "ce"], [33, 1, "ce"], [3, 9, "ce"], [11, 1, "ce"], [9, 2...', [[[14, 10, 'ce'], [33, 1, 'ce'], [3, 9, 'ce'], [11, 1, 'ce'], [9, 2, 'ce'], [7, 9, 'ce'], [29, 3, 'ce'], [27, 1, 'ce']], 10, 3], []]], [['regression [[[2, 3, "ce"], [35, 9, "ce"], [27, 2, "ce"], [40, 10, "ce"], [38, ...', [[[2, 3, 'ce'], [35, 9, 'ce'], [27, 2, 'ce'], [40, 10, 'ce'], [38, 3, 'ce'], [23, 3, 'ue'], [7, 10, 'ce'], [29, 9, 'ue']], 15, 3], [[3, 23], [9, 29]]], ['regression [[[12, 3, "ce"], [37, 2, "ce"], [33, 1, "ce"], [12, 10, "ce"], [4, ...', [[[12, 3, 'ce'], [37, 2, 'ce'], [33, 1, 'ce'], [12, 10, 'ce'], [4, 3, 'ce'], [7, 10, 'ce'], [34, 1, 'ue'], [1, 1, 'ce'], [11, 3, 'ce']], 5, 3], [[1, 34]]], ['partial-repair [[[5, 2, "ue"], [6, 2, "ce"], [7, 2, "ue"]], 10, 3]', [[[5, 2, 'ue'], [6, 2, 'ce'], [7, 2, 'ue']], 10, 3], [[2, 5]]], ['partial-repair [[[21, 9, "ce"], [27, 2, "ue"], [0, 2, "ue"], [21, 1, "ce"], [9, 10...', [[[21, 9, 'ce'], [27, 2, 'ue'], [0, 2, 'ue'], [21, 1, 'ce'], [9, 10, 'ce'], [0, 1, 'ce']], 5, 2], [[2, 0]]], ['control [[[39, 10, "ce"], [4, 3, "ce"], [20, 2, "ce"], [33, 1, "ce"]], 15, 3]', [[[39, 10, 'ce'], [4, 3, 'ce'], [20, 2, 'ce'], [33, 1, 'ce']], 15, 3], []], ['control [[[0, 1, "ce"], [10, 1, "ce"], [20, 1, "ce"]], 10, 2]', [[[0, 1, 'ce'], [10, 1, 'ce'], [20, 1, 'ce']], 10, 2], []], ['control [[[0, 1, "ce"], [9, 1, "ce"]], 10, 2]', [[[0, 1, 'ce'], [9, 1, 'ce']], 10, 2], [[1, 9]]], ['control [[[3, 1, "ce"], [1, 1, "ce"], [2, 4, "ce"]], 5, 2]', [[[3, 1, 'ce'], [1, 1, 'ce'], [2, 4, 'ce']], 5, 2], [[1, 3]]]]]
for label, args, expected in fixtures[N - 1]:
check(label, solve(*args), expected)
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 |
|---|---|---|---|
| regression [[[21, 9, "ce"], [27, 2, "ue"], [0, 2, "ue"], [21, 1, "ce"], [9, 10... | [[2, 27]] | [[2, 0]] | Failed |
| regression [[[39, 3, "ce"], [20, 10, "ce"], [16, 1, "ce"], [20, 10, "ce"], [22... | [] | [[3, 22]] | Failed |
| control [[[14, 10, "ce"], [33, 1, "ce"], [3, 9, "ce"], [11, 1, "ce"], [9, 2... | [] | [] | Passed |
| control [[[38, 2, "ce"], [26, 10, "ce"], [5, 1, "ce"], [32, 2, "ce"]], 5, 3] | [] | [] | Passed |
| control [[[39, 10, "ce"], [4, 3, "ce"], [20, 2, "ce"], [33, 1, "ce"]], 15, 3] | [] | [] | Passed |
| control [[[0, 1, "ce"], [10, 1, "ce"], [20, 1, "ce"]], 10, 2] | [] | [] | Passed |
| control [[[0, 1, "ce"], [9, 1, "ce"]], 10, 2] | [[1, 9]] | [[1, 9]] | Passed |
| control [[[3, 1, "ce"], [1, 1, "ce"], [2, 4, "ce"]], 5, 2] | [[1, 3]] | [[1, 3]] | Passed |
SHA-256 / 91f12b53b683a7fd5ecd6b8b5c2b64cced304be7026a07e3c6b5ee1303c14b22
3 / The verified repair
Exit 0"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(events, window, threshold):
retired = {}
hist = {}
for t, row, kind in sorted(events, key=lambda e: e[0]):
if row in retired:
continue
if kind == 'ue':
retired[row] = t
continue
h = [x for x in hist.get(row, []) if x > t - window] + [t]
hist[row] = h
if len(h) >= threshold:
retired[row] = t
return sorted([rw, tm] for rw, tm in retired.items())
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['regression [[[21, 9, "ce"], [27, 2, "ue"], [0, 2, "ue"], [21, 1, "ce"], [9, 10...', [[[21, 9, 'ce'], [27, 2, 'ue'], [0, 2, 'ue'], [21, 1, 'ce'], [9, 10, 'ce'], [0, 1, 'ce']], 5, 2], [[2, 0]]], ['regression [[[39, 3, "ce"], [20, 10, "ce"], [16, 1, "ce"], [20, 10, "ce"], [22...', [[[39, 3, 'ce'], [20, 10, 'ce'], [16, 1, 'ce'], [20, 10, 'ce'], [22, 3, 'ue'], [40, 10, 'ce'], [15, 10, 'ce']], 5, 3], [[3, 22]]], ['control [[[14, 10, "ce"], [33, 1, "ce"], [3, 9, "ce"], [11, 1, "ce"], [9, 2...', [[[14, 10, 'ce'], [33, 1, 'ce'], [3, 9, 'ce'], [11, 1, 'ce'], [9, 2, 'ce'], [7, 9, 'ce'], [29, 3, 'ce'], [27, 1, 'ce']], 10, 3], []], ['control [[[38, 2, "ce"], [26, 10, "ce"], [5, 1, "ce"], [32, 2, "ce"]], 5, 3]', [[[38, 2, 'ce'], [26, 10, 'ce'], [5, 1, 'ce'], [32, 2, 'ce']], 5, 3], []], ['control [[[39, 10, "ce"], [4, 3, "ce"], [20, 2, "ce"], [33, 1, "ce"]], 15, 3]', [[[39, 10, 'ce'], [4, 3, 'ce'], [20, 2, 'ce'], [33, 1, 'ce']], 15, 3], []], ['control [[[0, 1, "ce"], [10, 1, "ce"], [20, 1, "ce"]], 10, 2]', [[[0, 1, 'ce'], [10, 1, 'ce'], [20, 1, 'ce']], 10, 2], []], ['control [[[0, 1, "ce"], [9, 1, "ce"]], 10, 2]', [[[0, 1, 'ce'], [9, 1, 'ce']], 10, 2], [[1, 9]]], ['control [[[3, 1, "ce"], [1, 1, "ce"], [2, 4, "ce"]], 5, 2]', [[[3, 1, 'ce'], [1, 1, 'ce'], [2, 4, 'ce']], 5, 2], [[1, 3]]]], [['regression [[[2, 10, "ue"], [35, 1, "ce"], [6, 3, "ue"], [37, 10, "ce"]], 10, 3]', [[[2, 10, 'ue'], [35, 1, 'ce'], [6, 3, 'ue'], [37, 10, 'ce']], 10, 3], [[3, 6], [10, 2]]], ['regression [[[5, 9, "ce"], [3, 10, "ue"], [23, 1, "ce"]], 15, 3]', [[[5, 9, 'ce'], [3, 10, 'ue'], [23, 1, 'ce']], 15, 3], [[10, 3]]], ['control [[[3, 1, "ce"], [1, 1, "ce"], [2, 4, "ce"]], 5, 2]', [[[3, 1, 'ce'], [1, 1, 'ce'], [2, 4, 'ce']], 5, 2], [[1, 3]]], ['control [[[0, 1, "ce"], [1, 2, "ce"], [2, 3, "ce"]], 10, 2]', [[[0, 1, 'ce'], [1, 2, 'ce'], [2, 3, 'ce']], 10, 2], []], ['control [[[0, 8, "ce"], [1, 9, "ce"]], 10, 2]', [[[0, 8, 'ce'], [1, 9, 'ce']], 10, 2], []], ['control [[], 10, 2]', [[], 10, 2], []], ['control [[[14, 10, "ce"], [33, 1, "ce"], [3, 9, "ce"], [11, 1, "ce"], [9, 2...', [[[14, 10, 'ce'], [33, 1, 'ce'], [3, 9, 'ce'], [11, 1, 'ce'], [9, 2, 'ce'], [7, 9, 'ce'], [29, 3, 'ce'], [27, 1, 'ce']], 10, 3], []], ['control [[[38, 2, "ce"], [26, 10, "ce"], [5, 1, "ce"], [32, 2, "ce"]], 5, 3]', [[[38, 2, 'ce'], [26, 10, 'ce'], [5, 1, 'ce'], [32, 2, 'ce']], 5, 3], []]], [['regression [[[30, 1, "ce"], [30, 1, "ce"], [0, 3, "ce"], [16, 1, "ue"], [21, 3...', [[[30, 1, 'ce'], [30, 1, 'ce'], [0, 3, 'ce'], [16, 1, 'ue'], [21, 3, 'ue'], [33, 3, 'ce'], [30, 3, 'ue'], [29, 9, 'ue'], [1, 9, 'ce']], 15, 2], [[1, 16], [3, 21], [9, 29]]], ['regression [[[3, 3, "ue"], [24, 2, "ce"], [16, 1, "ue"], [12, 3, "ce"], [18, 3...', [[[3, 3, 'ue'], [24, 2, 'ce'], [16, 1, 'ue'], [12, 3, 'ce'], [18, 3, 'ce'], [3, 1, 'ce'], [2, 3, 'ce']], 5, 3], [[1, 16], [3, 3]]], ['partial-repair [[[32, 2, "ce"], [16, 10, "ue"], [26, 1, "ue"], [3, 10, "ce"], [1, ...', [[[32, 2, 'ce'], [16, 10, 'ue'], [26, 1, 'ue'], [3, 10, 'ce'], [1, 2, 'ce']], 10, 3], [[1, 26], [10, 16]]], ['partial-repair [[[15, 3, "ce"], [35, 9, "ce"], [0, 3, "ue"]], 5, 2]', [[[15, 3, 'ce'], [35, 9, 'ce'], [0, 3, 'ue']], 5, 2], [[3, 0]]], ['control [[[38, 2, "ce"], [26, 10, "ce"], [5, 1, "ce"], [32, 2, "ce"]], 5, 3]', [[[38, 2, 'ce'], [26, 10, 'ce'], [5, 1, 'ce'], [32, 2, 'ce']], 5, 3], []], ['control [[[39, 10, "ce"], [4, 3, "ce"], [20, 2, "ce"], [33, 1, "ce"]], 15, 3]', [[[39, 10, 'ce'], [4, 3, 'ce'], [20, 2, 'ce'], [33, 1, 'ce']], 15, 3], []], ['control [[[0, 1, "ce"], [10, 1, "ce"], [20, 1, "ce"]], 10, 2]', [[[0, 1, 'ce'], [10, 1, 'ce'], [20, 1, 'ce']], 10, 2], []], ['control [[[0, 1, "ce"], [9, 1, "ce"]], 10, 2]', [[[0, 1, 'ce'], [9, 1, 'ce']], 10, 2], [[1, 9]]]], [['regression [[[15, 3, "ce"], [35, 9, "ce"], [0, 3, "ue"]], 5, 2]', [[[15, 3, 'ce'], [35, 9, 'ce'], [0, 3, 'ue']], 5, 2], [[3, 0]]], ['regression [[[27, 3, "ce"], [2, 1, "ce"], [8, 1, "ce"], [28, 10, "ce"], [25, 1...', [[[27, 3, 'ce'], [2, 1, 'ce'], [8, 1, 'ce'], [28, 10, 'ce'], [25, 1, 'ce'], [19, 10, 'ce'], [8, 2, 'ue'], [7, 10, 'ce']], 5, 2], [[2, 8]]], ['partial-repair [[[3, 2, "ue"], [11, 1, "ce"], [29, 1, "ce"], [28, 3, "ce"]], 5, 2]', [[[3, 2, 'ue'], [11, 1, 'ce'], [29, 1, 'ce'], [28, 3, 'ce']], 5, 2], [[2, 3]]], ['partial-repair [[[2, 3, "ce"], [35, 9, "ce"], [27, 2, "ce"], [40, 10, "ce"], [38, ...', [[[2, 3, 'ce'], [35, 9, 'ce'], [27, 2, 'ce'], [40, 10, 'ce'], [38, 3, 'ce'], [23, 3, 'ue'], [7, 10, 'ce'], [29, 9, 'ue']], 15, 3], [[3, 23], [9, 29]]], ['control [[[0, 1, "ce"], [1, 2, "ce"], [2, 3, "ce"]], 10, 2]', [[[0, 1, 'ce'], [1, 2, 'ce'], [2, 3, 'ce']], 10, 2], []], ['control [[[0, 8, "ce"], [1, 9, "ce"]], 10, 2]', [[[0, 8, 'ce'], [1, 9, 'ce']], 10, 2], []], ['control [[], 10, 2]', [[], 10, 2], []], ['control [[[14, 10, "ce"], [33, 1, "ce"], [3, 9, "ce"], [11, 1, "ce"], [9, 2...', [[[14, 10, 'ce'], [33, 1, 'ce'], [3, 9, 'ce'], [11, 1, 'ce'], [9, 2, 'ce'], [7, 9, 'ce'], [29, 3, 'ce'], [27, 1, 'ce']], 10, 3], []]], [['regression [[[2, 3, "ce"], [35, 9, "ce"], [27, 2, "ce"], [40, 10, "ce"], [38, ...', [[[2, 3, 'ce'], [35, 9, 'ce'], [27, 2, 'ce'], [40, 10, 'ce'], [38, 3, 'ce'], [23, 3, 'ue'], [7, 10, 'ce'], [29, 9, 'ue']], 15, 3], [[3, 23], [9, 29]]], ['regression [[[12, 3, "ce"], [37, 2, "ce"], [33, 1, "ce"], [12, 10, "ce"], [4, ...', [[[12, 3, 'ce'], [37, 2, 'ce'], [33, 1, 'ce'], [12, 10, 'ce'], [4, 3, 'ce'], [7, 10, 'ce'], [34, 1, 'ue'], [1, 1, 'ce'], [11, 3, 'ce']], 5, 3], [[1, 34]]], ['partial-repair [[[5, 2, "ue"], [6, 2, "ce"], [7, 2, "ue"]], 10, 3]', [[[5, 2, 'ue'], [6, 2, 'ce'], [7, 2, 'ue']], 10, 3], [[2, 5]]], ['partial-repair [[[21, 9, "ce"], [27, 2, "ue"], [0, 2, "ue"], [21, 1, "ce"], [9, 10...', [[[21, 9, 'ce'], [27, 2, 'ue'], [0, 2, 'ue'], [21, 1, 'ce'], [9, 10, 'ce'], [0, 1, 'ce']], 5, 2], [[2, 0]]], ['control [[[39, 10, "ce"], [4, 3, "ce"], [20, 2, "ce"], [33, 1, "ce"]], 15, 3]', [[[39, 10, 'ce'], [4, 3, 'ce'], [20, 2, 'ce'], [33, 1, 'ce']], 15, 3], []], ['control [[[0, 1, "ce"], [10, 1, "ce"], [20, 1, "ce"]], 10, 2]', [[[0, 1, 'ce'], [10, 1, 'ce'], [20, 1, 'ce']], 10, 2], []], ['control [[[0, 1, "ce"], [9, 1, "ce"]], 10, 2]', [[[0, 1, 'ce'], [9, 1, 'ce']], 10, 2], [[1, 9]]], ['control [[[3, 1, "ce"], [1, 1, "ce"], [2, 4, "ce"]], 5, 2]', [[[3, 1, 'ce'], [1, 1, 'ce'], [2, 4, 'ce']], 5, 2], [[1, 3]]]]]
for label, args, expected in fixtures[N - 1]:
check(label, solve(*args), expected)
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 |
|---|---|---|---|
| regression [[[21, 9, "ce"], [27, 2, "ue"], [0, 2, "ue"], [21, 1, "ce"], [9, 10... | [[2, 0]] | [[2, 0]] | Passed |
| regression [[[39, 3, "ce"], [20, 10, "ce"], [16, 1, "ce"], [20, 10, "ce"], [22... | [[3, 22]] | [[3, 22]] | Passed |
| control [[[14, 10, "ce"], [33, 1, "ce"], [3, 9, "ce"], [11, 1, "ce"], [9, 2... | [] | [] | Passed |
| control [[[38, 2, "ce"], [26, 10, "ce"], [5, 1, "ce"], [32, 2, "ce"]], 5, 3] | [] | [] | Passed |
| control [[[39, 10, "ce"], [4, 3, "ce"], [20, 2, "ce"], [33, 1, "ce"]], 15, 3] | [] | [] | Passed |
| control [[[0, 1, "ce"], [10, 1, "ce"], [20, 1, "ce"]], 10, 2] | [] | [] | Passed |
| control [[[0, 1, "ce"], [9, 1, "ce"]], 10, 2] | [[1, 9]] | [[1, 9]] | Passed |
| control [[[3, 1, "ce"], [1, 1, "ce"], [2, 4, "ce"]], 5, 2] | [[1, 3]] | [[1, 3]] | Passed |
SHA-256 / 06ab66c43755f251aa7fd32b37c640fb9b3c636ba5ce3213558e1301c19b9e00
Verification & scope
A deterministic, bounded teaching model of the named code under the stated contract; not a production codec. 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:48:36.392522+00:00.
Case digest / cc1fcfc2dff0e294b08d97b8acbc223a5be7d54ae7972c053521766d91a5a01e