broken_source:
"""Failure Map reference implementation. Python standard library only."""
import json
from fractions import Fraction
N = 1
observations = []
def solve(r):
    old_candidate = r['local'] - r['old']
    new_candidate = r['local'] - r['new']
    old_valid = old_candidate < r['transition']
    new_valid = new_candidate >= r['transition']
    candidates = sorted(set(([old_candidate] if old_valid else []) + ([new_candidate] if new_valid else [])))
    count = len(candidates)
    ambiguous = count == 2
    chosen = None if count == 0 or (ambiguous and r['policy'] == 'reject') else candidates[-1 if r['policy'] == 'later' else 0]
    offset = None if chosen is None else r['new']
    roundtrip = None if chosen is None else chosen + offset
    return [candidates,ambiguous,chosen,offset,roundtrip]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve({'local': 109, 'old': 20, 'new': 10, 'transition': 100, 'policy': 'earlier'}), [[89], False, 89, 20, 109])
check('fixture 2', solve({'local': 110, 'old': 20, 'new': 10, 'transition': 100, 'policy': 'earlier'}), [[90, 100], True, 90, 20, 110])
check('fixture 3', solve({'local': 110, 'old': 20, 'new': 10, 'transition': 100, 'policy': 'later'}), [[90, 100], True, 100, 10, 110])
check('fixture 4', solve({'local': 110, 'old': 20, 'new': 10, 'transition': 100, 'policy': 'reject'}), [[90, 100], True, None, None, None])
check('fixture 5', solve({'local': 119, 'old': 20, 'new': 10, 'transition': 100, 'policy': 'later'}), [[99, 109], True, 109, 10, 119])
check('fixture 6', solve({'local': 120, 'old': 20, 'new': 10, 'transition': 100, 'policy': 'earlier'}), [[110], False, 110, 10, 120])
check('fixture 7', solve({'local': 100, 'old': 20, 'new': 10, 'transition': 100, 'policy': 'later'}), [[80], False, 80, 20, 100])
check('fixture 8', solve({'local': 130, 'old': 20, 'new': 10, 'transition': 100, 'policy': 'reject'}), [[120], False, 120, 10, 130])
check('fixture 9', solve({'local': -20, 'old': 20, 'new': 10, 'transition': 100, 'policy': 'earlier'}), [[-40], False, -40, 20, -20])
check('fixture 10', solve({'local': 115, 'old': 20, 'new': 10, 'transition': 100, 'policy': 'later'}), [[95, 105], True, 105, 10, 115])
variant = [({'local': 110, 'old': 20, 'new': 10, 'transition': 100, 'policy': 'earlier'}, [[90, 100], True, 90, 20, 110]), ({'local': 111, 'old': 20, 'new': 10, 'transition': 100, 'policy': 'earlier'}, [[91, 101], True, 91, 20, 111]), ({'local': 112, 'old': 20, 'new': 10, 'transition': 100, 'policy': 'earlier'}, [[92, 102], True, 92, 20, 112]), ({'local': 113, 'old': 20, 'new': 10, 'transition': 100, 'policy': 'earlier'}, [[93, 103], True, 93, 20, 113]), ({'local': 114, 'old': 20, 'new': 10, 'transition': 100, 'policy': 'earlier'}, [[94, 104], True, 94, 20, 114])]
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):
    old_candidate = r['local'] - r['old']
    new_candidate = r['local'] - r['new']
    old_valid = old_candidate < r['transition']
    new_valid = new_candidate >= r['transition']
    candidates = sorted(set(([old_candidate] if old_valid else []) + ([new_candidate] if new_valid else [])))
    count = len(candidates)
    ambiguous = count == 2
    chosen = None if count == 0 or (ambiguous and r['policy'] == 'reject') else candidates[-1 if r['policy'] == 'later' else 0]
    offset = None if chosen is None else r['old']
    roundtrip = None if chosen is None else chosen + offset
    return [candidates,ambiguous,chosen,offset,roundtrip]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve({'local': 109, 'old': 20, 'new': 10, 'transition': 100, 'policy': 'earlier'}), [[89], False, 89, 20, 109])
check('fixture 2', solve({'local': 110, 'old': 20, 'new': 10, 'transition': 100, 'policy': 'earlier'}), [[90, 100], True, 90, 20, 110])
check('fixture 3', solve({'local': 110, 'old': 20, 'new': 10, 'transition': 100, 'policy': 'later'}), [[90, 100], True, 100, 10, 110])
check('fixture 4', solve({'local': 110, 'old': 20, 'new': 10, 'transition': 100, 'policy': 'reject'}), [[90, 100], True, None, None, None])
check('fixture 5', solve({'local': 119, 'old': 20, 'new': 10, 'transition': 100, 'policy': 'later'}), [[99, 109], True, 109, 10, 119])
check('fixture 6', solve({'local': 120, 'old': 20, 'new': 10, 'transition': 100, 'policy': 'earlier'}), [[110], False, 110, 10, 120])
check('fixture 7', solve({'local': 100, 'old': 20, 'new': 10, 'transition': 100, 'policy': 'later'}), [[80], False, 80, 20, 100])
check('fixture 8', solve({'local': 130, 'old': 20, 'new': 10, 'transition': 100, 'policy': 'reject'}), [[120], False, 120, 10, 130])
check('fixture 9', solve({'local': -20, 'old': 20, 'new': 10, 'transition': 100, 'policy': 'earlier'}), [[-40], False, -40, 20, -20])
check('fixture 10', solve({'local': 115, 'old': 20, 'new': 10, 'transition': 100, 'policy': 'later'}), [[95, 105], True, 105, 10, 115])
variant = [({'local': 110, 'old': 20, 'new': 10, 'transition': 100, 'policy': 'earlier'}, [[90, 100], True, 90, 20, 110]), ({'local': 111, 'old': 20, 'new': 10, 'transition': 100, 'policy': 'earlier'}, [[91, 101], True, 91, 20, 111]), ({'local': 112, 'old': 20, 'new': 10, 'transition': 100, 'policy': 'earlier'}, [[92, 102], True, 92, 20, 112]), ({'local': 113, 'old': 20, 'new': 10, 'transition': 100, 'policy': 'earlier'}, [[93, 103], True, 93, 20, 113]), ({'local': 114, 'old': 20, 'new': 10, 'transition': 100, 'policy': 'earlier'}, [[94, 104], True, 94, 20, 114])]
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 offset.

A stipulated backward offset transition at UTC T changes larger old offset to smaller new offset. Candidate UTC coordinates local-offset are admitted on their owning sides (<T old, >=T new). Return sorted unique candidates, ambiguity flag, selected instant under earlier/later/reject policy, selected offset and civil roundtrip. No timezone database 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):
    old_candidate = r['local'] - r['old']
    new_candidate = r['local'] - r['new']
    old_valid = old_candidate < r['transition']
    new_valid = new_candidate >= r['transition']
    candidates = sorted(set(([old_candidate] if old_valid else []) + ([new_candidate] if new_valid else [])))
    count = len(candidates)
    ambiguous = count == 2
    chosen = None if count == 0 or (ambiguous and r['policy'] == 'reject') else candidates[-1 if r['policy'] == 'later' else 0]
    offset = None if chosen is None else (r['old'] if chosen < r['transition'] else r['new'])
    roundtrip = chosen
    return [candidates,ambiguous,chosen,offset,roundtrip]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve({'local': 109, 'old': 20, 'new': 10, 'transition': 100, 'policy': 'earlier'}), [[89], False, 89, 20, 109])
check('fixture 2', solve({'local': 110, 'old': 20, 'new': 10, 'transition': 100, 'policy': 'earlier'}), [[90, 100], True, 90, 20, 110])
check('fixture 3', solve({'local': 110, 'old': 20, 'new': 10, 'transition': 100, 'policy': 'later'}), [[90, 100], True, 100, 10, 110])
check('fixture 4', solve({'local': 110, 'old': 20, 'new': 10, 'transition': 100, 'policy': 'reject'}), [[90, 100], True, None, None, None])
check('fixture 5', solve({'local': 119, 'old': 20, 'new': 10, 'transition': 100, 'policy': 'later'}), [[99, 109], True, 109, 10, 119])
check('fixture 6', solve({'local': 120, 'old': 20, 'new': 10, 'transition': 100, 'policy': 'earlier'}), [[110], False, 110, 10, 120])
check('fixture 7', solve({'local': 100, 'old': 20, 'new': 10, 'transition': 100, 'policy': 'later'}), [[80], False, 80, 20, 100])
check('fixture 8', solve({'local': 130, 'old': 20, 'new': 10, 'transition': 100, 'policy': 'reject'}), [[120], False, 120, 10, 130])
check('fixture 9', solve({'local': -20, 'old': 20, 'new': 10, 'transition': 100, 'policy': 'earlier'}), [[-40], False, -40, 20, -20])
check('fixture 10', solve({'local': 115, 'old': 20, 'new': 10, 'transition': 100, 'policy': 'later'}), [[95, 105], True, 105, 10, 115])
variant = [({'local': 110, 'old': 20, 'new': 10, 'transition': 100, 'policy': 'earlier'}, [[90, 100], True, 90, 20, 110]), ({'local': 111, 'old': 20, 'new': 10, 'transition': 100, 'policy': 'earlier'}, [[91, 101], True, 91, 20, 111]), ({'local': 112, 'old': 20, 'new': 10, 'transition': 100, 'policy': 'earlier'}, [[92, 102], True, 92, 20, 112]), ({'local': 113, 'old': 20, 'new': 10, 'transition': 100, 'policy': 'earlier'}, [[93, 103], True, 93, 20, 113]), ({'local': 114, 'old': 20, 'new': 10, 'transition': 100, 'policy': 'earlier'}, [[94, 104], True, 94, 20, 114])]
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):
    old_candidate = r['local'] - r['old']
    new_candidate = r['local'] - r['new']
    old_valid = old_candidate < r['transition']
    new_valid = new_candidate >= r['transition']
    candidates = sorted(set(([old_candidate] if old_valid else []) + ([new_candidate] if new_valid else [])))
    count = len(candidates)
    ambiguous = count == 2
    chosen = None if count == 0 or (ambiguous and r['policy'] == 'reject') else candidates[-1 if r['policy'] == 'later' else 0]
    offset = None if chosen is None else (r['old'] if chosen < r['transition'] else r['new'])
    roundtrip = None if chosen is None else chosen - offset
    return [candidates,ambiguous,chosen,offset,roundtrip]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve({'local': 109, 'old': 20, 'new': 10, 'transition': 100, 'policy': 'earlier'}), [[89], False, 89, 20, 109])
check('fixture 2', solve({'local': 110, 'old': 20, 'new': 10, 'transition': 100, 'policy': 'earlier'}), [[90, 100], True, 90, 20, 110])
check('fixture 3', solve({'local': 110, 'old': 20, 'new': 10, 'transition': 100, 'policy': 'later'}), [[90, 100], True, 100, 10, 110])
check('fixture 4', solve({'local': 110, 'old': 20, 'new': 10, 'transition': 100, 'policy': 'reject'}), [[90, 100], True, None, None, None])
check('fixture 5', solve({'local': 119, 'old': 20, 'new': 10, 'transition': 100, 'policy': 'later'}), [[99, 109], True, 109, 10, 119])
check('fixture 6', solve({'local': 120, 'old': 20, 'new': 10, 'transition': 100, 'policy': 'earlier'}), [[110], False, 110, 10, 120])
check('fixture 7', solve({'local': 100, 'old': 20, 'new': 10, 'transition': 100, 'policy': 'later'}), [[80], False, 80, 20, 100])
check('fixture 8', solve({'local': 130, 'old': 20, 'new': 10, 'transition': 100, 'policy': 'reject'}), [[120], False, 120, 10, 130])
check('fixture 9', solve({'local': -20, 'old': 20, 'new': 10, 'transition': 100, 'policy': 'earlier'}), [[-40], False, -40, 20, -20])
check('fixture 10', solve({'local': 115, 'old': 20, 'new': 10, 'transition': 100, 'policy': 'later'}), [[95, 105], True, 105, 10, 115])
variant = [({'local': 110, 'old': 20, 'new': 10, 'transition': 100, 'policy': 'earlier'}, [[90, 100], True, 90, 20, 110]), ({'local': 111, 'old': 20, 'new': 10, 'transition': 100, 'policy': 'earlier'}, [[91, 101], True, 91, 20, 111]), ({'local': 112, 'old': 20, 'new': 10, 'transition': 100, 'policy': 'earlier'}, [[92, 102], True, 92, 20, 112]), ({'local': 113, 'old': 20, 'new': 10, 'transition': 100, 'policy': 'earlier'}, [[93, 103], True, 93, 20, 113]), ({'local': 114, 'old': 20, 'new': 10, 'transition': 100, 'policy': 'earlier'}, [[94, 104], True, 94, 20, 114])]
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 roundtrip.

A stipulated backward offset transition at UTC T changes larger old offset to smaller new offset. Candidate UTC coordinates local-offset are admitted on their owning sides (<T old, >=T new). Return sorted unique candidates, ambiguity flag, selected instant under earlier/later/reject policy, selected offset and civil roundtrip. No timezone database 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):
    start = r['transition'] - r['old']
    end = r['transition'] + r['new']
    width = r['new'] - r['old']
    in_gap = start <= r['local'] < end
    shift = (width if r['policy'] == 'forward' else -width) if in_gap and r['policy'] != 'reject' else 0
    resolved = None if in_gap and r['policy'] == 'reject' else r['local'] + shift
    offset = None if resolved is None else (r['old'] if resolved < start else r['new'])
    utc = None if resolved is None else resolved - offset
    direction = (shift > 0) - (shift < 0)
    changed = resolved is not None and resolved != r['local']
    return [resolved,utc,direction,changed]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve({'local': 109, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'forward'}), [109, 99, 0, False])
check('fixture 2', solve({'local': 110, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'forward'}), [130, 100, 1, True])
check('fixture 3', solve({'local': 110, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'backward'}), [90, 80, -1, True])
check('fixture 4', solve({'local': 110, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'reject'}), [None, None, 0, False])
check('fixture 5', solve({'local': 129, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'backward'}), [109, 99, -1, True])
check('fixture 6', solve({'local': 130, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'reject'}), [130, 100, 0, False])
check('fixture 7', solve({'local': 120, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'forward'}), [140, 110, 1, True])
check('fixture 8', solve({'local': 120, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'reject'}), [None, None, 0, False])
check('fixture 9', solve({'local': -20, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'backward'}), [-20, -30, 0, False])
check('fixture 10', solve({'local': 140, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'forward'}), [140, 110, 0, False])
variant = [({'local': 110, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'forward'}, [130, 100, 1, True]), ({'local': 111, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'forward'}, [131, 101, 1, True]), ({'local': 112, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'forward'}, [132, 102, 1, True]), ({'local': 113, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'forward'}, [133, 103, 1, True]), ({'local': 114, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'forward'}, [134, 104, 1, True])]
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):
    start = r['transition'] + r['new']
    end = r['transition'] + r['new']
    width = r['new'] - r['old']
    in_gap = start <= r['local'] < end
    shift = (width if r['policy'] == 'forward' else -width) if in_gap and r['policy'] != 'reject' else 0
    resolved = None if in_gap and r['policy'] == 'reject' else r['local'] + shift
    offset = None if resolved is None else (r['old'] if resolved < start else r['new'])
    utc = None if resolved is None else resolved - offset
    direction = (shift > 0) - (shift < 0)
    changed = resolved is not None and resolved != r['local']
    return [resolved,utc,direction,changed]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve({'local': 109, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'forward'}), [109, 99, 0, False])
check('fixture 2', solve({'local': 110, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'forward'}), [130, 100, 1, True])
check('fixture 3', solve({'local': 110, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'backward'}), [90, 80, -1, True])
check('fixture 4', solve({'local': 110, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'reject'}), [None, None, 0, False])
check('fixture 5', solve({'local': 129, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'backward'}), [109, 99, -1, True])
check('fixture 6', solve({'local': 130, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'reject'}), [130, 100, 0, False])
check('fixture 7', solve({'local': 120, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'forward'}), [140, 110, 1, True])
check('fixture 8', solve({'local': 120, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'reject'}), [None, None, 0, False])
check('fixture 9', solve({'local': -20, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'backward'}), [-20, -30, 0, False])
check('fixture 10', solve({'local': 140, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'forward'}), [140, 110, 0, False])
variant = [({'local': 110, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'forward'}, [130, 100, 1, True]), ({'local': 111, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'forward'}, [131, 101, 1, True]), ({'local': 112, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'forward'}, [132, 102, 1, True]), ({'local': 113, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'forward'}, [133, 103, 1, True]), ({'local': 114, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'forward'}, [134, 104, 1, True])]
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 start.

A stipulated forward offset transition at UTC T creates local gap [T+old,T+new). Reject returns None, forward adds gap width and backward subtracts it, preserving position in the gap. Return resolved local coordinate, UTC coordinate, shift direction and successful-change flag. Outside-gap labels are unchanged.

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):
    start = r['transition'] + r['old']
    end = r['transition'] - r['new']
    width = r['new'] - r['old']
    in_gap = start <= r['local'] < end
    shift = (width if r['policy'] == 'forward' else -width) if in_gap and r['policy'] != 'reject' else 0
    resolved = None if in_gap and r['policy'] == 'reject' else r['local'] + shift
    offset = None if resolved is None else (r['old'] if resolved < start else r['new'])
    utc = None if resolved is None else resolved - offset
    direction = (shift > 0) - (shift < 0)
    changed = resolved is not None and resolved != r['local']
    return [resolved,utc,direction,changed]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve({'local': 109, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'forward'}), [109, 99, 0, False])
check('fixture 2', solve({'local': 110, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'forward'}), [130, 100, 1, True])
check('fixture 3', solve({'local': 110, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'backward'}), [90, 80, -1, True])
check('fixture 4', solve({'local': 110, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'reject'}), [None, None, 0, False])
check('fixture 5', solve({'local': 129, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'backward'}), [109, 99, -1, True])
check('fixture 6', solve({'local': 130, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'reject'}), [130, 100, 0, False])
check('fixture 7', solve({'local': 120, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'forward'}), [140, 110, 1, True])
check('fixture 8', solve({'local': 120, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'reject'}), [None, None, 0, False])
check('fixture 9', solve({'local': -20, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'backward'}), [-20, -30, 0, False])
check('fixture 10', solve({'local': 140, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'forward'}), [140, 110, 0, False])
variant = [({'local': 110, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'forward'}, [130, 100, 1, True]), ({'local': 111, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'forward'}, [131, 101, 1, True]), ({'local': 112, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'forward'}, [132, 102, 1, True]), ({'local': 113, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'forward'}, [133, 103, 1, True]), ({'local': 114, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'forward'}, [134, 104, 1, True])]
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):
    start = r['transition'] + r['old']
    end = r['transition'] + r['old']
    width = r['new'] - r['old']
    in_gap = start <= r['local'] < end
    shift = (width if r['policy'] == 'forward' else -width) if in_gap and r['policy'] != 'reject' else 0
    resolved = None if in_gap and r['policy'] == 'reject' else r['local'] + shift
    offset = None if resolved is None else (r['old'] if resolved < start else r['new'])
    utc = None if resolved is None else resolved - offset
    direction = (shift > 0) - (shift < 0)
    changed = resolved is not None and resolved != r['local']
    return [resolved,utc,direction,changed]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve({'local': 109, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'forward'}), [109, 99, 0, False])
check('fixture 2', solve({'local': 110, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'forward'}), [130, 100, 1, True])
check('fixture 3', solve({'local': 110, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'backward'}), [90, 80, -1, True])
check('fixture 4', solve({'local': 110, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'reject'}), [None, None, 0, False])
check('fixture 5', solve({'local': 129, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'backward'}), [109, 99, -1, True])
check('fixture 6', solve({'local': 130, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'reject'}), [130, 100, 0, False])
check('fixture 7', solve({'local': 120, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'forward'}), [140, 110, 1, True])
check('fixture 8', solve({'local': 120, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'reject'}), [None, None, 0, False])
check('fixture 9', solve({'local': -20, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'backward'}), [-20, -30, 0, False])
check('fixture 10', solve({'local': 140, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'forward'}), [140, 110, 0, False])
variant = [({'local': 110, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'forward'}, [130, 100, 1, True]), ({'local': 111, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'forward'}, [131, 101, 1, True]), ({'local': 112, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'forward'}, [132, 102, 1, True]), ({'local': 113, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'forward'}, [133, 103, 1, True]), ({'local': 114, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'forward'}, [134, 104, 1, True])]
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.

A stipulated forward offset transition at UTC T creates local gap [T+old,T+new). Reject returns None, forward adds gap width and backward subtracts it, preserving position in the gap. Return resolved local coordinate, UTC coordinate, shift direction and successful-change flag. Outside-gap labels are unchanged.

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):
    start = r['transition'] + r['old']
    end = r['transition'] + r['new']
    width = r['new'] + r['old']
    in_gap = start <= r['local'] < end
    shift = (width if r['policy'] == 'forward' else -width) if in_gap and r['policy'] != 'reject' else 0
    resolved = None if in_gap and r['policy'] == 'reject' else r['local'] + shift
    offset = None if resolved is None else (r['old'] if resolved < start else r['new'])
    utc = None if resolved is None else resolved - offset
    direction = (shift > 0) - (shift < 0)
    changed = resolved is not None and resolved != r['local']
    return [resolved,utc,direction,changed]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve({'local': 109, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'forward'}), [109, 99, 0, False])
check('fixture 2', solve({'local': 110, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'forward'}), [130, 100, 1, True])
check('fixture 3', solve({'local': 110, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'backward'}), [90, 80, -1, True])
check('fixture 4', solve({'local': 110, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'reject'}), [None, None, 0, False])
check('fixture 5', solve({'local': 129, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'backward'}), [109, 99, -1, True])
check('fixture 6', solve({'local': 130, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'reject'}), [130, 100, 0, False])
check('fixture 7', solve({'local': 120, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'forward'}), [140, 110, 1, True])
check('fixture 8', solve({'local': 120, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'reject'}), [None, None, 0, False])
check('fixture 9', solve({'local': -20, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'backward'}), [-20, -30, 0, False])
check('fixture 10', solve({'local': 140, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'forward'}), [140, 110, 0, False])
variant = [({'local': 110, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'forward'}, [130, 100, 1, True]), ({'local': 111, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'forward'}, [131, 101, 1, True]), ({'local': 112, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'forward'}, [132, 102, 1, True]), ({'local': 113, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'forward'}, [133, 103, 1, True]), ({'local': 114, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'forward'}, [134, 104, 1, True])]
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):
    start = r['transition'] + r['old']
    end = r['transition'] + r['new']
    width = r['old'] - r['new']
    in_gap = start <= r['local'] < end
    shift = (width if r['policy'] == 'forward' else -width) if in_gap and r['policy'] != 'reject' else 0
    resolved = None if in_gap and r['policy'] == 'reject' else r['local'] + shift
    offset = None if resolved is None else (r['old'] if resolved < start else r['new'])
    utc = None if resolved is None else resolved - offset
    direction = (shift > 0) - (shift < 0)
    changed = resolved is not None and resolved != r['local']
    return [resolved,utc,direction,changed]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve({'local': 109, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'forward'}), [109, 99, 0, False])
check('fixture 2', solve({'local': 110, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'forward'}), [130, 100, 1, True])
check('fixture 3', solve({'local': 110, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'backward'}), [90, 80, -1, True])
check('fixture 4', solve({'local': 110, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'reject'}), [None, None, 0, False])
check('fixture 5', solve({'local': 129, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'backward'}), [109, 99, -1, True])
check('fixture 6', solve({'local': 130, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'reject'}), [130, 100, 0, False])
check('fixture 7', solve({'local': 120, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'forward'}), [140, 110, 1, True])
check('fixture 8', solve({'local': 120, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'reject'}), [None, None, 0, False])
check('fixture 9', solve({'local': -20, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'backward'}), [-20, -30, 0, False])
check('fixture 10', solve({'local': 140, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'forward'}), [140, 110, 0, False])
variant = [({'local': 110, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'forward'}, [130, 100, 1, True]), ({'local': 111, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'forward'}, [131, 101, 1, True]), ({'local': 112, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'forward'}, [132, 102, 1, True]), ({'local': 113, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'forward'}, [133, 103, 1, True]), ({'local': 114, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'forward'}, [134, 104, 1, True])]
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 width.

A stipulated forward offset transition at UTC T creates local gap [T+old,T+new). Reject returns None, forward adds gap width and backward subtracts it, preserving position in the gap. Return resolved local coordinate, UTC coordinate, shift direction and successful-change flag. Outside-gap labels are unchanged.

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):
    start = r['transition'] + r['old']
    end = r['transition'] + r['new']
    width = r['new'] - r['old']
    in_gap = start < r['local'] <= end
    shift = (width if r['policy'] == 'forward' else -width) if in_gap and r['policy'] != 'reject' else 0
    resolved = None if in_gap and r['policy'] == 'reject' else r['local'] + shift
    offset = None if resolved is None else (r['old'] if resolved < start else r['new'])
    utc = None if resolved is None else resolved - offset
    direction = (shift > 0) - (shift < 0)
    changed = resolved is not None and resolved != r['local']
    return [resolved,utc,direction,changed]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve({'local': 109, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'forward'}), [109, 99, 0, False])
check('fixture 2', solve({'local': 110, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'forward'}), [130, 100, 1, True])
check('fixture 3', solve({'local': 110, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'backward'}), [90, 80, -1, True])
check('fixture 4', solve({'local': 110, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'reject'}), [None, None, 0, False])
check('fixture 5', solve({'local': 129, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'backward'}), [109, 99, -1, True])
check('fixture 6', solve({'local': 130, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'reject'}), [130, 100, 0, False])
check('fixture 7', solve({'local': 120, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'forward'}), [140, 110, 1, True])
check('fixture 8', solve({'local': 120, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'reject'}), [None, None, 0, False])
check('fixture 9', solve({'local': -20, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'backward'}), [-20, -30, 0, False])
check('fixture 10', solve({'local': 140, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'forward'}), [140, 110, 0, False])
variant = [({'local': 110, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'forward'}, [130, 100, 1, True]), ({'local': 111, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'forward'}, [131, 101, 1, True]), ({'local': 112, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'forward'}, [132, 102, 1, True]), ({'local': 113, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'forward'}, [133, 103, 1, True]), ({'local': 114, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'forward'}, [134, 104, 1, True])]
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):
    start = r['transition'] + r['old']
    end = r['transition'] + r['new']
    width = r['new'] - r['old']
    in_gap = start <= r['local'] <= end
    shift = (width if r['policy'] == 'forward' else -width) if in_gap and r['policy'] != 'reject' else 0
    resolved = None if in_gap and r['policy'] == 'reject' else r['local'] + shift
    offset = None if resolved is None else (r['old'] if resolved < start else r['new'])
    utc = None if resolved is None else resolved - offset
    direction = (shift > 0) - (shift < 0)
    changed = resolved is not None and resolved != r['local']
    return [resolved,utc,direction,changed]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve({'local': 109, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'forward'}), [109, 99, 0, False])
check('fixture 2', solve({'local': 110, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'forward'}), [130, 100, 1, True])
check('fixture 3', solve({'local': 110, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'backward'}), [90, 80, -1, True])
check('fixture 4', solve({'local': 110, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'reject'}), [None, None, 0, False])
check('fixture 5', solve({'local': 129, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'backward'}), [109, 99, -1, True])
check('fixture 6', solve({'local': 130, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'reject'}), [130, 100, 0, False])
check('fixture 7', solve({'local': 120, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'forward'}), [140, 110, 1, True])
check('fixture 8', solve({'local': 120, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'reject'}), [None, None, 0, False])
check('fixture 9', solve({'local': -20, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'backward'}), [-20, -30, 0, False])
check('fixture 10', solve({'local': 140, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'forward'}), [140, 110, 0, False])
variant = [({'local': 110, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'forward'}, [130, 100, 1, True]), ({'local': 111, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'forward'}, [131, 101, 1, True]), ({'local': 112, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'forward'}, [132, 102, 1, True]), ({'local': 113, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'forward'}, [133, 103, 1, True]), ({'local': 114, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'forward'}, [134, 104, 1, True])]
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 in_gap.

A stipulated forward offset transition at UTC T creates local gap [T+old,T+new). Reject returns None, forward adds gap width and backward subtracts it, preserving position in the gap. Return resolved local coordinate, UTC coordinate, shift direction and successful-change flag. Outside-gap labels are unchanged.

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):
    start = r['transition'] + r['old']
    end = r['transition'] + r['new']
    width = r['new'] - r['old']
    in_gap = start <= r['local'] < end
    shift = width if in_gap else 0
    resolved = None if in_gap and r['policy'] == 'reject' else r['local'] + shift
    offset = None if resolved is None else (r['old'] if resolved < start else r['new'])
    utc = None if resolved is None else resolved - offset
    direction = (shift > 0) - (shift < 0)
    changed = resolved is not None and resolved != r['local']
    return [resolved,utc,direction,changed]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve({'local': 109, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'forward'}), [109, 99, 0, False])
check('fixture 2', solve({'local': 110, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'forward'}), [130, 100, 1, True])
check('fixture 3', solve({'local': 110, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'backward'}), [90, 80, -1, True])
check('fixture 4', solve({'local': 110, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'reject'}), [None, None, 0, False])
check('fixture 5', solve({'local': 129, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'backward'}), [109, 99, -1, True])
check('fixture 6', solve({'local': 130, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'reject'}), [130, 100, 0, False])
check('fixture 7', solve({'local': 120, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'forward'}), [140, 110, 1, True])
check('fixture 8', solve({'local': 120, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'reject'}), [None, None, 0, False])
check('fixture 9', solve({'local': -20, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'backward'}), [-20, -30, 0, False])
check('fixture 10', solve({'local': 140, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'forward'}), [140, 110, 0, False])
variant = [({'local': 110, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'forward'}, [130, 100, 1, True]), ({'local': 111, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'forward'}, [131, 101, 1, True]), ({'local': 112, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'forward'}, [132, 102, 1, True]), ({'local': 113, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'forward'}, [133, 103, 1, True]), ({'local': 114, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'forward'}, [134, 104, 1, True])]
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):
    start = r['transition'] + r['old']
    end = r['transition'] + r['new']
    width = r['new'] - r['old']
    in_gap = start <= r['local'] < end
    shift = -width if in_gap else 0
    resolved = None if in_gap and r['policy'] == 'reject' else r['local'] + shift
    offset = None if resolved is None else (r['old'] if resolved < start else r['new'])
    utc = None if resolved is None else resolved - offset
    direction = (shift > 0) - (shift < 0)
    changed = resolved is not None and resolved != r['local']
    return [resolved,utc,direction,changed]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve({'local': 109, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'forward'}), [109, 99, 0, False])
check('fixture 2', solve({'local': 110, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'forward'}), [130, 100, 1, True])
check('fixture 3', solve({'local': 110, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'backward'}), [90, 80, -1, True])
check('fixture 4', solve({'local': 110, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'reject'}), [None, None, 0, False])
check('fixture 5', solve({'local': 129, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'backward'}), [109, 99, -1, True])
check('fixture 6', solve({'local': 130, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'reject'}), [130, 100, 0, False])
check('fixture 7', solve({'local': 120, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'forward'}), [140, 110, 1, True])
check('fixture 8', solve({'local': 120, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'reject'}), [None, None, 0, False])
check('fixture 9', solve({'local': -20, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'backward'}), [-20, -30, 0, False])
check('fixture 10', solve({'local': 140, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'forward'}), [140, 110, 0, False])
variant = [({'local': 110, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'forward'}, [130, 100, 1, True]), ({'local': 111, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'forward'}, [131, 101, 1, True]), ({'local': 112, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'forward'}, [132, 102, 1, True]), ({'local': 113, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'forward'}, [133, 103, 1, True]), ({'local': 114, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'forward'}, [134, 104, 1, True])]
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 shift.

A stipulated forward offset transition at UTC T creates local gap [T+old,T+new). Reject returns None, forward adds gap width and backward subtracts it, preserving position in the gap. Return resolved local coordinate, UTC coordinate, shift direction and successful-change flag. Outside-gap labels are unchanged.

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):
    start = r['transition'] + r['old']
    end = r['transition'] + r['new']
    width = r['new'] - r['old']
    in_gap = start <= r['local'] < end
    shift = (width if r['policy'] == 'forward' else -width) if in_gap and r['policy'] != 'reject' else 0
    resolved = None if in_gap else r['local']
    offset = None if resolved is None else (r['old'] if resolved < start else r['new'])
    utc = None if resolved is None else resolved - offset
    direction = (shift > 0) - (shift < 0)
    changed = resolved is not None and resolved != r['local']
    return [resolved,utc,direction,changed]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve({'local': 109, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'forward'}), [109, 99, 0, False])
check('fixture 2', solve({'local': 110, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'forward'}), [130, 100, 1, True])
check('fixture 3', solve({'local': 110, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'backward'}), [90, 80, -1, True])
check('fixture 4', solve({'local': 110, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'reject'}), [None, None, 0, False])
check('fixture 5', solve({'local': 129, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'backward'}), [109, 99, -1, True])
check('fixture 6', solve({'local': 130, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'reject'}), [130, 100, 0, False])
check('fixture 7', solve({'local': 120, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'forward'}), [140, 110, 1, True])
check('fixture 8', solve({'local': 120, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'reject'}), [None, None, 0, False])
check('fixture 9', solve({'local': -20, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'backward'}), [-20, -30, 0, False])
check('fixture 10', solve({'local': 140, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'forward'}), [140, 110, 0, False])
variant = [({'local': 110, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'forward'}, [130, 100, 1, True]), ({'local': 111, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'forward'}, [131, 101, 1, True]), ({'local': 112, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'forward'}, [132, 102, 1, True]), ({'local': 113, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'forward'}, [133, 103, 1, True]), ({'local': 114, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'forward'}, [134, 104, 1, True])]
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):
    start = r['transition'] + r['old']
    end = r['transition'] + r['new']
    width = r['new'] - r['old']
    in_gap = start <= r['local'] < end
    shift = (width if r['policy'] == 'forward' else -width) if in_gap and r['policy'] != 'reject' else 0
    resolved = r['local'] + shift
    offset = None if resolved is None else (r['old'] if resolved < start else r['new'])
    utc = None if resolved is None else resolved - offset
    direction = (shift > 0) - (shift < 0)
    changed = resolved is not None and resolved != r['local']
    return [resolved,utc,direction,changed]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve({'local': 109, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'forward'}), [109, 99, 0, False])
check('fixture 2', solve({'local': 110, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'forward'}), [130, 100, 1, True])
check('fixture 3', solve({'local': 110, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'backward'}), [90, 80, -1, True])
check('fixture 4', solve({'local': 110, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'reject'}), [None, None, 0, False])
check('fixture 5', solve({'local': 129, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'backward'}), [109, 99, -1, True])
check('fixture 6', solve({'local': 130, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'reject'}), [130, 100, 0, False])
check('fixture 7', solve({'local': 120, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'forward'}), [140, 110, 1, True])
check('fixture 8', solve({'local': 120, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'reject'}), [None, None, 0, False])
check('fixture 9', solve({'local': -20, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'backward'}), [-20, -30, 0, False])
check('fixture 10', solve({'local': 140, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'forward'}), [140, 110, 0, False])
variant = [({'local': 110, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'forward'}, [130, 100, 1, True]), ({'local': 111, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'forward'}, [131, 101, 1, True]), ({'local': 112, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'forward'}, [132, 102, 1, True]), ({'local': 113, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'forward'}, [133, 103, 1, True]), ({'local': 114, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'forward'}, [134, 104, 1, True])]
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 resolved.

A stipulated forward offset transition at UTC T creates local gap [T+old,T+new). Reject returns None, forward adds gap width and backward subtracts it, preserving position in the gap. Return resolved local coordinate, UTC coordinate, shift direction and successful-change flag. Outside-gap labels are unchanged.

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):
    start = r['transition'] + r['old']
    end = r['transition'] + r['new']
    width = r['new'] - r['old']
    in_gap = start <= r['local'] < end
    shift = (width if r['policy'] == 'forward' else -width) if in_gap and r['policy'] != 'reject' else 0
    resolved = None if in_gap and r['policy'] == 'reject' else r['local'] + shift
    offset = None if resolved is None else r['new']
    utc = None if resolved is None else resolved - offset
    direction = (shift > 0) - (shift < 0)
    changed = resolved is not None and resolved != r['local']
    return [resolved,utc,direction,changed]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve({'local': 109, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'forward'}), [109, 99, 0, False])
check('fixture 2', solve({'local': 110, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'forward'}), [130, 100, 1, True])
check('fixture 3', solve({'local': 110, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'backward'}), [90, 80, -1, True])
check('fixture 4', solve({'local': 110, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'reject'}), [None, None, 0, False])
check('fixture 5', solve({'local': 129, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'backward'}), [109, 99, -1, True])
check('fixture 6', solve({'local': 130, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'reject'}), [130, 100, 0, False])
check('fixture 7', solve({'local': 120, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'forward'}), [140, 110, 1, True])
check('fixture 8', solve({'local': 120, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'reject'}), [None, None, 0, False])
check('fixture 9', solve({'local': -20, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'backward'}), [-20, -30, 0, False])
check('fixture 10', solve({'local': 140, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'forward'}), [140, 110, 0, False])
variant = [({'local': 110, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'forward'}, [130, 100, 1, True]), ({'local': 111, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'forward'}, [131, 101, 1, True]), ({'local': 112, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'forward'}, [132, 102, 1, True]), ({'local': 113, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'forward'}, [133, 103, 1, True]), ({'local': 114, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'forward'}, [134, 104, 1, True])]
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):
    start = r['transition'] + r['old']
    end = r['transition'] + r['new']
    width = r['new'] - r['old']
    in_gap = start <= r['local'] < end
    shift = (width if r['policy'] == 'forward' else -width) if in_gap and r['policy'] != 'reject' else 0
    resolved = None if in_gap and r['policy'] == 'reject' else r['local'] + shift
    offset = None if resolved is None else r['old']
    utc = None if resolved is None else resolved - offset
    direction = (shift > 0) - (shift < 0)
    changed = resolved is not None and resolved != r['local']
    return [resolved,utc,direction,changed]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve({'local': 109, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'forward'}), [109, 99, 0, False])
check('fixture 2', solve({'local': 110, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'forward'}), [130, 100, 1, True])
check('fixture 3', solve({'local': 110, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'backward'}), [90, 80, -1, True])
check('fixture 4', solve({'local': 110, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'reject'}), [None, None, 0, False])
check('fixture 5', solve({'local': 129, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'backward'}), [109, 99, -1, True])
check('fixture 6', solve({'local': 130, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'reject'}), [130, 100, 0, False])
check('fixture 7', solve({'local': 120, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'forward'}), [140, 110, 1, True])
check('fixture 8', solve({'local': 120, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'reject'}), [None, None, 0, False])
check('fixture 9', solve({'local': -20, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'backward'}), [-20, -30, 0, False])
check('fixture 10', solve({'local': 140, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'forward'}), [140, 110, 0, False])
variant = [({'local': 110, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'forward'}, [130, 100, 1, True]), ({'local': 111, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'forward'}, [131, 101, 1, True]), ({'local': 112, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'forward'}, [132, 102, 1, True]), ({'local': 113, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'forward'}, [133, 103, 1, True]), ({'local': 114, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'forward'}, [134, 104, 1, True])]
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 offset.

A stipulated forward offset transition at UTC T creates local gap [T+old,T+new). Reject returns None, forward adds gap width and backward subtracts it, preserving position in the gap. Return resolved local coordinate, UTC coordinate, shift direction and successful-change flag. Outside-gap labels are unchanged.

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):
    start = r['transition'] + r['old']
    end = r['transition'] + r['new']
    width = r['new'] - r['old']
    in_gap = start <= r['local'] < end
    shift = (width if r['policy'] == 'forward' else -width) if in_gap and r['policy'] != 'reject' else 0
    resolved = None if in_gap and r['policy'] == 'reject' else r['local'] + shift
    offset = None if resolved is None else (r['old'] if resolved < start else r['new'])
    utc = resolved
    direction = (shift > 0) - (shift < 0)
    changed = resolved is not None and resolved != r['local']
    return [resolved,utc,direction,changed]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve({'local': 109, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'forward'}), [109, 99, 0, False])
check('fixture 2', solve({'local': 110, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'forward'}), [130, 100, 1, True])
check('fixture 3', solve({'local': 110, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'backward'}), [90, 80, -1, True])
check('fixture 4', solve({'local': 110, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'reject'}), [None, None, 0, False])
check('fixture 5', solve({'local': 129, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'backward'}), [109, 99, -1, True])
check('fixture 6', solve({'local': 130, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'reject'}), [130, 100, 0, False])
check('fixture 7', solve({'local': 120, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'forward'}), [140, 110, 1, True])
check('fixture 8', solve({'local': 120, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'reject'}), [None, None, 0, False])
check('fixture 9', solve({'local': -20, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'backward'}), [-20, -30, 0, False])
check('fixture 10', solve({'local': 140, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'forward'}), [140, 110, 0, False])
variant = [({'local': 110, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'forward'}, [130, 100, 1, True]), ({'local': 111, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'forward'}, [131, 101, 1, True]), ({'local': 112, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'forward'}, [132, 102, 1, True]), ({'local': 113, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'forward'}, [133, 103, 1, True]), ({'local': 114, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'forward'}, [134, 104, 1, True])]
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):
    start = r['transition'] + r['old']
    end = r['transition'] + r['new']
    width = r['new'] - r['old']
    in_gap = start <= r['local'] < end
    shift = (width if r['policy'] == 'forward' else -width) if in_gap and r['policy'] != 'reject' else 0
    resolved = None if in_gap and r['policy'] == 'reject' else r['local'] + shift
    offset = None if resolved is None else (r['old'] if resolved < start else r['new'])
    utc = None if resolved is None else resolved + offset
    direction = (shift > 0) - (shift < 0)
    changed = resolved is not None and resolved != r['local']
    return [resolved,utc,direction,changed]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve({'local': 109, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'forward'}), [109, 99, 0, False])
check('fixture 2', solve({'local': 110, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'forward'}), [130, 100, 1, True])
check('fixture 3', solve({'local': 110, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'backward'}), [90, 80, -1, True])
check('fixture 4', solve({'local': 110, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'reject'}), [None, None, 0, False])
check('fixture 5', solve({'local': 129, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'backward'}), [109, 99, -1, True])
check('fixture 6', solve({'local': 130, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'reject'}), [130, 100, 0, False])
check('fixture 7', solve({'local': 120, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'forward'}), [140, 110, 1, True])
check('fixture 8', solve({'local': 120, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'reject'}), [None, None, 0, False])
check('fixture 9', solve({'local': -20, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'backward'}), [-20, -30, 0, False])
check('fixture 10', solve({'local': 140, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'forward'}), [140, 110, 0, False])
variant = [({'local': 110, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'forward'}, [130, 100, 1, True]), ({'local': 111, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'forward'}, [131, 101, 1, True]), ({'local': 112, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'forward'}, [132, 102, 1, True]), ({'local': 113, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'forward'}, [133, 103, 1, True]), ({'local': 114, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'forward'}, [134, 104, 1, True])]
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 utc.

A stipulated forward offset transition at UTC T creates local gap [T+old,T+new). Reject returns None, forward adds gap width and backward subtracts it, preserving position in the gap. Return resolved local coordinate, UTC coordinate, shift direction and successful-change flag. Outside-gap labels are unchanged.

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):
    start = r['transition'] + r['old']
    end = r['transition'] + r['new']
    width = r['new'] - r['old']
    in_gap = start <= r['local'] < end
    shift = (width if r['policy'] == 'forward' else -width) if in_gap and r['policy'] != 'reject' else 0
    resolved = None if in_gap and r['policy'] == 'reject' else r['local'] + shift
    offset = None if resolved is None else (r['old'] if resolved < start else r['new'])
    utc = None if resolved is None else resolved - offset
    direction = int(shift != 0)
    changed = resolved is not None and resolved != r['local']
    return [resolved,utc,direction,changed]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve({'local': 109, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'forward'}), [109, 99, 0, False])
check('fixture 2', solve({'local': 110, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'forward'}), [130, 100, 1, True])
check('fixture 3', solve({'local': 110, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'backward'}), [90, 80, -1, True])
check('fixture 4', solve({'local': 110, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'reject'}), [None, None, 0, False])
check('fixture 5', solve({'local': 129, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'backward'}), [109, 99, -1, True])
check('fixture 6', solve({'local': 130, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'reject'}), [130, 100, 0, False])
check('fixture 7', solve({'local': 120, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'forward'}), [140, 110, 1, True])
check('fixture 8', solve({'local': 120, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'reject'}), [None, None, 0, False])
check('fixture 9', solve({'local': -20, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'backward'}), [-20, -30, 0, False])
check('fixture 10', solve({'local': 140, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'forward'}), [140, 110, 0, False])
variant = [({'local': 110, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'forward'}, [130, 100, 1, True]), ({'local': 111, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'forward'}, [131, 101, 1, True]), ({'local': 112, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'forward'}, [132, 102, 1, True]), ({'local': 113, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'forward'}, [133, 103, 1, True]), ({'local': 114, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'forward'}, [134, 104, 1, True])]
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):
    start = r['transition'] + r['old']
    end = r['transition'] + r['new']
    width = r['new'] - r['old']
    in_gap = start <= r['local'] < end
    shift = (width if r['policy'] == 'forward' else -width) if in_gap and r['policy'] != 'reject' else 0
    resolved = None if in_gap and r['policy'] == 'reject' else r['local'] + shift
    offset = None if resolved is None else (r['old'] if resolved < start else r['new'])
    utc = None if resolved is None else resolved - offset
    direction = -1 if shift < 0 else 1
    changed = resolved is not None and resolved != r['local']
    return [resolved,utc,direction,changed]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve({'local': 109, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'forward'}), [109, 99, 0, False])
check('fixture 2', solve({'local': 110, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'forward'}), [130, 100, 1, True])
check('fixture 3', solve({'local': 110, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'backward'}), [90, 80, -1, True])
check('fixture 4', solve({'local': 110, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'reject'}), [None, None, 0, False])
check('fixture 5', solve({'local': 129, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'backward'}), [109, 99, -1, True])
check('fixture 6', solve({'local': 130, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'reject'}), [130, 100, 0, False])
check('fixture 7', solve({'local': 120, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'forward'}), [140, 110, 1, True])
check('fixture 8', solve({'local': 120, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'reject'}), [None, None, 0, False])
check('fixture 9', solve({'local': -20, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'backward'}), [-20, -30, 0, False])
check('fixture 10', solve({'local': 140, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'forward'}), [140, 110, 0, False])
variant = [({'local': 110, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'forward'}, [130, 100, 1, True]), ({'local': 111, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'forward'}, [131, 101, 1, True]), ({'local': 112, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'forward'}, [132, 102, 1, True]), ({'local': 113, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'forward'}, [133, 103, 1, True]), ({'local': 114, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'forward'}, [134, 104, 1, True])]
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 direction.

A stipulated forward offset transition at UTC T creates local gap [T+old,T+new). Reject returns None, forward adds gap width and backward subtracts it, preserving position in the gap. Return resolved local coordinate, UTC coordinate, shift direction and successful-change flag. Outside-gap labels are unchanged.

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):
    start = r['transition'] + r['old']
    end = r['transition'] + r['new']
    width = r['new'] - r['old']
    in_gap = start <= r['local'] < end
    shift = (width if r['policy'] == 'forward' else -width) if in_gap and r['policy'] != 'reject' else 0
    resolved = None if in_gap and r['policy'] == 'reject' else r['local'] + shift
    offset = None if resolved is None else (r['old'] if resolved < start else r['new'])
    utc = None if resolved is None else resolved - offset
    direction = (shift > 0) - (shift < 0)
    changed = in_gap
    return [resolved,utc,direction,changed]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve({'local': 109, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'forward'}), [109, 99, 0, False])
check('fixture 2', solve({'local': 110, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'forward'}), [130, 100, 1, True])
check('fixture 3', solve({'local': 110, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'backward'}), [90, 80, -1, True])
check('fixture 4', solve({'local': 110, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'reject'}), [None, None, 0, False])
check('fixture 5', solve({'local': 129, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'backward'}), [109, 99, -1, True])
check('fixture 6', solve({'local': 130, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'reject'}), [130, 100, 0, False])
check('fixture 7', solve({'local': 120, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'forward'}), [140, 110, 1, True])
check('fixture 8', solve({'local': 120, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'reject'}), [None, None, 0, False])
check('fixture 9', solve({'local': -20, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'backward'}), [-20, -30, 0, False])
check('fixture 10', solve({'local': 140, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'forward'}), [140, 110, 0, False])
variant = [({'local': 110, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'forward'}, [130, 100, 1, True]), ({'local': 111, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'forward'}, [131, 101, 1, True]), ({'local': 112, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'forward'}, [132, 102, 1, True]), ({'local': 113, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'forward'}, [133, 103, 1, True]), ({'local': 114, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'forward'}, [134, 104, 1, True])]
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):
    start = r['transition'] + r['old']
    end = r['transition'] + r['new']
    width = r['new'] - r['old']
    in_gap = start <= r['local'] < end
    shift = (width if r['policy'] == 'forward' else -width) if in_gap and r['policy'] != 'reject' else 0
    resolved = None if in_gap and r['policy'] == 'reject' else r['local'] + shift
    offset = None if resolved is None else (r['old'] if resolved < start else r['new'])
    utc = None if resolved is None else resolved - offset
    direction = (shift > 0) - (shift < 0)
    changed = resolved != r['local']
    return [resolved,utc,direction,changed]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve({'local': 109, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'forward'}), [109, 99, 0, False])
check('fixture 2', solve({'local': 110, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'forward'}), [130, 100, 1, True])
check('fixture 3', solve({'local': 110, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'backward'}), [90, 80, -1, True])
check('fixture 4', solve({'local': 110, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'reject'}), [None, None, 0, False])
check('fixture 5', solve({'local': 129, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'backward'}), [109, 99, -1, True])
check('fixture 6', solve({'local': 130, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'reject'}), [130, 100, 0, False])
check('fixture 7', solve({'local': 120, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'forward'}), [140, 110, 1, True])
check('fixture 8', solve({'local': 120, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'reject'}), [None, None, 0, False])
check('fixture 9', solve({'local': -20, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'backward'}), [-20, -30, 0, False])
check('fixture 10', solve({'local': 140, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'forward'}), [140, 110, 0, False])
variant = [({'local': 110, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'forward'}, [130, 100, 1, True]), ({'local': 111, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'forward'}, [131, 101, 1, True]), ({'local': 112, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'forward'}, [132, 102, 1, True]), ({'local': 113, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'forward'}, [133, 103, 1, True]), ({'local': 114, 'old': 10, 'new': 30, 'transition': 100, 'policy': 'forward'}, [134, 104, 1, True])]
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 changed.

A stipulated forward offset transition at UTC T creates local gap [T+old,T+new). Reject returns None, forward adds gap width and backward subtracts it, preserving position in the gap. Return resolved local coordinate, UTC coordinate, shift direction and successful-change flag. Outside-gap labels are unchanged.

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):
    length = 86400
    valid = 0 <= r['label'] < length
    atomic = r['origin'] + r['label'] if valid else None
    extra = valid and r['label'] == 86400
    hour = None if not valid else (23 if extra else r['label'] // 3600)
    minute = None if not valid else (59 if extra else r['label'] // 60 % 60)
    second = None if not valid else (60 if extra else r['label'] % 60)
    last = valid and r['label'] == length - 1
    remaining = None if not valid else length - r['label']
    midnight = r['origin'] + length
    return [valid,atomic,[hour,minute,second],last,remaining,midnight]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve({'leap': True, 'label': 86400, 'origin': 100000}), [True, 186400, [23, 59, 60], True, 1, 186401])
check('fixture 2', solve({'leap': False, 'label': 86400, 'origin': 100000}), [False, None, [None, None, None], False, None, 186400])
check('fixture 3', solve({'leap': True, 'label': 86399, 'origin': 50}), [True, 86449, [23, 59, 59], False, 2, 86451])
check('fixture 4', solve({'leap': False, 'label': 86399, 'origin': 50}), [True, 86449, [23, 59, 59], True, 1, 86450])
check('fixture 5', solve({'leap': True, 'label': 0, 'origin': -100}), [True, -100, [0, 0, 0], False, 86401, 86301])
check('fixture 6', solve({'leap': False, 'label': 3601, 'origin': 0}), [True, 3601, [1, 0, 1], False, 82799, 86400])
check('fixture 7', solve({'leap': True, 'label': -1, 'origin': 100}), [False, None, [None, None, None], False, None, 86501])
check('fixture 8', solve({'leap': True, 'label': 86401, 'origin': 20}), [False, None, [None, None, None], False, None, 86421])
check('fixture 9', solve({'leap': False, 'label': 0, 'origin': 0}), [True, 0, [0, 0, 0], False, 86400, 86400])
check('fixture 10', solve({'leap': True, 'label': 3661, 'origin': -20}), [True, 3641, [1, 1, 1], False, 82740, 86381])
variant = [({'leap': True, 'label': 86400, 'origin': 100001}, [True, 186401, [23, 59, 60], True, 1, 186402]), ({'leap': True, 'label': 86400, 'origin': 100002}, [True, 186402, [23, 59, 60], True, 1, 186403]), ({'leap': True, 'label': 86400, 'origin': 100003}, [True, 186403, [23, 59, 60], True, 1, 186404]), ({'leap': True, 'label': 86400, 'origin': 100004}, [True, 186404, [23, 59, 60], True, 1, 186405]), ({'leap': True, 'label': 86400, 'origin': 100005}, [True, 186405, [23, 59, 60], True, 1, 186406])]
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):
    length = 86401
    valid = 0 <= r['label'] < length
    atomic = r['origin'] + r['label'] if valid else None
    extra = valid and r['label'] == 86400
    hour = None if not valid else (23 if extra else r['label'] // 3600)
    minute = None if not valid else (59 if extra else r['label'] // 60 % 60)
    second = None if not valid else (60 if extra else r['label'] % 60)
    last = valid and r['label'] == length - 1
    remaining = None if not valid else length - r['label']
    midnight = r['origin'] + length
    return [valid,atomic,[hour,minute,second],last,remaining,midnight]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve({'leap': True, 'label': 86400, 'origin': 100000}), [True, 186400, [23, 59, 60], True, 1, 186401])
check('fixture 2', solve({'leap': False, 'label': 86400, 'origin': 100000}), [False, None, [None, None, None], False, None, 186400])
check('fixture 3', solve({'leap': True, 'label': 86399, 'origin': 50}), [True, 86449, [23, 59, 59], False, 2, 86451])
check('fixture 4', solve({'leap': False, 'label': 86399, 'origin': 50}), [True, 86449, [23, 59, 59], True, 1, 86450])
check('fixture 5', solve({'leap': True, 'label': 0, 'origin': -100}), [True, -100, [0, 0, 0], False, 86401, 86301])
check('fixture 6', solve({'leap': False, 'label': 3601, 'origin': 0}), [True, 3601, [1, 0, 1], False, 82799, 86400])
check('fixture 7', solve({'leap': True, 'label': -1, 'origin': 100}), [False, None, [None, None, None], False, None, 86501])
check('fixture 8', solve({'leap': True, 'label': 86401, 'origin': 20}), [False, None, [None, None, None], False, None, 86421])
check('fixture 9', solve({'leap': False, 'label': 0, 'origin': 0}), [True, 0, [0, 0, 0], False, 86400, 86400])
check('fixture 10', solve({'leap': True, 'label': 3661, 'origin': -20}), [True, 3641, [1, 1, 1], False, 82740, 86381])
variant = [({'leap': True, 'label': 86400, 'origin': 100001}, [True, 186401, [23, 59, 60], True, 1, 186402]), ({'leap': True, 'label': 86400, 'origin': 100002}, [True, 186402, [23, 59, 60], True, 1, 186403]), ({'leap': True, 'label': 86400, 'origin': 100003}, [True, 186403, [23, 59, 60], True, 1, 186404]), ({'leap': True, 'label': 86400, 'origin': 100004}, [True, 186404, [23, 59, 60], True, 1, 186405]), ({'leap': True, 'label': 86400, 'origin': 100005}, [True, 186405, [23, 59, 60], True, 1, 186406])]
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 length.

A stipulated positive-leap day has label 86400 following ordinary 0..86399; a normal day does not. Return validity, atomic origin+label or None, display [hour,minute,second] (23:59:60 for extra label), final-label flag, ticks until next midnight or None, and atomic next-midnight coordinate. No real-world leap table is claimed.

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):
    length = 86400 + int(r['leap'])
    valid = 0 <= r['label'] <= length
    atomic = r['origin'] + r['label'] if valid else None
    extra = valid and r['label'] == 86400
    hour = None if not valid else (23 if extra else r['label'] // 3600)
    minute = None if not valid else (59 if extra else r['label'] // 60 % 60)
    second = None if not valid else (60 if extra else r['label'] % 60)
    last = valid and r['label'] == length - 1
    remaining = None if not valid else length - r['label']
    midnight = r['origin'] + length
    return [valid,atomic,[hour,minute,second],last,remaining,midnight]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve({'leap': True, 'label': 86400, 'origin': 100000}), [True, 186400, [23, 59, 60], True, 1, 186401])
check('fixture 2', solve({'leap': False, 'label': 86400, 'origin': 100000}), [False, None, [None, None, None], False, None, 186400])
check('fixture 3', solve({'leap': True, 'label': 86399, 'origin': 50}), [True, 86449, [23, 59, 59], False, 2, 86451])
check('fixture 4', solve({'leap': False, 'label': 86399, 'origin': 50}), [True, 86449, [23, 59, 59], True, 1, 86450])
check('fixture 5', solve({'leap': True, 'label': 0, 'origin': -100}), [True, -100, [0, 0, 0], False, 86401, 86301])
check('fixture 6', solve({'leap': False, 'label': 3601, 'origin': 0}), [True, 3601, [1, 0, 1], False, 82799, 86400])
check('fixture 7', solve({'leap': True, 'label': -1, 'origin': 100}), [False, None, [None, None, None], False, None, 86501])
check('fixture 8', solve({'leap': True, 'label': 86401, 'origin': 20}), [False, None, [None, None, None], False, None, 86421])
check('fixture 9', solve({'leap': False, 'label': 0, 'origin': 0}), [True, 0, [0, 0, 0], False, 86400, 86400])
check('fixture 10', solve({'leap': True, 'label': 3661, 'origin': -20}), [True, 3641, [1, 1, 1], False, 82740, 86381])
variant = [({'leap': True, 'label': 86400, 'origin': 100001}, [True, 186401, [23, 59, 60], True, 1, 186402]), ({'leap': True, 'label': 86400, 'origin': 100002}, [True, 186402, [23, 59, 60], True, 1, 186403]), ({'leap': True, 'label': 86400, 'origin': 100003}, [True, 186403, [23, 59, 60], True, 1, 186404]), ({'leap': True, 'label': 86400, 'origin': 100004}, [True, 186404, [23, 59, 60], True, 1, 186405]), ({'leap': True, 'label': 86400, 'origin': 100005}, [True, 186405, [23, 59, 60], True, 1, 186406])]
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):
    length = 86400 + int(r['leap'])
    valid = 0 <= r['label'] < 86400
    atomic = r['origin'] + r['label'] if valid else None
    extra = valid and r['label'] == 86400
    hour = None if not valid else (23 if extra else r['label'] // 3600)
    minute = None if not valid else (59 if extra else r['label'] // 60 % 60)
    second = None if not valid else (60 if extra else r['label'] % 60)
    last = valid and r['label'] == length - 1
    remaining = None if not valid else length - r['label']
    midnight = r['origin'] + length
    return [valid,atomic,[hour,minute,second],last,remaining,midnight]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve({'leap': True, 'label': 86400, 'origin': 100000}), [True, 186400, [23, 59, 60], True, 1, 186401])
check('fixture 2', solve({'leap': False, 'label': 86400, 'origin': 100000}), [False, None, [None, None, None], False, None, 186400])
check('fixture 3', solve({'leap': True, 'label': 86399, 'origin': 50}), [True, 86449, [23, 59, 59], False, 2, 86451])
check('fixture 4', solve({'leap': False, 'label': 86399, 'origin': 50}), [True, 86449, [23, 59, 59], True, 1, 86450])
check('fixture 5', solve({'leap': True, 'label': 0, 'origin': -100}), [True, -100, [0, 0, 0], False, 86401, 86301])
check('fixture 6', solve({'leap': False, 'label': 3601, 'origin': 0}), [True, 3601, [1, 0, 1], False, 82799, 86400])
check('fixture 7', solve({'leap': True, 'label': -1, 'origin': 100}), [False, None, [None, None, None], False, None, 86501])
check('fixture 8', solve({'leap': True, 'label': 86401, 'origin': 20}), [False, None, [None, None, None], False, None, 86421])
check('fixture 9', solve({'leap': False, 'label': 0, 'origin': 0}), [True, 0, [0, 0, 0], False, 86400, 86400])
check('fixture 10', solve({'leap': True, 'label': 3661, 'origin': -20}), [True, 3641, [1, 1, 1], False, 82740, 86381])
variant = [({'leap': True, 'label': 86400, 'origin': 100001}, [True, 186401, [23, 59, 60], True, 1, 186402]), ({'leap': True, 'label': 86400, 'origin': 100002}, [True, 186402, [23, 59, 60], True, 1, 186403]), ({'leap': True, 'label': 86400, 'origin': 100003}, [True, 186403, [23, 59, 60], True, 1, 186404]), ({'leap': True, 'label': 86400, 'origin': 100004}, [True, 186404, [23, 59, 60], True, 1, 186405]), ({'leap': True, 'label': 86400, 'origin': 100005}, [True, 186405, [23, 59, 60], True, 1, 186406])]
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.

A stipulated positive-leap day has label 86400 following ordinary 0..86399; a normal day does not. Return validity, atomic origin+label or None, display [hour,minute,second] (23:59:60 for extra label), final-label flag, ticks until next midnight or None, and atomic next-midnight coordinate. No real-world leap table is claimed.

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):
    length = 86400 + int(r['leap'])
    valid = 0 <= r['label'] < length
    atomic = r['origin'] + min(r['label'],86399) if valid else None
    extra = valid and r['label'] == 86400
    hour = None if not valid else (23 if extra else r['label'] // 3600)
    minute = None if not valid else (59 if extra else r['label'] // 60 % 60)
    second = None if not valid else (60 if extra else r['label'] % 60)
    last = valid and r['label'] == length - 1
    remaining = None if not valid else length - r['label']
    midnight = r['origin'] + length
    return [valid,atomic,[hour,minute,second],last,remaining,midnight]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve({'leap': True, 'label': 86400, 'origin': 100000}), [True, 186400, [23, 59, 60], True, 1, 186401])
check('fixture 2', solve({'leap': False, 'label': 86400, 'origin': 100000}), [False, None, [None, None, None], False, None, 186400])
check('fixture 3', solve({'leap': True, 'label': 86399, 'origin': 50}), [True, 86449, [23, 59, 59], False, 2, 86451])
check('fixture 4', solve({'leap': False, 'label': 86399, 'origin': 50}), [True, 86449, [23, 59, 59], True, 1, 86450])
check('fixture 5', solve({'leap': True, 'label': 0, 'origin': -100}), [True, -100, [0, 0, 0], False, 86401, 86301])
check('fixture 6', solve({'leap': False, 'label': 3601, 'origin': 0}), [True, 3601, [1, 0, 1], False, 82799, 86400])
check('fixture 7', solve({'leap': True, 'label': -1, 'origin': 100}), [False, None, [None, None, None], False, None, 86501])
check('fixture 8', solve({'leap': True, 'label': 86401, 'origin': 20}), [False, None, [None, None, None], False, None, 86421])
check('fixture 9', solve({'leap': False, 'label': 0, 'origin': 0}), [True, 0, [0, 0, 0], False, 86400, 86400])
check('fixture 10', solve({'leap': True, 'label': 3661, 'origin': -20}), [True, 3641, [1, 1, 1], False, 82740, 86381])
variant = [({'leap': True, 'label': 86400, 'origin': 100001}, [True, 186401, [23, 59, 60], True, 1, 186402]), ({'leap': True, 'label': 86400, 'origin': 100002}, [True, 186402, [23, 59, 60], True, 1, 186403]), ({'leap': True, 'label': 86400, 'origin': 100003}, [True, 186403, [23, 59, 60], True, 1, 186404]), ({'leap': True, 'label': 86400, 'origin': 100004}, [True, 186404, [23, 59, 60], True, 1, 186405]), ({'leap': True, 'label': 86400, 'origin': 100005}, [True, 186405, [23, 59, 60], True, 1, 186406])]
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):
    length = 86400 + int(r['leap'])
    valid = 0 <= r['label'] < length
    atomic = r['origin'] + r['label'] + int(extra) if False else (r['origin'] + r['label'] + int(r['leap']) if valid else None)
    extra = valid and r['label'] == 86400
    hour = None if not valid else (23 if extra else r['label'] // 3600)
    minute = None if not valid else (59 if extra else r['label'] // 60 % 60)
    second = None if not valid else (60 if extra else r['label'] % 60)
    last = valid and r['label'] == length - 1
    remaining = None if not valid else length - r['label']
    midnight = r['origin'] + length
    return [valid,atomic,[hour,minute,second],last,remaining,midnight]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve({'leap': True, 'label': 86400, 'origin': 100000}), [True, 186400, [23, 59, 60], True, 1, 186401])
check('fixture 2', solve({'leap': False, 'label': 86400, 'origin': 100000}), [False, None, [None, None, None], False, None, 186400])
check('fixture 3', solve({'leap': True, 'label': 86399, 'origin': 50}), [True, 86449, [23, 59, 59], False, 2, 86451])
check('fixture 4', solve({'leap': False, 'label': 86399, 'origin': 50}), [True, 86449, [23, 59, 59], True, 1, 86450])
check('fixture 5', solve({'leap': True, 'label': 0, 'origin': -100}), [True, -100, [0, 0, 0], False, 86401, 86301])
check('fixture 6', solve({'leap': False, 'label': 3601, 'origin': 0}), [True, 3601, [1, 0, 1], False, 82799, 86400])
check('fixture 7', solve({'leap': True, 'label': -1, 'origin': 100}), [False, None, [None, None, None], False, None, 86501])
check('fixture 8', solve({'leap': True, 'label': 86401, 'origin': 20}), [False, None, [None, None, None], False, None, 86421])
check('fixture 9', solve({'leap': False, 'label': 0, 'origin': 0}), [True, 0, [0, 0, 0], False, 86400, 86400])
check('fixture 10', solve({'leap': True, 'label': 3661, 'origin': -20}), [True, 3641, [1, 1, 1], False, 82740, 86381])
variant = [({'leap': True, 'label': 86400, 'origin': 100001}, [True, 186401, [23, 59, 60], True, 1, 186402]), ({'leap': True, 'label': 86400, 'origin': 100002}, [True, 186402, [23, 59, 60], True, 1, 186403]), ({'leap': True, 'label': 86400, 'origin': 100003}, [True, 186403, [23, 59, 60], True, 1, 186404]), ({'leap': True, 'label': 86400, 'origin': 100004}, [True, 186404, [23, 59, 60], True, 1, 186405]), ({'leap': True, 'label': 86400, 'origin': 100005}, [True, 186405, [23, 59, 60], True, 1, 186406])]
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 atomic.

A stipulated positive-leap day has label 86400 following ordinary 0..86399; a normal day does not. Return validity, atomic origin+label or None, display [hour,minute,second] (23:59:60 for extra label), final-label flag, ticks until next midnight or None, and atomic next-midnight coordinate. No real-world leap table is claimed.

split: open-access