broken_source:
"""Failure Map reference implementation. Python standard library only."""
import json
from fractions import Fraction
N = 1
observations = []
def solve(r):
    base_era = r['reference'] // 1024
    candidates = [(base_era + k) * 1024 + r['week'] for k in (-1,0,1)]
    distances = [abs(x-r['reference']) for x in candidates]
    nearest = min(distances)
    winners = [x for x,d in zip(candidates,distances) if d == nearest]
    ambiguous = len(winners) != 1 or (r['reference_uncertainty'] > 0 and nearest + r['reference_uncertainty'] >= 512)
    valid_fields = 0 <= r['week'] < 1024 and 0 <= r['tick'] < 100
    trusted = True
    chosen = winners[0] if not ambiguous and valid_fields and trusted else None
    absolute_tick = None if chosen is None else chosen * 100 + r['tick']
    return [chosen,absolute_tick,ambiguous,nearest,None if chosen is None else chosen//1024]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve({'reference': 1023, 'week': 0, 'tick': 1, 'radius': 2, 'reference_uncertainty': 0}), [1024, 102401, False, 1, 1])
check('fixture 2', solve({'reference': 1024, 'week': 1023, 'tick': 2, 'radius': 2, 'reference_uncertainty': 0}), [1023, 102302, False, 1, 0])
check('fixture 3', solve({'reference': 512, 'week': 0, 'tick': 5, 'radius': 600, 'reference_uncertainty': 0}), [None, None, True, 512, None])
check('fixture 4', solve({'reference': 0, 'week': 512, 'tick': 1, 'radius': 512, 'reference_uncertainty': 0}), [None, None, True, 512, None])
check('fixture 5', solve({'reference': -1, 'week': 0, 'tick': 1, 'radius': 1, 'reference_uncertainty': 0}), [0, 1, False, 1, 0])
check('fixture 6', solve({'reference': -1025, 'week': 1023, 'tick': 2, 'radius': 1, 'reference_uncertainty': 0}), [-1025, -102498, False, 0, -2])
check('fixture 7', solve({'reference': 100, 'week': 100, 'tick': 99, 'radius': 0, 'reference_uncertainty': 0}), [100, 10099, False, 0, 0])
check('fixture 8', solve({'reference': 100, 'week': 100, 'tick': 100, 'radius': 1, 'reference_uncertainty': 0}), [None, None, False, 0, None])
check('fixture 9', solve({'reference': 1024, 'week': 1024, 'tick': 0, 'radius': 1024, 'reference_uncertainty': 0}), [None, None, False, 0, None])
check('fixture 10', solve({'reference': 100, 'week': 200, 'tick': 1, 'radius': 99, 'reference_uncertainty': 0}), [None, None, False, 100, None])
check('fixture 11', solve({'reference': 100, 'week': 200, 'tick': 1, 'radius': 100, 'reference_uncertainty': 0}), [200, 20001, False, 100, 0])
check('fixture 12', solve({'reference': 3072, 'week': 1, 'tick': 2, 'radius': 10, 'reference_uncertainty': 0}), [3073, 307302, False, 1, 3])
check('fixture 13', solve({'reference': -513, 'week': 1023, 'tick': 0, 'radius': 512, 'reference_uncertainty': 0}), [None, None, True, 512, None])
check('fixture 14', solve({'reference': 5120000, 'week': 0, 'tick': 0, 'radius': 1, 'reference_uncertainty': 0}), [5120000, 512000000, False, 0, 5000])
check('fixture 15', solve({'reference': 100, 'week': 200, 'tick': 1, 'radius': 600, 'reference_uncertainty': 411}), [200, 20001, False, 100, 0])
check('fixture 16', solve({'reference': 100, 'week': 200, 'tick': 1, 'radius': 600, 'reference_uncertainty': 412}), [None, None, True, 100, None])
check('fixture 17', solve({'reference': 100, 'week': 200, 'tick': 1, 'radius': 600, 'reference_uncertainty': 500}), [None, None, True, 100, None])
variant = [({'reference': 1023, 'week': 0, 'tick': 2, 'radius': 2, 'reference_uncertainty': 0}, [1024, 102402, False, 1, 1]), ({'reference': 1023, 'week': 0, 'tick': 3, 'radius': 2, 'reference_uncertainty': 0}, [1024, 102403, False, 1, 1]), ({'reference': 1023, 'week': 0, 'tick': 4, 'radius': 2, 'reference_uncertainty': 0}, [1024, 102404, False, 1, 1]), ({'reference': 1023, 'week': 0, 'tick': 5, 'radius': 2, 'reference_uncertainty': 0}, [1024, 102405, False, 1, 1]), ({'reference': 1023, 'week': 0, 'tick': 6, 'radius': 2, 'reference_uncertainty': 0}, [1024, 102406, False, 1, 1])]
check("variant capture", solve(variant[N-1][0]), variant[N-1][1])
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)

source:
"""Failure Map reference implementation. Python standard library only."""
import json
from fractions import Fraction
N = 1
observations = []
def solve(r):
    base_era = r['reference'] // 1024
    candidates = [(base_era + k) * 1024 + r['week'] for k in (-1,0,1)]
    distances = [abs(x-r['reference']) for x in candidates]
    nearest = min(distances)
    winners = [x for x,d in zip(candidates,distances) if d == nearest]
    ambiguous = len(winners) != 1 or (r['reference_uncertainty'] > 0 and nearest + r['reference_uncertainty'] >= 512)
    valid_fields = 0 <= r['week'] < 1024 and 0 <= r['tick'] < 100
    trusted = nearest < r['radius']
    chosen = winners[0] if not ambiguous and valid_fields and trusted else None
    absolute_tick = None if chosen is None else chosen * 100 + r['tick']
    return [chosen,absolute_tick,ambiguous,nearest,None if chosen is None else chosen//1024]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve({'reference': 1023, 'week': 0, 'tick': 1, 'radius': 2, 'reference_uncertainty': 0}), [1024, 102401, False, 1, 1])
check('fixture 2', solve({'reference': 1024, 'week': 1023, 'tick': 2, 'radius': 2, 'reference_uncertainty': 0}), [1023, 102302, False, 1, 0])
check('fixture 3', solve({'reference': 512, 'week': 0, 'tick': 5, 'radius': 600, 'reference_uncertainty': 0}), [None, None, True, 512, None])
check('fixture 4', solve({'reference': 0, 'week': 512, 'tick': 1, 'radius': 512, 'reference_uncertainty': 0}), [None, None, True, 512, None])
check('fixture 5', solve({'reference': -1, 'week': 0, 'tick': 1, 'radius': 1, 'reference_uncertainty': 0}), [0, 1, False, 1, 0])
check('fixture 6', solve({'reference': -1025, 'week': 1023, 'tick': 2, 'radius': 1, 'reference_uncertainty': 0}), [-1025, -102498, False, 0, -2])
check('fixture 7', solve({'reference': 100, 'week': 100, 'tick': 99, 'radius': 0, 'reference_uncertainty': 0}), [100, 10099, False, 0, 0])
check('fixture 8', solve({'reference': 100, 'week': 100, 'tick': 100, 'radius': 1, 'reference_uncertainty': 0}), [None, None, False, 0, None])
check('fixture 9', solve({'reference': 1024, 'week': 1024, 'tick': 0, 'radius': 1024, 'reference_uncertainty': 0}), [None, None, False, 0, None])
check('fixture 10', solve({'reference': 100, 'week': 200, 'tick': 1, 'radius': 99, 'reference_uncertainty': 0}), [None, None, False, 100, None])
check('fixture 11', solve({'reference': 100, 'week': 200, 'tick': 1, 'radius': 100, 'reference_uncertainty': 0}), [200, 20001, False, 100, 0])
check('fixture 12', solve({'reference': 3072, 'week': 1, 'tick': 2, 'radius': 10, 'reference_uncertainty': 0}), [3073, 307302, False, 1, 3])
check('fixture 13', solve({'reference': -513, 'week': 1023, 'tick': 0, 'radius': 512, 'reference_uncertainty': 0}), [None, None, True, 512, None])
check('fixture 14', solve({'reference': 5120000, 'week': 0, 'tick': 0, 'radius': 1, 'reference_uncertainty': 0}), [5120000, 512000000, False, 0, 5000])
check('fixture 15', solve({'reference': 100, 'week': 200, 'tick': 1, 'radius': 600, 'reference_uncertainty': 411}), [200, 20001, False, 100, 0])
check('fixture 16', solve({'reference': 100, 'week': 200, 'tick': 1, 'radius': 600, 'reference_uncertainty': 412}), [None, None, True, 100, None])
check('fixture 17', solve({'reference': 100, 'week': 200, 'tick': 1, 'radius': 600, 'reference_uncertainty': 500}), [None, None, True, 100, None])
variant = [({'reference': 1023, 'week': 0, 'tick': 2, 'radius': 2, 'reference_uncertainty': 0}, [1024, 102402, False, 1, 1]), ({'reference': 1023, 'week': 0, 'tick': 3, 'radius': 2, 'reference_uncertainty': 0}, [1024, 102403, False, 1, 1]), ({'reference': 1023, 'week': 0, 'tick': 4, 'radius': 2, 'reference_uncertainty': 0}, [1024, 102404, False, 1, 1]), ({'reference': 1023, 'week': 0, 'tick': 5, 'radius': 2, 'reference_uncertainty': 0}, [1024, 102405, False, 1, 1]), ({'reference': 1023, 'week': 0, 'tick': 6, 'radius': 2, 'reference_uncertainty': 0}, [1024, 102406, False, 1, 1])]
check("variant capture", solve(variant[N-1][0]), variant[N-1][1])
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)

prompt:
The decoded time state disagrees with the explicit regression oracle for trusted.

Controlled week counter has 1024-week eras. A received low week 0..1023 and tick-within-week 0..99 must resolve near trusted absolute reference week, considering neighboring eras. Pick minimum absolute week distance; ties are ambiguous and rejected. Also require distance within trust radius. Report accepted absolute week/tick plus ambiguity, distance and selected era. No GNSS standards compliance is claimed. A nonnegative reference uncertainty invalidates selection if nearest distance plus uncertainty reaches the 512-week half-era boundary.

split: open-access


broken_source:
"""Failure Map reference implementation. Python standard library only."""
import json
from fractions import Fraction
N = 1
observations = []
def solve(r):
    base_era = r['reference'] // 1024
    candidates = [(base_era + k) * 1024 + r['week'] for k in (-1,0,1)]
    distances = [abs(x-r['reference']) for x in candidates]
    nearest = min(distances)
    winners = [x for x,d in zip(candidates,distances) if d == nearest]
    ambiguous = len(winners) != 1 or (r['reference_uncertainty'] > 0 and nearest + r['reference_uncertainty'] >= 512)
    valid_fields = 0 <= r['week'] < 1024 and 0 <= r['tick'] < 100
    trusted = nearest <= r['radius']
    chosen = winners[0] if valid_fields and trusted else None
    absolute_tick = None if chosen is None else chosen * 100 + r['tick']
    return [chosen,absolute_tick,ambiguous,nearest,None if chosen is None else chosen//1024]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve({'reference': 1023, 'week': 0, 'tick': 1, 'radius': 2, 'reference_uncertainty': 0}), [1024, 102401, False, 1, 1])
check('fixture 2', solve({'reference': 1024, 'week': 1023, 'tick': 2, 'radius': 2, 'reference_uncertainty': 0}), [1023, 102302, False, 1, 0])
check('fixture 3', solve({'reference': 512, 'week': 0, 'tick': 5, 'radius': 600, 'reference_uncertainty': 0}), [None, None, True, 512, None])
check('fixture 4', solve({'reference': 0, 'week': 512, 'tick': 1, 'radius': 512, 'reference_uncertainty': 0}), [None, None, True, 512, None])
check('fixture 5', solve({'reference': -1, 'week': 0, 'tick': 1, 'radius': 1, 'reference_uncertainty': 0}), [0, 1, False, 1, 0])
check('fixture 6', solve({'reference': -1025, 'week': 1023, 'tick': 2, 'radius': 1, 'reference_uncertainty': 0}), [-1025, -102498, False, 0, -2])
check('fixture 7', solve({'reference': 100, 'week': 100, 'tick': 99, 'radius': 0, 'reference_uncertainty': 0}), [100, 10099, False, 0, 0])
check('fixture 8', solve({'reference': 100, 'week': 100, 'tick': 100, 'radius': 1, 'reference_uncertainty': 0}), [None, None, False, 0, None])
check('fixture 9', solve({'reference': 1024, 'week': 1024, 'tick': 0, 'radius': 1024, 'reference_uncertainty': 0}), [None, None, False, 0, None])
check('fixture 10', solve({'reference': 100, 'week': 200, 'tick': 1, 'radius': 99, 'reference_uncertainty': 0}), [None, None, False, 100, None])
check('fixture 11', solve({'reference': 100, 'week': 200, 'tick': 1, 'radius': 100, 'reference_uncertainty': 0}), [200, 20001, False, 100, 0])
check('fixture 12', solve({'reference': 3072, 'week': 1, 'tick': 2, 'radius': 10, 'reference_uncertainty': 0}), [3073, 307302, False, 1, 3])
check('fixture 13', solve({'reference': -513, 'week': 1023, 'tick': 0, 'radius': 512, 'reference_uncertainty': 0}), [None, None, True, 512, None])
check('fixture 14', solve({'reference': 5120000, 'week': 0, 'tick': 0, 'radius': 1, 'reference_uncertainty': 0}), [5120000, 512000000, False, 0, 5000])
check('fixture 15', solve({'reference': 100, 'week': 200, 'tick': 1, 'radius': 600, 'reference_uncertainty': 411}), [200, 20001, False, 100, 0])
check('fixture 16', solve({'reference': 100, 'week': 200, 'tick': 1, 'radius': 600, 'reference_uncertainty': 412}), [None, None, True, 100, None])
check('fixture 17', solve({'reference': 100, 'week': 200, 'tick': 1, 'radius': 600, 'reference_uncertainty': 500}), [None, None, True, 100, None])
variant = [({'reference': 1023, 'week': 0, 'tick': 2, 'radius': 2, 'reference_uncertainty': 0}, [1024, 102402, False, 1, 1]), ({'reference': 1023, 'week': 0, 'tick': 3, 'radius': 2, 'reference_uncertainty': 0}, [1024, 102403, False, 1, 1]), ({'reference': 1023, 'week': 0, 'tick': 4, 'radius': 2, 'reference_uncertainty': 0}, [1024, 102404, False, 1, 1]), ({'reference': 1023, 'week': 0, 'tick': 5, 'radius': 2, 'reference_uncertainty': 0}, [1024, 102405, False, 1, 1]), ({'reference': 1023, 'week': 0, 'tick': 6, 'radius': 2, 'reference_uncertainty': 0}, [1024, 102406, False, 1, 1])]
check("variant capture", solve(variant[N-1][0]), variant[N-1][1])
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)

meaning: Fixture-count band, not measured model difficulty

deps: stdlib

source:
"""Failure Map reference implementation. Python standard library only."""
import json
from fractions import Fraction
N = 1
observations = []
def solve(r):
    base_era = r['reference'] // 1024
    candidates = [(base_era + k) * 1024 + r['week'] for k in (-1,0,1)]
    distances = [abs(x-r['reference']) for x in candidates]
    nearest = min(distances)
    winners = [x for x,d in zip(candidates,distances) if d == nearest]
    ambiguous = len(winners) != 1 or (r['reference_uncertainty'] > 0 and nearest + r['reference_uncertainty'] >= 512)
    valid_fields = 0 <= r['week'] < 1024 and 0 <= r['tick'] < 100
    trusted = nearest <= r['radius']
    chosen = winners[0] if not ambiguous and valid_fields else None
    absolute_tick = None if chosen is None else chosen * 100 + r['tick']
    return [chosen,absolute_tick,ambiguous,nearest,None if chosen is None else chosen//1024]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve({'reference': 1023, 'week': 0, 'tick': 1, 'radius': 2, 'reference_uncertainty': 0}), [1024, 102401, False, 1, 1])
check('fixture 2', solve({'reference': 1024, 'week': 1023, 'tick': 2, 'radius': 2, 'reference_uncertainty': 0}), [1023, 102302, False, 1, 0])
check('fixture 3', solve({'reference': 512, 'week': 0, 'tick': 5, 'radius': 600, 'reference_uncertainty': 0}), [None, None, True, 512, None])
check('fixture 4', solve({'reference': 0, 'week': 512, 'tick': 1, 'radius': 512, 'reference_uncertainty': 0}), [None, None, True, 512, None])
check('fixture 5', solve({'reference': -1, 'week': 0, 'tick': 1, 'radius': 1, 'reference_uncertainty': 0}), [0, 1, False, 1, 0])
check('fixture 6', solve({'reference': -1025, 'week': 1023, 'tick': 2, 'radius': 1, 'reference_uncertainty': 0}), [-1025, -102498, False, 0, -2])
check('fixture 7', solve({'reference': 100, 'week': 100, 'tick': 99, 'radius': 0, 'reference_uncertainty': 0}), [100, 10099, False, 0, 0])
check('fixture 8', solve({'reference': 100, 'week': 100, 'tick': 100, 'radius': 1, 'reference_uncertainty': 0}), [None, None, False, 0, None])
check('fixture 9', solve({'reference': 1024, 'week': 1024, 'tick': 0, 'radius': 1024, 'reference_uncertainty': 0}), [None, None, False, 0, None])
check('fixture 10', solve({'reference': 100, 'week': 200, 'tick': 1, 'radius': 99, 'reference_uncertainty': 0}), [None, None, False, 100, None])
check('fixture 11', solve({'reference': 100, 'week': 200, 'tick': 1, 'radius': 100, 'reference_uncertainty': 0}), [200, 20001, False, 100, 0])
check('fixture 12', solve({'reference': 3072, 'week': 1, 'tick': 2, 'radius': 10, 'reference_uncertainty': 0}), [3073, 307302, False, 1, 3])
check('fixture 13', solve({'reference': -513, 'week': 1023, 'tick': 0, 'radius': 512, 'reference_uncertainty': 0}), [None, None, True, 512, None])
check('fixture 14', solve({'reference': 5120000, 'week': 0, 'tick': 0, 'radius': 1, 'reference_uncertainty': 0}), [5120000, 512000000, False, 0, 5000])
check('fixture 15', solve({'reference': 100, 'week': 200, 'tick': 1, 'radius': 600, 'reference_uncertainty': 411}), [200, 20001, False, 100, 0])
check('fixture 16', solve({'reference': 100, 'week': 200, 'tick': 1, 'radius': 600, 'reference_uncertainty': 412}), [None, None, True, 100, None])
check('fixture 17', solve({'reference': 100, 'week': 200, 'tick': 1, 'radius': 600, 'reference_uncertainty': 500}), [None, None, True, 100, None])
variant = [({'reference': 1023, 'week': 0, 'tick': 2, 'radius': 2, 'reference_uncertainty': 0}, [1024, 102402, False, 1, 1]), ({'reference': 1023, 'week': 0, 'tick': 3, 'radius': 2, 'reference_uncertainty': 0}, [1024, 102403, False, 1, 1]), ({'reference': 1023, 'week': 0, 'tick': 4, 'radius': 2, 'reference_uncertainty': 0}, [1024, 102404, False, 1, 1]), ({'reference': 1023, 'week': 0, 'tick': 5, 'radius': 2, 'reference_uncertainty': 0}, [1024, 102405, False, 1, 1]), ({'reference': 1023, 'week': 0, 'tick': 6, 'radius': 2, 'reference_uncertainty': 0}, [1024, 102406, False, 1, 1])]
check("variant capture", solve(variant[N-1][0]), variant[N-1][1])
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)

prompt:
The decoded time state disagrees with the explicit regression oracle for chosen.

Controlled week counter has 1024-week eras. A received low week 0..1023 and tick-within-week 0..99 must resolve near trusted absolute reference week, considering neighboring eras. Pick minimum absolute week distance; ties are ambiguous and rejected. Also require distance within trust radius. Report accepted absolute week/tick plus ambiguity, distance and selected era. No GNSS standards compliance is claimed. A nonnegative reference uncertainty invalidates selection if nearest distance plus uncertainty reaches the 512-week half-era boundary.

split: open-access


broken_source:
"""Failure Map reference implementation. Python standard library only."""
import json
from fractions import Fraction
N = 1
observations = []
def solve(r):
    base_era = r['reference'] // 1024
    candidates = [(base_era + k) * 1024 + r['week'] for k in (-1,0,1)]
    distances = [abs(x-r['reference']) for x in candidates]
    nearest = min(distances)
    winners = [x for x,d in zip(candidates,distances) if d == nearest]
    ambiguous = len(winners) != 1 or (r['reference_uncertainty'] > 0 and nearest + r['reference_uncertainty'] >= 512)
    valid_fields = 0 <= r['week'] < 1024 and 0 <= r['tick'] < 100
    trusted = nearest <= r['radius']
    chosen = winners[0] if not ambiguous and valid_fields and trusted else None
    absolute_tick = None if chosen is None else chosen + r['tick']
    return [chosen,absolute_tick,ambiguous,nearest,None if chosen is None else chosen//1024]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve({'reference': 1023, 'week': 0, 'tick': 1, 'radius': 2, 'reference_uncertainty': 0}), [1024, 102401, False, 1, 1])
check('fixture 2', solve({'reference': 1024, 'week': 1023, 'tick': 2, 'radius': 2, 'reference_uncertainty': 0}), [1023, 102302, False, 1, 0])
check('fixture 3', solve({'reference': 512, 'week': 0, 'tick': 5, 'radius': 600, 'reference_uncertainty': 0}), [None, None, True, 512, None])
check('fixture 4', solve({'reference': 0, 'week': 512, 'tick': 1, 'radius': 512, 'reference_uncertainty': 0}), [None, None, True, 512, None])
check('fixture 5', solve({'reference': -1, 'week': 0, 'tick': 1, 'radius': 1, 'reference_uncertainty': 0}), [0, 1, False, 1, 0])
check('fixture 6', solve({'reference': -1025, 'week': 1023, 'tick': 2, 'radius': 1, 'reference_uncertainty': 0}), [-1025, -102498, False, 0, -2])
check('fixture 7', solve({'reference': 100, 'week': 100, 'tick': 99, 'radius': 0, 'reference_uncertainty': 0}), [100, 10099, False, 0, 0])
check('fixture 8', solve({'reference': 100, 'week': 100, 'tick': 100, 'radius': 1, 'reference_uncertainty': 0}), [None, None, False, 0, None])
check('fixture 9', solve({'reference': 1024, 'week': 1024, 'tick': 0, 'radius': 1024, 'reference_uncertainty': 0}), [None, None, False, 0, None])
check('fixture 10', solve({'reference': 100, 'week': 200, 'tick': 1, 'radius': 99, 'reference_uncertainty': 0}), [None, None, False, 100, None])
check('fixture 11', solve({'reference': 100, 'week': 200, 'tick': 1, 'radius': 100, 'reference_uncertainty': 0}), [200, 20001, False, 100, 0])
check('fixture 12', solve({'reference': 3072, 'week': 1, 'tick': 2, 'radius': 10, 'reference_uncertainty': 0}), [3073, 307302, False, 1, 3])
check('fixture 13', solve({'reference': -513, 'week': 1023, 'tick': 0, 'radius': 512, 'reference_uncertainty': 0}), [None, None, True, 512, None])
check('fixture 14', solve({'reference': 5120000, 'week': 0, 'tick': 0, 'radius': 1, 'reference_uncertainty': 0}), [5120000, 512000000, False, 0, 5000])
check('fixture 15', solve({'reference': 100, 'week': 200, 'tick': 1, 'radius': 600, 'reference_uncertainty': 411}), [200, 20001, False, 100, 0])
check('fixture 16', solve({'reference': 100, 'week': 200, 'tick': 1, 'radius': 600, 'reference_uncertainty': 412}), [None, None, True, 100, None])
check('fixture 17', solve({'reference': 100, 'week': 200, 'tick': 1, 'radius': 600, 'reference_uncertainty': 500}), [None, None, True, 100, None])
variant = [({'reference': 1023, 'week': 0, 'tick': 2, 'radius': 2, 'reference_uncertainty': 0}, [1024, 102402, False, 1, 1]), ({'reference': 1023, 'week': 0, 'tick': 3, 'radius': 2, 'reference_uncertainty': 0}, [1024, 102403, False, 1, 1]), ({'reference': 1023, 'week': 0, 'tick': 4, 'radius': 2, 'reference_uncertainty': 0}, [1024, 102404, False, 1, 1]), ({'reference': 1023, 'week': 0, 'tick': 5, 'radius': 2, 'reference_uncertainty': 0}, [1024, 102405, False, 1, 1]), ({'reference': 1023, 'week': 0, 'tick': 6, 'radius': 2, 'reference_uncertainty': 0}, [1024, 102406, False, 1, 1])]
check("variant capture", solve(variant[N-1][0]), variant[N-1][1])
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)

source:
"""Failure Map reference implementation. Python standard library only."""
import json
from fractions import Fraction
N = 1
observations = []
def solve(r):
    base_era = r['reference'] // 1024
    candidates = [(base_era + k) * 1024 + r['week'] for k in (-1,0,1)]
    distances = [abs(x-r['reference']) for x in candidates]
    nearest = min(distances)
    winners = [x for x,d in zip(candidates,distances) if d == nearest]
    ambiguous = len(winners) != 1 or (r['reference_uncertainty'] > 0 and nearest + r['reference_uncertainty'] >= 512)
    valid_fields = 0 <= r['week'] < 1024 and 0 <= r['tick'] < 100
    trusted = nearest <= r['radius']
    chosen = winners[0] if not ambiguous and valid_fields and trusted else None
    absolute_tick = None if chosen is None else chosen*100
    return [chosen,absolute_tick,ambiguous,nearest,None if chosen is None else chosen//1024]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve({'reference': 1023, 'week': 0, 'tick': 1, 'radius': 2, 'reference_uncertainty': 0}), [1024, 102401, False, 1, 1])
check('fixture 2', solve({'reference': 1024, 'week': 1023, 'tick': 2, 'radius': 2, 'reference_uncertainty': 0}), [1023, 102302, False, 1, 0])
check('fixture 3', solve({'reference': 512, 'week': 0, 'tick': 5, 'radius': 600, 'reference_uncertainty': 0}), [None, None, True, 512, None])
check('fixture 4', solve({'reference': 0, 'week': 512, 'tick': 1, 'radius': 512, 'reference_uncertainty': 0}), [None, None, True, 512, None])
check('fixture 5', solve({'reference': -1, 'week': 0, 'tick': 1, 'radius': 1, 'reference_uncertainty': 0}), [0, 1, False, 1, 0])
check('fixture 6', solve({'reference': -1025, 'week': 1023, 'tick': 2, 'radius': 1, 'reference_uncertainty': 0}), [-1025, -102498, False, 0, -2])
check('fixture 7', solve({'reference': 100, 'week': 100, 'tick': 99, 'radius': 0, 'reference_uncertainty': 0}), [100, 10099, False, 0, 0])
check('fixture 8', solve({'reference': 100, 'week': 100, 'tick': 100, 'radius': 1, 'reference_uncertainty': 0}), [None, None, False, 0, None])
check('fixture 9', solve({'reference': 1024, 'week': 1024, 'tick': 0, 'radius': 1024, 'reference_uncertainty': 0}), [None, None, False, 0, None])
check('fixture 10', solve({'reference': 100, 'week': 200, 'tick': 1, 'radius': 99, 'reference_uncertainty': 0}), [None, None, False, 100, None])
check('fixture 11', solve({'reference': 100, 'week': 200, 'tick': 1, 'radius': 100, 'reference_uncertainty': 0}), [200, 20001, False, 100, 0])
check('fixture 12', solve({'reference': 3072, 'week': 1, 'tick': 2, 'radius': 10, 'reference_uncertainty': 0}), [3073, 307302, False, 1, 3])
check('fixture 13', solve({'reference': -513, 'week': 1023, 'tick': 0, 'radius': 512, 'reference_uncertainty': 0}), [None, None, True, 512, None])
check('fixture 14', solve({'reference': 5120000, 'week': 0, 'tick': 0, 'radius': 1, 'reference_uncertainty': 0}), [5120000, 512000000, False, 0, 5000])
check('fixture 15', solve({'reference': 100, 'week': 200, 'tick': 1, 'radius': 600, 'reference_uncertainty': 411}), [200, 20001, False, 100, 0])
check('fixture 16', solve({'reference': 100, 'week': 200, 'tick': 1, 'radius': 600, 'reference_uncertainty': 412}), [None, None, True, 100, None])
check('fixture 17', solve({'reference': 100, 'week': 200, 'tick': 1, 'radius': 600, 'reference_uncertainty': 500}), [None, None, True, 100, None])
variant = [({'reference': 1023, 'week': 0, 'tick': 2, 'radius': 2, 'reference_uncertainty': 0}, [1024, 102402, False, 1, 1]), ({'reference': 1023, 'week': 0, 'tick': 3, 'radius': 2, 'reference_uncertainty': 0}, [1024, 102403, False, 1, 1]), ({'reference': 1023, 'week': 0, 'tick': 4, 'radius': 2, 'reference_uncertainty': 0}, [1024, 102404, False, 1, 1]), ({'reference': 1023, 'week': 0, 'tick': 5, 'radius': 2, 'reference_uncertainty': 0}, [1024, 102405, False, 1, 1]), ({'reference': 1023, 'week': 0, 'tick': 6, 'radius': 2, 'reference_uncertainty': 0}, [1024, 102406, False, 1, 1])]
check("variant capture", solve(variant[N-1][0]), variant[N-1][1])
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)

prompt:
The decoded time state disagrees with the explicit regression oracle for absolute_tick.

Controlled week counter has 1024-week eras. A received low week 0..1023 and tick-within-week 0..99 must resolve near trusted absolute reference week, considering neighboring eras. Pick minimum absolute week distance; ties are ambiguous and rejected. Also require distance within trust radius. Report accepted absolute week/tick plus ambiguity, distance and selected era. No GNSS standards compliance is claimed. A nonnegative reference uncertainty invalidates selection if nearest distance plus uncertainty reaches the 512-week half-era boundary.

split: open-access


prompt:
The decoded time state disagrees with the explicit regression oracle for shifted.

Controlled astronomical coordinate counts exact rational days from a noon origin. A civil day index uses midnight; coordinate J corresponds to civil index floor(J+1/2) and fraction J+1/2-index. One civil day has 86400 exact ticks. Return civil index, rational tick within day, noon-relative displacement, modified coordinate J-2400000.5, exact roundtrip and before-noon flag. No historical calendar conversion is modeled.

split: open-access


prompt:
The decoded time state disagrees with the explicit regression oracle for day.

Controlled astronomical coordinate counts exact rational days from a noon origin. A civil day index uses midnight; coordinate J corresponds to civil index floor(J+1/2) and fraction J+1/2-index. One civil day has 86400 exact ticks. Return civil index, rational tick within day, noon-relative displacement, modified coordinate J-2400000.5, exact roundtrip and before-noon flag. No historical calendar conversion is modeled.

split: open-access


prompt:
The decoded time state disagrees with the explicit regression oracle for fraction.

Controlled astronomical coordinate counts exact rational days from a noon origin. A civil day index uses midnight; coordinate J corresponds to civil index floor(J+1/2) and fraction J+1/2-index. One civil day has 86400 exact ticks. Return civil index, rational tick within day, noon-relative displacement, modified coordinate J-2400000.5, exact roundtrip and before-noon flag. No historical calendar conversion is modeled.

split: open-access


prompt:
The decoded time state disagrees with the explicit regression oracle for tick.

Controlled astronomical coordinate counts exact rational days from a noon origin. A civil day index uses midnight; coordinate J corresponds to civil index floor(J+1/2) and fraction J+1/2-index. One civil day has 86400 exact ticks. Return civil index, rational tick within day, noon-relative displacement, modified coordinate J-2400000.5, exact roundtrip and before-noon flag. No historical calendar conversion is modeled.

split: open-access


prompt:
The decoded time state disagrees with the explicit regression oracle for noon_delta.

Controlled astronomical coordinate counts exact rational days from a noon origin. A civil day index uses midnight; coordinate J corresponds to civil index floor(J+1/2) and fraction J+1/2-index. One civil day has 86400 exact ticks. Return civil index, rational tick within day, noon-relative displacement, modified coordinate J-2400000.5, exact roundtrip and before-noon flag. No historical calendar conversion is modeled.

split: open-access


prompt:
The decoded time state disagrees with the explicit regression oracle for modified.

Controlled astronomical coordinate counts exact rational days from a noon origin. A civil day index uses midnight; coordinate J corresponds to civil index floor(J+1/2) and fraction J+1/2-index. One civil day has 86400 exact ticks. Return civil index, rational tick within day, noon-relative displacement, modified coordinate J-2400000.5, exact roundtrip and before-noon flag. No historical calendar conversion is modeled.

split: open-access


prompt:
The decoded time state disagrees with the explicit regression oracle for roundtrip.

Controlled astronomical coordinate counts exact rational days from a noon origin. A civil day index uses midnight; coordinate J corresponds to civil index floor(J+1/2) and fraction J+1/2-index. One civil day has 86400 exact ticks. Return civil index, rational tick within day, noon-relative displacement, modified coordinate J-2400000.5, exact roundtrip and before-noon flag. No historical calendar conversion is modeled.

split: open-access


prompt:
The decoded time state disagrees with the explicit regression oracle for before_noon.

Controlled astronomical coordinate counts exact rational days from a noon origin. A civil day index uses midnight; coordinate J corresponds to civil index floor(J+1/2) and fraction J+1/2-index. One civil day has 86400 exact ticks. Return civil index, rational tick within day, noon-relative displacement, modified coordinate J-2400000.5, exact roundtrip and before-noon flag. No historical calendar conversion is modeled.

split: open-access


prompt:
The decoded time state disagrees with the explicit regression oracle for next_noon.

Controlled astronomical coordinate counts exact rational days from a noon origin. A civil day index uses midnight; coordinate J corresponds to civil index floor(J+1/2) and fraction J+1/2-index. One civil day has 86400 exact ticks. Return civil index, rational tick within day, noon-relative displacement, modified coordinate J-2400000.5, exact roundtrip and before-noon flag. No historical calendar conversion is modeled.

split: open-access


prompt:
The decoded time state disagrees with the explicit regression oracle for until_noon.

Controlled astronomical coordinate counts exact rational days from a noon origin. A civil day index uses midnight; coordinate J corresponds to civil index floor(J+1/2) and fraction J+1/2-index. One civil day has 86400 exact ticks. Return civil index, rational tick within day, noon-relative displacement, modified coordinate J-2400000.5, exact roundtrip and before-noon flag. No historical calendar conversion is modeled.

split: open-access


broken_source:
"""Failure Map reference implementation. Python standard library only."""
import json
from fractions import Fraction
N = 1
observations = []
def solve(r):
    hour_ok = 0 <= r['hour'] < 24
    minute_ok = 0 <= r['minute'] < 60
    second_ok = 0 <= r['second'] < 60
    fraction_ok = 0 <= r['fraction'] < 1000
    end_label = r['hour'] == 24
    end_valid = not end_label or (r['minute'] == 0 and r['second'] == 0 and r['fraction'] == 0)
    valid = hour_ok and minute_ok and second_ok and fraction_ok and end_valid
    day = r['day'] + int(end_label)
    hour = 0 if end_label else r['hour']
    coordinate = ((day*24+hour)*3600+r['minute']*60+r['second'])*1000+r['fraction']
    return [valid,[day,hour,r['minute'],r['second'],r['fraction']] if valid else None,r['day'] if valid and end_label else None,coordinate if valid else None]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve({'day': 10, 'hour': 24, 'minute': 0, 'second': 0, 'fraction': 0}), [True, [11, 0, 0, 0, 0], 10, 950400000])
check('fixture 2', solve({'day': 10, 'hour': 0, 'minute': 0, 'second': 0, 'fraction': 0}), [True, [10, 0, 0, 0, 0], None, 864000000])
check('fixture 3', solve({'day': 10, 'hour': 23, 'minute': 59, 'second': 59, 'fraction': 999}), [True, [10, 23, 59, 59, 999], None, 950399999])
check('fixture 4', solve({'day': -1, 'hour': 24, 'minute': 0, 'second': 0, 'fraction': 0}), [True, [0, 0, 0, 0, 0], -1, 0])
check('fixture 5', solve({'day': 10, 'hour': 24, 'minute': 0, 'second': 1, 'fraction': 0}), [False, None, None, None])
check('fixture 6', solve({'day': 10, 'hour': 24, 'minute': 0, 'second': 0, 'fraction': 1}), [False, None, None, None])
check('fixture 7', solve({'day': 10, 'hour': 24, 'minute': 1, 'second': 0, 'fraction': 0}), [False, None, None, None])
check('fixture 8', solve({'day': 10, 'hour': 25, 'minute': 0, 'second': 0, 'fraction': 0}), [False, None, None, None])
check('fixture 9', solve({'day': 10, 'hour': 12, 'minute': 60, 'second': 0, 'fraction': 0}), [False, None, None, None])
check('fixture 10', solve({'day': 10, 'hour': 12, 'minute': -1, 'second': 0, 'fraction': 0}), [False, None, None, None])
check('fixture 11', solve({'day': 10, 'hour': 12, 'minute': 0, 'second': 60, 'fraction': 0}), [False, None, None, None])
check('fixture 12', solve({'day': 10, 'hour': 12, 'minute': 0, 'second': -1, 'fraction': 0}), [False, None, None, None])
check('fixture 13', solve({'day': 10, 'hour': 12, 'minute': 0, 'second': 0, 'fraction': 1000}), [False, None, None, None])
check('fixture 14', solve({'day': 10, 'hour': 12, 'minute': 0, 'second': 0, 'fraction': -1}), [False, None, None, None])
check('fixture 15', solve({'day': 0, 'hour': 12, 'minute': 30, 'second': 1, 'fraction': 2}), [True, [0, 12, 30, 1, 2], None, 45001002])
variant = [({'day': 11, 'hour': 24, 'minute': 0, 'second': 0, 'fraction': 0}, [True, [12, 0, 0, 0, 0], 11, 1036800000]), ({'day': 12, 'hour': 24, 'minute': 0, 'second': 0, 'fraction': 0}, [True, [13, 0, 0, 0, 0], 12, 1123200000]), ({'day': 13, 'hour': 24, 'minute': 0, 'second': 0, 'fraction': 0}, [True, [14, 0, 0, 0, 0], 13, 1209600000]), ({'day': 14, 'hour': 24, 'minute': 0, 'second': 0, 'fraction': 0}, [True, [15, 0, 0, 0, 0], 14, 1296000000]), ({'day': 15, 'hour': 24, 'minute': 0, 'second': 0, 'fraction': 0}, [True, [16, 0, 0, 0, 0], 15, 1382400000])]
check("variant capture", solve(variant[N-1][0]), variant[N-1][1])
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)

source:
"""Failure Map reference implementation. Python standard library only."""
import json
from fractions import Fraction
N = 1
observations = []
def solve(r):
    hour_ok = 0 <= r['hour'] <= 25
    minute_ok = 0 <= r['minute'] < 60
    second_ok = 0 <= r['second'] < 60
    fraction_ok = 0 <= r['fraction'] < 1000
    end_label = r['hour'] == 24
    end_valid = not end_label or (r['minute'] == 0 and r['second'] == 0 and r['fraction'] == 0)
    valid = hour_ok and minute_ok and second_ok and fraction_ok and end_valid
    day = r['day'] + int(end_label)
    hour = 0 if end_label else r['hour']
    coordinate = ((day*24+hour)*3600+r['minute']*60+r['second'])*1000+r['fraction']
    return [valid,[day,hour,r['minute'],r['second'],r['fraction']] if valid else None,r['day'] if valid and end_label else None,coordinate if valid else None]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve({'day': 10, 'hour': 24, 'minute': 0, 'second': 0, 'fraction': 0}), [True, [11, 0, 0, 0, 0], 10, 950400000])
check('fixture 2', solve({'day': 10, 'hour': 0, 'minute': 0, 'second': 0, 'fraction': 0}), [True, [10, 0, 0, 0, 0], None, 864000000])
check('fixture 3', solve({'day': 10, 'hour': 23, 'minute': 59, 'second': 59, 'fraction': 999}), [True, [10, 23, 59, 59, 999], None, 950399999])
check('fixture 4', solve({'day': -1, 'hour': 24, 'minute': 0, 'second': 0, 'fraction': 0}), [True, [0, 0, 0, 0, 0], -1, 0])
check('fixture 5', solve({'day': 10, 'hour': 24, 'minute': 0, 'second': 1, 'fraction': 0}), [False, None, None, None])
check('fixture 6', solve({'day': 10, 'hour': 24, 'minute': 0, 'second': 0, 'fraction': 1}), [False, None, None, None])
check('fixture 7', solve({'day': 10, 'hour': 24, 'minute': 1, 'second': 0, 'fraction': 0}), [False, None, None, None])
check('fixture 8', solve({'day': 10, 'hour': 25, 'minute': 0, 'second': 0, 'fraction': 0}), [False, None, None, None])
check('fixture 9', solve({'day': 10, 'hour': 12, 'minute': 60, 'second': 0, 'fraction': 0}), [False, None, None, None])
check('fixture 10', solve({'day': 10, 'hour': 12, 'minute': -1, 'second': 0, 'fraction': 0}), [False, None, None, None])
check('fixture 11', solve({'day': 10, 'hour': 12, 'minute': 0, 'second': 60, 'fraction': 0}), [False, None, None, None])
check('fixture 12', solve({'day': 10, 'hour': 12, 'minute': 0, 'second': -1, 'fraction': 0}), [False, None, None, None])
check('fixture 13', solve({'day': 10, 'hour': 12, 'minute': 0, 'second': 0, 'fraction': 1000}), [False, None, None, None])
check('fixture 14', solve({'day': 10, 'hour': 12, 'minute': 0, 'second': 0, 'fraction': -1}), [False, None, None, None])
check('fixture 15', solve({'day': 0, 'hour': 12, 'minute': 30, 'second': 1, 'fraction': 2}), [True, [0, 12, 30, 1, 2], None, 45001002])
variant = [({'day': 11, 'hour': 24, 'minute': 0, 'second': 0, 'fraction': 0}, [True, [12, 0, 0, 0, 0], 11, 1036800000]), ({'day': 12, 'hour': 24, 'minute': 0, 'second': 0, 'fraction': 0}, [True, [13, 0, 0, 0, 0], 12, 1123200000]), ({'day': 13, 'hour': 24, 'minute': 0, 'second': 0, 'fraction': 0}, [True, [14, 0, 0, 0, 0], 13, 1209600000]), ({'day': 14, 'hour': 24, 'minute': 0, 'second': 0, 'fraction': 0}, [True, [15, 0, 0, 0, 0], 14, 1296000000]), ({'day': 15, 'hour': 24, 'minute': 0, 'second': 0, 'fraction': 0}, [True, [16, 0, 0, 0, 0], 15, 1382400000])]
check("variant capture", solve(variant[N-1][0]), variant[N-1][1])
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)

prompt:
The decoded time state disagrees with the explicit regression oracle for hour_ok.

Controlled local date index plus clock label permits ordinary 00:00:00 through 23:59:59, or exact 24:00:00 with zero fractional milliseconds only. Normalize 24:00 to following day 00:00, retaining end-of-day provenance for roundtrip. Date index is an abstract signed day, not Gregorian arithmetic. Return admission, normalized tuple, original-day provenance and total millisecond coordinate.

split: open-access


broken_source:
"""Failure Map reference implementation. Python standard library only."""
import json
from fractions import Fraction
N = 1
observations = []
def solve(r):
    hour_ok = 0 <= r['hour'] <= 24
    minute_ok = 0 <= r['minute'] <= 60
    second_ok = 0 <= r['second'] < 60
    fraction_ok = 0 <= r['fraction'] < 1000
    end_label = r['hour'] == 24
    end_valid = not end_label or (r['minute'] == 0 and r['second'] == 0 and r['fraction'] == 0)
    valid = hour_ok and minute_ok and second_ok and fraction_ok and end_valid
    day = r['day'] + int(end_label)
    hour = 0 if end_label else r['hour']
    coordinate = ((day*24+hour)*3600+r['minute']*60+r['second'])*1000+r['fraction']
    return [valid,[day,hour,r['minute'],r['second'],r['fraction']] if valid else None,r['day'] if valid and end_label else None,coordinate if valid else None]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve({'day': 10, 'hour': 24, 'minute': 0, 'second': 0, 'fraction': 0}), [True, [11, 0, 0, 0, 0], 10, 950400000])
check('fixture 2', solve({'day': 10, 'hour': 0, 'minute': 0, 'second': 0, 'fraction': 0}), [True, [10, 0, 0, 0, 0], None, 864000000])
check('fixture 3', solve({'day': 10, 'hour': 23, 'minute': 59, 'second': 59, 'fraction': 999}), [True, [10, 23, 59, 59, 999], None, 950399999])
check('fixture 4', solve({'day': -1, 'hour': 24, 'minute': 0, 'second': 0, 'fraction': 0}), [True, [0, 0, 0, 0, 0], -1, 0])
check('fixture 5', solve({'day': 10, 'hour': 24, 'minute': 0, 'second': 1, 'fraction': 0}), [False, None, None, None])
check('fixture 6', solve({'day': 10, 'hour': 24, 'minute': 0, 'second': 0, 'fraction': 1}), [False, None, None, None])
check('fixture 7', solve({'day': 10, 'hour': 24, 'minute': 1, 'second': 0, 'fraction': 0}), [False, None, None, None])
check('fixture 8', solve({'day': 10, 'hour': 25, 'minute': 0, 'second': 0, 'fraction': 0}), [False, None, None, None])
check('fixture 9', solve({'day': 10, 'hour': 12, 'minute': 60, 'second': 0, 'fraction': 0}), [False, None, None, None])
check('fixture 10', solve({'day': 10, 'hour': 12, 'minute': -1, 'second': 0, 'fraction': 0}), [False, None, None, None])
check('fixture 11', solve({'day': 10, 'hour': 12, 'minute': 0, 'second': 60, 'fraction': 0}), [False, None, None, None])
check('fixture 12', solve({'day': 10, 'hour': 12, 'minute': 0, 'second': -1, 'fraction': 0}), [False, None, None, None])
check('fixture 13', solve({'day': 10, 'hour': 12, 'minute': 0, 'second': 0, 'fraction': 1000}), [False, None, None, None])
check('fixture 14', solve({'day': 10, 'hour': 12, 'minute': 0, 'second': 0, 'fraction': -1}), [False, None, None, None])
check('fixture 15', solve({'day': 0, 'hour': 12, 'minute': 30, 'second': 1, 'fraction': 2}), [True, [0, 12, 30, 1, 2], None, 45001002])
variant = [({'day': 11, 'hour': 24, 'minute': 0, 'second': 0, 'fraction': 0}, [True, [12, 0, 0, 0, 0], 11, 1036800000]), ({'day': 12, 'hour': 24, 'minute': 0, 'second': 0, 'fraction': 0}, [True, [13, 0, 0, 0, 0], 12, 1123200000]), ({'day': 13, 'hour': 24, 'minute': 0, 'second': 0, 'fraction': 0}, [True, [14, 0, 0, 0, 0], 13, 1209600000]), ({'day': 14, 'hour': 24, 'minute': 0, 'second': 0, 'fraction': 0}, [True, [15, 0, 0, 0, 0], 14, 1296000000]), ({'day': 15, 'hour': 24, 'minute': 0, 'second': 0, 'fraction': 0}, [True, [16, 0, 0, 0, 0], 15, 1382400000])]
check("variant capture", solve(variant[N-1][0]), variant[N-1][1])
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)

source:
"""Failure Map reference implementation. Python standard library only."""
import json
from fractions import Fraction
N = 1
observations = []
def solve(r):
    hour_ok = 0 <= r['hour'] <= 24
    minute_ok = r['minute'] < 60
    second_ok = 0 <= r['second'] < 60
    fraction_ok = 0 <= r['fraction'] < 1000
    end_label = r['hour'] == 24
    end_valid = not end_label or (r['minute'] == 0 and r['second'] == 0 and r['fraction'] == 0)
    valid = hour_ok and minute_ok and second_ok and fraction_ok and end_valid
    day = r['day'] + int(end_label)
    hour = 0 if end_label else r['hour']
    coordinate = ((day*24+hour)*3600+r['minute']*60+r['second'])*1000+r['fraction']
    return [valid,[day,hour,r['minute'],r['second'],r['fraction']] if valid else None,r['day'] if valid and end_label else None,coordinate if valid else None]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve({'day': 10, 'hour': 24, 'minute': 0, 'second': 0, 'fraction': 0}), [True, [11, 0, 0, 0, 0], 10, 950400000])
check('fixture 2', solve({'day': 10, 'hour': 0, 'minute': 0, 'second': 0, 'fraction': 0}), [True, [10, 0, 0, 0, 0], None, 864000000])
check('fixture 3', solve({'day': 10, 'hour': 23, 'minute': 59, 'second': 59, 'fraction': 999}), [True, [10, 23, 59, 59, 999], None, 950399999])
check('fixture 4', solve({'day': -1, 'hour': 24, 'minute': 0, 'second': 0, 'fraction': 0}), [True, [0, 0, 0, 0, 0], -1, 0])
check('fixture 5', solve({'day': 10, 'hour': 24, 'minute': 0, 'second': 1, 'fraction': 0}), [False, None, None, None])
check('fixture 6', solve({'day': 10, 'hour': 24, 'minute': 0, 'second': 0, 'fraction': 1}), [False, None, None, None])
check('fixture 7', solve({'day': 10, 'hour': 24, 'minute': 1, 'second': 0, 'fraction': 0}), [False, None, None, None])
check('fixture 8', solve({'day': 10, 'hour': 25, 'minute': 0, 'second': 0, 'fraction': 0}), [False, None, None, None])
check('fixture 9', solve({'day': 10, 'hour': 12, 'minute': 60, 'second': 0, 'fraction': 0}), [False, None, None, None])
check('fixture 10', solve({'day': 10, 'hour': 12, 'minute': -1, 'second': 0, 'fraction': 0}), [False, None, None, None])
check('fixture 11', solve({'day': 10, 'hour': 12, 'minute': 0, 'second': 60, 'fraction': 0}), [False, None, None, None])
check('fixture 12', solve({'day': 10, 'hour': 12, 'minute': 0, 'second': -1, 'fraction': 0}), [False, None, None, None])
check('fixture 13', solve({'day': 10, 'hour': 12, 'minute': 0, 'second': 0, 'fraction': 1000}), [False, None, None, None])
check('fixture 14', solve({'day': 10, 'hour': 12, 'minute': 0, 'second': 0, 'fraction': -1}), [False, None, None, None])
check('fixture 15', solve({'day': 0, 'hour': 12, 'minute': 30, 'second': 1, 'fraction': 2}), [True, [0, 12, 30, 1, 2], None, 45001002])
variant = [({'day': 11, 'hour': 24, 'minute': 0, 'second': 0, 'fraction': 0}, [True, [12, 0, 0, 0, 0], 11, 1036800000]), ({'day': 12, 'hour': 24, 'minute': 0, 'second': 0, 'fraction': 0}, [True, [13, 0, 0, 0, 0], 12, 1123200000]), ({'day': 13, 'hour': 24, 'minute': 0, 'second': 0, 'fraction': 0}, [True, [14, 0, 0, 0, 0], 13, 1209600000]), ({'day': 14, 'hour': 24, 'minute': 0, 'second': 0, 'fraction': 0}, [True, [15, 0, 0, 0, 0], 14, 1296000000]), ({'day': 15, 'hour': 24, 'minute': 0, 'second': 0, 'fraction': 0}, [True, [16, 0, 0, 0, 0], 15, 1382400000])]
check("variant capture", solve(variant[N-1][0]), variant[N-1][1])
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)

prompt:
The decoded time state disagrees with the explicit regression oracle for minute_ok.

Controlled local date index plus clock label permits ordinary 00:00:00 through 23:59:59, or exact 24:00:00 with zero fractional milliseconds only. Normalize 24:00 to following day 00:00, retaining end-of-day provenance for roundtrip. Date index is an abstract signed day, not Gregorian arithmetic. Return admission, normalized tuple, original-day provenance and total millisecond coordinate.

split: open-access


broken_source:
"""Failure Map reference implementation. Python standard library only."""
import json
from fractions import Fraction
N = 1
observations = []
def solve(r):
    hour_ok = 0 <= r['hour'] <= 24
    minute_ok = 0 <= r['minute'] < 60
    second_ok = 0 <= r['second'] <= 60
    fraction_ok = 0 <= r['fraction'] < 1000
    end_label = r['hour'] == 24
    end_valid = not end_label or (r['minute'] == 0 and r['second'] == 0 and r['fraction'] == 0)
    valid = hour_ok and minute_ok and second_ok and fraction_ok and end_valid
    day = r['day'] + int(end_label)
    hour = 0 if end_label else r['hour']
    coordinate = ((day*24+hour)*3600+r['minute']*60+r['second'])*1000+r['fraction']
    return [valid,[day,hour,r['minute'],r['second'],r['fraction']] if valid else None,r['day'] if valid and end_label else None,coordinate if valid else None]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve({'day': 10, 'hour': 24, 'minute': 0, 'second': 0, 'fraction': 0}), [True, [11, 0, 0, 0, 0], 10, 950400000])
check('fixture 2', solve({'day': 10, 'hour': 0, 'minute': 0, 'second': 0, 'fraction': 0}), [True, [10, 0, 0, 0, 0], None, 864000000])
check('fixture 3', solve({'day': 10, 'hour': 23, 'minute': 59, 'second': 59, 'fraction': 999}), [True, [10, 23, 59, 59, 999], None, 950399999])
check('fixture 4', solve({'day': -1, 'hour': 24, 'minute': 0, 'second': 0, 'fraction': 0}), [True, [0, 0, 0, 0, 0], -1, 0])
check('fixture 5', solve({'day': 10, 'hour': 24, 'minute': 0, 'second': 1, 'fraction': 0}), [False, None, None, None])
check('fixture 6', solve({'day': 10, 'hour': 24, 'minute': 0, 'second': 0, 'fraction': 1}), [False, None, None, None])
check('fixture 7', solve({'day': 10, 'hour': 24, 'minute': 1, 'second': 0, 'fraction': 0}), [False, None, None, None])
check('fixture 8', solve({'day': 10, 'hour': 25, 'minute': 0, 'second': 0, 'fraction': 0}), [False, None, None, None])
check('fixture 9', solve({'day': 10, 'hour': 12, 'minute': 60, 'second': 0, 'fraction': 0}), [False, None, None, None])
check('fixture 10', solve({'day': 10, 'hour': 12, 'minute': -1, 'second': 0, 'fraction': 0}), [False, None, None, None])
check('fixture 11', solve({'day': 10, 'hour': 12, 'minute': 0, 'second': 60, 'fraction': 0}), [False, None, None, None])
check('fixture 12', solve({'day': 10, 'hour': 12, 'minute': 0, 'second': -1, 'fraction': 0}), [False, None, None, None])
check('fixture 13', solve({'day': 10, 'hour': 12, 'minute': 0, 'second': 0, 'fraction': 1000}), [False, None, None, None])
check('fixture 14', solve({'day': 10, 'hour': 12, 'minute': 0, 'second': 0, 'fraction': -1}), [False, None, None, None])
check('fixture 15', solve({'day': 0, 'hour': 12, 'minute': 30, 'second': 1, 'fraction': 2}), [True, [0, 12, 30, 1, 2], None, 45001002])
variant = [({'day': 11, 'hour': 24, 'minute': 0, 'second': 0, 'fraction': 0}, [True, [12, 0, 0, 0, 0], 11, 1036800000]), ({'day': 12, 'hour': 24, 'minute': 0, 'second': 0, 'fraction': 0}, [True, [13, 0, 0, 0, 0], 12, 1123200000]), ({'day': 13, 'hour': 24, 'minute': 0, 'second': 0, 'fraction': 0}, [True, [14, 0, 0, 0, 0], 13, 1209600000]), ({'day': 14, 'hour': 24, 'minute': 0, 'second': 0, 'fraction': 0}, [True, [15, 0, 0, 0, 0], 14, 1296000000]), ({'day': 15, 'hour': 24, 'minute': 0, 'second': 0, 'fraction': 0}, [True, [16, 0, 0, 0, 0], 15, 1382400000])]
check("variant capture", solve(variant[N-1][0]), variant[N-1][1])
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)

source:
"""Failure Map reference implementation. Python standard library only."""
import json
from fractions import Fraction
N = 1
observations = []
def solve(r):
    hour_ok = 0 <= r['hour'] <= 24
    minute_ok = 0 <= r['minute'] < 60
    second_ok = r['second'] < 60
    fraction_ok = 0 <= r['fraction'] < 1000
    end_label = r['hour'] == 24
    end_valid = not end_label or (r['minute'] == 0 and r['second'] == 0 and r['fraction'] == 0)
    valid = hour_ok and minute_ok and second_ok and fraction_ok and end_valid
    day = r['day'] + int(end_label)
    hour = 0 if end_label else r['hour']
    coordinate = ((day*24+hour)*3600+r['minute']*60+r['second'])*1000+r['fraction']
    return [valid,[day,hour,r['minute'],r['second'],r['fraction']] if valid else None,r['day'] if valid and end_label else None,coordinate if valid else None]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve({'day': 10, 'hour': 24, 'minute': 0, 'second': 0, 'fraction': 0}), [True, [11, 0, 0, 0, 0], 10, 950400000])
check('fixture 2', solve({'day': 10, 'hour': 0, 'minute': 0, 'second': 0, 'fraction': 0}), [True, [10, 0, 0, 0, 0], None, 864000000])
check('fixture 3', solve({'day': 10, 'hour': 23, 'minute': 59, 'second': 59, 'fraction': 999}), [True, [10, 23, 59, 59, 999], None, 950399999])
check('fixture 4', solve({'day': -1, 'hour': 24, 'minute': 0, 'second': 0, 'fraction': 0}), [True, [0, 0, 0, 0, 0], -1, 0])
check('fixture 5', solve({'day': 10, 'hour': 24, 'minute': 0, 'second': 1, 'fraction': 0}), [False, None, None, None])
check('fixture 6', solve({'day': 10, 'hour': 24, 'minute': 0, 'second': 0, 'fraction': 1}), [False, None, None, None])
check('fixture 7', solve({'day': 10, 'hour': 24, 'minute': 1, 'second': 0, 'fraction': 0}), [False, None, None, None])
check('fixture 8', solve({'day': 10, 'hour': 25, 'minute': 0, 'second': 0, 'fraction': 0}), [False, None, None, None])
check('fixture 9', solve({'day': 10, 'hour': 12, 'minute': 60, 'second': 0, 'fraction': 0}), [False, None, None, None])
check('fixture 10', solve({'day': 10, 'hour': 12, 'minute': -1, 'second': 0, 'fraction': 0}), [False, None, None, None])
check('fixture 11', solve({'day': 10, 'hour': 12, 'minute': 0, 'second': 60, 'fraction': 0}), [False, None, None, None])
check('fixture 12', solve({'day': 10, 'hour': 12, 'minute': 0, 'second': -1, 'fraction': 0}), [False, None, None, None])
check('fixture 13', solve({'day': 10, 'hour': 12, 'minute': 0, 'second': 0, 'fraction': 1000}), [False, None, None, None])
check('fixture 14', solve({'day': 10, 'hour': 12, 'minute': 0, 'second': 0, 'fraction': -1}), [False, None, None, None])
check('fixture 15', solve({'day': 0, 'hour': 12, 'minute': 30, 'second': 1, 'fraction': 2}), [True, [0, 12, 30, 1, 2], None, 45001002])
variant = [({'day': 11, 'hour': 24, 'minute': 0, 'second': 0, 'fraction': 0}, [True, [12, 0, 0, 0, 0], 11, 1036800000]), ({'day': 12, 'hour': 24, 'minute': 0, 'second': 0, 'fraction': 0}, [True, [13, 0, 0, 0, 0], 12, 1123200000]), ({'day': 13, 'hour': 24, 'minute': 0, 'second': 0, 'fraction': 0}, [True, [14, 0, 0, 0, 0], 13, 1209600000]), ({'day': 14, 'hour': 24, 'minute': 0, 'second': 0, 'fraction': 0}, [True, [15, 0, 0, 0, 0], 14, 1296000000]), ({'day': 15, 'hour': 24, 'minute': 0, 'second': 0, 'fraction': 0}, [True, [16, 0, 0, 0, 0], 15, 1382400000])]
check("variant capture", solve(variant[N-1][0]), variant[N-1][1])
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)

prompt:
The decoded time state disagrees with the explicit regression oracle for second_ok.

Controlled local date index plus clock label permits ordinary 00:00:00 through 23:59:59, or exact 24:00:00 with zero fractional milliseconds only. Normalize 24:00 to following day 00:00, retaining end-of-day provenance for roundtrip. Date index is an abstract signed day, not Gregorian arithmetic. Return admission, normalized tuple, original-day provenance and total millisecond coordinate.

split: open-access


broken_source:
"""Failure Map reference implementation. Python standard library only."""
import json
from fractions import Fraction
N = 1
observations = []
def solve(r):
    hour_ok = 0 <= r['hour'] <= 24
    minute_ok = 0 <= r['minute'] < 60
    second_ok = 0 <= r['second'] < 60
    fraction_ok = 0 <= r['fraction'] <= 1000
    end_label = r['hour'] == 24
    end_valid = not end_label or (r['minute'] == 0 and r['second'] == 0 and r['fraction'] == 0)
    valid = hour_ok and minute_ok and second_ok and fraction_ok and end_valid
    day = r['day'] + int(end_label)
    hour = 0 if end_label else r['hour']
    coordinate = ((day*24+hour)*3600+r['minute']*60+r['second'])*1000+r['fraction']
    return [valid,[day,hour,r['minute'],r['second'],r['fraction']] if valid else None,r['day'] if valid and end_label else None,coordinate if valid else None]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve({'day': 10, 'hour': 24, 'minute': 0, 'second': 0, 'fraction': 0}), [True, [11, 0, 0, 0, 0], 10, 950400000])
check('fixture 2', solve({'day': 10, 'hour': 0, 'minute': 0, 'second': 0, 'fraction': 0}), [True, [10, 0, 0, 0, 0], None, 864000000])
check('fixture 3', solve({'day': 10, 'hour': 23, 'minute': 59, 'second': 59, 'fraction': 999}), [True, [10, 23, 59, 59, 999], None, 950399999])
check('fixture 4', solve({'day': -1, 'hour': 24, 'minute': 0, 'second': 0, 'fraction': 0}), [True, [0, 0, 0, 0, 0], -1, 0])
check('fixture 5', solve({'day': 10, 'hour': 24, 'minute': 0, 'second': 1, 'fraction': 0}), [False, None, None, None])
check('fixture 6', solve({'day': 10, 'hour': 24, 'minute': 0, 'second': 0, 'fraction': 1}), [False, None, None, None])
check('fixture 7', solve({'day': 10, 'hour': 24, 'minute': 1, 'second': 0, 'fraction': 0}), [False, None, None, None])
check('fixture 8', solve({'day': 10, 'hour': 25, 'minute': 0, 'second': 0, 'fraction': 0}), [False, None, None, None])
check('fixture 9', solve({'day': 10, 'hour': 12, 'minute': 60, 'second': 0, 'fraction': 0}), [False, None, None, None])
check('fixture 10', solve({'day': 10, 'hour': 12, 'minute': -1, 'second': 0, 'fraction': 0}), [False, None, None, None])
check('fixture 11', solve({'day': 10, 'hour': 12, 'minute': 0, 'second': 60, 'fraction': 0}), [False, None, None, None])
check('fixture 12', solve({'day': 10, 'hour': 12, 'minute': 0, 'second': -1, 'fraction': 0}), [False, None, None, None])
check('fixture 13', solve({'day': 10, 'hour': 12, 'minute': 0, 'second': 0, 'fraction': 1000}), [False, None, None, None])
check('fixture 14', solve({'day': 10, 'hour': 12, 'minute': 0, 'second': 0, 'fraction': -1}), [False, None, None, None])
check('fixture 15', solve({'day': 0, 'hour': 12, 'minute': 30, 'second': 1, 'fraction': 2}), [True, [0, 12, 30, 1, 2], None, 45001002])
variant = [({'day': 11, 'hour': 24, 'minute': 0, 'second': 0, 'fraction': 0}, [True, [12, 0, 0, 0, 0], 11, 1036800000]), ({'day': 12, 'hour': 24, 'minute': 0, 'second': 0, 'fraction': 0}, [True, [13, 0, 0, 0, 0], 12, 1123200000]), ({'day': 13, 'hour': 24, 'minute': 0, 'second': 0, 'fraction': 0}, [True, [14, 0, 0, 0, 0], 13, 1209600000]), ({'day': 14, 'hour': 24, 'minute': 0, 'second': 0, 'fraction': 0}, [True, [15, 0, 0, 0, 0], 14, 1296000000]), ({'day': 15, 'hour': 24, 'minute': 0, 'second': 0, 'fraction': 0}, [True, [16, 0, 0, 0, 0], 15, 1382400000])]
check("variant capture", solve(variant[N-1][0]), variant[N-1][1])
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)

source:
"""Failure Map reference implementation. Python standard library only."""
import json
from fractions import Fraction
N = 1
observations = []
def solve(r):
    hour_ok = 0 <= r['hour'] <= 24
    minute_ok = 0 <= r['minute'] < 60
    second_ok = 0 <= r['second'] < 60
    fraction_ok = r['fraction'] < 1000
    end_label = r['hour'] == 24
    end_valid = not end_label or (r['minute'] == 0 and r['second'] == 0 and r['fraction'] == 0)
    valid = hour_ok and minute_ok and second_ok and fraction_ok and end_valid
    day = r['day'] + int(end_label)
    hour = 0 if end_label else r['hour']
    coordinate = ((day*24+hour)*3600+r['minute']*60+r['second'])*1000+r['fraction']
    return [valid,[day,hour,r['minute'],r['second'],r['fraction']] if valid else None,r['day'] if valid and end_label else None,coordinate if valid else None]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve({'day': 10, 'hour': 24, 'minute': 0, 'second': 0, 'fraction': 0}), [True, [11, 0, 0, 0, 0], 10, 950400000])
check('fixture 2', solve({'day': 10, 'hour': 0, 'minute': 0, 'second': 0, 'fraction': 0}), [True, [10, 0, 0, 0, 0], None, 864000000])
check('fixture 3', solve({'day': 10, 'hour': 23, 'minute': 59, 'second': 59, 'fraction': 999}), [True, [10, 23, 59, 59, 999], None, 950399999])
check('fixture 4', solve({'day': -1, 'hour': 24, 'minute': 0, 'second': 0, 'fraction': 0}), [True, [0, 0, 0, 0, 0], -1, 0])
check('fixture 5', solve({'day': 10, 'hour': 24, 'minute': 0, 'second': 1, 'fraction': 0}), [False, None, None, None])
check('fixture 6', solve({'day': 10, 'hour': 24, 'minute': 0, 'second': 0, 'fraction': 1}), [False, None, None, None])
check('fixture 7', solve({'day': 10, 'hour': 24, 'minute': 1, 'second': 0, 'fraction': 0}), [False, None, None, None])
check('fixture 8', solve({'day': 10, 'hour': 25, 'minute': 0, 'second': 0, 'fraction': 0}), [False, None, None, None])
check('fixture 9', solve({'day': 10, 'hour': 12, 'minute': 60, 'second': 0, 'fraction': 0}), [False, None, None, None])
check('fixture 10', solve({'day': 10, 'hour': 12, 'minute': -1, 'second': 0, 'fraction': 0}), [False, None, None, None])
check('fixture 11', solve({'day': 10, 'hour': 12, 'minute': 0, 'second': 60, 'fraction': 0}), [False, None, None, None])
check('fixture 12', solve({'day': 10, 'hour': 12, 'minute': 0, 'second': -1, 'fraction': 0}), [False, None, None, None])
check('fixture 13', solve({'day': 10, 'hour': 12, 'minute': 0, 'second': 0, 'fraction': 1000}), [False, None, None, None])
check('fixture 14', solve({'day': 10, 'hour': 12, 'minute': 0, 'second': 0, 'fraction': -1}), [False, None, None, None])
check('fixture 15', solve({'day': 0, 'hour': 12, 'minute': 30, 'second': 1, 'fraction': 2}), [True, [0, 12, 30, 1, 2], None, 45001002])
variant = [({'day': 11, 'hour': 24, 'minute': 0, 'second': 0, 'fraction': 0}, [True, [12, 0, 0, 0, 0], 11, 1036800000]), ({'day': 12, 'hour': 24, 'minute': 0, 'second': 0, 'fraction': 0}, [True, [13, 0, 0, 0, 0], 12, 1123200000]), ({'day': 13, 'hour': 24, 'minute': 0, 'second': 0, 'fraction': 0}, [True, [14, 0, 0, 0, 0], 13, 1209600000]), ({'day': 14, 'hour': 24, 'minute': 0, 'second': 0, 'fraction': 0}, [True, [15, 0, 0, 0, 0], 14, 1296000000]), ({'day': 15, 'hour': 24, 'minute': 0, 'second': 0, 'fraction': 0}, [True, [16, 0, 0, 0, 0], 15, 1382400000])]
check("variant capture", solve(variant[N-1][0]), variant[N-1][1])
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)

prompt:
The decoded time state disagrees with the explicit regression oracle for fraction_ok.

Controlled local date index plus clock label permits ordinary 00:00:00 through 23:59:59, or exact 24:00:00 with zero fractional milliseconds only. Normalize 24:00 to following day 00:00, retaining end-of-day provenance for roundtrip. Date index is an abstract signed day, not Gregorian arithmetic. Return admission, normalized tuple, original-day provenance and total millisecond coordinate.

split: open-access


broken_source:
"""Failure Map reference implementation. Python standard library only."""
import json
from fractions import Fraction
N = 1
observations = []
def solve(r):
    hour_ok = 0 <= r['hour'] <= 24
    minute_ok = 0 <= r['minute'] < 60
    second_ok = 0 <= r['second'] < 60
    fraction_ok = 0 <= r['fraction'] < 1000
    end_label = r['hour'] == 0
    end_valid = not end_label or (r['minute'] == 0 and r['second'] == 0 and r['fraction'] == 0)
    valid = hour_ok and minute_ok and second_ok and fraction_ok and end_valid
    day = r['day'] + int(end_label)
    hour = 0 if end_label else r['hour']
    coordinate = ((day*24+hour)*3600+r['minute']*60+r['second'])*1000+r['fraction']
    return [valid,[day,hour,r['minute'],r['second'],r['fraction']] if valid else None,r['day'] if valid and end_label else None,coordinate if valid else None]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve({'day': 10, 'hour': 24, 'minute': 0, 'second': 0, 'fraction': 0}), [True, [11, 0, 0, 0, 0], 10, 950400000])
check('fixture 2', solve({'day': 10, 'hour': 0, 'minute': 0, 'second': 0, 'fraction': 0}), [True, [10, 0, 0, 0, 0], None, 864000000])
check('fixture 3', solve({'day': 10, 'hour': 23, 'minute': 59, 'second': 59, 'fraction': 999}), [True, [10, 23, 59, 59, 999], None, 950399999])
check('fixture 4', solve({'day': -1, 'hour': 24, 'minute': 0, 'second': 0, 'fraction': 0}), [True, [0, 0, 0, 0, 0], -1, 0])
check('fixture 5', solve({'day': 10, 'hour': 24, 'minute': 0, 'second': 1, 'fraction': 0}), [False, None, None, None])
check('fixture 6', solve({'day': 10, 'hour': 24, 'minute': 0, 'second': 0, 'fraction': 1}), [False, None, None, None])
check('fixture 7', solve({'day': 10, 'hour': 24, 'minute': 1, 'second': 0, 'fraction': 0}), [False, None, None, None])
check('fixture 8', solve({'day': 10, 'hour': 25, 'minute': 0, 'second': 0, 'fraction': 0}), [False, None, None, None])
check('fixture 9', solve({'day': 10, 'hour': 12, 'minute': 60, 'second': 0, 'fraction': 0}), [False, None, None, None])
check('fixture 10', solve({'day': 10, 'hour': 12, 'minute': -1, 'second': 0, 'fraction': 0}), [False, None, None, None])
check('fixture 11', solve({'day': 10, 'hour': 12, 'minute': 0, 'second': 60, 'fraction': 0}), [False, None, None, None])
check('fixture 12', solve({'day': 10, 'hour': 12, 'minute': 0, 'second': -1, 'fraction': 0}), [False, None, None, None])
check('fixture 13', solve({'day': 10, 'hour': 12, 'minute': 0, 'second': 0, 'fraction': 1000}), [False, None, None, None])
check('fixture 14', solve({'day': 10, 'hour': 12, 'minute': 0, 'second': 0, 'fraction': -1}), [False, None, None, None])
check('fixture 15', solve({'day': 0, 'hour': 12, 'minute': 30, 'second': 1, 'fraction': 2}), [True, [0, 12, 30, 1, 2], None, 45001002])
variant = [({'day': 11, 'hour': 24, 'minute': 0, 'second': 0, 'fraction': 0}, [True, [12, 0, 0, 0, 0], 11, 1036800000]), ({'day': 12, 'hour': 24, 'minute': 0, 'second': 0, 'fraction': 0}, [True, [13, 0, 0, 0, 0], 12, 1123200000]), ({'day': 13, 'hour': 24, 'minute': 0, 'second': 0, 'fraction': 0}, [True, [14, 0, 0, 0, 0], 13, 1209600000]), ({'day': 14, 'hour': 24, 'minute': 0, 'second': 0, 'fraction': 0}, [True, [15, 0, 0, 0, 0], 14, 1296000000]), ({'day': 15, 'hour': 24, 'minute': 0, 'second': 0, 'fraction': 0}, [True, [16, 0, 0, 0, 0], 15, 1382400000])]
check("variant capture", solve(variant[N-1][0]), variant[N-1][1])
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)

source:
"""Failure Map reference implementation. Python standard library only."""
import json
from fractions import Fraction
N = 1
observations = []
def solve(r):
    hour_ok = 0 <= r['hour'] <= 24
    minute_ok = 0 <= r['minute'] < 60
    second_ok = 0 <= r['second'] < 60
    fraction_ok = 0 <= r['fraction'] < 1000
    end_label = r['hour'] >= 23
    end_valid = not end_label or (r['minute'] == 0 and r['second'] == 0 and r['fraction'] == 0)
    valid = hour_ok and minute_ok and second_ok and fraction_ok and end_valid
    day = r['day'] + int(end_label)
    hour = 0 if end_label else r['hour']
    coordinate = ((day*24+hour)*3600+r['minute']*60+r['second'])*1000+r['fraction']
    return [valid,[day,hour,r['minute'],r['second'],r['fraction']] if valid else None,r['day'] if valid and end_label else None,coordinate if valid else None]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve({'day': 10, 'hour': 24, 'minute': 0, 'second': 0, 'fraction': 0}), [True, [11, 0, 0, 0, 0], 10, 950400000])
check('fixture 2', solve({'day': 10, 'hour': 0, 'minute': 0, 'second': 0, 'fraction': 0}), [True, [10, 0, 0, 0, 0], None, 864000000])
check('fixture 3', solve({'day': 10, 'hour': 23, 'minute': 59, 'second': 59, 'fraction': 999}), [True, [10, 23, 59, 59, 999], None, 950399999])
check('fixture 4', solve({'day': -1, 'hour': 24, 'minute': 0, 'second': 0, 'fraction': 0}), [True, [0, 0, 0, 0, 0], -1, 0])
check('fixture 5', solve({'day': 10, 'hour': 24, 'minute': 0, 'second': 1, 'fraction': 0}), [False, None, None, None])
check('fixture 6', solve({'day': 10, 'hour': 24, 'minute': 0, 'second': 0, 'fraction': 1}), [False, None, None, None])
check('fixture 7', solve({'day': 10, 'hour': 24, 'minute': 1, 'second': 0, 'fraction': 0}), [False, None, None, None])
check('fixture 8', solve({'day': 10, 'hour': 25, 'minute': 0, 'second': 0, 'fraction': 0}), [False, None, None, None])
check('fixture 9', solve({'day': 10, 'hour': 12, 'minute': 60, 'second': 0, 'fraction': 0}), [False, None, None, None])
check('fixture 10', solve({'day': 10, 'hour': 12, 'minute': -1, 'second': 0, 'fraction': 0}), [False, None, None, None])
check('fixture 11', solve({'day': 10, 'hour': 12, 'minute': 0, 'second': 60, 'fraction': 0}), [False, None, None, None])
check('fixture 12', solve({'day': 10, 'hour': 12, 'minute': 0, 'second': -1, 'fraction': 0}), [False, None, None, None])
check('fixture 13', solve({'day': 10, 'hour': 12, 'minute': 0, 'second': 0, 'fraction': 1000}), [False, None, None, None])
check('fixture 14', solve({'day': 10, 'hour': 12, 'minute': 0, 'second': 0, 'fraction': -1}), [False, None, None, None])
check('fixture 15', solve({'day': 0, 'hour': 12, 'minute': 30, 'second': 1, 'fraction': 2}), [True, [0, 12, 30, 1, 2], None, 45001002])
variant = [({'day': 11, 'hour': 24, 'minute': 0, 'second': 0, 'fraction': 0}, [True, [12, 0, 0, 0, 0], 11, 1036800000]), ({'day': 12, 'hour': 24, 'minute': 0, 'second': 0, 'fraction': 0}, [True, [13, 0, 0, 0, 0], 12, 1123200000]), ({'day': 13, 'hour': 24, 'minute': 0, 'second': 0, 'fraction': 0}, [True, [14, 0, 0, 0, 0], 13, 1209600000]), ({'day': 14, 'hour': 24, 'minute': 0, 'second': 0, 'fraction': 0}, [True, [15, 0, 0, 0, 0], 14, 1296000000]), ({'day': 15, 'hour': 24, 'minute': 0, 'second': 0, 'fraction': 0}, [True, [16, 0, 0, 0, 0], 15, 1382400000])]
check("variant capture", solve(variant[N-1][0]), variant[N-1][1])
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)

prompt:
The decoded time state disagrees with the explicit regression oracle for end_label.

Controlled local date index plus clock label permits ordinary 00:00:00 through 23:59:59, or exact 24:00:00 with zero fractional milliseconds only. Normalize 24:00 to following day 00:00, retaining end-of-day provenance for roundtrip. Date index is an abstract signed day, not Gregorian arithmetic. Return admission, normalized tuple, original-day provenance and total millisecond coordinate.

split: open-access


broken_source:
"""Failure Map reference implementation. Python standard library only."""
import json
from fractions import Fraction
N = 1
observations = []
def solve(r):
    hour_ok = 0 <= r['hour'] <= 24
    minute_ok = 0 <= r['minute'] < 60
    second_ok = 0 <= r['second'] < 60
    fraction_ok = 0 <= r['fraction'] < 1000
    end_label = r['hour'] == 24
    end_valid = not end_label or r['minute'] == 0
    valid = hour_ok and minute_ok and second_ok and fraction_ok and end_valid
    day = r['day'] + int(end_label)
    hour = 0 if end_label else r['hour']
    coordinate = ((day*24+hour)*3600+r['minute']*60+r['second'])*1000+r['fraction']
    return [valid,[day,hour,r['minute'],r['second'],r['fraction']] if valid else None,r['day'] if valid and end_label else None,coordinate if valid else None]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve({'day': 10, 'hour': 24, 'minute': 0, 'second': 0, 'fraction': 0}), [True, [11, 0, 0, 0, 0], 10, 950400000])
check('fixture 2', solve({'day': 10, 'hour': 0, 'minute': 0, 'second': 0, 'fraction': 0}), [True, [10, 0, 0, 0, 0], None, 864000000])
check('fixture 3', solve({'day': 10, 'hour': 23, 'minute': 59, 'second': 59, 'fraction': 999}), [True, [10, 23, 59, 59, 999], None, 950399999])
check('fixture 4', solve({'day': -1, 'hour': 24, 'minute': 0, 'second': 0, 'fraction': 0}), [True, [0, 0, 0, 0, 0], -1, 0])
check('fixture 5', solve({'day': 10, 'hour': 24, 'minute': 0, 'second': 1, 'fraction': 0}), [False, None, None, None])
check('fixture 6', solve({'day': 10, 'hour': 24, 'minute': 0, 'second': 0, 'fraction': 1}), [False, None, None, None])
check('fixture 7', solve({'day': 10, 'hour': 24, 'minute': 1, 'second': 0, 'fraction': 0}), [False, None, None, None])
check('fixture 8', solve({'day': 10, 'hour': 25, 'minute': 0, 'second': 0, 'fraction': 0}), [False, None, None, None])
check('fixture 9', solve({'day': 10, 'hour': 12, 'minute': 60, 'second': 0, 'fraction': 0}), [False, None, None, None])
check('fixture 10', solve({'day': 10, 'hour': 12, 'minute': -1, 'second': 0, 'fraction': 0}), [False, None, None, None])
check('fixture 11', solve({'day': 10, 'hour': 12, 'minute': 0, 'second': 60, 'fraction': 0}), [False, None, None, None])
check('fixture 12', solve({'day': 10, 'hour': 12, 'minute': 0, 'second': -1, 'fraction': 0}), [False, None, None, None])
check('fixture 13', solve({'day': 10, 'hour': 12, 'minute': 0, 'second': 0, 'fraction': 1000}), [False, None, None, None])
check('fixture 14', solve({'day': 10, 'hour': 12, 'minute': 0, 'second': 0, 'fraction': -1}), [False, None, None, None])
check('fixture 15', solve({'day': 0, 'hour': 12, 'minute': 30, 'second': 1, 'fraction': 2}), [True, [0, 12, 30, 1, 2], None, 45001002])
variant = [({'day': 11, 'hour': 24, 'minute': 0, 'second': 0, 'fraction': 0}, [True, [12, 0, 0, 0, 0], 11, 1036800000]), ({'day': 12, 'hour': 24, 'minute': 0, 'second': 0, 'fraction': 0}, [True, [13, 0, 0, 0, 0], 12, 1123200000]), ({'day': 13, 'hour': 24, 'minute': 0, 'second': 0, 'fraction': 0}, [True, [14, 0, 0, 0, 0], 13, 1209600000]), ({'day': 14, 'hour': 24, 'minute': 0, 'second': 0, 'fraction': 0}, [True, [15, 0, 0, 0, 0], 14, 1296000000]), ({'day': 15, 'hour': 24, 'minute': 0, 'second': 0, 'fraction': 0}, [True, [16, 0, 0, 0, 0], 15, 1382400000])]
check("variant capture", solve(variant[N-1][0]), variant[N-1][1])
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)

source:
"""Failure Map reference implementation. Python standard library only."""
import json
from fractions import Fraction
N = 1
observations = []
def solve(r):
    hour_ok = 0 <= r['hour'] <= 24
    minute_ok = 0 <= r['minute'] < 60
    second_ok = 0 <= r['second'] < 60
    fraction_ok = 0 <= r['fraction'] < 1000
    end_label = r['hour'] == 24
    end_valid = not end_label or (r['minute'] == 0 and r['second'] == 0)
    valid = hour_ok and minute_ok and second_ok and fraction_ok and end_valid
    day = r['day'] + int(end_label)
    hour = 0 if end_label else r['hour']
    coordinate = ((day*24+hour)*3600+r['minute']*60+r['second'])*1000+r['fraction']
    return [valid,[day,hour,r['minute'],r['second'],r['fraction']] if valid else None,r['day'] if valid and end_label else None,coordinate if valid else None]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve({'day': 10, 'hour': 24, 'minute': 0, 'second': 0, 'fraction': 0}), [True, [11, 0, 0, 0, 0], 10, 950400000])
check('fixture 2', solve({'day': 10, 'hour': 0, 'minute': 0, 'second': 0, 'fraction': 0}), [True, [10, 0, 0, 0, 0], None, 864000000])
check('fixture 3', solve({'day': 10, 'hour': 23, 'minute': 59, 'second': 59, 'fraction': 999}), [True, [10, 23, 59, 59, 999], None, 950399999])
check('fixture 4', solve({'day': -1, 'hour': 24, 'minute': 0, 'second': 0, 'fraction': 0}), [True, [0, 0, 0, 0, 0], -1, 0])
check('fixture 5', solve({'day': 10, 'hour': 24, 'minute': 0, 'second': 1, 'fraction': 0}), [False, None, None, None])
check('fixture 6', solve({'day': 10, 'hour': 24, 'minute': 0, 'second': 0, 'fraction': 1}), [False, None, None, None])
check('fixture 7', solve({'day': 10, 'hour': 24, 'minute': 1, 'second': 0, 'fraction': 0}), [False, None, None, None])
check('fixture 8', solve({'day': 10, 'hour': 25, 'minute': 0, 'second': 0, 'fraction': 0}), [False, None, None, None])
check('fixture 9', solve({'day': 10, 'hour': 12, 'minute': 60, 'second': 0, 'fraction': 0}), [False, None, None, None])
check('fixture 10', solve({'day': 10, 'hour': 12, 'minute': -1, 'second': 0, 'fraction': 0}), [False, None, None, None])
check('fixture 11', solve({'day': 10, 'hour': 12, 'minute': 0, 'second': 60, 'fraction': 0}), [False, None, None, None])
check('fixture 12', solve({'day': 10, 'hour': 12, 'minute': 0, 'second': -1, 'fraction': 0}), [False, None, None, None])
check('fixture 13', solve({'day': 10, 'hour': 12, 'minute': 0, 'second': 0, 'fraction': 1000}), [False, None, None, None])
check('fixture 14', solve({'day': 10, 'hour': 12, 'minute': 0, 'second': 0, 'fraction': -1}), [False, None, None, None])
check('fixture 15', solve({'day': 0, 'hour': 12, 'minute': 30, 'second': 1, 'fraction': 2}), [True, [0, 12, 30, 1, 2], None, 45001002])
variant = [({'day': 11, 'hour': 24, 'minute': 0, 'second': 0, 'fraction': 0}, [True, [12, 0, 0, 0, 0], 11, 1036800000]), ({'day': 12, 'hour': 24, 'minute': 0, 'second': 0, 'fraction': 0}, [True, [13, 0, 0, 0, 0], 12, 1123200000]), ({'day': 13, 'hour': 24, 'minute': 0, 'second': 0, 'fraction': 0}, [True, [14, 0, 0, 0, 0], 13, 1209600000]), ({'day': 14, 'hour': 24, 'minute': 0, 'second': 0, 'fraction': 0}, [True, [15, 0, 0, 0, 0], 14, 1296000000]), ({'day': 15, 'hour': 24, 'minute': 0, 'second': 0, 'fraction': 0}, [True, [16, 0, 0, 0, 0], 15, 1382400000])]
check("variant capture", solve(variant[N-1][0]), variant[N-1][1])
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)

prompt:
The decoded time state disagrees with the explicit regression oracle for end_valid.

Controlled local date index plus clock label permits ordinary 00:00:00 through 23:59:59, or exact 24:00:00 with zero fractional milliseconds only. Normalize 24:00 to following day 00:00, retaining end-of-day provenance for roundtrip. Date index is an abstract signed day, not Gregorian arithmetic. Return admission, normalized tuple, original-day provenance and total millisecond coordinate.

split: open-access


broken_source:
"""Failure Map reference implementation. Python standard library only."""
import json
from fractions import Fraction
N = 1
observations = []
def solve(r):
    hour_ok = 0 <= r['hour'] <= 24
    minute_ok = 0 <= r['minute'] < 60
    second_ok = 0 <= r['second'] < 60
    fraction_ok = 0 <= r['fraction'] < 1000
    end_label = r['hour'] == 24
    end_valid = not end_label or (r['minute'] == 0 and r['second'] == 0 and r['fraction'] == 0)
    valid = hour_ok and minute_ok and second_ok and fraction_ok
    day = r['day'] + int(end_label)
    hour = 0 if end_label else r['hour']
    coordinate = ((day*24+hour)*3600+r['minute']*60+r['second'])*1000+r['fraction']
    return [valid,[day,hour,r['minute'],r['second'],r['fraction']] if valid else None,r['day'] if valid and end_label else None,coordinate if valid else None]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve({'day': 10, 'hour': 24, 'minute': 0, 'second': 0, 'fraction': 0}), [True, [11, 0, 0, 0, 0], 10, 950400000])
check('fixture 2', solve({'day': 10, 'hour': 0, 'minute': 0, 'second': 0, 'fraction': 0}), [True, [10, 0, 0, 0, 0], None, 864000000])
check('fixture 3', solve({'day': 10, 'hour': 23, 'minute': 59, 'second': 59, 'fraction': 999}), [True, [10, 23, 59, 59, 999], None, 950399999])
check('fixture 4', solve({'day': -1, 'hour': 24, 'minute': 0, 'second': 0, 'fraction': 0}), [True, [0, 0, 0, 0, 0], -1, 0])
check('fixture 5', solve({'day': 10, 'hour': 24, 'minute': 0, 'second': 1, 'fraction': 0}), [False, None, None, None])
check('fixture 6', solve({'day': 10, 'hour': 24, 'minute': 0, 'second': 0, 'fraction': 1}), [False, None, None, None])
check('fixture 7', solve({'day': 10, 'hour': 24, 'minute': 1, 'second': 0, 'fraction': 0}), [False, None, None, None])
check('fixture 8', solve({'day': 10, 'hour': 25, 'minute': 0, 'second': 0, 'fraction': 0}), [False, None, None, None])
check('fixture 9', solve({'day': 10, 'hour': 12, 'minute': 60, 'second': 0, 'fraction': 0}), [False, None, None, None])
check('fixture 10', solve({'day': 10, 'hour': 12, 'minute': -1, 'second': 0, 'fraction': 0}), [False, None, None, None])
check('fixture 11', solve({'day': 10, 'hour': 12, 'minute': 0, 'second': 60, 'fraction': 0}), [False, None, None, None])
check('fixture 12', solve({'day': 10, 'hour': 12, 'minute': 0, 'second': -1, 'fraction': 0}), [False, None, None, None])
check('fixture 13', solve({'day': 10, 'hour': 12, 'minute': 0, 'second': 0, 'fraction': 1000}), [False, None, None, None])
check('fixture 14', solve({'day': 10, 'hour': 12, 'minute': 0, 'second': 0, 'fraction': -1}), [False, None, None, None])
check('fixture 15', solve({'day': 0, 'hour': 12, 'minute': 30, 'second': 1, 'fraction': 2}), [True, [0, 12, 30, 1, 2], None, 45001002])
variant = [({'day': 11, 'hour': 24, 'minute': 0, 'second': 0, 'fraction': 0}, [True, [12, 0, 0, 0, 0], 11, 1036800000]), ({'day': 12, 'hour': 24, 'minute': 0, 'second': 0, 'fraction': 0}, [True, [13, 0, 0, 0, 0], 12, 1123200000]), ({'day': 13, 'hour': 24, 'minute': 0, 'second': 0, 'fraction': 0}, [True, [14, 0, 0, 0, 0], 13, 1209600000]), ({'day': 14, 'hour': 24, 'minute': 0, 'second': 0, 'fraction': 0}, [True, [15, 0, 0, 0, 0], 14, 1296000000]), ({'day': 15, 'hour': 24, 'minute': 0, 'second': 0, 'fraction': 0}, [True, [16, 0, 0, 0, 0], 15, 1382400000])]
check("variant capture", solve(variant[N-1][0]), variant[N-1][1])
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)

source:
"""Failure Map reference implementation. Python standard library only."""
import json
from fractions import Fraction
N = 1
observations = []
def solve(r):
    hour_ok = 0 <= r['hour'] <= 24
    minute_ok = 0 <= r['minute'] < 60
    second_ok = 0 <= r['second'] < 60
    fraction_ok = 0 <= r['fraction'] < 1000
    end_label = r['hour'] == 24
    end_valid = not end_label or (r['minute'] == 0 and r['second'] == 0 and r['fraction'] == 0)
    valid = hour_ok and minute_ok and fraction_ok and end_valid
    day = r['day'] + int(end_label)
    hour = 0 if end_label else r['hour']
    coordinate = ((day*24+hour)*3600+r['minute']*60+r['second'])*1000+r['fraction']
    return [valid,[day,hour,r['minute'],r['second'],r['fraction']] if valid else None,r['day'] if valid and end_label else None,coordinate if valid else None]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve({'day': 10, 'hour': 24, 'minute': 0, 'second': 0, 'fraction': 0}), [True, [11, 0, 0, 0, 0], 10, 950400000])
check('fixture 2', solve({'day': 10, 'hour': 0, 'minute': 0, 'second': 0, 'fraction': 0}), [True, [10, 0, 0, 0, 0], None, 864000000])
check('fixture 3', solve({'day': 10, 'hour': 23, 'minute': 59, 'second': 59, 'fraction': 999}), [True, [10, 23, 59, 59, 999], None, 950399999])
check('fixture 4', solve({'day': -1, 'hour': 24, 'minute': 0, 'second': 0, 'fraction': 0}), [True, [0, 0, 0, 0, 0], -1, 0])
check('fixture 5', solve({'day': 10, 'hour': 24, 'minute': 0, 'second': 1, 'fraction': 0}), [False, None, None, None])
check('fixture 6', solve({'day': 10, 'hour': 24, 'minute': 0, 'second': 0, 'fraction': 1}), [False, None, None, None])
check('fixture 7', solve({'day': 10, 'hour': 24, 'minute': 1, 'second': 0, 'fraction': 0}), [False, None, None, None])
check('fixture 8', solve({'day': 10, 'hour': 25, 'minute': 0, 'second': 0, 'fraction': 0}), [False, None, None, None])
check('fixture 9', solve({'day': 10, 'hour': 12, 'minute': 60, 'second': 0, 'fraction': 0}), [False, None, None, None])
check('fixture 10', solve({'day': 10, 'hour': 12, 'minute': -1, 'second': 0, 'fraction': 0}), [False, None, None, None])
check('fixture 11', solve({'day': 10, 'hour': 12, 'minute': 0, 'second': 60, 'fraction': 0}), [False, None, None, None])
check('fixture 12', solve({'day': 10, 'hour': 12, 'minute': 0, 'second': -1, 'fraction': 0}), [False, None, None, None])
check('fixture 13', solve({'day': 10, 'hour': 12, 'minute': 0, 'second': 0, 'fraction': 1000}), [False, None, None, None])
check('fixture 14', solve({'day': 10, 'hour': 12, 'minute': 0, 'second': 0, 'fraction': -1}), [False, None, None, None])
check('fixture 15', solve({'day': 0, 'hour': 12, 'minute': 30, 'second': 1, 'fraction': 2}), [True, [0, 12, 30, 1, 2], None, 45001002])
variant = [({'day': 11, 'hour': 24, 'minute': 0, 'second': 0, 'fraction': 0}, [True, [12, 0, 0, 0, 0], 11, 1036800000]), ({'day': 12, 'hour': 24, 'minute': 0, 'second': 0, 'fraction': 0}, [True, [13, 0, 0, 0, 0], 12, 1123200000]), ({'day': 13, 'hour': 24, 'minute': 0, 'second': 0, 'fraction': 0}, [True, [14, 0, 0, 0, 0], 13, 1209600000]), ({'day': 14, 'hour': 24, 'minute': 0, 'second': 0, 'fraction': 0}, [True, [15, 0, 0, 0, 0], 14, 1296000000]), ({'day': 15, 'hour': 24, 'minute': 0, 'second': 0, 'fraction': 0}, [True, [16, 0, 0, 0, 0], 15, 1382400000])]
check("variant capture", solve(variant[N-1][0]), variant[N-1][1])
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)

prompt:
The decoded time state disagrees with the explicit regression oracle for valid.

Controlled local date index plus clock label permits ordinary 00:00:00 through 23:59:59, or exact 24:00:00 with zero fractional milliseconds only. Normalize 24:00 to following day 00:00, retaining end-of-day provenance for roundtrip. Date index is an abstract signed day, not Gregorian arithmetic. Return admission, normalized tuple, original-day provenance and total millisecond coordinate.

split: open-access


broken_source:
"""Failure Map reference implementation. Python standard library only."""
import json
from fractions import Fraction
N = 1
observations = []
def solve(r):
    hour_ok = 0 <= r['hour'] <= 24
    minute_ok = 0 <= r['minute'] < 60
    second_ok = 0 <= r['second'] < 60
    fraction_ok = 0 <= r['fraction'] < 1000
    end_label = r['hour'] == 24
    end_valid = not end_label or (r['minute'] == 0 and r['second'] == 0 and r['fraction'] == 0)
    valid = hour_ok and minute_ok and second_ok and fraction_ok and end_valid
    day = r['day']
    hour = 0 if end_label else r['hour']
    coordinate = ((day*24+hour)*3600+r['minute']*60+r['second'])*1000+r['fraction']
    return [valid,[day,hour,r['minute'],r['second'],r['fraction']] if valid else None,r['day'] if valid and end_label else None,coordinate if valid else None]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve({'day': 10, 'hour': 24, 'minute': 0, 'second': 0, 'fraction': 0}), [True, [11, 0, 0, 0, 0], 10, 950400000])
check('fixture 2', solve({'day': 10, 'hour': 0, 'minute': 0, 'second': 0, 'fraction': 0}), [True, [10, 0, 0, 0, 0], None, 864000000])
check('fixture 3', solve({'day': 10, 'hour': 23, 'minute': 59, 'second': 59, 'fraction': 999}), [True, [10, 23, 59, 59, 999], None, 950399999])
check('fixture 4', solve({'day': -1, 'hour': 24, 'minute': 0, 'second': 0, 'fraction': 0}), [True, [0, 0, 0, 0, 0], -1, 0])
check('fixture 5', solve({'day': 10, 'hour': 24, 'minute': 0, 'second': 1, 'fraction': 0}), [False, None, None, None])
check('fixture 6', solve({'day': 10, 'hour': 24, 'minute': 0, 'second': 0, 'fraction': 1}), [False, None, None, None])
check('fixture 7', solve({'day': 10, 'hour': 24, 'minute': 1, 'second': 0, 'fraction': 0}), [False, None, None, None])
check('fixture 8', solve({'day': 10, 'hour': 25, 'minute': 0, 'second': 0, 'fraction': 0}), [False, None, None, None])
check('fixture 9', solve({'day': 10, 'hour': 12, 'minute': 60, 'second': 0, 'fraction': 0}), [False, None, None, None])
check('fixture 10', solve({'day': 10, 'hour': 12, 'minute': -1, 'second': 0, 'fraction': 0}), [False, None, None, None])
check('fixture 11', solve({'day': 10, 'hour': 12, 'minute': 0, 'second': 60, 'fraction': 0}), [False, None, None, None])
check('fixture 12', solve({'day': 10, 'hour': 12, 'minute': 0, 'second': -1, 'fraction': 0}), [False, None, None, None])
check('fixture 13', solve({'day': 10, 'hour': 12, 'minute': 0, 'second': 0, 'fraction': 1000}), [False, None, None, None])
check('fixture 14', solve({'day': 10, 'hour': 12, 'minute': 0, 'second': 0, 'fraction': -1}), [False, None, None, None])
check('fixture 15', solve({'day': 0, 'hour': 12, 'minute': 30, 'second': 1, 'fraction': 2}), [True, [0, 12, 30, 1, 2], None, 45001002])
variant = [({'day': 11, 'hour': 24, 'minute': 0, 'second': 0, 'fraction': 0}, [True, [12, 0, 0, 0, 0], 11, 1036800000]), ({'day': 12, 'hour': 24, 'minute': 0, 'second': 0, 'fraction': 0}, [True, [13, 0, 0, 0, 0], 12, 1123200000]), ({'day': 13, 'hour': 24, 'minute': 0, 'second': 0, 'fraction': 0}, [True, [14, 0, 0, 0, 0], 13, 1209600000]), ({'day': 14, 'hour': 24, 'minute': 0, 'second': 0, 'fraction': 0}, [True, [15, 0, 0, 0, 0], 14, 1296000000]), ({'day': 15, 'hour': 24, 'minute': 0, 'second': 0, 'fraction': 0}, [True, [16, 0, 0, 0, 0], 15, 1382400000])]
check("variant capture", solve(variant[N-1][0]), variant[N-1][1])
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)

source:
"""Failure Map reference implementation. Python standard library only."""
import json
from fractions import Fraction
N = 1
observations = []
def solve(r):
    hour_ok = 0 <= r['hour'] <= 24
    minute_ok = 0 <= r['minute'] < 60
    second_ok = 0 <= r['second'] < 60
    fraction_ok = 0 <= r['fraction'] < 1000
    end_label = r['hour'] == 24
    end_valid = not end_label or (r['minute'] == 0 and r['second'] == 0 and r['fraction'] == 0)
    valid = hour_ok and minute_ok and second_ok and fraction_ok and end_valid
    day = r['day'] + 1
    hour = 0 if end_label else r['hour']
    coordinate = ((day*24+hour)*3600+r['minute']*60+r['second'])*1000+r['fraction']
    return [valid,[day,hour,r['minute'],r['second'],r['fraction']] if valid else None,r['day'] if valid and end_label else None,coordinate if valid else None]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve({'day': 10, 'hour': 24, 'minute': 0, 'second': 0, 'fraction': 0}), [True, [11, 0, 0, 0, 0], 10, 950400000])
check('fixture 2', solve({'day': 10, 'hour': 0, 'minute': 0, 'second': 0, 'fraction': 0}), [True, [10, 0, 0, 0, 0], None, 864000000])
check('fixture 3', solve({'day': 10, 'hour': 23, 'minute': 59, 'second': 59, 'fraction': 999}), [True, [10, 23, 59, 59, 999], None, 950399999])
check('fixture 4', solve({'day': -1, 'hour': 24, 'minute': 0, 'second': 0, 'fraction': 0}), [True, [0, 0, 0, 0, 0], -1, 0])
check('fixture 5', solve({'day': 10, 'hour': 24, 'minute': 0, 'second': 1, 'fraction': 0}), [False, None, None, None])
check('fixture 6', solve({'day': 10, 'hour': 24, 'minute': 0, 'second': 0, 'fraction': 1}), [False, None, None, None])
check('fixture 7', solve({'day': 10, 'hour': 24, 'minute': 1, 'second': 0, 'fraction': 0}), [False, None, None, None])
check('fixture 8', solve({'day': 10, 'hour': 25, 'minute': 0, 'second': 0, 'fraction': 0}), [False, None, None, None])
check('fixture 9', solve({'day': 10, 'hour': 12, 'minute': 60, 'second': 0, 'fraction': 0}), [False, None, None, None])
check('fixture 10', solve({'day': 10, 'hour': 12, 'minute': -1, 'second': 0, 'fraction': 0}), [False, None, None, None])
check('fixture 11', solve({'day': 10, 'hour': 12, 'minute': 0, 'second': 60, 'fraction': 0}), [False, None, None, None])
check('fixture 12', solve({'day': 10, 'hour': 12, 'minute': 0, 'second': -1, 'fraction': 0}), [False, None, None, None])
check('fixture 13', solve({'day': 10, 'hour': 12, 'minute': 0, 'second': 0, 'fraction': 1000}), [False, None, None, None])
check('fixture 14', solve({'day': 10, 'hour': 12, 'minute': 0, 'second': 0, 'fraction': -1}), [False, None, None, None])
check('fixture 15', solve({'day': 0, 'hour': 12, 'minute': 30, 'second': 1, 'fraction': 2}), [True, [0, 12, 30, 1, 2], None, 45001002])
variant = [({'day': 11, 'hour': 24, 'minute': 0, 'second': 0, 'fraction': 0}, [True, [12, 0, 0, 0, 0], 11, 1036800000]), ({'day': 12, 'hour': 24, 'minute': 0, 'second': 0, 'fraction': 0}, [True, [13, 0, 0, 0, 0], 12, 1123200000]), ({'day': 13, 'hour': 24, 'minute': 0, 'second': 0, 'fraction': 0}, [True, [14, 0, 0, 0, 0], 13, 1209600000]), ({'day': 14, 'hour': 24, 'minute': 0, 'second': 0, 'fraction': 0}, [True, [15, 0, 0, 0, 0], 14, 1296000000]), ({'day': 15, 'hour': 24, 'minute': 0, 'second': 0, 'fraction': 0}, [True, [16, 0, 0, 0, 0], 15, 1382400000])]
check("variant capture", solve(variant[N-1][0]), variant[N-1][1])
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)

prompt:
The decoded time state disagrees with the explicit regression oracle for day.

Controlled local date index plus clock label permits ordinary 00:00:00 through 23:59:59, or exact 24:00:00 with zero fractional milliseconds only. Normalize 24:00 to following day 00:00, retaining end-of-day provenance for roundtrip. Date index is an abstract signed day, not Gregorian arithmetic. Return admission, normalized tuple, original-day provenance and total millisecond coordinate.

split: open-access