broken_source:
"""Failure Map reference implementation. Python standard library only."""
import json
from fractions import Fraction
N = 1
observations = []
def solve(r):
    old_residue = 0 if r['reset'] else r['residue']
    scaled = r['source'] * r['p']
    accumulated = scaled + old_residue
    emitted = accumulated // r['q']
    residue = accumulated % r['q']
    old_target = 0 if r['reset'] else r['target']
    target = old_target + emitted
    coordinate = r['origin'] + target
    exact = Fraction(coordinate) + Fraction(residue,r['q'])
    needs_tick = residue > 1
    return [coordinate,residue,str(exact),needs_tick,target,emitted]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve({'reset': False, 'residue': 2, 'source': 1, 'p': 2, 'q': 3, 'target': 10, 'origin': 100}), [111, 1, '334/3', True, 11, 1])
check('fixture 2', solve({'reset': True, 'residue': 2, 'source': 1, 'p': 2, 'q': 3, 'target': 10, 'origin': 100}), [100, 2, '302/3', True, 0, 0])
check('fixture 3', solve({'reset': False, 'residue': 0, 'source': 1, 'p': 2, 'q': 3, 'target': 0, 'origin': 0}), [0, 2, '2/3', True, 0, 0])
check('fixture 4', solve({'reset': False, 'residue': 1, 'source': 1, 'p': 2, 'q': 3, 'target': 5, 'origin': 10}), [16, 0, '16', False, 6, 1])
check('fixture 5', solve({'reset': False, 'residue': 0, 'source': 3, 'p': 2, 'q': 3, 'target': 7, 'origin': -10}), [-1, 0, '-1', False, 9, 2])
check('fixture 6', solve({'reset': False, 'residue': 1, 'source': 0, 'p': 1, 'q': 4, 'target': 2, 'origin': 100}), [102, 1, '409/4', True, 2, 0])
check('fixture 7', solve({'reset': True, 'residue': 1, 'source': 0, 'p': 1, 'q': 4, 'target': 9, 'origin': 50}), [50, 0, '50', False, 0, 0])
check('fixture 8', solve({'reset': False, 'residue': 4, 'source': 2, 'p': 3, 'q': 5, 'target': 10, 'origin': 0}), [12, 0, '12', False, 12, 2])
check('fixture 9', solve({'reset': False, 'residue': 0, 'source': 0, 'p': 2, 'q': 3, 'target': 0, 'origin': 0}), [0, 0, '0', False, 0, 0])
check('fixture 10', solve({'reset': False, 'residue': 2, 'source': 10, 'p': 1, 'q': 7, 'target': 100, 'origin': 4}), [105, 5, '740/7', True, 101, 1])
variant = [({'reset': False, 'residue': 2, 'source': 2, 'p': 2, 'q': 3, 'target': 10, 'origin': 100}, [112, 0, '112', False, 12, 2]), ({'reset': False, 'residue': 2, 'source': 3, 'p': 2, 'q': 3, 'target': 10, 'origin': 100}, [112, 2, '338/3', True, 12, 2]), ({'reset': False, 'residue': 2, 'source': 4, 'p': 2, 'q': 3, 'target': 10, 'origin': 100}, [113, 1, '340/3', True, 13, 3]), ({'reset': False, 'residue': 2, 'source': 5, 'p': 2, 'q': 3, 'target': 10, 'origin': 100}, [114, 0, '114', False, 14, 4]), ({'reset': False, 'residue': 2, 'source': 6, 'p': 2, 'q': 3, 'target': 10, 'origin': 100}, [114, 2, '344/3', True, 14, 4])]
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_residue = 0 if r['reset'] else r['residue']
    scaled = r['source'] * r['p']
    accumulated = scaled + old_residue
    emitted = accumulated // r['q']
    residue = accumulated % r['q']
    old_target = 0 if r['reset'] else r['target']
    target = old_target + emitted
    coordinate = r['origin'] + target
    exact = Fraction(coordinate) + Fraction(residue,r['q'])
    needs_tick = emitted == 0
    return [coordinate,residue,str(exact),needs_tick,target,emitted]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve({'reset': False, 'residue': 2, 'source': 1, 'p': 2, 'q': 3, 'target': 10, 'origin': 100}), [111, 1, '334/3', True, 11, 1])
check('fixture 2', solve({'reset': True, 'residue': 2, 'source': 1, 'p': 2, 'q': 3, 'target': 10, 'origin': 100}), [100, 2, '302/3', True, 0, 0])
check('fixture 3', solve({'reset': False, 'residue': 0, 'source': 1, 'p': 2, 'q': 3, 'target': 0, 'origin': 0}), [0, 2, '2/3', True, 0, 0])
check('fixture 4', solve({'reset': False, 'residue': 1, 'source': 1, 'p': 2, 'q': 3, 'target': 5, 'origin': 10}), [16, 0, '16', False, 6, 1])
check('fixture 5', solve({'reset': False, 'residue': 0, 'source': 3, 'p': 2, 'q': 3, 'target': 7, 'origin': -10}), [-1, 0, '-1', False, 9, 2])
check('fixture 6', solve({'reset': False, 'residue': 1, 'source': 0, 'p': 1, 'q': 4, 'target': 2, 'origin': 100}), [102, 1, '409/4', True, 2, 0])
check('fixture 7', solve({'reset': True, 'residue': 1, 'source': 0, 'p': 1, 'q': 4, 'target': 9, 'origin': 50}), [50, 0, '50', False, 0, 0])
check('fixture 8', solve({'reset': False, 'residue': 4, 'source': 2, 'p': 3, 'q': 5, 'target': 10, 'origin': 0}), [12, 0, '12', False, 12, 2])
check('fixture 9', solve({'reset': False, 'residue': 0, 'source': 0, 'p': 2, 'q': 3, 'target': 0, 'origin': 0}), [0, 0, '0', False, 0, 0])
check('fixture 10', solve({'reset': False, 'residue': 2, 'source': 10, 'p': 1, 'q': 7, 'target': 100, 'origin': 4}), [105, 5, '740/7', True, 101, 1])
variant = [({'reset': False, 'residue': 2, 'source': 2, 'p': 2, 'q': 3, 'target': 10, 'origin': 100}, [112, 0, '112', False, 12, 2]), ({'reset': False, 'residue': 2, 'source': 3, 'p': 2, 'q': 3, 'target': 10, 'origin': 100}, [112, 2, '338/3', True, 12, 2]), ({'reset': False, 'residue': 2, 'source': 4, 'p': 2, 'q': 3, 'target': 10, 'origin': 100}, [113, 1, '340/3', True, 13, 3]), ({'reset': False, 'residue': 2, 'source': 5, 'p': 2, 'q': 3, 'target': 10, 'origin': 100}, [114, 0, '114', False, 14, 4]), ({'reset': False, 'residue': 2, 'source': 6, 'p': 2, 'q': 3, 'target': 10, 'origin': 100}, [114, 2, '344/3', True, 14, 4])]
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 needs_tick.

An elapsed-time converter maps incoming nonnegative source ticks to target ticks with exact rate numerator/denominator and retained residue. Each step adds source*p to prior numerator residue; emit quotient and preserve remainder. A reset invalidates old remainder. A phase origin belongs to emitted target coordinate. Report emitted ticks, new residue, cumulative target, exact unrounded cumulative coordinate and reset marker.

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):
    active_offset = r['new'] if r['atomic'] > r['transition'] else r['old']
    label = r['atomic'] - active_offset
    previous_offset = r['new'] if r['atomic'] - 1 >= r['transition'] else r['old']
    previous_label = r['atomic'] - 1 - previous_offset
    step = r['new'] - r['old']
    label_delta = label - previous_label
    fold = step > 0 and r['transition'] <= r['atomic'] < r['transition'] + step
    gap = step < 0 and r['atomic'] == r['transition']
    direction = (step > 0) - (step < 0)
    reconstructed = label + active_offset
    return [label,active_offset,label_delta,fold,gap,direction,reconstructed,[label,int(fold)]]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve({'atomic': 99, 'transition': 100, 'old': 10, 'new': 11, 'probe': 0}), [89, 10, 1, False, False, 1, 99, [89, 0]])
check('fixture 2', solve({'atomic': 100, 'transition': 100, 'old': 10, 'new': 11, 'probe': 0}), [89, 11, 0, True, False, 1, 100, [89, 1]])
check('fixture 3', solve({'atomic': 101, 'transition': 100, 'old': 10, 'new': 11, 'probe': 0}), [90, 11, 1, False, False, 1, 101, [90, 0]])
check('fixture 4', solve({'atomic': 110, 'transition': 100, 'old': 10, 'new': 11, 'probe': 0}), [99, 11, 1, False, False, 1, 110, [99, 0]])
check('fixture 5', solve({'atomic': 100, 'transition': 100, 'old': 10, 'new': 9, 'probe': 0}), [91, 9, 2, False, True, -1, 100, [91, 0]])
check('fixture 6', solve({'atomic': 99, 'transition': 100, 'old': 10, 'new': 9, 'probe': 0}), [89, 10, 1, False, False, -1, 99, [89, 0]])
check('fixture 7', solve({'atomic': 101, 'transition': 100, 'old': 10, 'new': 9, 'probe': 0}), [92, 9, 1, False, False, -1, 101, [92, 0]])
check('fixture 8', solve({'atomic': 100, 'transition': 100, 'old': 10, 'new': 10, 'probe': 0}), [90, 10, 1, False, False, 0, 100, [90, 0]])
check('fixture 9', solve({'atomic': 101, 'transition': 100, 'old': 10, 'new': 13, 'probe': 0}), [88, 13, 1, True, False, 1, 101, [88, 1]])
check('fixture 10', solve({'atomic': 103, 'transition': 100, 'old': 10, 'new': 13, 'probe': 0}), [90, 13, 1, False, False, 1, 103, [90, 0]])
check('fixture 11', solve({'atomic': 100, 'transition': 100, 'old': 10, 'new': 13, 'probe': 0}), [87, 13, -2, True, False, 1, 100, [87, 1]])
variant = [({'atomic': 100, 'transition': 100, 'old': 10, 'new': 11, 'probe': 0}, [89, 11, 0, True, False, 1, 100, [89, 1]]), ({'atomic': 101, 'transition': 100, 'old': 10, 'new': 11, 'probe': 0}, [90, 11, 1, False, False, 1, 101, [90, 0]]), ({'atomic': 102, 'transition': 100, 'old': 10, 'new': 11, 'probe': 0}, [91, 11, 1, False, False, 1, 102, [91, 0]]), ({'atomic': 103, 'transition': 100, 'old': 10, 'new': 11, 'probe': 0}, [92, 11, 1, False, False, 1, 103, [92, 0]]), ({'atomic': 104, 'transition': 100, 'old': 10, 'new': 11, 'probe': 0}, [93, 11, 1, False, False, 1, 104, [93, 0]])]
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):
    active_offset = r['new']
    label = r['atomic'] - active_offset
    previous_offset = r['new'] if r['atomic'] - 1 >= r['transition'] else r['old']
    previous_label = r['atomic'] - 1 - previous_offset
    step = r['new'] - r['old']
    label_delta = label - previous_label
    fold = step > 0 and r['transition'] <= r['atomic'] < r['transition'] + step
    gap = step < 0 and r['atomic'] == r['transition']
    direction = (step > 0) - (step < 0)
    reconstructed = label + active_offset
    return [label,active_offset,label_delta,fold,gap,direction,reconstructed,[label,int(fold)]]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve({'atomic': 99, 'transition': 100, 'old': 10, 'new': 11, 'probe': 0}), [89, 10, 1, False, False, 1, 99, [89, 0]])
check('fixture 2', solve({'atomic': 100, 'transition': 100, 'old': 10, 'new': 11, 'probe': 0}), [89, 11, 0, True, False, 1, 100, [89, 1]])
check('fixture 3', solve({'atomic': 101, 'transition': 100, 'old': 10, 'new': 11, 'probe': 0}), [90, 11, 1, False, False, 1, 101, [90, 0]])
check('fixture 4', solve({'atomic': 110, 'transition': 100, 'old': 10, 'new': 11, 'probe': 0}), [99, 11, 1, False, False, 1, 110, [99, 0]])
check('fixture 5', solve({'atomic': 100, 'transition': 100, 'old': 10, 'new': 9, 'probe': 0}), [91, 9, 2, False, True, -1, 100, [91, 0]])
check('fixture 6', solve({'atomic': 99, 'transition': 100, 'old': 10, 'new': 9, 'probe': 0}), [89, 10, 1, False, False, -1, 99, [89, 0]])
check('fixture 7', solve({'atomic': 101, 'transition': 100, 'old': 10, 'new': 9, 'probe': 0}), [92, 9, 1, False, False, -1, 101, [92, 0]])
check('fixture 8', solve({'atomic': 100, 'transition': 100, 'old': 10, 'new': 10, 'probe': 0}), [90, 10, 1, False, False, 0, 100, [90, 0]])
check('fixture 9', solve({'atomic': 101, 'transition': 100, 'old': 10, 'new': 13, 'probe': 0}), [88, 13, 1, True, False, 1, 101, [88, 1]])
check('fixture 10', solve({'atomic': 103, 'transition': 100, 'old': 10, 'new': 13, 'probe': 0}), [90, 13, 1, False, False, 1, 103, [90, 0]])
check('fixture 11', solve({'atomic': 100, 'transition': 100, 'old': 10, 'new': 13, 'probe': 0}), [87, 13, -2, True, False, 1, 100, [87, 1]])
variant = [({'atomic': 100, 'transition': 100, 'old': 10, 'new': 11, 'probe': 0}, [89, 11, 0, True, False, 1, 100, [89, 1]]), ({'atomic': 101, 'transition': 100, 'old': 10, 'new': 11, 'probe': 0}, [90, 11, 1, False, False, 1, 101, [90, 0]]), ({'atomic': 102, 'transition': 100, 'old': 10, 'new': 11, 'probe': 0}, [91, 11, 1, False, False, 1, 102, [91, 0]]), ({'atomic': 103, 'transition': 100, 'old': 10, 'new': 11, 'probe': 0}, [92, 11, 1, False, False, 1, 103, [92, 0]]), ({'atomic': 104, 'transition': 100, 'old': 10, 'new': 11, 'probe': 0}, [93, 11, 1, False, False, 1, 104, [93, 0]])]
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 active_offset.

A stipulated offset table has initial atomic-minus-civil offset and a single step effective at atomic transition T. Translate atomic to civil label using active offset, retaining a fold tag for repeated labels on positive steps. Report label, offset, previous-label delta, discontinuity direction, repeated-label window membership and invertible pair. Offsets need not correspond to any real-world table.

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):
    active_offset = r['new'] if r['atomic'] >= r['transition'] else r['old']
    label = r['atomic'] + active_offset
    previous_offset = r['new'] if r['atomic'] - 1 >= r['transition'] else r['old']
    previous_label = r['atomic'] - 1 - previous_offset
    step = r['new'] - r['old']
    label_delta = label - previous_label
    fold = step > 0 and r['transition'] <= r['atomic'] < r['transition'] + step
    gap = step < 0 and r['atomic'] == r['transition']
    direction = (step > 0) - (step < 0)
    reconstructed = label + active_offset
    return [label,active_offset,label_delta,fold,gap,direction,reconstructed,[label,int(fold)]]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve({'atomic': 99, 'transition': 100, 'old': 10, 'new': 11, 'probe': 0}), [89, 10, 1, False, False, 1, 99, [89, 0]])
check('fixture 2', solve({'atomic': 100, 'transition': 100, 'old': 10, 'new': 11, 'probe': 0}), [89, 11, 0, True, False, 1, 100, [89, 1]])
check('fixture 3', solve({'atomic': 101, 'transition': 100, 'old': 10, 'new': 11, 'probe': 0}), [90, 11, 1, False, False, 1, 101, [90, 0]])
check('fixture 4', solve({'atomic': 110, 'transition': 100, 'old': 10, 'new': 11, 'probe': 0}), [99, 11, 1, False, False, 1, 110, [99, 0]])
check('fixture 5', solve({'atomic': 100, 'transition': 100, 'old': 10, 'new': 9, 'probe': 0}), [91, 9, 2, False, True, -1, 100, [91, 0]])
check('fixture 6', solve({'atomic': 99, 'transition': 100, 'old': 10, 'new': 9, 'probe': 0}), [89, 10, 1, False, False, -1, 99, [89, 0]])
check('fixture 7', solve({'atomic': 101, 'transition': 100, 'old': 10, 'new': 9, 'probe': 0}), [92, 9, 1, False, False, -1, 101, [92, 0]])
check('fixture 8', solve({'atomic': 100, 'transition': 100, 'old': 10, 'new': 10, 'probe': 0}), [90, 10, 1, False, False, 0, 100, [90, 0]])
check('fixture 9', solve({'atomic': 101, 'transition': 100, 'old': 10, 'new': 13, 'probe': 0}), [88, 13, 1, True, False, 1, 101, [88, 1]])
check('fixture 10', solve({'atomic': 103, 'transition': 100, 'old': 10, 'new': 13, 'probe': 0}), [90, 13, 1, False, False, 1, 103, [90, 0]])
check('fixture 11', solve({'atomic': 100, 'transition': 100, 'old': 10, 'new': 13, 'probe': 0}), [87, 13, -2, True, False, 1, 100, [87, 1]])
variant = [({'atomic': 100, 'transition': 100, 'old': 10, 'new': 11, 'probe': 0}, [89, 11, 0, True, False, 1, 100, [89, 1]]), ({'atomic': 101, 'transition': 100, 'old': 10, 'new': 11, 'probe': 0}, [90, 11, 1, False, False, 1, 101, [90, 0]]), ({'atomic': 102, 'transition': 100, 'old': 10, 'new': 11, 'probe': 0}, [91, 11, 1, False, False, 1, 102, [91, 0]]), ({'atomic': 103, 'transition': 100, 'old': 10, 'new': 11, 'probe': 0}, [92, 11, 1, False, False, 1, 103, [92, 0]]), ({'atomic': 104, 'transition': 100, 'old': 10, 'new': 11, 'probe': 0}, [93, 11, 1, False, False, 1, 104, [93, 0]])]
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):
    active_offset = r['new'] if r['atomic'] >= r['transition'] else r['old']
    label = r['atomic'] - r['old']
    previous_offset = r['new'] if r['atomic'] - 1 >= r['transition'] else r['old']
    previous_label = r['atomic'] - 1 - previous_offset
    step = r['new'] - r['old']
    label_delta = label - previous_label
    fold = step > 0 and r['transition'] <= r['atomic'] < r['transition'] + step
    gap = step < 0 and r['atomic'] == r['transition']
    direction = (step > 0) - (step < 0)
    reconstructed = label + active_offset
    return [label,active_offset,label_delta,fold,gap,direction,reconstructed,[label,int(fold)]]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve({'atomic': 99, 'transition': 100, 'old': 10, 'new': 11, 'probe': 0}), [89, 10, 1, False, False, 1, 99, [89, 0]])
check('fixture 2', solve({'atomic': 100, 'transition': 100, 'old': 10, 'new': 11, 'probe': 0}), [89, 11, 0, True, False, 1, 100, [89, 1]])
check('fixture 3', solve({'atomic': 101, 'transition': 100, 'old': 10, 'new': 11, 'probe': 0}), [90, 11, 1, False, False, 1, 101, [90, 0]])
check('fixture 4', solve({'atomic': 110, 'transition': 100, 'old': 10, 'new': 11, 'probe': 0}), [99, 11, 1, False, False, 1, 110, [99, 0]])
check('fixture 5', solve({'atomic': 100, 'transition': 100, 'old': 10, 'new': 9, 'probe': 0}), [91, 9, 2, False, True, -1, 100, [91, 0]])
check('fixture 6', solve({'atomic': 99, 'transition': 100, 'old': 10, 'new': 9, 'probe': 0}), [89, 10, 1, False, False, -1, 99, [89, 0]])
check('fixture 7', solve({'atomic': 101, 'transition': 100, 'old': 10, 'new': 9, 'probe': 0}), [92, 9, 1, False, False, -1, 101, [92, 0]])
check('fixture 8', solve({'atomic': 100, 'transition': 100, 'old': 10, 'new': 10, 'probe': 0}), [90, 10, 1, False, False, 0, 100, [90, 0]])
check('fixture 9', solve({'atomic': 101, 'transition': 100, 'old': 10, 'new': 13, 'probe': 0}), [88, 13, 1, True, False, 1, 101, [88, 1]])
check('fixture 10', solve({'atomic': 103, 'transition': 100, 'old': 10, 'new': 13, 'probe': 0}), [90, 13, 1, False, False, 1, 103, [90, 0]])
check('fixture 11', solve({'atomic': 100, 'transition': 100, 'old': 10, 'new': 13, 'probe': 0}), [87, 13, -2, True, False, 1, 100, [87, 1]])
variant = [({'atomic': 100, 'transition': 100, 'old': 10, 'new': 11, 'probe': 0}, [89, 11, 0, True, False, 1, 100, [89, 1]]), ({'atomic': 101, 'transition': 100, 'old': 10, 'new': 11, 'probe': 0}, [90, 11, 1, False, False, 1, 101, [90, 0]]), ({'atomic': 102, 'transition': 100, 'old': 10, 'new': 11, 'probe': 0}, [91, 11, 1, False, False, 1, 102, [91, 0]]), ({'atomic': 103, 'transition': 100, 'old': 10, 'new': 11, 'probe': 0}, [92, 11, 1, False, False, 1, 103, [92, 0]]), ({'atomic': 104, 'transition': 100, 'old': 10, 'new': 11, 'probe': 0}, [93, 11, 1, False, False, 1, 104, [93, 0]])]
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 label.

A stipulated offset table has initial atomic-minus-civil offset and a single step effective at atomic transition T. Translate atomic to civil label using active offset, retaining a fold tag for repeated labels on positive steps. Report label, offset, previous-label delta, discontinuity direction, repeated-label window membership and invertible pair. Offsets need not correspond to any real-world table.

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):
    active_offset = r['new'] if r['atomic'] >= r['transition'] else r['old']
    label = r['atomic'] - active_offset
    previous_offset = active_offset
    previous_label = r['atomic'] - 1 - previous_offset
    step = r['new'] - r['old']
    label_delta = label - previous_label
    fold = step > 0 and r['transition'] <= r['atomic'] < r['transition'] + step
    gap = step < 0 and r['atomic'] == r['transition']
    direction = (step > 0) - (step < 0)
    reconstructed = label + active_offset
    return [label,active_offset,label_delta,fold,gap,direction,reconstructed,[label,int(fold)]]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve({'atomic': 99, 'transition': 100, 'old': 10, 'new': 11, 'probe': 0}), [89, 10, 1, False, False, 1, 99, [89, 0]])
check('fixture 2', solve({'atomic': 100, 'transition': 100, 'old': 10, 'new': 11, 'probe': 0}), [89, 11, 0, True, False, 1, 100, [89, 1]])
check('fixture 3', solve({'atomic': 101, 'transition': 100, 'old': 10, 'new': 11, 'probe': 0}), [90, 11, 1, False, False, 1, 101, [90, 0]])
check('fixture 4', solve({'atomic': 110, 'transition': 100, 'old': 10, 'new': 11, 'probe': 0}), [99, 11, 1, False, False, 1, 110, [99, 0]])
check('fixture 5', solve({'atomic': 100, 'transition': 100, 'old': 10, 'new': 9, 'probe': 0}), [91, 9, 2, False, True, -1, 100, [91, 0]])
check('fixture 6', solve({'atomic': 99, 'transition': 100, 'old': 10, 'new': 9, 'probe': 0}), [89, 10, 1, False, False, -1, 99, [89, 0]])
check('fixture 7', solve({'atomic': 101, 'transition': 100, 'old': 10, 'new': 9, 'probe': 0}), [92, 9, 1, False, False, -1, 101, [92, 0]])
check('fixture 8', solve({'atomic': 100, 'transition': 100, 'old': 10, 'new': 10, 'probe': 0}), [90, 10, 1, False, False, 0, 100, [90, 0]])
check('fixture 9', solve({'atomic': 101, 'transition': 100, 'old': 10, 'new': 13, 'probe': 0}), [88, 13, 1, True, False, 1, 101, [88, 1]])
check('fixture 10', solve({'atomic': 103, 'transition': 100, 'old': 10, 'new': 13, 'probe': 0}), [90, 13, 1, False, False, 1, 103, [90, 0]])
check('fixture 11', solve({'atomic': 100, 'transition': 100, 'old': 10, 'new': 13, 'probe': 0}), [87, 13, -2, True, False, 1, 100, [87, 1]])
variant = [({'atomic': 100, 'transition': 100, 'old': 10, 'new': 11, 'probe': 0}, [89, 11, 0, True, False, 1, 100, [89, 1]]), ({'atomic': 101, 'transition': 100, 'old': 10, 'new': 11, 'probe': 0}, [90, 11, 1, False, False, 1, 101, [90, 0]]), ({'atomic': 102, 'transition': 100, 'old': 10, 'new': 11, 'probe': 0}, [91, 11, 1, False, False, 1, 102, [91, 0]]), ({'atomic': 103, 'transition': 100, 'old': 10, 'new': 11, 'probe': 0}, [92, 11, 1, False, False, 1, 103, [92, 0]]), ({'atomic': 104, 'transition': 100, 'old': 10, 'new': 11, 'probe': 0}, [93, 11, 1, False, False, 1, 104, [93, 0]])]
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):
    active_offset = r['new'] if r['atomic'] >= r['transition'] else r['old']
    label = r['atomic'] - active_offset
    previous_offset = r['old']
    previous_label = r['atomic'] - 1 - previous_offset
    step = r['new'] - r['old']
    label_delta = label - previous_label
    fold = step > 0 and r['transition'] <= r['atomic'] < r['transition'] + step
    gap = step < 0 and r['atomic'] == r['transition']
    direction = (step > 0) - (step < 0)
    reconstructed = label + active_offset
    return [label,active_offset,label_delta,fold,gap,direction,reconstructed,[label,int(fold)]]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve({'atomic': 99, 'transition': 100, 'old': 10, 'new': 11, 'probe': 0}), [89, 10, 1, False, False, 1, 99, [89, 0]])
check('fixture 2', solve({'atomic': 100, 'transition': 100, 'old': 10, 'new': 11, 'probe': 0}), [89, 11, 0, True, False, 1, 100, [89, 1]])
check('fixture 3', solve({'atomic': 101, 'transition': 100, 'old': 10, 'new': 11, 'probe': 0}), [90, 11, 1, False, False, 1, 101, [90, 0]])
check('fixture 4', solve({'atomic': 110, 'transition': 100, 'old': 10, 'new': 11, 'probe': 0}), [99, 11, 1, False, False, 1, 110, [99, 0]])
check('fixture 5', solve({'atomic': 100, 'transition': 100, 'old': 10, 'new': 9, 'probe': 0}), [91, 9, 2, False, True, -1, 100, [91, 0]])
check('fixture 6', solve({'atomic': 99, 'transition': 100, 'old': 10, 'new': 9, 'probe': 0}), [89, 10, 1, False, False, -1, 99, [89, 0]])
check('fixture 7', solve({'atomic': 101, 'transition': 100, 'old': 10, 'new': 9, 'probe': 0}), [92, 9, 1, False, False, -1, 101, [92, 0]])
check('fixture 8', solve({'atomic': 100, 'transition': 100, 'old': 10, 'new': 10, 'probe': 0}), [90, 10, 1, False, False, 0, 100, [90, 0]])
check('fixture 9', solve({'atomic': 101, 'transition': 100, 'old': 10, 'new': 13, 'probe': 0}), [88, 13, 1, True, False, 1, 101, [88, 1]])
check('fixture 10', solve({'atomic': 103, 'transition': 100, 'old': 10, 'new': 13, 'probe': 0}), [90, 13, 1, False, False, 1, 103, [90, 0]])
check('fixture 11', solve({'atomic': 100, 'transition': 100, 'old': 10, 'new': 13, 'probe': 0}), [87, 13, -2, True, False, 1, 100, [87, 1]])
variant = [({'atomic': 100, 'transition': 100, 'old': 10, 'new': 11, 'probe': 0}, [89, 11, 0, True, False, 1, 100, [89, 1]]), ({'atomic': 101, 'transition': 100, 'old': 10, 'new': 11, 'probe': 0}, [90, 11, 1, False, False, 1, 101, [90, 0]]), ({'atomic': 102, 'transition': 100, 'old': 10, 'new': 11, 'probe': 0}, [91, 11, 1, False, False, 1, 102, [91, 0]]), ({'atomic': 103, 'transition': 100, 'old': 10, 'new': 11, 'probe': 0}, [92, 11, 1, False, False, 1, 103, [92, 0]]), ({'atomic': 104, 'transition': 100, 'old': 10, 'new': 11, 'probe': 0}, [93, 11, 1, False, False, 1, 104, [93, 0]])]
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 previous_offset.

A stipulated offset table has initial atomic-minus-civil offset and a single step effective at atomic transition T. Translate atomic to civil label using active offset, retaining a fold tag for repeated labels on positive steps. Report label, offset, previous-label delta, discontinuity direction, repeated-label window membership and invertible pair. Offsets need not correspond to any real-world table.

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):
    active_offset = r['new'] if r['atomic'] >= r['transition'] else r['old']
    label = r['atomic'] - active_offset
    previous_offset = r['new'] if r['atomic'] - 1 >= r['transition'] else r['old']
    previous_label = r['atomic'] - previous_offset
    step = r['new'] - r['old']
    label_delta = label - previous_label
    fold = step > 0 and r['transition'] <= r['atomic'] < r['transition'] + step
    gap = step < 0 and r['atomic'] == r['transition']
    direction = (step > 0) - (step < 0)
    reconstructed = label + active_offset
    return [label,active_offset,label_delta,fold,gap,direction,reconstructed,[label,int(fold)]]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve({'atomic': 99, 'transition': 100, 'old': 10, 'new': 11, 'probe': 0}), [89, 10, 1, False, False, 1, 99, [89, 0]])
check('fixture 2', solve({'atomic': 100, 'transition': 100, 'old': 10, 'new': 11, 'probe': 0}), [89, 11, 0, True, False, 1, 100, [89, 1]])
check('fixture 3', solve({'atomic': 101, 'transition': 100, 'old': 10, 'new': 11, 'probe': 0}), [90, 11, 1, False, False, 1, 101, [90, 0]])
check('fixture 4', solve({'atomic': 110, 'transition': 100, 'old': 10, 'new': 11, 'probe': 0}), [99, 11, 1, False, False, 1, 110, [99, 0]])
check('fixture 5', solve({'atomic': 100, 'transition': 100, 'old': 10, 'new': 9, 'probe': 0}), [91, 9, 2, False, True, -1, 100, [91, 0]])
check('fixture 6', solve({'atomic': 99, 'transition': 100, 'old': 10, 'new': 9, 'probe': 0}), [89, 10, 1, False, False, -1, 99, [89, 0]])
check('fixture 7', solve({'atomic': 101, 'transition': 100, 'old': 10, 'new': 9, 'probe': 0}), [92, 9, 1, False, False, -1, 101, [92, 0]])
check('fixture 8', solve({'atomic': 100, 'transition': 100, 'old': 10, 'new': 10, 'probe': 0}), [90, 10, 1, False, False, 0, 100, [90, 0]])
check('fixture 9', solve({'atomic': 101, 'transition': 100, 'old': 10, 'new': 13, 'probe': 0}), [88, 13, 1, True, False, 1, 101, [88, 1]])
check('fixture 10', solve({'atomic': 103, 'transition': 100, 'old': 10, 'new': 13, 'probe': 0}), [90, 13, 1, False, False, 1, 103, [90, 0]])
check('fixture 11', solve({'atomic': 100, 'transition': 100, 'old': 10, 'new': 13, 'probe': 0}), [87, 13, -2, True, False, 1, 100, [87, 1]])
variant = [({'atomic': 100, 'transition': 100, 'old': 10, 'new': 11, 'probe': 0}, [89, 11, 0, True, False, 1, 100, [89, 1]]), ({'atomic': 101, 'transition': 100, 'old': 10, 'new': 11, 'probe': 0}, [90, 11, 1, False, False, 1, 101, [90, 0]]), ({'atomic': 102, 'transition': 100, 'old': 10, 'new': 11, 'probe': 0}, [91, 11, 1, False, False, 1, 102, [91, 0]]), ({'atomic': 103, 'transition': 100, 'old': 10, 'new': 11, 'probe': 0}, [92, 11, 1, False, False, 1, 103, [92, 0]]), ({'atomic': 104, 'transition': 100, 'old': 10, 'new': 11, 'probe': 0}, [93, 11, 1, False, False, 1, 104, [93, 0]])]
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):
    active_offset = r['new'] if r['atomic'] >= r['transition'] else r['old']
    label = r['atomic'] - active_offset
    previous_offset = r['new'] if r['atomic'] - 1 >= r['transition'] else r['old']
    previous_label = label - 1
    step = r['new'] - r['old']
    label_delta = label - previous_label
    fold = step > 0 and r['transition'] <= r['atomic'] < r['transition'] + step
    gap = step < 0 and r['atomic'] == r['transition']
    direction = (step > 0) - (step < 0)
    reconstructed = label + active_offset
    return [label,active_offset,label_delta,fold,gap,direction,reconstructed,[label,int(fold)]]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve({'atomic': 99, 'transition': 100, 'old': 10, 'new': 11, 'probe': 0}), [89, 10, 1, False, False, 1, 99, [89, 0]])
check('fixture 2', solve({'atomic': 100, 'transition': 100, 'old': 10, 'new': 11, 'probe': 0}), [89, 11, 0, True, False, 1, 100, [89, 1]])
check('fixture 3', solve({'atomic': 101, 'transition': 100, 'old': 10, 'new': 11, 'probe': 0}), [90, 11, 1, False, False, 1, 101, [90, 0]])
check('fixture 4', solve({'atomic': 110, 'transition': 100, 'old': 10, 'new': 11, 'probe': 0}), [99, 11, 1, False, False, 1, 110, [99, 0]])
check('fixture 5', solve({'atomic': 100, 'transition': 100, 'old': 10, 'new': 9, 'probe': 0}), [91, 9, 2, False, True, -1, 100, [91, 0]])
check('fixture 6', solve({'atomic': 99, 'transition': 100, 'old': 10, 'new': 9, 'probe': 0}), [89, 10, 1, False, False, -1, 99, [89, 0]])
check('fixture 7', solve({'atomic': 101, 'transition': 100, 'old': 10, 'new': 9, 'probe': 0}), [92, 9, 1, False, False, -1, 101, [92, 0]])
check('fixture 8', solve({'atomic': 100, 'transition': 100, 'old': 10, 'new': 10, 'probe': 0}), [90, 10, 1, False, False, 0, 100, [90, 0]])
check('fixture 9', solve({'atomic': 101, 'transition': 100, 'old': 10, 'new': 13, 'probe': 0}), [88, 13, 1, True, False, 1, 101, [88, 1]])
check('fixture 10', solve({'atomic': 103, 'transition': 100, 'old': 10, 'new': 13, 'probe': 0}), [90, 13, 1, False, False, 1, 103, [90, 0]])
check('fixture 11', solve({'atomic': 100, 'transition': 100, 'old': 10, 'new': 13, 'probe': 0}), [87, 13, -2, True, False, 1, 100, [87, 1]])
variant = [({'atomic': 100, 'transition': 100, 'old': 10, 'new': 11, 'probe': 0}, [89, 11, 0, True, False, 1, 100, [89, 1]]), ({'atomic': 101, 'transition': 100, 'old': 10, 'new': 11, 'probe': 0}, [90, 11, 1, False, False, 1, 101, [90, 0]]), ({'atomic': 102, 'transition': 100, 'old': 10, 'new': 11, 'probe': 0}, [91, 11, 1, False, False, 1, 102, [91, 0]]), ({'atomic': 103, 'transition': 100, 'old': 10, 'new': 11, 'probe': 0}, [92, 11, 1, False, False, 1, 103, [92, 0]]), ({'atomic': 104, 'transition': 100, 'old': 10, 'new': 11, 'probe': 0}, [93, 11, 1, False, False, 1, 104, [93, 0]])]
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 previous_label.

A stipulated offset table has initial atomic-minus-civil offset and a single step effective at atomic transition T. Translate atomic to civil label using active offset, retaining a fold tag for repeated labels on positive steps. Report label, offset, previous-label delta, discontinuity direction, repeated-label window membership and invertible pair. Offsets need not correspond to any real-world table.

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):
    active_offset = r['new'] if r['atomic'] >= r['transition'] else r['old']
    label = r['atomic'] - active_offset
    previous_offset = r['new'] if r['atomic'] - 1 >= r['transition'] else r['old']
    previous_label = r['atomic'] - 1 - previous_offset
    step = r['new']
    label_delta = label - previous_label
    fold = step > 0 and r['transition'] <= r['atomic'] < r['transition'] + step
    gap = step < 0 and r['atomic'] == r['transition']
    direction = (step > 0) - (step < 0)
    reconstructed = label + active_offset
    return [label,active_offset,label_delta,fold,gap,direction,reconstructed,[label,int(fold)]]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve({'atomic': 99, 'transition': 100, 'old': 10, 'new': 11, 'probe': 0}), [89, 10, 1, False, False, 1, 99, [89, 0]])
check('fixture 2', solve({'atomic': 100, 'transition': 100, 'old': 10, 'new': 11, 'probe': 0}), [89, 11, 0, True, False, 1, 100, [89, 1]])
check('fixture 3', solve({'atomic': 101, 'transition': 100, 'old': 10, 'new': 11, 'probe': 0}), [90, 11, 1, False, False, 1, 101, [90, 0]])
check('fixture 4', solve({'atomic': 110, 'transition': 100, 'old': 10, 'new': 11, 'probe': 0}), [99, 11, 1, False, False, 1, 110, [99, 0]])
check('fixture 5', solve({'atomic': 100, 'transition': 100, 'old': 10, 'new': 9, 'probe': 0}), [91, 9, 2, False, True, -1, 100, [91, 0]])
check('fixture 6', solve({'atomic': 99, 'transition': 100, 'old': 10, 'new': 9, 'probe': 0}), [89, 10, 1, False, False, -1, 99, [89, 0]])
check('fixture 7', solve({'atomic': 101, 'transition': 100, 'old': 10, 'new': 9, 'probe': 0}), [92, 9, 1, False, False, -1, 101, [92, 0]])
check('fixture 8', solve({'atomic': 100, 'transition': 100, 'old': 10, 'new': 10, 'probe': 0}), [90, 10, 1, False, False, 0, 100, [90, 0]])
check('fixture 9', solve({'atomic': 101, 'transition': 100, 'old': 10, 'new': 13, 'probe': 0}), [88, 13, 1, True, False, 1, 101, [88, 1]])
check('fixture 10', solve({'atomic': 103, 'transition': 100, 'old': 10, 'new': 13, 'probe': 0}), [90, 13, 1, False, False, 1, 103, [90, 0]])
check('fixture 11', solve({'atomic': 100, 'transition': 100, 'old': 10, 'new': 13, 'probe': 0}), [87, 13, -2, True, False, 1, 100, [87, 1]])
variant = [({'atomic': 100, 'transition': 100, 'old': 10, 'new': 11, 'probe': 0}, [89, 11, 0, True, False, 1, 100, [89, 1]]), ({'atomic': 101, 'transition': 100, 'old': 10, 'new': 11, 'probe': 0}, [90, 11, 1, False, False, 1, 101, [90, 0]]), ({'atomic': 102, 'transition': 100, 'old': 10, 'new': 11, 'probe': 0}, [91, 11, 1, False, False, 1, 102, [91, 0]]), ({'atomic': 103, 'transition': 100, 'old': 10, 'new': 11, 'probe': 0}, [92, 11, 1, False, False, 1, 103, [92, 0]]), ({'atomic': 104, 'transition': 100, 'old': 10, 'new': 11, 'probe': 0}, [93, 11, 1, False, False, 1, 104, [93, 0]])]
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):
    active_offset = r['new'] if r['atomic'] >= r['transition'] else r['old']
    label = r['atomic'] - active_offset
    previous_offset = r['new'] if r['atomic'] - 1 >= r['transition'] else r['old']
    previous_label = r['atomic'] - 1 - previous_offset
    step = r['old'] - r['new']
    label_delta = label - previous_label
    fold = step > 0 and r['transition'] <= r['atomic'] < r['transition'] + step
    gap = step < 0 and r['atomic'] == r['transition']
    direction = (step > 0) - (step < 0)
    reconstructed = label + active_offset
    return [label,active_offset,label_delta,fold,gap,direction,reconstructed,[label,int(fold)]]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve({'atomic': 99, 'transition': 100, 'old': 10, 'new': 11, 'probe': 0}), [89, 10, 1, False, False, 1, 99, [89, 0]])
check('fixture 2', solve({'atomic': 100, 'transition': 100, 'old': 10, 'new': 11, 'probe': 0}), [89, 11, 0, True, False, 1, 100, [89, 1]])
check('fixture 3', solve({'atomic': 101, 'transition': 100, 'old': 10, 'new': 11, 'probe': 0}), [90, 11, 1, False, False, 1, 101, [90, 0]])
check('fixture 4', solve({'atomic': 110, 'transition': 100, 'old': 10, 'new': 11, 'probe': 0}), [99, 11, 1, False, False, 1, 110, [99, 0]])
check('fixture 5', solve({'atomic': 100, 'transition': 100, 'old': 10, 'new': 9, 'probe': 0}), [91, 9, 2, False, True, -1, 100, [91, 0]])
check('fixture 6', solve({'atomic': 99, 'transition': 100, 'old': 10, 'new': 9, 'probe': 0}), [89, 10, 1, False, False, -1, 99, [89, 0]])
check('fixture 7', solve({'atomic': 101, 'transition': 100, 'old': 10, 'new': 9, 'probe': 0}), [92, 9, 1, False, False, -1, 101, [92, 0]])
check('fixture 8', solve({'atomic': 100, 'transition': 100, 'old': 10, 'new': 10, 'probe': 0}), [90, 10, 1, False, False, 0, 100, [90, 0]])
check('fixture 9', solve({'atomic': 101, 'transition': 100, 'old': 10, 'new': 13, 'probe': 0}), [88, 13, 1, True, False, 1, 101, [88, 1]])
check('fixture 10', solve({'atomic': 103, 'transition': 100, 'old': 10, 'new': 13, 'probe': 0}), [90, 13, 1, False, False, 1, 103, [90, 0]])
check('fixture 11', solve({'atomic': 100, 'transition': 100, 'old': 10, 'new': 13, 'probe': 0}), [87, 13, -2, True, False, 1, 100, [87, 1]])
variant = [({'atomic': 100, 'transition': 100, 'old': 10, 'new': 11, 'probe': 0}, [89, 11, 0, True, False, 1, 100, [89, 1]]), ({'atomic': 101, 'transition': 100, 'old': 10, 'new': 11, 'probe': 0}, [90, 11, 1, False, False, 1, 101, [90, 0]]), ({'atomic': 102, 'transition': 100, 'old': 10, 'new': 11, 'probe': 0}, [91, 11, 1, False, False, 1, 102, [91, 0]]), ({'atomic': 103, 'transition': 100, 'old': 10, 'new': 11, 'probe': 0}, [92, 11, 1, False, False, 1, 103, [92, 0]]), ({'atomic': 104, 'transition': 100, 'old': 10, 'new': 11, 'probe': 0}, [93, 11, 1, False, False, 1, 104, [93, 0]])]
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 step.

A stipulated offset table has initial atomic-minus-civil offset and a single step effective at atomic transition T. Translate atomic to civil label using active offset, retaining a fold tag for repeated labels on positive steps. Report label, offset, previous-label delta, discontinuity direction, repeated-label window membership and invertible pair. Offsets need not correspond to any real-world table.

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):
    active_offset = r['new'] if r['atomic'] >= r['transition'] else r['old']
    label = r['atomic'] - active_offset
    previous_offset = r['new'] if r['atomic'] - 1 >= r['transition'] else r['old']
    previous_label = r['atomic'] - 1 - previous_offset
    step = r['new'] - r['old']
    label_delta = max(1,label - previous_label)
    fold = step > 0 and r['transition'] <= r['atomic'] < r['transition'] + step
    gap = step < 0 and r['atomic'] == r['transition']
    direction = (step > 0) - (step < 0)
    reconstructed = label + active_offset
    return [label,active_offset,label_delta,fold,gap,direction,reconstructed,[label,int(fold)]]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve({'atomic': 99, 'transition': 100, 'old': 10, 'new': 11, 'probe': 0}), [89, 10, 1, False, False, 1, 99, [89, 0]])
check('fixture 2', solve({'atomic': 100, 'transition': 100, 'old': 10, 'new': 11, 'probe': 0}), [89, 11, 0, True, False, 1, 100, [89, 1]])
check('fixture 3', solve({'atomic': 101, 'transition': 100, 'old': 10, 'new': 11, 'probe': 0}), [90, 11, 1, False, False, 1, 101, [90, 0]])
check('fixture 4', solve({'atomic': 110, 'transition': 100, 'old': 10, 'new': 11, 'probe': 0}), [99, 11, 1, False, False, 1, 110, [99, 0]])
check('fixture 5', solve({'atomic': 100, 'transition': 100, 'old': 10, 'new': 9, 'probe': 0}), [91, 9, 2, False, True, -1, 100, [91, 0]])
check('fixture 6', solve({'atomic': 99, 'transition': 100, 'old': 10, 'new': 9, 'probe': 0}), [89, 10, 1, False, False, -1, 99, [89, 0]])
check('fixture 7', solve({'atomic': 101, 'transition': 100, 'old': 10, 'new': 9, 'probe': 0}), [92, 9, 1, False, False, -1, 101, [92, 0]])
check('fixture 8', solve({'atomic': 100, 'transition': 100, 'old': 10, 'new': 10, 'probe': 0}), [90, 10, 1, False, False, 0, 100, [90, 0]])
check('fixture 9', solve({'atomic': 101, 'transition': 100, 'old': 10, 'new': 13, 'probe': 0}), [88, 13, 1, True, False, 1, 101, [88, 1]])
check('fixture 10', solve({'atomic': 103, 'transition': 100, 'old': 10, 'new': 13, 'probe': 0}), [90, 13, 1, False, False, 1, 103, [90, 0]])
check('fixture 11', solve({'atomic': 100, 'transition': 100, 'old': 10, 'new': 13, 'probe': 0}), [87, 13, -2, True, False, 1, 100, [87, 1]])
variant = [({'atomic': 100, 'transition': 100, 'old': 10, 'new': 11, 'probe': 0}, [89, 11, 0, True, False, 1, 100, [89, 1]]), ({'atomic': 101, 'transition': 100, 'old': 10, 'new': 11, 'probe': 0}, [90, 11, 1, False, False, 1, 101, [90, 0]]), ({'atomic': 102, 'transition': 100, 'old': 10, 'new': 11, 'probe': 0}, [91, 11, 1, False, False, 1, 102, [91, 0]]), ({'atomic': 103, 'transition': 100, 'old': 10, 'new': 11, 'probe': 0}, [92, 11, 1, False, False, 1, 103, [92, 0]]), ({'atomic': 104, 'transition': 100, 'old': 10, 'new': 11, 'probe': 0}, [93, 11, 1, False, False, 1, 104, [93, 0]])]
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):
    active_offset = r['new'] if r['atomic'] >= r['transition'] else r['old']
    label = r['atomic'] - active_offset
    previous_offset = r['new'] if r['atomic'] - 1 >= r['transition'] else r['old']
    previous_label = r['atomic'] - 1 - previous_offset
    step = r['new'] - r['old']
    label_delta = abs(label - previous_label)
    fold = step > 0 and r['transition'] <= r['atomic'] < r['transition'] + step
    gap = step < 0 and r['atomic'] == r['transition']
    direction = (step > 0) - (step < 0)
    reconstructed = label + active_offset
    return [label,active_offset,label_delta,fold,gap,direction,reconstructed,[label,int(fold)]]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve({'atomic': 99, 'transition': 100, 'old': 10, 'new': 11, 'probe': 0}), [89, 10, 1, False, False, 1, 99, [89, 0]])
check('fixture 2', solve({'atomic': 100, 'transition': 100, 'old': 10, 'new': 11, 'probe': 0}), [89, 11, 0, True, False, 1, 100, [89, 1]])
check('fixture 3', solve({'atomic': 101, 'transition': 100, 'old': 10, 'new': 11, 'probe': 0}), [90, 11, 1, False, False, 1, 101, [90, 0]])
check('fixture 4', solve({'atomic': 110, 'transition': 100, 'old': 10, 'new': 11, 'probe': 0}), [99, 11, 1, False, False, 1, 110, [99, 0]])
check('fixture 5', solve({'atomic': 100, 'transition': 100, 'old': 10, 'new': 9, 'probe': 0}), [91, 9, 2, False, True, -1, 100, [91, 0]])
check('fixture 6', solve({'atomic': 99, 'transition': 100, 'old': 10, 'new': 9, 'probe': 0}), [89, 10, 1, False, False, -1, 99, [89, 0]])
check('fixture 7', solve({'atomic': 101, 'transition': 100, 'old': 10, 'new': 9, 'probe': 0}), [92, 9, 1, False, False, -1, 101, [92, 0]])
check('fixture 8', solve({'atomic': 100, 'transition': 100, 'old': 10, 'new': 10, 'probe': 0}), [90, 10, 1, False, False, 0, 100, [90, 0]])
check('fixture 9', solve({'atomic': 101, 'transition': 100, 'old': 10, 'new': 13, 'probe': 0}), [88, 13, 1, True, False, 1, 101, [88, 1]])
check('fixture 10', solve({'atomic': 103, 'transition': 100, 'old': 10, 'new': 13, 'probe': 0}), [90, 13, 1, False, False, 1, 103, [90, 0]])
check('fixture 11', solve({'atomic': 100, 'transition': 100, 'old': 10, 'new': 13, 'probe': 0}), [87, 13, -2, True, False, 1, 100, [87, 1]])
variant = [({'atomic': 100, 'transition': 100, 'old': 10, 'new': 11, 'probe': 0}, [89, 11, 0, True, False, 1, 100, [89, 1]]), ({'atomic': 101, 'transition': 100, 'old': 10, 'new': 11, 'probe': 0}, [90, 11, 1, False, False, 1, 101, [90, 0]]), ({'atomic': 102, 'transition': 100, 'old': 10, 'new': 11, 'probe': 0}, [91, 11, 1, False, False, 1, 102, [91, 0]]), ({'atomic': 103, 'transition': 100, 'old': 10, 'new': 11, 'probe': 0}, [92, 11, 1, False, False, 1, 103, [92, 0]]), ({'atomic': 104, 'transition': 100, 'old': 10, 'new': 11, 'probe': 0}, [93, 11, 1, False, False, 1, 104, [93, 0]])]
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 label_delta.

A stipulated offset table has initial atomic-minus-civil offset and a single step effective at atomic transition T. Translate atomic to civil label using active offset, retaining a fold tag for repeated labels on positive steps. Report label, offset, previous-label delta, discontinuity direction, repeated-label window membership and invertible pair. Offsets need not correspond to any real-world table.

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):
    active_offset = r['new'] if r['atomic'] >= r['transition'] else r['old']
    label = r['atomic'] - active_offset
    previous_offset = r['new'] if r['atomic'] - 1 >= r['transition'] else r['old']
    previous_label = r['atomic'] - 1 - previous_offset
    step = r['new'] - r['old']
    label_delta = label - previous_label
    fold = step > 0 and r['atomic'] >= r['transition']
    gap = step < 0 and r['atomic'] == r['transition']
    direction = (step > 0) - (step < 0)
    reconstructed = label + active_offset
    return [label,active_offset,label_delta,fold,gap,direction,reconstructed,[label,int(fold)]]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve({'atomic': 99, 'transition': 100, 'old': 10, 'new': 11, 'probe': 0}), [89, 10, 1, False, False, 1, 99, [89, 0]])
check('fixture 2', solve({'atomic': 100, 'transition': 100, 'old': 10, 'new': 11, 'probe': 0}), [89, 11, 0, True, False, 1, 100, [89, 1]])
check('fixture 3', solve({'atomic': 101, 'transition': 100, 'old': 10, 'new': 11, 'probe': 0}), [90, 11, 1, False, False, 1, 101, [90, 0]])
check('fixture 4', solve({'atomic': 110, 'transition': 100, 'old': 10, 'new': 11, 'probe': 0}), [99, 11, 1, False, False, 1, 110, [99, 0]])
check('fixture 5', solve({'atomic': 100, 'transition': 100, 'old': 10, 'new': 9, 'probe': 0}), [91, 9, 2, False, True, -1, 100, [91, 0]])
check('fixture 6', solve({'atomic': 99, 'transition': 100, 'old': 10, 'new': 9, 'probe': 0}), [89, 10, 1, False, False, -1, 99, [89, 0]])
check('fixture 7', solve({'atomic': 101, 'transition': 100, 'old': 10, 'new': 9, 'probe': 0}), [92, 9, 1, False, False, -1, 101, [92, 0]])
check('fixture 8', solve({'atomic': 100, 'transition': 100, 'old': 10, 'new': 10, 'probe': 0}), [90, 10, 1, False, False, 0, 100, [90, 0]])
check('fixture 9', solve({'atomic': 101, 'transition': 100, 'old': 10, 'new': 13, 'probe': 0}), [88, 13, 1, True, False, 1, 101, [88, 1]])
check('fixture 10', solve({'atomic': 103, 'transition': 100, 'old': 10, 'new': 13, 'probe': 0}), [90, 13, 1, False, False, 1, 103, [90, 0]])
check('fixture 11', solve({'atomic': 100, 'transition': 100, 'old': 10, 'new': 13, 'probe': 0}), [87, 13, -2, True, False, 1, 100, [87, 1]])
variant = [({'atomic': 100, 'transition': 100, 'old': 10, 'new': 11, 'probe': 0}, [89, 11, 0, True, False, 1, 100, [89, 1]]), ({'atomic': 101, 'transition': 100, 'old': 10, 'new': 11, 'probe': 0}, [90, 11, 1, False, False, 1, 101, [90, 0]]), ({'atomic': 102, 'transition': 100, 'old': 10, 'new': 11, 'probe': 0}, [91, 11, 1, False, False, 1, 102, [91, 0]]), ({'atomic': 103, 'transition': 100, 'old': 10, 'new': 11, 'probe': 0}, [92, 11, 1, False, False, 1, 103, [92, 0]]), ({'atomic': 104, 'transition': 100, 'old': 10, 'new': 11, 'probe': 0}, [93, 11, 1, False, False, 1, 104, [93, 0]])]
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):
    active_offset = r['new'] if r['atomic'] >= r['transition'] else r['old']
    label = r['atomic'] - active_offset
    previous_offset = r['new'] if r['atomic'] - 1 >= r['transition'] else r['old']
    previous_label = r['atomic'] - 1 - previous_offset
    step = r['new'] - r['old']
    label_delta = label - previous_label
    fold = step > 0 and r['transition'] < r['atomic'] <= r['transition'] + step
    gap = step < 0 and r['atomic'] == r['transition']
    direction = (step > 0) - (step < 0)
    reconstructed = label + active_offset
    return [label,active_offset,label_delta,fold,gap,direction,reconstructed,[label,int(fold)]]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve({'atomic': 99, 'transition': 100, 'old': 10, 'new': 11, 'probe': 0}), [89, 10, 1, False, False, 1, 99, [89, 0]])
check('fixture 2', solve({'atomic': 100, 'transition': 100, 'old': 10, 'new': 11, 'probe': 0}), [89, 11, 0, True, False, 1, 100, [89, 1]])
check('fixture 3', solve({'atomic': 101, 'transition': 100, 'old': 10, 'new': 11, 'probe': 0}), [90, 11, 1, False, False, 1, 101, [90, 0]])
check('fixture 4', solve({'atomic': 110, 'transition': 100, 'old': 10, 'new': 11, 'probe': 0}), [99, 11, 1, False, False, 1, 110, [99, 0]])
check('fixture 5', solve({'atomic': 100, 'transition': 100, 'old': 10, 'new': 9, 'probe': 0}), [91, 9, 2, False, True, -1, 100, [91, 0]])
check('fixture 6', solve({'atomic': 99, 'transition': 100, 'old': 10, 'new': 9, 'probe': 0}), [89, 10, 1, False, False, -1, 99, [89, 0]])
check('fixture 7', solve({'atomic': 101, 'transition': 100, 'old': 10, 'new': 9, 'probe': 0}), [92, 9, 1, False, False, -1, 101, [92, 0]])
check('fixture 8', solve({'atomic': 100, 'transition': 100, 'old': 10, 'new': 10, 'probe': 0}), [90, 10, 1, False, False, 0, 100, [90, 0]])
check('fixture 9', solve({'atomic': 101, 'transition': 100, 'old': 10, 'new': 13, 'probe': 0}), [88, 13, 1, True, False, 1, 101, [88, 1]])
check('fixture 10', solve({'atomic': 103, 'transition': 100, 'old': 10, 'new': 13, 'probe': 0}), [90, 13, 1, False, False, 1, 103, [90, 0]])
check('fixture 11', solve({'atomic': 100, 'transition': 100, 'old': 10, 'new': 13, 'probe': 0}), [87, 13, -2, True, False, 1, 100, [87, 1]])
variant = [({'atomic': 100, 'transition': 100, 'old': 10, 'new': 11, 'probe': 0}, [89, 11, 0, True, False, 1, 100, [89, 1]]), ({'atomic': 101, 'transition': 100, 'old': 10, 'new': 11, 'probe': 0}, [90, 11, 1, False, False, 1, 101, [90, 0]]), ({'atomic': 102, 'transition': 100, 'old': 10, 'new': 11, 'probe': 0}, [91, 11, 1, False, False, 1, 102, [91, 0]]), ({'atomic': 103, 'transition': 100, 'old': 10, 'new': 11, 'probe': 0}, [92, 11, 1, False, False, 1, 103, [92, 0]]), ({'atomic': 104, 'transition': 100, 'old': 10, 'new': 11, 'probe': 0}, [93, 11, 1, False, False, 1, 104, [93, 0]])]
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 fold.

A stipulated offset table has initial atomic-minus-civil offset and a single step effective at atomic transition T. Translate atomic to civil label using active offset, retaining a fold tag for repeated labels on positive steps. Report label, offset, previous-label delta, discontinuity direction, repeated-label window membership and invertible pair. Offsets need not correspond to any real-world table.

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):
    active_offset = r['new'] if r['atomic'] >= r['transition'] else r['old']
    label = r['atomic'] - active_offset
    previous_offset = r['new'] if r['atomic'] - 1 >= r['transition'] else r['old']
    previous_label = r['atomic'] - 1 - previous_offset
    step = r['new'] - r['old']
    label_delta = label - previous_label
    fold = step > 0 and r['transition'] <= r['atomic'] < r['transition'] + step
    gap = step < 0
    direction = (step > 0) - (step < 0)
    reconstructed = label + active_offset
    return [label,active_offset,label_delta,fold,gap,direction,reconstructed,[label,int(fold)]]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve({'atomic': 99, 'transition': 100, 'old': 10, 'new': 11, 'probe': 0}), [89, 10, 1, False, False, 1, 99, [89, 0]])
check('fixture 2', solve({'atomic': 100, 'transition': 100, 'old': 10, 'new': 11, 'probe': 0}), [89, 11, 0, True, False, 1, 100, [89, 1]])
check('fixture 3', solve({'atomic': 101, 'transition': 100, 'old': 10, 'new': 11, 'probe': 0}), [90, 11, 1, False, False, 1, 101, [90, 0]])
check('fixture 4', solve({'atomic': 110, 'transition': 100, 'old': 10, 'new': 11, 'probe': 0}), [99, 11, 1, False, False, 1, 110, [99, 0]])
check('fixture 5', solve({'atomic': 100, 'transition': 100, 'old': 10, 'new': 9, 'probe': 0}), [91, 9, 2, False, True, -1, 100, [91, 0]])
check('fixture 6', solve({'atomic': 99, 'transition': 100, 'old': 10, 'new': 9, 'probe': 0}), [89, 10, 1, False, False, -1, 99, [89, 0]])
check('fixture 7', solve({'atomic': 101, 'transition': 100, 'old': 10, 'new': 9, 'probe': 0}), [92, 9, 1, False, False, -1, 101, [92, 0]])
check('fixture 8', solve({'atomic': 100, 'transition': 100, 'old': 10, 'new': 10, 'probe': 0}), [90, 10, 1, False, False, 0, 100, [90, 0]])
check('fixture 9', solve({'atomic': 101, 'transition': 100, 'old': 10, 'new': 13, 'probe': 0}), [88, 13, 1, True, False, 1, 101, [88, 1]])
check('fixture 10', solve({'atomic': 103, 'transition': 100, 'old': 10, 'new': 13, 'probe': 0}), [90, 13, 1, False, False, 1, 103, [90, 0]])
check('fixture 11', solve({'atomic': 100, 'transition': 100, 'old': 10, 'new': 13, 'probe': 0}), [87, 13, -2, True, False, 1, 100, [87, 1]])
variant = [({'atomic': 100, 'transition': 100, 'old': 10, 'new': 11, 'probe': 0}, [89, 11, 0, True, False, 1, 100, [89, 1]]), ({'atomic': 101, 'transition': 100, 'old': 10, 'new': 11, 'probe': 0}, [90, 11, 1, False, False, 1, 101, [90, 0]]), ({'atomic': 102, 'transition': 100, 'old': 10, 'new': 11, 'probe': 0}, [91, 11, 1, False, False, 1, 102, [91, 0]]), ({'atomic': 103, 'transition': 100, 'old': 10, 'new': 11, 'probe': 0}, [92, 11, 1, False, False, 1, 103, [92, 0]]), ({'atomic': 104, 'transition': 100, 'old': 10, 'new': 11, 'probe': 0}, [93, 11, 1, False, False, 1, 104, [93, 0]])]
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):
    active_offset = r['new'] if r['atomic'] >= r['transition'] else r['old']
    label = r['atomic'] - active_offset
    previous_offset = r['new'] if r['atomic'] - 1 >= r['transition'] else r['old']
    previous_label = r['atomic'] - 1 - previous_offset
    step = r['new'] - r['old']
    label_delta = label - previous_label
    fold = step > 0 and r['transition'] <= r['atomic'] < r['transition'] + step
    gap = step < 0 and r['atomic'] > r['transition']
    direction = (step > 0) - (step < 0)
    reconstructed = label + active_offset
    return [label,active_offset,label_delta,fold,gap,direction,reconstructed,[label,int(fold)]]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve({'atomic': 99, 'transition': 100, 'old': 10, 'new': 11, 'probe': 0}), [89, 10, 1, False, False, 1, 99, [89, 0]])
check('fixture 2', solve({'atomic': 100, 'transition': 100, 'old': 10, 'new': 11, 'probe': 0}), [89, 11, 0, True, False, 1, 100, [89, 1]])
check('fixture 3', solve({'atomic': 101, 'transition': 100, 'old': 10, 'new': 11, 'probe': 0}), [90, 11, 1, False, False, 1, 101, [90, 0]])
check('fixture 4', solve({'atomic': 110, 'transition': 100, 'old': 10, 'new': 11, 'probe': 0}), [99, 11, 1, False, False, 1, 110, [99, 0]])
check('fixture 5', solve({'atomic': 100, 'transition': 100, 'old': 10, 'new': 9, 'probe': 0}), [91, 9, 2, False, True, -1, 100, [91, 0]])
check('fixture 6', solve({'atomic': 99, 'transition': 100, 'old': 10, 'new': 9, 'probe': 0}), [89, 10, 1, False, False, -1, 99, [89, 0]])
check('fixture 7', solve({'atomic': 101, 'transition': 100, 'old': 10, 'new': 9, 'probe': 0}), [92, 9, 1, False, False, -1, 101, [92, 0]])
check('fixture 8', solve({'atomic': 100, 'transition': 100, 'old': 10, 'new': 10, 'probe': 0}), [90, 10, 1, False, False, 0, 100, [90, 0]])
check('fixture 9', solve({'atomic': 101, 'transition': 100, 'old': 10, 'new': 13, 'probe': 0}), [88, 13, 1, True, False, 1, 101, [88, 1]])
check('fixture 10', solve({'atomic': 103, 'transition': 100, 'old': 10, 'new': 13, 'probe': 0}), [90, 13, 1, False, False, 1, 103, [90, 0]])
check('fixture 11', solve({'atomic': 100, 'transition': 100, 'old': 10, 'new': 13, 'probe': 0}), [87, 13, -2, True, False, 1, 100, [87, 1]])
variant = [({'atomic': 100, 'transition': 100, 'old': 10, 'new': 11, 'probe': 0}, [89, 11, 0, True, False, 1, 100, [89, 1]]), ({'atomic': 101, 'transition': 100, 'old': 10, 'new': 11, 'probe': 0}, [90, 11, 1, False, False, 1, 101, [90, 0]]), ({'atomic': 102, 'transition': 100, 'old': 10, 'new': 11, 'probe': 0}, [91, 11, 1, False, False, 1, 102, [91, 0]]), ({'atomic': 103, 'transition': 100, 'old': 10, 'new': 11, 'probe': 0}, [92, 11, 1, False, False, 1, 103, [92, 0]]), ({'atomic': 104, 'transition': 100, 'old': 10, 'new': 11, 'probe': 0}, [93, 11, 1, False, False, 1, 104, [93, 0]])]
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 gap.

A stipulated offset table has initial atomic-minus-civil offset and a single step effective at atomic transition T. Translate atomic to civil label using active offset, retaining a fold tag for repeated labels on positive steps. Report label, offset, previous-label delta, discontinuity direction, repeated-label window membership and invertible pair. Offsets need not correspond to any real-world table.

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):
    active_offset = r['new'] if r['atomic'] >= r['transition'] else r['old']
    label = r['atomic'] - active_offset
    previous_offset = r['new'] if r['atomic'] - 1 >= r['transition'] else r['old']
    previous_label = r['atomic'] - 1 - previous_offset
    step = r['new'] - r['old']
    label_delta = label - previous_label
    fold = step > 0 and r['transition'] <= r['atomic'] < r['transition'] + step
    gap = step < 0 and r['atomic'] == r['transition']
    direction = int(step > 0)
    reconstructed = label + active_offset
    return [label,active_offset,label_delta,fold,gap,direction,reconstructed,[label,int(fold)]]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve({'atomic': 99, 'transition': 100, 'old': 10, 'new': 11, 'probe': 0}), [89, 10, 1, False, False, 1, 99, [89, 0]])
check('fixture 2', solve({'atomic': 100, 'transition': 100, 'old': 10, 'new': 11, 'probe': 0}), [89, 11, 0, True, False, 1, 100, [89, 1]])
check('fixture 3', solve({'atomic': 101, 'transition': 100, 'old': 10, 'new': 11, 'probe': 0}), [90, 11, 1, False, False, 1, 101, [90, 0]])
check('fixture 4', solve({'atomic': 110, 'transition': 100, 'old': 10, 'new': 11, 'probe': 0}), [99, 11, 1, False, False, 1, 110, [99, 0]])
check('fixture 5', solve({'atomic': 100, 'transition': 100, 'old': 10, 'new': 9, 'probe': 0}), [91, 9, 2, False, True, -1, 100, [91, 0]])
check('fixture 6', solve({'atomic': 99, 'transition': 100, 'old': 10, 'new': 9, 'probe': 0}), [89, 10, 1, False, False, -1, 99, [89, 0]])
check('fixture 7', solve({'atomic': 101, 'transition': 100, 'old': 10, 'new': 9, 'probe': 0}), [92, 9, 1, False, False, -1, 101, [92, 0]])
check('fixture 8', solve({'atomic': 100, 'transition': 100, 'old': 10, 'new': 10, 'probe': 0}), [90, 10, 1, False, False, 0, 100, [90, 0]])
check('fixture 9', solve({'atomic': 101, 'transition': 100, 'old': 10, 'new': 13, 'probe': 0}), [88, 13, 1, True, False, 1, 101, [88, 1]])
check('fixture 10', solve({'atomic': 103, 'transition': 100, 'old': 10, 'new': 13, 'probe': 0}), [90, 13, 1, False, False, 1, 103, [90, 0]])
check('fixture 11', solve({'atomic': 100, 'transition': 100, 'old': 10, 'new': 13, 'probe': 0}), [87, 13, -2, True, False, 1, 100, [87, 1]])
variant = [({'atomic': 100, 'transition': 100, 'old': 10, 'new': 11, 'probe': 0}, [89, 11, 0, True, False, 1, 100, [89, 1]]), ({'atomic': 101, 'transition': 100, 'old': 10, 'new': 11, 'probe': 0}, [90, 11, 1, False, False, 1, 101, [90, 0]]), ({'atomic': 102, 'transition': 100, 'old': 10, 'new': 11, 'probe': 0}, [91, 11, 1, False, False, 1, 102, [91, 0]]), ({'atomic': 103, 'transition': 100, 'old': 10, 'new': 11, 'probe': 0}, [92, 11, 1, False, False, 1, 103, [92, 0]]), ({'atomic': 104, 'transition': 100, 'old': 10, 'new': 11, 'probe': 0}, [93, 11, 1, False, False, 1, 104, [93, 0]])]
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):
    active_offset = r['new'] if r['atomic'] >= r['transition'] else r['old']
    label = r['atomic'] - active_offset
    previous_offset = r['new'] if r['atomic'] - 1 >= r['transition'] else r['old']
    previous_label = r['atomic'] - 1 - previous_offset
    step = r['new'] - r['old']
    label_delta = label - previous_label
    fold = step > 0 and r['transition'] <= r['atomic'] < r['transition'] + step
    gap = step < 0 and r['atomic'] == r['transition']
    direction = 1 if step >= 0 else -1
    reconstructed = label + active_offset
    return [label,active_offset,label_delta,fold,gap,direction,reconstructed,[label,int(fold)]]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve({'atomic': 99, 'transition': 100, 'old': 10, 'new': 11, 'probe': 0}), [89, 10, 1, False, False, 1, 99, [89, 0]])
check('fixture 2', solve({'atomic': 100, 'transition': 100, 'old': 10, 'new': 11, 'probe': 0}), [89, 11, 0, True, False, 1, 100, [89, 1]])
check('fixture 3', solve({'atomic': 101, 'transition': 100, 'old': 10, 'new': 11, 'probe': 0}), [90, 11, 1, False, False, 1, 101, [90, 0]])
check('fixture 4', solve({'atomic': 110, 'transition': 100, 'old': 10, 'new': 11, 'probe': 0}), [99, 11, 1, False, False, 1, 110, [99, 0]])
check('fixture 5', solve({'atomic': 100, 'transition': 100, 'old': 10, 'new': 9, 'probe': 0}), [91, 9, 2, False, True, -1, 100, [91, 0]])
check('fixture 6', solve({'atomic': 99, 'transition': 100, 'old': 10, 'new': 9, 'probe': 0}), [89, 10, 1, False, False, -1, 99, [89, 0]])
check('fixture 7', solve({'atomic': 101, 'transition': 100, 'old': 10, 'new': 9, 'probe': 0}), [92, 9, 1, False, False, -1, 101, [92, 0]])
check('fixture 8', solve({'atomic': 100, 'transition': 100, 'old': 10, 'new': 10, 'probe': 0}), [90, 10, 1, False, False, 0, 100, [90, 0]])
check('fixture 9', solve({'atomic': 101, 'transition': 100, 'old': 10, 'new': 13, 'probe': 0}), [88, 13, 1, True, False, 1, 101, [88, 1]])
check('fixture 10', solve({'atomic': 103, 'transition': 100, 'old': 10, 'new': 13, 'probe': 0}), [90, 13, 1, False, False, 1, 103, [90, 0]])
check('fixture 11', solve({'atomic': 100, 'transition': 100, 'old': 10, 'new': 13, 'probe': 0}), [87, 13, -2, True, False, 1, 100, [87, 1]])
variant = [({'atomic': 100, 'transition': 100, 'old': 10, 'new': 11, 'probe': 0}, [89, 11, 0, True, False, 1, 100, [89, 1]]), ({'atomic': 101, 'transition': 100, 'old': 10, 'new': 11, 'probe': 0}, [90, 11, 1, False, False, 1, 101, [90, 0]]), ({'atomic': 102, 'transition': 100, 'old': 10, 'new': 11, 'probe': 0}, [91, 11, 1, False, False, 1, 102, [91, 0]]), ({'atomic': 103, 'transition': 100, 'old': 10, 'new': 11, 'probe': 0}, [92, 11, 1, False, False, 1, 103, [92, 0]]), ({'atomic': 104, 'transition': 100, 'old': 10, 'new': 11, 'probe': 0}, [93, 11, 1, False, False, 1, 104, [93, 0]])]
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 offset table has initial atomic-minus-civil offset and a single step effective at atomic transition T. Translate atomic to civil label using active offset, retaining a fold tag for repeated labels on positive steps. Report label, offset, previous-label delta, discontinuity direction, repeated-label window membership and invertible pair. Offsets need not correspond to any real-world table.

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):
    active_offset = r['new'] if r['atomic'] >= r['transition'] else r['old']
    label = r['atomic'] - active_offset
    previous_offset = r['new'] if r['atomic'] - 1 >= r['transition'] else r['old']
    previous_label = r['atomic'] - 1 - previous_offset
    step = r['new'] - r['old']
    label_delta = label - previous_label
    fold = step > 0 and r['transition'] <= r['atomic'] < r['transition'] + step
    gap = step < 0 and r['atomic'] == r['transition']
    direction = (step > 0) - (step < 0)
    reconstructed = label
    return [label,active_offset,label_delta,fold,gap,direction,reconstructed,[label,int(fold)]]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve({'atomic': 99, 'transition': 100, 'old': 10, 'new': 11, 'probe': 0}), [89, 10, 1, False, False, 1, 99, [89, 0]])
check('fixture 2', solve({'atomic': 100, 'transition': 100, 'old': 10, 'new': 11, 'probe': 0}), [89, 11, 0, True, False, 1, 100, [89, 1]])
check('fixture 3', solve({'atomic': 101, 'transition': 100, 'old': 10, 'new': 11, 'probe': 0}), [90, 11, 1, False, False, 1, 101, [90, 0]])
check('fixture 4', solve({'atomic': 110, 'transition': 100, 'old': 10, 'new': 11, 'probe': 0}), [99, 11, 1, False, False, 1, 110, [99, 0]])
check('fixture 5', solve({'atomic': 100, 'transition': 100, 'old': 10, 'new': 9, 'probe': 0}), [91, 9, 2, False, True, -1, 100, [91, 0]])
check('fixture 6', solve({'atomic': 99, 'transition': 100, 'old': 10, 'new': 9, 'probe': 0}), [89, 10, 1, False, False, -1, 99, [89, 0]])
check('fixture 7', solve({'atomic': 101, 'transition': 100, 'old': 10, 'new': 9, 'probe': 0}), [92, 9, 1, False, False, -1, 101, [92, 0]])
check('fixture 8', solve({'atomic': 100, 'transition': 100, 'old': 10, 'new': 10, 'probe': 0}), [90, 10, 1, False, False, 0, 100, [90, 0]])
check('fixture 9', solve({'atomic': 101, 'transition': 100, 'old': 10, 'new': 13, 'probe': 0}), [88, 13, 1, True, False, 1, 101, [88, 1]])
check('fixture 10', solve({'atomic': 103, 'transition': 100, 'old': 10, 'new': 13, 'probe': 0}), [90, 13, 1, False, False, 1, 103, [90, 0]])
check('fixture 11', solve({'atomic': 100, 'transition': 100, 'old': 10, 'new': 13, 'probe': 0}), [87, 13, -2, True, False, 1, 100, [87, 1]])
variant = [({'atomic': 100, 'transition': 100, 'old': 10, 'new': 11, 'probe': 0}, [89, 11, 0, True, False, 1, 100, [89, 1]]), ({'atomic': 101, 'transition': 100, 'old': 10, 'new': 11, 'probe': 0}, [90, 11, 1, False, False, 1, 101, [90, 0]]), ({'atomic': 102, 'transition': 100, 'old': 10, 'new': 11, 'probe': 0}, [91, 11, 1, False, False, 1, 102, [91, 0]]), ({'atomic': 103, 'transition': 100, 'old': 10, 'new': 11, 'probe': 0}, [92, 11, 1, False, False, 1, 103, [92, 0]]), ({'atomic': 104, 'transition': 100, 'old': 10, 'new': 11, 'probe': 0}, [93, 11, 1, False, False, 1, 104, [93, 0]])]
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):
    active_offset = r['new'] if r['atomic'] >= r['transition'] else r['old']
    label = r['atomic'] - active_offset
    previous_offset = r['new'] if r['atomic'] - 1 >= r['transition'] else r['old']
    previous_label = r['atomic'] - 1 - previous_offset
    step = r['new'] - r['old']
    label_delta = label - previous_label
    fold = step > 0 and r['transition'] <= r['atomic'] < r['transition'] + step
    gap = step < 0 and r['atomic'] == r['transition']
    direction = (step > 0) - (step < 0)
    reconstructed = label + r['old']
    return [label,active_offset,label_delta,fold,gap,direction,reconstructed,[label,int(fold)]]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve({'atomic': 99, 'transition': 100, 'old': 10, 'new': 11, 'probe': 0}), [89, 10, 1, False, False, 1, 99, [89, 0]])
check('fixture 2', solve({'atomic': 100, 'transition': 100, 'old': 10, 'new': 11, 'probe': 0}), [89, 11, 0, True, False, 1, 100, [89, 1]])
check('fixture 3', solve({'atomic': 101, 'transition': 100, 'old': 10, 'new': 11, 'probe': 0}), [90, 11, 1, False, False, 1, 101, [90, 0]])
check('fixture 4', solve({'atomic': 110, 'transition': 100, 'old': 10, 'new': 11, 'probe': 0}), [99, 11, 1, False, False, 1, 110, [99, 0]])
check('fixture 5', solve({'atomic': 100, 'transition': 100, 'old': 10, 'new': 9, 'probe': 0}), [91, 9, 2, False, True, -1, 100, [91, 0]])
check('fixture 6', solve({'atomic': 99, 'transition': 100, 'old': 10, 'new': 9, 'probe': 0}), [89, 10, 1, False, False, -1, 99, [89, 0]])
check('fixture 7', solve({'atomic': 101, 'transition': 100, 'old': 10, 'new': 9, 'probe': 0}), [92, 9, 1, False, False, -1, 101, [92, 0]])
check('fixture 8', solve({'atomic': 100, 'transition': 100, 'old': 10, 'new': 10, 'probe': 0}), [90, 10, 1, False, False, 0, 100, [90, 0]])
check('fixture 9', solve({'atomic': 101, 'transition': 100, 'old': 10, 'new': 13, 'probe': 0}), [88, 13, 1, True, False, 1, 101, [88, 1]])
check('fixture 10', solve({'atomic': 103, 'transition': 100, 'old': 10, 'new': 13, 'probe': 0}), [90, 13, 1, False, False, 1, 103, [90, 0]])
check('fixture 11', solve({'atomic': 100, 'transition': 100, 'old': 10, 'new': 13, 'probe': 0}), [87, 13, -2, True, False, 1, 100, [87, 1]])
variant = [({'atomic': 100, 'transition': 100, 'old': 10, 'new': 11, 'probe': 0}, [89, 11, 0, True, False, 1, 100, [89, 1]]), ({'atomic': 101, 'transition': 100, 'old': 10, 'new': 11, 'probe': 0}, [90, 11, 1, False, False, 1, 101, [90, 0]]), ({'atomic': 102, 'transition': 100, 'old': 10, 'new': 11, 'probe': 0}, [91, 11, 1, False, False, 1, 102, [91, 0]]), ({'atomic': 103, 'transition': 100, 'old': 10, 'new': 11, 'probe': 0}, [92, 11, 1, False, False, 1, 103, [92, 0]]), ({'atomic': 104, 'transition': 100, 'old': 10, 'new': 11, 'probe': 0}, [93, 11, 1, False, False, 1, 104, [93, 0]])]
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 reconstructed.

A stipulated offset table has initial atomic-minus-civil offset and a single step effective at atomic transition T. Translate atomic to civil label using active offset, retaining a fold tag for repeated labels on positive steps. Report label, offset, previous-label delta, discontinuity direction, repeated-label window membership and invertible pair. Offsets need not correspond to any real-world table.

split: open-access


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

A clock uses signed 16-bit seconds relative to configurable epoch E and fractional nanoseconds. Source absolute total nanoseconds is exact integer. Convert to canonical seconds/remainder relative to E, mark representability, and serialize biased unsigned seconds word only if in range. Provide saturation coordinate, loss amount, earliest/latest representable total and exact reconstruction.

split: open-access


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

A clock uses signed 16-bit seconds relative to configurable epoch E and fractional nanoseconds. Source absolute total nanoseconds is exact integer. Convert to canonical seconds/remainder relative to E, mark representability, and serialize biased unsigned seconds word only if in range. Provide saturation coordinate, loss amount, earliest/latest representable total and exact reconstruction.

split: open-access


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

A clock uses signed 16-bit seconds relative to configurable epoch E and fractional nanoseconds. Source absolute total nanoseconds is exact integer. Convert to canonical seconds/remainder relative to E, mark representability, and serialize biased unsigned seconds word only if in range. Provide saturation coordinate, loss amount, earliest/latest representable total and exact reconstruction.

split: open-access


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

A clock uses signed 16-bit seconds relative to configurable epoch E and fractional nanoseconds. Source absolute total nanoseconds is exact integer. Convert to canonical seconds/remainder relative to E, mark representability, and serialize biased unsigned seconds word only if in range. Provide saturation coordinate, loss amount, earliest/latest representable total and exact reconstruction.

split: open-access


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

A clock uses signed 16-bit seconds relative to configurable epoch E and fractional nanoseconds. Source absolute total nanoseconds is exact integer. Convert to canonical seconds/remainder relative to E, mark representability, and serialize biased unsigned seconds word only if in range. Provide saturation coordinate, loss amount, earliest/latest representable total and exact reconstruction.

split: open-access


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

A clock uses signed 16-bit seconds relative to configurable epoch E and fractional nanoseconds. Source absolute total nanoseconds is exact integer. Convert to canonical seconds/remainder relative to E, mark representability, and serialize biased unsigned seconds word only if in range. Provide saturation coordinate, loss amount, earliest/latest representable total and exact reconstruction.

split: open-access


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

A clock uses signed 16-bit seconds relative to configurable epoch E and fractional nanoseconds. Source absolute total nanoseconds is exact integer. Convert to canonical seconds/remainder relative to E, mark representability, and serialize biased unsigned seconds word only if in range. Provide saturation coordinate, loss amount, earliest/latest representable total and exact reconstruction.

split: open-access


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

A clock uses signed 16-bit seconds relative to configurable epoch E and fractional nanoseconds. Source absolute total nanoseconds is exact integer. Convert to canonical seconds/remainder relative to E, mark representability, and serialize biased unsigned seconds word only if in range. Provide saturation coordinate, loss amount, earliest/latest representable total and exact reconstruction.

split: open-access


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

A clock uses signed 16-bit seconds relative to configurable epoch E and fractional nanoseconds. Source absolute total nanoseconds is exact integer. Convert to canonical seconds/remainder relative to E, mark representability, and serialize biased unsigned seconds word only if in range. Provide saturation coordinate, loss amount, earliest/latest representable total and exact reconstruction.

split: open-access


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

A clock uses signed 16-bit seconds relative to configurable epoch E and fractional nanoseconds. Source absolute total nanoseconds is exact integer. Convert to canonical seconds/remainder relative to E, mark representability, and serialize biased unsigned seconds word only if in range. Provide saturation coordinate, loss amount, earliest/latest representable total and exact reconstruction.

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):
    text = r['text'].strip()
    zulu = text == 'Z'
    shape = len(text) == 6 and text[0] in '+-' and text[3] == ':'
    digits = shape and all('0' <= c <= '9' for c in text[1:3]+text[4:6])
    hour = int(text[1:3]) if digits else 0
    minute = int(text[4:6]) if digits else 0
    range_ok = hour <= 14 and minute <= 59 and (hour != 14 or minute == 0)
    valid = zulu or (digits and range_ok)
    unknown = valid and text == '-00:00'
    offset = None if not valid or unknown else (0 if zulu else (-1 if text[0] == '-' else 1) * (hour * 60 + minute))
    return [valid,valid and not unknown,offset,unknown]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve({'text': 'Z', 'probe': 0}), [True, True, 0, False])
check('fixture 2', solve({'text': 'z', 'probe': 0}), [False, False, None, False])
check('fixture 3', solve({'text': 'UTC', 'probe': 0}), [False, False, None, False])
check('fixture 4', solve({'text': '+00:00', 'probe': 0}), [True, True, 0, False])
check('fixture 5', solve({'text': '-00:00', 'probe': 0}), [True, False, None, True])
check('fixture 6', solve({'text': '-05:30', 'probe': 0}), [True, True, -330, False])
check('fixture 7', solve({'text': '+14:00', 'probe': 0}), [True, True, 840, False])
check('fixture 8', solve({'text': '+14:01', 'probe': 0}), [False, False, None, False])
check('fixture 9', solve({'text': '+12:59', 'probe': 0}), [True, True, 779, False])
check('fixture 10', solve({'text': '+12:60', 'probe': 0}), [False, False, None, False])
check('fixture 11', solve({'text': 'x01:00', 'probe': 0}), [False, False, None, False])
check('fixture 12', solve({'text': '+01x00', 'probe': 0}), [False, False, None, False])
check('fixture 13', solve({'text': '+٠١:٠٠', 'probe': 0}), [False, False, None, False])
check('fixture 14', solve({'text': ' Z ', 'probe': 0}), [False, False, None, False])
check('fixture 15', solve({'text': '+10:02', 'probe': 0}), [True, True, 602, False])
variant = [({'text': '+01:30', 'probe': 0}, [True, True, 90, False]), ({'text': '+02:30', 'probe': 0}, [True, True, 150, False]), ({'text': '+03:30', 'probe': 0}, [True, True, 210, False]), ({'text': '+04:30', 'probe': 0}, [True, True, 270, False]), ({'text': '+05:30', 'probe': 0}, [True, True, 330, False])]
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):
    text = r['text'].upper()
    zulu = text == 'Z'
    shape = len(text) == 6 and text[0] in '+-' and text[3] == ':'
    digits = shape and all('0' <= c <= '9' for c in text[1:3]+text[4:6])
    hour = int(text[1:3]) if digits else 0
    minute = int(text[4:6]) if digits else 0
    range_ok = hour <= 14 and minute <= 59 and (hour != 14 or minute == 0)
    valid = zulu or (digits and range_ok)
    unknown = valid and text == '-00:00'
    offset = None if not valid or unknown else (0 if zulu else (-1 if text[0] == '-' else 1) * (hour * 60 + minute))
    return [valid,valid and not unknown,offset,unknown]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve({'text': 'Z', 'probe': 0}), [True, True, 0, False])
check('fixture 2', solve({'text': 'z', 'probe': 0}), [False, False, None, False])
check('fixture 3', solve({'text': 'UTC', 'probe': 0}), [False, False, None, False])
check('fixture 4', solve({'text': '+00:00', 'probe': 0}), [True, True, 0, False])
check('fixture 5', solve({'text': '-00:00', 'probe': 0}), [True, False, None, True])
check('fixture 6', solve({'text': '-05:30', 'probe': 0}), [True, True, -330, False])
check('fixture 7', solve({'text': '+14:00', 'probe': 0}), [True, True, 840, False])
check('fixture 8', solve({'text': '+14:01', 'probe': 0}), [False, False, None, False])
check('fixture 9', solve({'text': '+12:59', 'probe': 0}), [True, True, 779, False])
check('fixture 10', solve({'text': '+12:60', 'probe': 0}), [False, False, None, False])
check('fixture 11', solve({'text': 'x01:00', 'probe': 0}), [False, False, None, False])
check('fixture 12', solve({'text': '+01x00', 'probe': 0}), [False, False, None, False])
check('fixture 13', solve({'text': '+٠١:٠٠', 'probe': 0}), [False, False, None, False])
check('fixture 14', solve({'text': ' Z ', 'probe': 0}), [False, False, None, False])
check('fixture 15', solve({'text': '+10:02', 'probe': 0}), [True, True, 602, False])
variant = [({'text': '+01:30', 'probe': 0}, [True, True, 90, False]), ({'text': '+02:30', 'probe': 0}, [True, True, 150, False]), ({'text': '+03:30', 'probe': 0}, [True, True, 210, False]), ({'text': '+04:30', 'probe': 0}, [True, True, 270, False]), ({'text': '+05:30', 'probe': 0}, [True, True, 330, False])]
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 text.

Controlled offset lexeme is Z or signed HH:MM with ASCII digits, hour<=14, minute<=59 and hour14 only minute00. Negative zero means unknown local offset and has no numeric UTC offset; positive zero and Z are known UTC. Return accepted, known, signed minute displacement and original negative-zero marker. No timezone database is consulted.

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):
    text = r['text']
    zulu = text in ('Z','UTC')
    shape = len(text) == 6 and text[0] in '+-' and text[3] == ':'
    digits = shape and all('0' <= c <= '9' for c in text[1:3]+text[4:6])
    hour = int(text[1:3]) if digits else 0
    minute = int(text[4:6]) if digits else 0
    range_ok = hour <= 14 and minute <= 59 and (hour != 14 or minute == 0)
    valid = zulu or (digits and range_ok)
    unknown = valid and text == '-00:00'
    offset = None if not valid or unknown else (0 if zulu else (-1 if text[0] == '-' else 1) * (hour * 60 + minute))
    return [valid,valid and not unknown,offset,unknown]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve({'text': 'Z', 'probe': 0}), [True, True, 0, False])
check('fixture 2', solve({'text': 'z', 'probe': 0}), [False, False, None, False])
check('fixture 3', solve({'text': 'UTC', 'probe': 0}), [False, False, None, False])
check('fixture 4', solve({'text': '+00:00', 'probe': 0}), [True, True, 0, False])
check('fixture 5', solve({'text': '-00:00', 'probe': 0}), [True, False, None, True])
check('fixture 6', solve({'text': '-05:30', 'probe': 0}), [True, True, -330, False])
check('fixture 7', solve({'text': '+14:00', 'probe': 0}), [True, True, 840, False])
check('fixture 8', solve({'text': '+14:01', 'probe': 0}), [False, False, None, False])
check('fixture 9', solve({'text': '+12:59', 'probe': 0}), [True, True, 779, False])
check('fixture 10', solve({'text': '+12:60', 'probe': 0}), [False, False, None, False])
check('fixture 11', solve({'text': 'x01:00', 'probe': 0}), [False, False, None, False])
check('fixture 12', solve({'text': '+01x00', 'probe': 0}), [False, False, None, False])
check('fixture 13', solve({'text': '+٠١:٠٠', 'probe': 0}), [False, False, None, False])
check('fixture 14', solve({'text': ' Z ', 'probe': 0}), [False, False, None, False])
check('fixture 15', solve({'text': '+10:02', 'probe': 0}), [True, True, 602, False])
variant = [({'text': '+01:30', 'probe': 0}, [True, True, 90, False]), ({'text': '+02:30', 'probe': 0}, [True, True, 150, False]), ({'text': '+03:30', 'probe': 0}, [True, True, 210, False]), ({'text': '+04:30', 'probe': 0}, [True, True, 270, False]), ({'text': '+05:30', 'probe': 0}, [True, True, 330, False])]
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):
    text = r['text']
    zulu = text in ('Z','z')
    shape = len(text) == 6 and text[0] in '+-' and text[3] == ':'
    digits = shape and all('0' <= c <= '9' for c in text[1:3]+text[4:6])
    hour = int(text[1:3]) if digits else 0
    minute = int(text[4:6]) if digits else 0
    range_ok = hour <= 14 and minute <= 59 and (hour != 14 or minute == 0)
    valid = zulu or (digits and range_ok)
    unknown = valid and text == '-00:00'
    offset = None if not valid or unknown else (0 if zulu else (-1 if text[0] == '-' else 1) * (hour * 60 + minute))
    return [valid,valid and not unknown,offset,unknown]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve({'text': 'Z', 'probe': 0}), [True, True, 0, False])
check('fixture 2', solve({'text': 'z', 'probe': 0}), [False, False, None, False])
check('fixture 3', solve({'text': 'UTC', 'probe': 0}), [False, False, None, False])
check('fixture 4', solve({'text': '+00:00', 'probe': 0}), [True, True, 0, False])
check('fixture 5', solve({'text': '-00:00', 'probe': 0}), [True, False, None, True])
check('fixture 6', solve({'text': '-05:30', 'probe': 0}), [True, True, -330, False])
check('fixture 7', solve({'text': '+14:00', 'probe': 0}), [True, True, 840, False])
check('fixture 8', solve({'text': '+14:01', 'probe': 0}), [False, False, None, False])
check('fixture 9', solve({'text': '+12:59', 'probe': 0}), [True, True, 779, False])
check('fixture 10', solve({'text': '+12:60', 'probe': 0}), [False, False, None, False])
check('fixture 11', solve({'text': 'x01:00', 'probe': 0}), [False, False, None, False])
check('fixture 12', solve({'text': '+01x00', 'probe': 0}), [False, False, None, False])
check('fixture 13', solve({'text': '+٠١:٠٠', 'probe': 0}), [False, False, None, False])
check('fixture 14', solve({'text': ' Z ', 'probe': 0}), [False, False, None, False])
check('fixture 15', solve({'text': '+10:02', 'probe': 0}), [True, True, 602, False])
variant = [({'text': '+01:30', 'probe': 0}, [True, True, 90, False]), ({'text': '+02:30', 'probe': 0}, [True, True, 150, False]), ({'text': '+03:30', 'probe': 0}, [True, True, 210, False]), ({'text': '+04:30', 'probe': 0}, [True, True, 270, False]), ({'text': '+05:30', 'probe': 0}, [True, True, 330, False])]
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 zulu.

Controlled offset lexeme is Z or signed HH:MM with ASCII digits, hour<=14, minute<=59 and hour14 only minute00. Negative zero means unknown local offset and has no numeric UTC offset; positive zero and Z are known UTC. Return accepted, known, signed minute displacement and original negative-zero marker. No timezone database is consulted.

split: open-access