broken_source:
"""Failure Map reference implementation. Python standard library only."""
import json
from fractions import Fraction
N = 1
observations = []
def solve(r):
    epoch = r['epoch'] + (1 if r['pending'] and r['counter'] < 128 else 0)
    previous_epoch = epoch - (1 if r['before_isr'] and not r['pending'] and r['counter'] >= 128 else 0)
    expanded = previous_epoch * 256 + r['counter']
    delta = expanded - r['previous']
    forward = delta >= 0
    within = delta <= r['max_interval']
    wraps = expanded // 256 - r['previous'] // 256
    phase = expanded % r['period']
    cycles = expanded // r['period']
    next_edge = (cycles + 1) * r['period']
    return [expanded,delta,forward,within,wraps,phase,next_edge]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve({'epoch': 1, 'pending': True, 'counter': 2, 'before_isr': False, 'previous': 250, 'max_interval': 8, 'period': 10}), [514, 264, True, False, 2, 4, 520])
check('fixture 2', solve({'epoch': 1, 'pending': True, 'counter': 250, 'before_isr': False, 'previous': 490, 'max_interval': 16, 'period': 30}), [506, 16, True, True, 0, 26, 510])
check('fixture 3', solve({'epoch': 2, 'pending': False, 'counter': 250, 'before_isr': True, 'previous': 500, 'max_interval': 6, 'period': 10}), [506, 6, True, True, 0, 6, 510])
check('fixture 4', solve({'epoch': 1, 'pending': False, 'counter': 0, 'before_isr': False, 'previous': 256, 'max_interval': 0, 'period': 7}), [256, 0, True, True, 0, 4, 259])
check('fixture 5', solve({'epoch': 3, 'pending': False, 'counter': 20, 'before_isr': False, 'previous': 10, 'max_interval': 800, 'period': 100}), [788, 778, True, True, 3, 88, 800])
check('fixture 6', solve({'epoch': 1, 'pending': False, 'counter': 0, 'before_isr': False, 'previous': 260, 'max_interval': 10, 'period': 13}), [256, -4, False, False, 0, 9, 260])
check('fixture 7', solve({'epoch': 0, 'pending': False, 'counter': 20, 'before_isr': False, 'previous': 10, 'max_interval': 9, 'period': 7}), [20, 10, True, False, 0, 6, 21])
check('fixture 8', solve({'epoch': 2, 'pending': False, 'counter': 0, 'before_isr': False, 'previous': 0, 'max_interval': 512, 'period': 16}), [512, 512, True, True, 2, 0, 528])
check('fixture 9', solve({'epoch': 0, 'pending': False, 'counter': 127, 'before_isr': False, 'previous': 0, 'max_interval': 127, 'period': 20}), [127, 127, True, True, 0, 7, 140])
check('fixture 10', solve({'epoch': 0, 'pending': True, 'counter': 128, 'before_isr': False, 'previous': 0, 'max_interval': 128, 'period': 10}), [128, 128, True, True, 0, 8, 130])
check('fixture 11', solve({'epoch': 2, 'pending': False, 'counter': 2, 'before_isr': True, 'previous': 512, 'max_interval': 20, 'period': 10}), [514, 2, True, True, 0, 4, 520])
variant = [({'epoch': 1, 'pending': True, 'counter': 2, 'before_isr': False, 'previous': 250, 'max_interval': 8, 'period': 11}, [514, 264, True, False, 2, 8, 517]), ({'epoch': 1, 'pending': True, 'counter': 2, 'before_isr': False, 'previous': 250, 'max_interval': 8, 'period': 12}, [514, 264, True, False, 2, 10, 516]), ({'epoch': 1, 'pending': True, 'counter': 2, 'before_isr': False, 'previous': 250, 'max_interval': 8, 'period': 13}, [514, 264, True, False, 2, 7, 520]), ({'epoch': 1, 'pending': True, 'counter': 2, 'before_isr': False, 'previous': 250, 'max_interval': 8, 'period': 14}, [514, 264, True, False, 2, 10, 518]), ({'epoch': 1, 'pending': True, 'counter': 2, 'before_isr': False, 'previous': 250, 'max_interval': 8, 'period': 15}, [514, 264, True, False, 2, 4, 525])]
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):
    epoch = r['epoch'] + (1 if r['pending'] and r['counter'] < 128 else 0)
    previous_epoch = epoch - (1 if r['before_isr'] and not r['pending'] and r['counter'] >= 128 else 0)
    expanded = previous_epoch * 256 + r['counter']
    delta = expanded - r['previous']
    forward = delta >= 0
    within = 0 <= delta < r['max_interval']
    wraps = expanded // 256 - r['previous'] // 256
    phase = expanded % r['period']
    cycles = expanded // r['period']
    next_edge = (cycles + 1) * r['period']
    return [expanded,delta,forward,within,wraps,phase,next_edge]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve({'epoch': 1, 'pending': True, 'counter': 2, 'before_isr': False, 'previous': 250, 'max_interval': 8, 'period': 10}), [514, 264, True, False, 2, 4, 520])
check('fixture 2', solve({'epoch': 1, 'pending': True, 'counter': 250, 'before_isr': False, 'previous': 490, 'max_interval': 16, 'period': 30}), [506, 16, True, True, 0, 26, 510])
check('fixture 3', solve({'epoch': 2, 'pending': False, 'counter': 250, 'before_isr': True, 'previous': 500, 'max_interval': 6, 'period': 10}), [506, 6, True, True, 0, 6, 510])
check('fixture 4', solve({'epoch': 1, 'pending': False, 'counter': 0, 'before_isr': False, 'previous': 256, 'max_interval': 0, 'period': 7}), [256, 0, True, True, 0, 4, 259])
check('fixture 5', solve({'epoch': 3, 'pending': False, 'counter': 20, 'before_isr': False, 'previous': 10, 'max_interval': 800, 'period': 100}), [788, 778, True, True, 3, 88, 800])
check('fixture 6', solve({'epoch': 1, 'pending': False, 'counter': 0, 'before_isr': False, 'previous': 260, 'max_interval': 10, 'period': 13}), [256, -4, False, False, 0, 9, 260])
check('fixture 7', solve({'epoch': 0, 'pending': False, 'counter': 20, 'before_isr': False, 'previous': 10, 'max_interval': 9, 'period': 7}), [20, 10, True, False, 0, 6, 21])
check('fixture 8', solve({'epoch': 2, 'pending': False, 'counter': 0, 'before_isr': False, 'previous': 0, 'max_interval': 512, 'period': 16}), [512, 512, True, True, 2, 0, 528])
check('fixture 9', solve({'epoch': 0, 'pending': False, 'counter': 127, 'before_isr': False, 'previous': 0, 'max_interval': 127, 'period': 20}), [127, 127, True, True, 0, 7, 140])
check('fixture 10', solve({'epoch': 0, 'pending': True, 'counter': 128, 'before_isr': False, 'previous': 0, 'max_interval': 128, 'period': 10}), [128, 128, True, True, 0, 8, 130])
check('fixture 11', solve({'epoch': 2, 'pending': False, 'counter': 2, 'before_isr': True, 'previous': 512, 'max_interval': 20, 'period': 10}), [514, 2, True, True, 0, 4, 520])
variant = [({'epoch': 1, 'pending': True, 'counter': 2, 'before_isr': False, 'previous': 250, 'max_interval': 8, 'period': 11}, [514, 264, True, False, 2, 8, 517]), ({'epoch': 1, 'pending': True, 'counter': 2, 'before_isr': False, 'previous': 250, 'max_interval': 8, 'period': 12}, [514, 264, True, False, 2, 10, 516]), ({'epoch': 1, 'pending': True, 'counter': 2, 'before_isr': False, 'previous': 250, 'max_interval': 8, 'period': 13}, [514, 264, True, False, 2, 7, 520]), ({'epoch': 1, 'pending': True, 'counter': 2, 'before_isr': False, 'previous': 250, 'max_interval': 8, 'period': 14}, [514, 264, True, False, 2, 10, 518]), ({'epoch': 1, 'pending': True, 'counter': 2, 'before_isr': False, 'previous': 250, 'max_interval': 8, 'period': 15}, [514, 264, True, False, 2, 4, 525])]
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 within.

Expand a 256-tick hardware capture with an ISR epoch. Pending overflow applies only to low-half captures; a pre-ISR high-half capture backs out one serviced epoch. Return expanded coordinate, signed delta from previous capture, nonnegative-order flag, bounded-interval flag, epoch crossings, phase on a positive external grid, and strictly next grid edge.

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):
    epoch = r['epoch'] + (1 if r['pending'] and r['counter'] < 128 else 0)
    previous_epoch = epoch - (1 if r['before_isr'] and not r['pending'] and r['counter'] >= 128 else 0)
    expanded = previous_epoch * 256 + r['counter']
    delta = expanded - r['previous']
    forward = delta >= 0
    within = 0 <= delta <= r['max_interval']
    wraps = delta // 256
    phase = expanded % r['period']
    cycles = expanded // r['period']
    next_edge = (cycles + 1) * r['period']
    return [expanded,delta,forward,within,wraps,phase,next_edge]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve({'epoch': 1, 'pending': True, 'counter': 2, 'before_isr': False, 'previous': 250, 'max_interval': 8, 'period': 10}), [514, 264, True, False, 2, 4, 520])
check('fixture 2', solve({'epoch': 1, 'pending': True, 'counter': 250, 'before_isr': False, 'previous': 490, 'max_interval': 16, 'period': 30}), [506, 16, True, True, 0, 26, 510])
check('fixture 3', solve({'epoch': 2, 'pending': False, 'counter': 250, 'before_isr': True, 'previous': 500, 'max_interval': 6, 'period': 10}), [506, 6, True, True, 0, 6, 510])
check('fixture 4', solve({'epoch': 1, 'pending': False, 'counter': 0, 'before_isr': False, 'previous': 256, 'max_interval': 0, 'period': 7}), [256, 0, True, True, 0, 4, 259])
check('fixture 5', solve({'epoch': 3, 'pending': False, 'counter': 20, 'before_isr': False, 'previous': 10, 'max_interval': 800, 'period': 100}), [788, 778, True, True, 3, 88, 800])
check('fixture 6', solve({'epoch': 1, 'pending': False, 'counter': 0, 'before_isr': False, 'previous': 260, 'max_interval': 10, 'period': 13}), [256, -4, False, False, 0, 9, 260])
check('fixture 7', solve({'epoch': 0, 'pending': False, 'counter': 20, 'before_isr': False, 'previous': 10, 'max_interval': 9, 'period': 7}), [20, 10, True, False, 0, 6, 21])
check('fixture 8', solve({'epoch': 2, 'pending': False, 'counter': 0, 'before_isr': False, 'previous': 0, 'max_interval': 512, 'period': 16}), [512, 512, True, True, 2, 0, 528])
check('fixture 9', solve({'epoch': 0, 'pending': False, 'counter': 127, 'before_isr': False, 'previous': 0, 'max_interval': 127, 'period': 20}), [127, 127, True, True, 0, 7, 140])
check('fixture 10', solve({'epoch': 0, 'pending': True, 'counter': 128, 'before_isr': False, 'previous': 0, 'max_interval': 128, 'period': 10}), [128, 128, True, True, 0, 8, 130])
check('fixture 11', solve({'epoch': 2, 'pending': False, 'counter': 2, 'before_isr': True, 'previous': 512, 'max_interval': 20, 'period': 10}), [514, 2, True, True, 0, 4, 520])
variant = [({'epoch': 1, 'pending': True, 'counter': 2, 'before_isr': False, 'previous': 250, 'max_interval': 8, 'period': 11}, [514, 264, True, False, 2, 8, 517]), ({'epoch': 1, 'pending': True, 'counter': 2, 'before_isr': False, 'previous': 250, 'max_interval': 8, 'period': 12}, [514, 264, True, False, 2, 10, 516]), ({'epoch': 1, 'pending': True, 'counter': 2, 'before_isr': False, 'previous': 250, 'max_interval': 8, 'period': 13}, [514, 264, True, False, 2, 7, 520]), ({'epoch': 1, 'pending': True, 'counter': 2, 'before_isr': False, 'previous': 250, 'max_interval': 8, 'period': 14}, [514, 264, True, False, 2, 10, 518]), ({'epoch': 1, 'pending': True, 'counter': 2, 'before_isr': False, 'previous': 250, 'max_interval': 8, 'period': 15}, [514, 264, True, False, 2, 4, 525])]
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):
    epoch = r['epoch'] + (1 if r['pending'] and r['counter'] < 128 else 0)
    previous_epoch = epoch - (1 if r['before_isr'] and not r['pending'] and r['counter'] >= 128 else 0)
    expanded = previous_epoch * 256 + r['counter']
    delta = expanded - r['previous']
    forward = delta >= 0
    within = 0 <= delta <= r['max_interval']
    wraps = int(expanded % 256 < r['previous'] % 256)
    phase = expanded % r['period']
    cycles = expanded // r['period']
    next_edge = (cycles + 1) * r['period']
    return [expanded,delta,forward,within,wraps,phase,next_edge]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve({'epoch': 1, 'pending': True, 'counter': 2, 'before_isr': False, 'previous': 250, 'max_interval': 8, 'period': 10}), [514, 264, True, False, 2, 4, 520])
check('fixture 2', solve({'epoch': 1, 'pending': True, 'counter': 250, 'before_isr': False, 'previous': 490, 'max_interval': 16, 'period': 30}), [506, 16, True, True, 0, 26, 510])
check('fixture 3', solve({'epoch': 2, 'pending': False, 'counter': 250, 'before_isr': True, 'previous': 500, 'max_interval': 6, 'period': 10}), [506, 6, True, True, 0, 6, 510])
check('fixture 4', solve({'epoch': 1, 'pending': False, 'counter': 0, 'before_isr': False, 'previous': 256, 'max_interval': 0, 'period': 7}), [256, 0, True, True, 0, 4, 259])
check('fixture 5', solve({'epoch': 3, 'pending': False, 'counter': 20, 'before_isr': False, 'previous': 10, 'max_interval': 800, 'period': 100}), [788, 778, True, True, 3, 88, 800])
check('fixture 6', solve({'epoch': 1, 'pending': False, 'counter': 0, 'before_isr': False, 'previous': 260, 'max_interval': 10, 'period': 13}), [256, -4, False, False, 0, 9, 260])
check('fixture 7', solve({'epoch': 0, 'pending': False, 'counter': 20, 'before_isr': False, 'previous': 10, 'max_interval': 9, 'period': 7}), [20, 10, True, False, 0, 6, 21])
check('fixture 8', solve({'epoch': 2, 'pending': False, 'counter': 0, 'before_isr': False, 'previous': 0, 'max_interval': 512, 'period': 16}), [512, 512, True, True, 2, 0, 528])
check('fixture 9', solve({'epoch': 0, 'pending': False, 'counter': 127, 'before_isr': False, 'previous': 0, 'max_interval': 127, 'period': 20}), [127, 127, True, True, 0, 7, 140])
check('fixture 10', solve({'epoch': 0, 'pending': True, 'counter': 128, 'before_isr': False, 'previous': 0, 'max_interval': 128, 'period': 10}), [128, 128, True, True, 0, 8, 130])
check('fixture 11', solve({'epoch': 2, 'pending': False, 'counter': 2, 'before_isr': True, 'previous': 512, 'max_interval': 20, 'period': 10}), [514, 2, True, True, 0, 4, 520])
variant = [({'epoch': 1, 'pending': True, 'counter': 2, 'before_isr': False, 'previous': 250, 'max_interval': 8, 'period': 11}, [514, 264, True, False, 2, 8, 517]), ({'epoch': 1, 'pending': True, 'counter': 2, 'before_isr': False, 'previous': 250, 'max_interval': 8, 'period': 12}, [514, 264, True, False, 2, 10, 516]), ({'epoch': 1, 'pending': True, 'counter': 2, 'before_isr': False, 'previous': 250, 'max_interval': 8, 'period': 13}, [514, 264, True, False, 2, 7, 520]), ({'epoch': 1, 'pending': True, 'counter': 2, 'before_isr': False, 'previous': 250, 'max_interval': 8, 'period': 14}, [514, 264, True, False, 2, 10, 518]), ({'epoch': 1, 'pending': True, 'counter': 2, 'before_isr': False, 'previous': 250, 'max_interval': 8, 'period': 15}, [514, 264, True, False, 2, 4, 525])]
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 wraps.

Expand a 256-tick hardware capture with an ISR epoch. Pending overflow applies only to low-half captures; a pre-ISR high-half capture backs out one serviced epoch. Return expanded coordinate, signed delta from previous capture, nonnegative-order flag, bounded-interval flag, epoch crossings, phase on a positive external grid, and strictly next grid edge.

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):
    epoch = r['epoch'] + (1 if r['pending'] and r['counter'] < 128 else 0)
    previous_epoch = epoch - (1 if r['before_isr'] and not r['pending'] and r['counter'] >= 128 else 0)
    expanded = previous_epoch * 256 + r['counter']
    delta = expanded - r['previous']
    forward = delta >= 0
    within = 0 <= delta <= r['max_interval']
    wraps = expanded // 256 - r['previous'] // 256
    phase = expanded % 256
    cycles = expanded // r['period']
    next_edge = (cycles + 1) * r['period']
    return [expanded,delta,forward,within,wraps,phase,next_edge]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve({'epoch': 1, 'pending': True, 'counter': 2, 'before_isr': False, 'previous': 250, 'max_interval': 8, 'period': 10}), [514, 264, True, False, 2, 4, 520])
check('fixture 2', solve({'epoch': 1, 'pending': True, 'counter': 250, 'before_isr': False, 'previous': 490, 'max_interval': 16, 'period': 30}), [506, 16, True, True, 0, 26, 510])
check('fixture 3', solve({'epoch': 2, 'pending': False, 'counter': 250, 'before_isr': True, 'previous': 500, 'max_interval': 6, 'period': 10}), [506, 6, True, True, 0, 6, 510])
check('fixture 4', solve({'epoch': 1, 'pending': False, 'counter': 0, 'before_isr': False, 'previous': 256, 'max_interval': 0, 'period': 7}), [256, 0, True, True, 0, 4, 259])
check('fixture 5', solve({'epoch': 3, 'pending': False, 'counter': 20, 'before_isr': False, 'previous': 10, 'max_interval': 800, 'period': 100}), [788, 778, True, True, 3, 88, 800])
check('fixture 6', solve({'epoch': 1, 'pending': False, 'counter': 0, 'before_isr': False, 'previous': 260, 'max_interval': 10, 'period': 13}), [256, -4, False, False, 0, 9, 260])
check('fixture 7', solve({'epoch': 0, 'pending': False, 'counter': 20, 'before_isr': False, 'previous': 10, 'max_interval': 9, 'period': 7}), [20, 10, True, False, 0, 6, 21])
check('fixture 8', solve({'epoch': 2, 'pending': False, 'counter': 0, 'before_isr': False, 'previous': 0, 'max_interval': 512, 'period': 16}), [512, 512, True, True, 2, 0, 528])
check('fixture 9', solve({'epoch': 0, 'pending': False, 'counter': 127, 'before_isr': False, 'previous': 0, 'max_interval': 127, 'period': 20}), [127, 127, True, True, 0, 7, 140])
check('fixture 10', solve({'epoch': 0, 'pending': True, 'counter': 128, 'before_isr': False, 'previous': 0, 'max_interval': 128, 'period': 10}), [128, 128, True, True, 0, 8, 130])
check('fixture 11', solve({'epoch': 2, 'pending': False, 'counter': 2, 'before_isr': True, 'previous': 512, 'max_interval': 20, 'period': 10}), [514, 2, True, True, 0, 4, 520])
variant = [({'epoch': 1, 'pending': True, 'counter': 2, 'before_isr': False, 'previous': 250, 'max_interval': 8, 'period': 11}, [514, 264, True, False, 2, 8, 517]), ({'epoch': 1, 'pending': True, 'counter': 2, 'before_isr': False, 'previous': 250, 'max_interval': 8, 'period': 12}, [514, 264, True, False, 2, 10, 516]), ({'epoch': 1, 'pending': True, 'counter': 2, 'before_isr': False, 'previous': 250, 'max_interval': 8, 'period': 13}, [514, 264, True, False, 2, 7, 520]), ({'epoch': 1, 'pending': True, 'counter': 2, 'before_isr': False, 'previous': 250, 'max_interval': 8, 'period': 14}, [514, 264, True, False, 2, 10, 518]), ({'epoch': 1, 'pending': True, 'counter': 2, 'before_isr': False, 'previous': 250, 'max_interval': 8, 'period': 15}, [514, 264, True, False, 2, 4, 525])]
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):
    epoch = r['epoch'] + (1 if r['pending'] and r['counter'] < 128 else 0)
    previous_epoch = epoch - (1 if r['before_isr'] and not r['pending'] and r['counter'] >= 128 else 0)
    expanded = previous_epoch * 256 + r['counter']
    delta = expanded - r['previous']
    forward = delta >= 0
    within = 0 <= delta <= r['max_interval']
    wraps = expanded // 256 - r['previous'] // 256
    phase = expanded % (r['period'] + 1)
    cycles = expanded // r['period']
    next_edge = (cycles + 1) * r['period']
    return [expanded,delta,forward,within,wraps,phase,next_edge]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve({'epoch': 1, 'pending': True, 'counter': 2, 'before_isr': False, 'previous': 250, 'max_interval': 8, 'period': 10}), [514, 264, True, False, 2, 4, 520])
check('fixture 2', solve({'epoch': 1, 'pending': True, 'counter': 250, 'before_isr': False, 'previous': 490, 'max_interval': 16, 'period': 30}), [506, 16, True, True, 0, 26, 510])
check('fixture 3', solve({'epoch': 2, 'pending': False, 'counter': 250, 'before_isr': True, 'previous': 500, 'max_interval': 6, 'period': 10}), [506, 6, True, True, 0, 6, 510])
check('fixture 4', solve({'epoch': 1, 'pending': False, 'counter': 0, 'before_isr': False, 'previous': 256, 'max_interval': 0, 'period': 7}), [256, 0, True, True, 0, 4, 259])
check('fixture 5', solve({'epoch': 3, 'pending': False, 'counter': 20, 'before_isr': False, 'previous': 10, 'max_interval': 800, 'period': 100}), [788, 778, True, True, 3, 88, 800])
check('fixture 6', solve({'epoch': 1, 'pending': False, 'counter': 0, 'before_isr': False, 'previous': 260, 'max_interval': 10, 'period': 13}), [256, -4, False, False, 0, 9, 260])
check('fixture 7', solve({'epoch': 0, 'pending': False, 'counter': 20, 'before_isr': False, 'previous': 10, 'max_interval': 9, 'period': 7}), [20, 10, True, False, 0, 6, 21])
check('fixture 8', solve({'epoch': 2, 'pending': False, 'counter': 0, 'before_isr': False, 'previous': 0, 'max_interval': 512, 'period': 16}), [512, 512, True, True, 2, 0, 528])
check('fixture 9', solve({'epoch': 0, 'pending': False, 'counter': 127, 'before_isr': False, 'previous': 0, 'max_interval': 127, 'period': 20}), [127, 127, True, True, 0, 7, 140])
check('fixture 10', solve({'epoch': 0, 'pending': True, 'counter': 128, 'before_isr': False, 'previous': 0, 'max_interval': 128, 'period': 10}), [128, 128, True, True, 0, 8, 130])
check('fixture 11', solve({'epoch': 2, 'pending': False, 'counter': 2, 'before_isr': True, 'previous': 512, 'max_interval': 20, 'period': 10}), [514, 2, True, True, 0, 4, 520])
variant = [({'epoch': 1, 'pending': True, 'counter': 2, 'before_isr': False, 'previous': 250, 'max_interval': 8, 'period': 11}, [514, 264, True, False, 2, 8, 517]), ({'epoch': 1, 'pending': True, 'counter': 2, 'before_isr': False, 'previous': 250, 'max_interval': 8, 'period': 12}, [514, 264, True, False, 2, 10, 516]), ({'epoch': 1, 'pending': True, 'counter': 2, 'before_isr': False, 'previous': 250, 'max_interval': 8, 'period': 13}, [514, 264, True, False, 2, 7, 520]), ({'epoch': 1, 'pending': True, 'counter': 2, 'before_isr': False, 'previous': 250, 'max_interval': 8, 'period': 14}, [514, 264, True, False, 2, 10, 518]), ({'epoch': 1, 'pending': True, 'counter': 2, 'before_isr': False, 'previous': 250, 'max_interval': 8, 'period': 15}, [514, 264, True, False, 2, 4, 525])]
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 phase.

Expand a 256-tick hardware capture with an ISR epoch. Pending overflow applies only to low-half captures; a pre-ISR high-half capture backs out one serviced epoch. Return expanded coordinate, signed delta from previous capture, nonnegative-order flag, bounded-interval flag, epoch crossings, phase on a positive external grid, and strictly next grid edge.

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):
    epoch = r['epoch'] + (1 if r['pending'] and r['counter'] < 128 else 0)
    previous_epoch = epoch - (1 if r['before_isr'] and not r['pending'] and r['counter'] >= 128 else 0)
    expanded = previous_epoch * 256 + r['counter']
    delta = expanded - r['previous']
    forward = delta >= 0
    within = 0 <= delta <= r['max_interval']
    wraps = expanded // 256 - r['previous'] // 256
    phase = expanded % r['period']
    cycles = expanded // 256
    next_edge = (cycles + 1) * r['period']
    return [expanded,delta,forward,within,wraps,phase,next_edge]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve({'epoch': 1, 'pending': True, 'counter': 2, 'before_isr': False, 'previous': 250, 'max_interval': 8, 'period': 10}), [514, 264, True, False, 2, 4, 520])
check('fixture 2', solve({'epoch': 1, 'pending': True, 'counter': 250, 'before_isr': False, 'previous': 490, 'max_interval': 16, 'period': 30}), [506, 16, True, True, 0, 26, 510])
check('fixture 3', solve({'epoch': 2, 'pending': False, 'counter': 250, 'before_isr': True, 'previous': 500, 'max_interval': 6, 'period': 10}), [506, 6, True, True, 0, 6, 510])
check('fixture 4', solve({'epoch': 1, 'pending': False, 'counter': 0, 'before_isr': False, 'previous': 256, 'max_interval': 0, 'period': 7}), [256, 0, True, True, 0, 4, 259])
check('fixture 5', solve({'epoch': 3, 'pending': False, 'counter': 20, 'before_isr': False, 'previous': 10, 'max_interval': 800, 'period': 100}), [788, 778, True, True, 3, 88, 800])
check('fixture 6', solve({'epoch': 1, 'pending': False, 'counter': 0, 'before_isr': False, 'previous': 260, 'max_interval': 10, 'period': 13}), [256, -4, False, False, 0, 9, 260])
check('fixture 7', solve({'epoch': 0, 'pending': False, 'counter': 20, 'before_isr': False, 'previous': 10, 'max_interval': 9, 'period': 7}), [20, 10, True, False, 0, 6, 21])
check('fixture 8', solve({'epoch': 2, 'pending': False, 'counter': 0, 'before_isr': False, 'previous': 0, 'max_interval': 512, 'period': 16}), [512, 512, True, True, 2, 0, 528])
check('fixture 9', solve({'epoch': 0, 'pending': False, 'counter': 127, 'before_isr': False, 'previous': 0, 'max_interval': 127, 'period': 20}), [127, 127, True, True, 0, 7, 140])
check('fixture 10', solve({'epoch': 0, 'pending': True, 'counter': 128, 'before_isr': False, 'previous': 0, 'max_interval': 128, 'period': 10}), [128, 128, True, True, 0, 8, 130])
check('fixture 11', solve({'epoch': 2, 'pending': False, 'counter': 2, 'before_isr': True, 'previous': 512, 'max_interval': 20, 'period': 10}), [514, 2, True, True, 0, 4, 520])
variant = [({'epoch': 1, 'pending': True, 'counter': 2, 'before_isr': False, 'previous': 250, 'max_interval': 8, 'period': 11}, [514, 264, True, False, 2, 8, 517]), ({'epoch': 1, 'pending': True, 'counter': 2, 'before_isr': False, 'previous': 250, 'max_interval': 8, 'period': 12}, [514, 264, True, False, 2, 10, 516]), ({'epoch': 1, 'pending': True, 'counter': 2, 'before_isr': False, 'previous': 250, 'max_interval': 8, 'period': 13}, [514, 264, True, False, 2, 7, 520]), ({'epoch': 1, 'pending': True, 'counter': 2, 'before_isr': False, 'previous': 250, 'max_interval': 8, 'period': 14}, [514, 264, True, False, 2, 10, 518]), ({'epoch': 1, 'pending': True, 'counter': 2, 'before_isr': False, 'previous': 250, 'max_interval': 8, 'period': 15}, [514, 264, True, False, 2, 4, 525])]
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):
    epoch = r['epoch'] + (1 if r['pending'] and r['counter'] < 128 else 0)
    previous_epoch = epoch - (1 if r['before_isr'] and not r['pending'] and r['counter'] >= 128 else 0)
    expanded = previous_epoch * 256 + r['counter']
    delta = expanded - r['previous']
    forward = delta >= 0
    within = 0 <= delta <= r['max_interval']
    wraps = expanded // 256 - r['previous'] // 256
    phase = expanded % r['period']
    cycles = (expanded + r['period'] - 1) // r['period']
    next_edge = (cycles + 1) * r['period']
    return [expanded,delta,forward,within,wraps,phase,next_edge]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve({'epoch': 1, 'pending': True, 'counter': 2, 'before_isr': False, 'previous': 250, 'max_interval': 8, 'period': 10}), [514, 264, True, False, 2, 4, 520])
check('fixture 2', solve({'epoch': 1, 'pending': True, 'counter': 250, 'before_isr': False, 'previous': 490, 'max_interval': 16, 'period': 30}), [506, 16, True, True, 0, 26, 510])
check('fixture 3', solve({'epoch': 2, 'pending': False, 'counter': 250, 'before_isr': True, 'previous': 500, 'max_interval': 6, 'period': 10}), [506, 6, True, True, 0, 6, 510])
check('fixture 4', solve({'epoch': 1, 'pending': False, 'counter': 0, 'before_isr': False, 'previous': 256, 'max_interval': 0, 'period': 7}), [256, 0, True, True, 0, 4, 259])
check('fixture 5', solve({'epoch': 3, 'pending': False, 'counter': 20, 'before_isr': False, 'previous': 10, 'max_interval': 800, 'period': 100}), [788, 778, True, True, 3, 88, 800])
check('fixture 6', solve({'epoch': 1, 'pending': False, 'counter': 0, 'before_isr': False, 'previous': 260, 'max_interval': 10, 'period': 13}), [256, -4, False, False, 0, 9, 260])
check('fixture 7', solve({'epoch': 0, 'pending': False, 'counter': 20, 'before_isr': False, 'previous': 10, 'max_interval': 9, 'period': 7}), [20, 10, True, False, 0, 6, 21])
check('fixture 8', solve({'epoch': 2, 'pending': False, 'counter': 0, 'before_isr': False, 'previous': 0, 'max_interval': 512, 'period': 16}), [512, 512, True, True, 2, 0, 528])
check('fixture 9', solve({'epoch': 0, 'pending': False, 'counter': 127, 'before_isr': False, 'previous': 0, 'max_interval': 127, 'period': 20}), [127, 127, True, True, 0, 7, 140])
check('fixture 10', solve({'epoch': 0, 'pending': True, 'counter': 128, 'before_isr': False, 'previous': 0, 'max_interval': 128, 'period': 10}), [128, 128, True, True, 0, 8, 130])
check('fixture 11', solve({'epoch': 2, 'pending': False, 'counter': 2, 'before_isr': True, 'previous': 512, 'max_interval': 20, 'period': 10}), [514, 2, True, True, 0, 4, 520])
variant = [({'epoch': 1, 'pending': True, 'counter': 2, 'before_isr': False, 'previous': 250, 'max_interval': 8, 'period': 11}, [514, 264, True, False, 2, 8, 517]), ({'epoch': 1, 'pending': True, 'counter': 2, 'before_isr': False, 'previous': 250, 'max_interval': 8, 'period': 12}, [514, 264, True, False, 2, 10, 516]), ({'epoch': 1, 'pending': True, 'counter': 2, 'before_isr': False, 'previous': 250, 'max_interval': 8, 'period': 13}, [514, 264, True, False, 2, 7, 520]), ({'epoch': 1, 'pending': True, 'counter': 2, 'before_isr': False, 'previous': 250, 'max_interval': 8, 'period': 14}, [514, 264, True, False, 2, 10, 518]), ({'epoch': 1, 'pending': True, 'counter': 2, 'before_isr': False, 'previous': 250, 'max_interval': 8, 'period': 15}, [514, 264, True, False, 2, 4, 525])]
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 cycles.

Expand a 256-tick hardware capture with an ISR epoch. Pending overflow applies only to low-half captures; a pre-ISR high-half capture backs out one serviced epoch. Return expanded coordinate, signed delta from previous capture, nonnegative-order flag, bounded-interval flag, epoch crossings, phase on a positive external grid, and strictly next grid edge.

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):
    epoch = r['epoch'] + (1 if r['pending'] and r['counter'] < 128 else 0)
    previous_epoch = epoch - (1 if r['before_isr'] and not r['pending'] and r['counter'] >= 128 else 0)
    expanded = previous_epoch * 256 + r['counter']
    delta = expanded - r['previous']
    forward = delta >= 0
    within = 0 <= delta <= r['max_interval']
    wraps = expanded // 256 - r['previous'] // 256
    phase = expanded % r['period']
    cycles = expanded // r['period']
    next_edge = cycles * r['period']
    return [expanded,delta,forward,within,wraps,phase,next_edge]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve({'epoch': 1, 'pending': True, 'counter': 2, 'before_isr': False, 'previous': 250, 'max_interval': 8, 'period': 10}), [514, 264, True, False, 2, 4, 520])
check('fixture 2', solve({'epoch': 1, 'pending': True, 'counter': 250, 'before_isr': False, 'previous': 490, 'max_interval': 16, 'period': 30}), [506, 16, True, True, 0, 26, 510])
check('fixture 3', solve({'epoch': 2, 'pending': False, 'counter': 250, 'before_isr': True, 'previous': 500, 'max_interval': 6, 'period': 10}), [506, 6, True, True, 0, 6, 510])
check('fixture 4', solve({'epoch': 1, 'pending': False, 'counter': 0, 'before_isr': False, 'previous': 256, 'max_interval': 0, 'period': 7}), [256, 0, True, True, 0, 4, 259])
check('fixture 5', solve({'epoch': 3, 'pending': False, 'counter': 20, 'before_isr': False, 'previous': 10, 'max_interval': 800, 'period': 100}), [788, 778, True, True, 3, 88, 800])
check('fixture 6', solve({'epoch': 1, 'pending': False, 'counter': 0, 'before_isr': False, 'previous': 260, 'max_interval': 10, 'period': 13}), [256, -4, False, False, 0, 9, 260])
check('fixture 7', solve({'epoch': 0, 'pending': False, 'counter': 20, 'before_isr': False, 'previous': 10, 'max_interval': 9, 'period': 7}), [20, 10, True, False, 0, 6, 21])
check('fixture 8', solve({'epoch': 2, 'pending': False, 'counter': 0, 'before_isr': False, 'previous': 0, 'max_interval': 512, 'period': 16}), [512, 512, True, True, 2, 0, 528])
check('fixture 9', solve({'epoch': 0, 'pending': False, 'counter': 127, 'before_isr': False, 'previous': 0, 'max_interval': 127, 'period': 20}), [127, 127, True, True, 0, 7, 140])
check('fixture 10', solve({'epoch': 0, 'pending': True, 'counter': 128, 'before_isr': False, 'previous': 0, 'max_interval': 128, 'period': 10}), [128, 128, True, True, 0, 8, 130])
check('fixture 11', solve({'epoch': 2, 'pending': False, 'counter': 2, 'before_isr': True, 'previous': 512, 'max_interval': 20, 'period': 10}), [514, 2, True, True, 0, 4, 520])
variant = [({'epoch': 1, 'pending': True, 'counter': 2, 'before_isr': False, 'previous': 250, 'max_interval': 8, 'period': 11}, [514, 264, True, False, 2, 8, 517]), ({'epoch': 1, 'pending': True, 'counter': 2, 'before_isr': False, 'previous': 250, 'max_interval': 8, 'period': 12}, [514, 264, True, False, 2, 10, 516]), ({'epoch': 1, 'pending': True, 'counter': 2, 'before_isr': False, 'previous': 250, 'max_interval': 8, 'period': 13}, [514, 264, True, False, 2, 7, 520]), ({'epoch': 1, 'pending': True, 'counter': 2, 'before_isr': False, 'previous': 250, 'max_interval': 8, 'period': 14}, [514, 264, True, False, 2, 10, 518]), ({'epoch': 1, 'pending': True, 'counter': 2, 'before_isr': False, 'previous': 250, 'max_interval': 8, 'period': 15}, [514, 264, True, False, 2, 4, 525])]
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):
    epoch = r['epoch'] + (1 if r['pending'] and r['counter'] < 128 else 0)
    previous_epoch = epoch - (1 if r['before_isr'] and not r['pending'] and r['counter'] >= 128 else 0)
    expanded = previous_epoch * 256 + r['counter']
    delta = expanded - r['previous']
    forward = delta >= 0
    within = 0 <= delta <= r['max_interval']
    wraps = expanded // 256 - r['previous'] // 256
    phase = expanded % r['period']
    cycles = expanded // r['period']
    next_edge = expanded + r['period']
    return [expanded,delta,forward,within,wraps,phase,next_edge]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve({'epoch': 1, 'pending': True, 'counter': 2, 'before_isr': False, 'previous': 250, 'max_interval': 8, 'period': 10}), [514, 264, True, False, 2, 4, 520])
check('fixture 2', solve({'epoch': 1, 'pending': True, 'counter': 250, 'before_isr': False, 'previous': 490, 'max_interval': 16, 'period': 30}), [506, 16, True, True, 0, 26, 510])
check('fixture 3', solve({'epoch': 2, 'pending': False, 'counter': 250, 'before_isr': True, 'previous': 500, 'max_interval': 6, 'period': 10}), [506, 6, True, True, 0, 6, 510])
check('fixture 4', solve({'epoch': 1, 'pending': False, 'counter': 0, 'before_isr': False, 'previous': 256, 'max_interval': 0, 'period': 7}), [256, 0, True, True, 0, 4, 259])
check('fixture 5', solve({'epoch': 3, 'pending': False, 'counter': 20, 'before_isr': False, 'previous': 10, 'max_interval': 800, 'period': 100}), [788, 778, True, True, 3, 88, 800])
check('fixture 6', solve({'epoch': 1, 'pending': False, 'counter': 0, 'before_isr': False, 'previous': 260, 'max_interval': 10, 'period': 13}), [256, -4, False, False, 0, 9, 260])
check('fixture 7', solve({'epoch': 0, 'pending': False, 'counter': 20, 'before_isr': False, 'previous': 10, 'max_interval': 9, 'period': 7}), [20, 10, True, False, 0, 6, 21])
check('fixture 8', solve({'epoch': 2, 'pending': False, 'counter': 0, 'before_isr': False, 'previous': 0, 'max_interval': 512, 'period': 16}), [512, 512, True, True, 2, 0, 528])
check('fixture 9', solve({'epoch': 0, 'pending': False, 'counter': 127, 'before_isr': False, 'previous': 0, 'max_interval': 127, 'period': 20}), [127, 127, True, True, 0, 7, 140])
check('fixture 10', solve({'epoch': 0, 'pending': True, 'counter': 128, 'before_isr': False, 'previous': 0, 'max_interval': 128, 'period': 10}), [128, 128, True, True, 0, 8, 130])
check('fixture 11', solve({'epoch': 2, 'pending': False, 'counter': 2, 'before_isr': True, 'previous': 512, 'max_interval': 20, 'period': 10}), [514, 2, True, True, 0, 4, 520])
variant = [({'epoch': 1, 'pending': True, 'counter': 2, 'before_isr': False, 'previous': 250, 'max_interval': 8, 'period': 11}, [514, 264, True, False, 2, 8, 517]), ({'epoch': 1, 'pending': True, 'counter': 2, 'before_isr': False, 'previous': 250, 'max_interval': 8, 'period': 12}, [514, 264, True, False, 2, 10, 516]), ({'epoch': 1, 'pending': True, 'counter': 2, 'before_isr': False, 'previous': 250, 'max_interval': 8, 'period': 13}, [514, 264, True, False, 2, 7, 520]), ({'epoch': 1, 'pending': True, 'counter': 2, 'before_isr': False, 'previous': 250, 'max_interval': 8, 'period': 14}, [514, 264, True, False, 2, 10, 518]), ({'epoch': 1, 'pending': True, 'counter': 2, 'before_isr': False, 'previous': 250, 'max_interval': 8, 'period': 15}, [514, 264, True, False, 2, 4, 525])]
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 next_edge.

Expand a 256-tick hardware capture with an ISR epoch. Pending overflow applies only to low-half captures; a pre-ISR high-half capture backs out one serviced epoch. Return expanded coordinate, signed delta from previous capture, nonnegative-order flag, bounded-interval flag, epoch crossings, phase on a positive external grid, and strictly next grid edge.

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):
    age = r['elapsed']
    early_growth = (age * r['early_rate'] + 999) // 1000
    late_growth = (age * r['late_rate'] + 999) // 1000
    center = r['anchor'] + r['elapsed']
    low = center - r['early'] - early_growth
    high = center + r['late'] + late_growth
    width = high - low
    contains_zero = low <= 0 <= high
    earliest = r['query'] - high
    latest = r['query'] - low
    return [[low,high],width,contains_zero,[earliest,latest],high < r['query']]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve({'anchor': 10, 'elapsed': 1, 'early': 2, 'late': 3, 'early_rate': 1, 'late_rate': 500, 'query': 20}), [[8, 15], 7, False, [5, 12], True])
check('fixture 2', solve({'anchor': 0, 'elapsed': -5, 'early': 0, 'late': 1, 'early_rate': 200, 'late_rate': 1, 'query': 0}), [[-6, -3], 3, False, [3, 6], True])
check('fixture 3', solve({'anchor': -1, 'elapsed': 1, 'early': 0, 'late': 0, 'early_rate': 0, 'late_rate': 0, 'query': -3}), [[0, 0], 0, True, [-3, -3], False])
check('fixture 4', solve({'anchor': 20, 'elapsed': 1000, 'early': 3, 'late': 5, 'early_rate': 2, 'late_rate': 7, 'query': 100}), [[1015, 1032], 17, False, [-932, -915], False])
check('fixture 5', solve({'anchor': -10, 'elapsed': 0, 'early': 2, 'late': 3, 'early_rate': 0, 'late_rate': 0, 'query': -20}), [[-12, -7], 5, False, [-13, -8], False])
check('fixture 6', solve({'anchor': 0, 'elapsed': 2, 'early': 5, 'late': 0, 'early_rate': 1, 'late_rate': 2000, 'query': 0}), [[-4, 6], 10, True, [-6, 4], False])
check('fixture 7', solve({'anchor': 10, 'elapsed': -1001, 'early': 0, 'late': 1, 'early_rate': 2, 'late_rate': 1, 'query': 8}), [[-994, -988], 6, False, [996, 1002], True])
check('fixture 8', solve({'anchor': 0, 'elapsed': 0, 'early': 0, 'late': 0, 'early_rate': 0, 'late_rate': 0, 'query': 0}), [[0, 0], 0, True, [0, 0], False])
check('fixture 9', solve({'anchor': 2, 'elapsed': -1, 'early': 0, 'late': 0, 'early_rate': 1000, 'late_rate': 1000, 'query': 2}), [[0, 2], 2, True, [0, 2], False])
check('fixture 10', solve({'anchor': 0, 'elapsed': 10, 'early': 1, 'late': 10, 'early_rate': 90, 'late_rate': 150, 'query': 20}), [[8, 22], 14, False, [-2, 12], False])
variant = [({'anchor': 10, 'elapsed': 1, 'early': 2, 'late': 3, 'early_rate': 1, 'late_rate': 500, 'query': 21}, [[8, 15], 7, False, [6, 13], True]), ({'anchor': 10, 'elapsed': 1, 'early': 2, 'late': 3, 'early_rate': 1, 'late_rate': 500, 'query': 22}, [[8, 15], 7, False, [7, 14], True]), ({'anchor': 10, 'elapsed': 1, 'early': 2, 'late': 3, 'early_rate': 1, 'late_rate': 500, 'query': 23}, [[8, 15], 7, False, [8, 15], True]), ({'anchor': 10, 'elapsed': 1, 'early': 2, 'late': 3, 'early_rate': 1, 'late_rate': 500, 'query': 24}, [[8, 15], 7, False, [9, 16], True]), ({'anchor': 10, 'elapsed': 1, 'early': 2, 'late': 3, 'early_rate': 1, 'late_rate': 500, 'query': 25}, [[8, 15], 7, False, [10, 17], True])]
check("variant capture", solve(variant[N-1][0]), variant[N-1][1])
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)

source:
"""Failure Map reference implementation. Python standard library only."""
import json
from fractions import Fraction
N = 1
observations = []
def solve(r):
    age = max(0,r['elapsed'])
    early_growth = (age * r['early_rate'] + 999) // 1000
    late_growth = (age * r['late_rate'] + 999) // 1000
    center = r['anchor'] + r['elapsed']
    low = center - r['early'] - early_growth
    high = center + r['late'] + late_growth
    width = high - low
    contains_zero = low <= 0 <= high
    earliest = r['query'] - high
    latest = r['query'] - low
    return [[low,high],width,contains_zero,[earliest,latest],high < r['query']]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve({'anchor': 10, 'elapsed': 1, 'early': 2, 'late': 3, 'early_rate': 1, 'late_rate': 500, 'query': 20}), [[8, 15], 7, False, [5, 12], True])
check('fixture 2', solve({'anchor': 0, 'elapsed': -5, 'early': 0, 'late': 1, 'early_rate': 200, 'late_rate': 1, 'query': 0}), [[-6, -3], 3, False, [3, 6], True])
check('fixture 3', solve({'anchor': -1, 'elapsed': 1, 'early': 0, 'late': 0, 'early_rate': 0, 'late_rate': 0, 'query': -3}), [[0, 0], 0, True, [-3, -3], False])
check('fixture 4', solve({'anchor': 20, 'elapsed': 1000, 'early': 3, 'late': 5, 'early_rate': 2, 'late_rate': 7, 'query': 100}), [[1015, 1032], 17, False, [-932, -915], False])
check('fixture 5', solve({'anchor': -10, 'elapsed': 0, 'early': 2, 'late': 3, 'early_rate': 0, 'late_rate': 0, 'query': -20}), [[-12, -7], 5, False, [-13, -8], False])
check('fixture 6', solve({'anchor': 0, 'elapsed': 2, 'early': 5, 'late': 0, 'early_rate': 1, 'late_rate': 2000, 'query': 0}), [[-4, 6], 10, True, [-6, 4], False])
check('fixture 7', solve({'anchor': 10, 'elapsed': -1001, 'early': 0, 'late': 1, 'early_rate': 2, 'late_rate': 1, 'query': 8}), [[-994, -988], 6, False, [996, 1002], True])
check('fixture 8', solve({'anchor': 0, 'elapsed': 0, 'early': 0, 'late': 0, 'early_rate': 0, 'late_rate': 0, 'query': 0}), [[0, 0], 0, True, [0, 0], False])
check('fixture 9', solve({'anchor': 2, 'elapsed': -1, 'early': 0, 'late': 0, 'early_rate': 1000, 'late_rate': 1000, 'query': 2}), [[0, 2], 2, True, [0, 2], False])
check('fixture 10', solve({'anchor': 0, 'elapsed': 10, 'early': 1, 'late': 10, 'early_rate': 90, 'late_rate': 150, 'query': 20}), [[8, 22], 14, False, [-2, 12], False])
variant = [({'anchor': 10, 'elapsed': 1, 'early': 2, 'late': 3, 'early_rate': 1, 'late_rate': 500, 'query': 21}, [[8, 15], 7, False, [6, 13], True]), ({'anchor': 10, 'elapsed': 1, 'early': 2, 'late': 3, 'early_rate': 1, 'late_rate': 500, 'query': 22}, [[8, 15], 7, False, [7, 14], True]), ({'anchor': 10, 'elapsed': 1, 'early': 2, 'late': 3, 'early_rate': 1, 'late_rate': 500, 'query': 23}, [[8, 15], 7, False, [8, 15], True]), ({'anchor': 10, 'elapsed': 1, 'early': 2, 'late': 3, 'early_rate': 1, 'late_rate': 500, 'query': 24}, [[8, 15], 7, False, [9, 16], True]), ({'anchor': 10, 'elapsed': 1, 'early': 2, 'late': 3, 'early_rate': 1, 'late_rate': 500, 'query': 25}, [[8, 15], 7, False, [10, 17], True])]
check("variant capture", solve(variant[N-1][0]), variant[N-1][1])
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)

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

Project a center with asymmetric early/late error through signed elapsed ticks. Error growth uses elapsed magnitude and independent parts-per-thousand bounds rounded outward. Return projected [low,high], full width, zero containment, earliest/latest signed query duration and strict certainty of preceding query.

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):
    age = abs(r['elapsed'])
    early_growth = age * r['early_rate'] // 1000
    late_growth = (age * r['late_rate'] + 999) // 1000
    center = r['anchor'] + r['elapsed']
    low = center - r['early'] - early_growth
    high = center + r['late'] + late_growth
    width = high - low
    contains_zero = low <= 0 <= high
    earliest = r['query'] - high
    latest = r['query'] - low
    return [[low,high],width,contains_zero,[earliest,latest],high < r['query']]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve({'anchor': 10, 'elapsed': 1, 'early': 2, 'late': 3, 'early_rate': 1, 'late_rate': 500, 'query': 20}), [[8, 15], 7, False, [5, 12], True])
check('fixture 2', solve({'anchor': 0, 'elapsed': -5, 'early': 0, 'late': 1, 'early_rate': 200, 'late_rate': 1, 'query': 0}), [[-6, -3], 3, False, [3, 6], True])
check('fixture 3', solve({'anchor': -1, 'elapsed': 1, 'early': 0, 'late': 0, 'early_rate': 0, 'late_rate': 0, 'query': -3}), [[0, 0], 0, True, [-3, -3], False])
check('fixture 4', solve({'anchor': 20, 'elapsed': 1000, 'early': 3, 'late': 5, 'early_rate': 2, 'late_rate': 7, 'query': 100}), [[1015, 1032], 17, False, [-932, -915], False])
check('fixture 5', solve({'anchor': -10, 'elapsed': 0, 'early': 2, 'late': 3, 'early_rate': 0, 'late_rate': 0, 'query': -20}), [[-12, -7], 5, False, [-13, -8], False])
check('fixture 6', solve({'anchor': 0, 'elapsed': 2, 'early': 5, 'late': 0, 'early_rate': 1, 'late_rate': 2000, 'query': 0}), [[-4, 6], 10, True, [-6, 4], False])
check('fixture 7', solve({'anchor': 10, 'elapsed': -1001, 'early': 0, 'late': 1, 'early_rate': 2, 'late_rate': 1, 'query': 8}), [[-994, -988], 6, False, [996, 1002], True])
check('fixture 8', solve({'anchor': 0, 'elapsed': 0, 'early': 0, 'late': 0, 'early_rate': 0, 'late_rate': 0, 'query': 0}), [[0, 0], 0, True, [0, 0], False])
check('fixture 9', solve({'anchor': 2, 'elapsed': -1, 'early': 0, 'late': 0, 'early_rate': 1000, 'late_rate': 1000, 'query': 2}), [[0, 2], 2, True, [0, 2], False])
check('fixture 10', solve({'anchor': 0, 'elapsed': 10, 'early': 1, 'late': 10, 'early_rate': 90, 'late_rate': 150, 'query': 20}), [[8, 22], 14, False, [-2, 12], False])
variant = [({'anchor': 10, 'elapsed': 1, 'early': 2, 'late': 3, 'early_rate': 1, 'late_rate': 500, 'query': 21}, [[8, 15], 7, False, [6, 13], True]), ({'anchor': 10, 'elapsed': 1, 'early': 2, 'late': 3, 'early_rate': 1, 'late_rate': 500, 'query': 22}, [[8, 15], 7, False, [7, 14], True]), ({'anchor': 10, 'elapsed': 1, 'early': 2, 'late': 3, 'early_rate': 1, 'late_rate': 500, 'query': 23}, [[8, 15], 7, False, [8, 15], True]), ({'anchor': 10, 'elapsed': 1, 'early': 2, 'late': 3, 'early_rate': 1, 'late_rate': 500, 'query': 24}, [[8, 15], 7, False, [9, 16], True]), ({'anchor': 10, 'elapsed': 1, 'early': 2, 'late': 3, 'early_rate': 1, 'late_rate': 500, 'query': 25}, [[8, 15], 7, False, [10, 17], True])]
check("variant capture", solve(variant[N-1][0]), variant[N-1][1])
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)

source:
"""Failure Map reference implementation. Python standard library only."""
import json
from fractions import Fraction
N = 1
observations = []
def solve(r):
    age = abs(r['elapsed'])
    early_growth = (age * r['late_rate'] + 999) // 1000
    late_growth = (age * r['late_rate'] + 999) // 1000
    center = r['anchor'] + r['elapsed']
    low = center - r['early'] - early_growth
    high = center + r['late'] + late_growth
    width = high - low
    contains_zero = low <= 0 <= high
    earliest = r['query'] - high
    latest = r['query'] - low
    return [[low,high],width,contains_zero,[earliest,latest],high < r['query']]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve({'anchor': 10, 'elapsed': 1, 'early': 2, 'late': 3, 'early_rate': 1, 'late_rate': 500, 'query': 20}), [[8, 15], 7, False, [5, 12], True])
check('fixture 2', solve({'anchor': 0, 'elapsed': -5, 'early': 0, 'late': 1, 'early_rate': 200, 'late_rate': 1, 'query': 0}), [[-6, -3], 3, False, [3, 6], True])
check('fixture 3', solve({'anchor': -1, 'elapsed': 1, 'early': 0, 'late': 0, 'early_rate': 0, 'late_rate': 0, 'query': -3}), [[0, 0], 0, True, [-3, -3], False])
check('fixture 4', solve({'anchor': 20, 'elapsed': 1000, 'early': 3, 'late': 5, 'early_rate': 2, 'late_rate': 7, 'query': 100}), [[1015, 1032], 17, False, [-932, -915], False])
check('fixture 5', solve({'anchor': -10, 'elapsed': 0, 'early': 2, 'late': 3, 'early_rate': 0, 'late_rate': 0, 'query': -20}), [[-12, -7], 5, False, [-13, -8], False])
check('fixture 6', solve({'anchor': 0, 'elapsed': 2, 'early': 5, 'late': 0, 'early_rate': 1, 'late_rate': 2000, 'query': 0}), [[-4, 6], 10, True, [-6, 4], False])
check('fixture 7', solve({'anchor': 10, 'elapsed': -1001, 'early': 0, 'late': 1, 'early_rate': 2, 'late_rate': 1, 'query': 8}), [[-994, -988], 6, False, [996, 1002], True])
check('fixture 8', solve({'anchor': 0, 'elapsed': 0, 'early': 0, 'late': 0, 'early_rate': 0, 'late_rate': 0, 'query': 0}), [[0, 0], 0, True, [0, 0], False])
check('fixture 9', solve({'anchor': 2, 'elapsed': -1, 'early': 0, 'late': 0, 'early_rate': 1000, 'late_rate': 1000, 'query': 2}), [[0, 2], 2, True, [0, 2], False])
check('fixture 10', solve({'anchor': 0, 'elapsed': 10, 'early': 1, 'late': 10, 'early_rate': 90, 'late_rate': 150, 'query': 20}), [[8, 22], 14, False, [-2, 12], False])
variant = [({'anchor': 10, 'elapsed': 1, 'early': 2, 'late': 3, 'early_rate': 1, 'late_rate': 500, 'query': 21}, [[8, 15], 7, False, [6, 13], True]), ({'anchor': 10, 'elapsed': 1, 'early': 2, 'late': 3, 'early_rate': 1, 'late_rate': 500, 'query': 22}, [[8, 15], 7, False, [7, 14], True]), ({'anchor': 10, 'elapsed': 1, 'early': 2, 'late': 3, 'early_rate': 1, 'late_rate': 500, 'query': 23}, [[8, 15], 7, False, [8, 15], True]), ({'anchor': 10, 'elapsed': 1, 'early': 2, 'late': 3, 'early_rate': 1, 'late_rate': 500, 'query': 24}, [[8, 15], 7, False, [9, 16], True]), ({'anchor': 10, 'elapsed': 1, 'early': 2, 'late': 3, 'early_rate': 1, 'late_rate': 500, 'query': 25}, [[8, 15], 7, False, [10, 17], True])]
check("variant capture", solve(variant[N-1][0]), variant[N-1][1])
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)

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

Project a center with asymmetric early/late error through signed elapsed ticks. Error growth uses elapsed magnitude and independent parts-per-thousand bounds rounded outward. Return projected [low,high], full width, zero containment, earliest/latest signed query duration and strict certainty of preceding query.

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):
    age = abs(r['elapsed'])
    early_growth = (age * r['early_rate'] + 999) // 1000
    late_growth = age * r['late_rate'] // 1000
    center = r['anchor'] + r['elapsed']
    low = center - r['early'] - early_growth
    high = center + r['late'] + late_growth
    width = high - low
    contains_zero = low <= 0 <= high
    earliest = r['query'] - high
    latest = r['query'] - low
    return [[low,high],width,contains_zero,[earliest,latest],high < r['query']]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve({'anchor': 10, 'elapsed': 1, 'early': 2, 'late': 3, 'early_rate': 1, 'late_rate': 500, 'query': 20}), [[8, 15], 7, False, [5, 12], True])
check('fixture 2', solve({'anchor': 0, 'elapsed': -5, 'early': 0, 'late': 1, 'early_rate': 200, 'late_rate': 1, 'query': 0}), [[-6, -3], 3, False, [3, 6], True])
check('fixture 3', solve({'anchor': -1, 'elapsed': 1, 'early': 0, 'late': 0, 'early_rate': 0, 'late_rate': 0, 'query': -3}), [[0, 0], 0, True, [-3, -3], False])
check('fixture 4', solve({'anchor': 20, 'elapsed': 1000, 'early': 3, 'late': 5, 'early_rate': 2, 'late_rate': 7, 'query': 100}), [[1015, 1032], 17, False, [-932, -915], False])
check('fixture 5', solve({'anchor': -10, 'elapsed': 0, 'early': 2, 'late': 3, 'early_rate': 0, 'late_rate': 0, 'query': -20}), [[-12, -7], 5, False, [-13, -8], False])
check('fixture 6', solve({'anchor': 0, 'elapsed': 2, 'early': 5, 'late': 0, 'early_rate': 1, 'late_rate': 2000, 'query': 0}), [[-4, 6], 10, True, [-6, 4], False])
check('fixture 7', solve({'anchor': 10, 'elapsed': -1001, 'early': 0, 'late': 1, 'early_rate': 2, 'late_rate': 1, 'query': 8}), [[-994, -988], 6, False, [996, 1002], True])
check('fixture 8', solve({'anchor': 0, 'elapsed': 0, 'early': 0, 'late': 0, 'early_rate': 0, 'late_rate': 0, 'query': 0}), [[0, 0], 0, True, [0, 0], False])
check('fixture 9', solve({'anchor': 2, 'elapsed': -1, 'early': 0, 'late': 0, 'early_rate': 1000, 'late_rate': 1000, 'query': 2}), [[0, 2], 2, True, [0, 2], False])
check('fixture 10', solve({'anchor': 0, 'elapsed': 10, 'early': 1, 'late': 10, 'early_rate': 90, 'late_rate': 150, 'query': 20}), [[8, 22], 14, False, [-2, 12], False])
variant = [({'anchor': 10, 'elapsed': 1, 'early': 2, 'late': 3, 'early_rate': 1, 'late_rate': 500, 'query': 21}, [[8, 15], 7, False, [6, 13], True]), ({'anchor': 10, 'elapsed': 1, 'early': 2, 'late': 3, 'early_rate': 1, 'late_rate': 500, 'query': 22}, [[8, 15], 7, False, [7, 14], True]), ({'anchor': 10, 'elapsed': 1, 'early': 2, 'late': 3, 'early_rate': 1, 'late_rate': 500, 'query': 23}, [[8, 15], 7, False, [8, 15], True]), ({'anchor': 10, 'elapsed': 1, 'early': 2, 'late': 3, 'early_rate': 1, 'late_rate': 500, 'query': 24}, [[8, 15], 7, False, [9, 16], True]), ({'anchor': 10, 'elapsed': 1, 'early': 2, 'late': 3, 'early_rate': 1, 'late_rate': 500, 'query': 25}, [[8, 15], 7, False, [10, 17], True])]
check("variant capture", solve(variant[N-1][0]), variant[N-1][1])
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)

source:
"""Failure Map reference implementation. Python standard library only."""
import json
from fractions import Fraction
N = 1
observations = []
def solve(r):
    age = abs(r['elapsed'])
    early_growth = (age * r['early_rate'] + 999) // 1000
    late_growth = (age * r['early_rate'] + 999) // 1000
    center = r['anchor'] + r['elapsed']
    low = center - r['early'] - early_growth
    high = center + r['late'] + late_growth
    width = high - low
    contains_zero = low <= 0 <= high
    earliest = r['query'] - high
    latest = r['query'] - low
    return [[low,high],width,contains_zero,[earliest,latest],high < r['query']]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve({'anchor': 10, 'elapsed': 1, 'early': 2, 'late': 3, 'early_rate': 1, 'late_rate': 500, 'query': 20}), [[8, 15], 7, False, [5, 12], True])
check('fixture 2', solve({'anchor': 0, 'elapsed': -5, 'early': 0, 'late': 1, 'early_rate': 200, 'late_rate': 1, 'query': 0}), [[-6, -3], 3, False, [3, 6], True])
check('fixture 3', solve({'anchor': -1, 'elapsed': 1, 'early': 0, 'late': 0, 'early_rate': 0, 'late_rate': 0, 'query': -3}), [[0, 0], 0, True, [-3, -3], False])
check('fixture 4', solve({'anchor': 20, 'elapsed': 1000, 'early': 3, 'late': 5, 'early_rate': 2, 'late_rate': 7, 'query': 100}), [[1015, 1032], 17, False, [-932, -915], False])
check('fixture 5', solve({'anchor': -10, 'elapsed': 0, 'early': 2, 'late': 3, 'early_rate': 0, 'late_rate': 0, 'query': -20}), [[-12, -7], 5, False, [-13, -8], False])
check('fixture 6', solve({'anchor': 0, 'elapsed': 2, 'early': 5, 'late': 0, 'early_rate': 1, 'late_rate': 2000, 'query': 0}), [[-4, 6], 10, True, [-6, 4], False])
check('fixture 7', solve({'anchor': 10, 'elapsed': -1001, 'early': 0, 'late': 1, 'early_rate': 2, 'late_rate': 1, 'query': 8}), [[-994, -988], 6, False, [996, 1002], True])
check('fixture 8', solve({'anchor': 0, 'elapsed': 0, 'early': 0, 'late': 0, 'early_rate': 0, 'late_rate': 0, 'query': 0}), [[0, 0], 0, True, [0, 0], False])
check('fixture 9', solve({'anchor': 2, 'elapsed': -1, 'early': 0, 'late': 0, 'early_rate': 1000, 'late_rate': 1000, 'query': 2}), [[0, 2], 2, True, [0, 2], False])
check('fixture 10', solve({'anchor': 0, 'elapsed': 10, 'early': 1, 'late': 10, 'early_rate': 90, 'late_rate': 150, 'query': 20}), [[8, 22], 14, False, [-2, 12], False])
variant = [({'anchor': 10, 'elapsed': 1, 'early': 2, 'late': 3, 'early_rate': 1, 'late_rate': 500, 'query': 21}, [[8, 15], 7, False, [6, 13], True]), ({'anchor': 10, 'elapsed': 1, 'early': 2, 'late': 3, 'early_rate': 1, 'late_rate': 500, 'query': 22}, [[8, 15], 7, False, [7, 14], True]), ({'anchor': 10, 'elapsed': 1, 'early': 2, 'late': 3, 'early_rate': 1, 'late_rate': 500, 'query': 23}, [[8, 15], 7, False, [8, 15], True]), ({'anchor': 10, 'elapsed': 1, 'early': 2, 'late': 3, 'early_rate': 1, 'late_rate': 500, 'query': 24}, [[8, 15], 7, False, [9, 16], True]), ({'anchor': 10, 'elapsed': 1, 'early': 2, 'late': 3, 'early_rate': 1, 'late_rate': 500, 'query': 25}, [[8, 15], 7, False, [10, 17], True])]
check("variant capture", solve(variant[N-1][0]), variant[N-1][1])
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)

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

Project a center with asymmetric early/late error through signed elapsed ticks. Error growth uses elapsed magnitude and independent parts-per-thousand bounds rounded outward. Return projected [low,high], full width, zero containment, earliest/latest signed query duration and strict certainty of preceding query.

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):
    age = abs(r['elapsed'])
    early_growth = (age * r['early_rate'] + 999) // 1000
    late_growth = (age * r['late_rate'] + 999) // 1000
    center = r['anchor'] + age
    low = center - r['early'] - early_growth
    high = center + r['late'] + late_growth
    width = high - low
    contains_zero = low <= 0 <= high
    earliest = r['query'] - high
    latest = r['query'] - low
    return [[low,high],width,contains_zero,[earliest,latest],high < r['query']]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve({'anchor': 10, 'elapsed': 1, 'early': 2, 'late': 3, 'early_rate': 1, 'late_rate': 500, 'query': 20}), [[8, 15], 7, False, [5, 12], True])
check('fixture 2', solve({'anchor': 0, 'elapsed': -5, 'early': 0, 'late': 1, 'early_rate': 200, 'late_rate': 1, 'query': 0}), [[-6, -3], 3, False, [3, 6], True])
check('fixture 3', solve({'anchor': -1, 'elapsed': 1, 'early': 0, 'late': 0, 'early_rate': 0, 'late_rate': 0, 'query': -3}), [[0, 0], 0, True, [-3, -3], False])
check('fixture 4', solve({'anchor': 20, 'elapsed': 1000, 'early': 3, 'late': 5, 'early_rate': 2, 'late_rate': 7, 'query': 100}), [[1015, 1032], 17, False, [-932, -915], False])
check('fixture 5', solve({'anchor': -10, 'elapsed': 0, 'early': 2, 'late': 3, 'early_rate': 0, 'late_rate': 0, 'query': -20}), [[-12, -7], 5, False, [-13, -8], False])
check('fixture 6', solve({'anchor': 0, 'elapsed': 2, 'early': 5, 'late': 0, 'early_rate': 1, 'late_rate': 2000, 'query': 0}), [[-4, 6], 10, True, [-6, 4], False])
check('fixture 7', solve({'anchor': 10, 'elapsed': -1001, 'early': 0, 'late': 1, 'early_rate': 2, 'late_rate': 1, 'query': 8}), [[-994, -988], 6, False, [996, 1002], True])
check('fixture 8', solve({'anchor': 0, 'elapsed': 0, 'early': 0, 'late': 0, 'early_rate': 0, 'late_rate': 0, 'query': 0}), [[0, 0], 0, True, [0, 0], False])
check('fixture 9', solve({'anchor': 2, 'elapsed': -1, 'early': 0, 'late': 0, 'early_rate': 1000, 'late_rate': 1000, 'query': 2}), [[0, 2], 2, True, [0, 2], False])
check('fixture 10', solve({'anchor': 0, 'elapsed': 10, 'early': 1, 'late': 10, 'early_rate': 90, 'late_rate': 150, 'query': 20}), [[8, 22], 14, False, [-2, 12], False])
variant = [({'anchor': 10, 'elapsed': 1, 'early': 2, 'late': 3, 'early_rate': 1, 'late_rate': 500, 'query': 21}, [[8, 15], 7, False, [6, 13], True]), ({'anchor': 10, 'elapsed': 1, 'early': 2, 'late': 3, 'early_rate': 1, 'late_rate': 500, 'query': 22}, [[8, 15], 7, False, [7, 14], True]), ({'anchor': 10, 'elapsed': 1, 'early': 2, 'late': 3, 'early_rate': 1, 'late_rate': 500, 'query': 23}, [[8, 15], 7, False, [8, 15], True]), ({'anchor': 10, 'elapsed': 1, 'early': 2, 'late': 3, 'early_rate': 1, 'late_rate': 500, 'query': 24}, [[8, 15], 7, False, [9, 16], True]), ({'anchor': 10, 'elapsed': 1, 'early': 2, 'late': 3, 'early_rate': 1, 'late_rate': 500, 'query': 25}, [[8, 15], 7, False, [10, 17], True])]
check("variant capture", solve(variant[N-1][0]), variant[N-1][1])
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)

source:
"""Failure Map reference implementation. Python standard library only."""
import json
from fractions import Fraction
N = 1
observations = []
def solve(r):
    age = abs(r['elapsed'])
    early_growth = (age * r['early_rate'] + 999) // 1000
    late_growth = (age * r['late_rate'] + 999) // 1000
    center = r['anchor'] - r['elapsed']
    low = center - r['early'] - early_growth
    high = center + r['late'] + late_growth
    width = high - low
    contains_zero = low <= 0 <= high
    earliest = r['query'] - high
    latest = r['query'] - low
    return [[low,high],width,contains_zero,[earliest,latest],high < r['query']]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve({'anchor': 10, 'elapsed': 1, 'early': 2, 'late': 3, 'early_rate': 1, 'late_rate': 500, 'query': 20}), [[8, 15], 7, False, [5, 12], True])
check('fixture 2', solve({'anchor': 0, 'elapsed': -5, 'early': 0, 'late': 1, 'early_rate': 200, 'late_rate': 1, 'query': 0}), [[-6, -3], 3, False, [3, 6], True])
check('fixture 3', solve({'anchor': -1, 'elapsed': 1, 'early': 0, 'late': 0, 'early_rate': 0, 'late_rate': 0, 'query': -3}), [[0, 0], 0, True, [-3, -3], False])
check('fixture 4', solve({'anchor': 20, 'elapsed': 1000, 'early': 3, 'late': 5, 'early_rate': 2, 'late_rate': 7, 'query': 100}), [[1015, 1032], 17, False, [-932, -915], False])
check('fixture 5', solve({'anchor': -10, 'elapsed': 0, 'early': 2, 'late': 3, 'early_rate': 0, 'late_rate': 0, 'query': -20}), [[-12, -7], 5, False, [-13, -8], False])
check('fixture 6', solve({'anchor': 0, 'elapsed': 2, 'early': 5, 'late': 0, 'early_rate': 1, 'late_rate': 2000, 'query': 0}), [[-4, 6], 10, True, [-6, 4], False])
check('fixture 7', solve({'anchor': 10, 'elapsed': -1001, 'early': 0, 'late': 1, 'early_rate': 2, 'late_rate': 1, 'query': 8}), [[-994, -988], 6, False, [996, 1002], True])
check('fixture 8', solve({'anchor': 0, 'elapsed': 0, 'early': 0, 'late': 0, 'early_rate': 0, 'late_rate': 0, 'query': 0}), [[0, 0], 0, True, [0, 0], False])
check('fixture 9', solve({'anchor': 2, 'elapsed': -1, 'early': 0, 'late': 0, 'early_rate': 1000, 'late_rate': 1000, 'query': 2}), [[0, 2], 2, True, [0, 2], False])
check('fixture 10', solve({'anchor': 0, 'elapsed': 10, 'early': 1, 'late': 10, 'early_rate': 90, 'late_rate': 150, 'query': 20}), [[8, 22], 14, False, [-2, 12], False])
variant = [({'anchor': 10, 'elapsed': 1, 'early': 2, 'late': 3, 'early_rate': 1, 'late_rate': 500, 'query': 21}, [[8, 15], 7, False, [6, 13], True]), ({'anchor': 10, 'elapsed': 1, 'early': 2, 'late': 3, 'early_rate': 1, 'late_rate': 500, 'query': 22}, [[8, 15], 7, False, [7, 14], True]), ({'anchor': 10, 'elapsed': 1, 'early': 2, 'late': 3, 'early_rate': 1, 'late_rate': 500, 'query': 23}, [[8, 15], 7, False, [8, 15], True]), ({'anchor': 10, 'elapsed': 1, 'early': 2, 'late': 3, 'early_rate': 1, 'late_rate': 500, 'query': 24}, [[8, 15], 7, False, [9, 16], True]), ({'anchor': 10, 'elapsed': 1, 'early': 2, 'late': 3, 'early_rate': 1, 'late_rate': 500, 'query': 25}, [[8, 15], 7, False, [10, 17], True])]
check("variant capture", solve(variant[N-1][0]), variant[N-1][1])
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)

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

Project a center with asymmetric early/late error through signed elapsed ticks. Error growth uses elapsed magnitude and independent parts-per-thousand bounds rounded outward. Return projected [low,high], full width, zero containment, earliest/latest signed query duration and strict certainty of preceding query.

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):
    age = abs(r['elapsed'])
    early_growth = (age * r['early_rate'] + 999) // 1000
    late_growth = (age * r['late_rate'] + 999) // 1000
    center = r['anchor'] + r['elapsed']
    low = center - r['early'] + early_growth
    high = center + r['late'] + late_growth
    width = high - low
    contains_zero = low <= 0 <= high
    earliest = r['query'] - high
    latest = r['query'] - low
    return [[low,high],width,contains_zero,[earliest,latest],high < r['query']]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve({'anchor': 10, 'elapsed': 1, 'early': 2, 'late': 3, 'early_rate': 1, 'late_rate': 500, 'query': 20}), [[8, 15], 7, False, [5, 12], True])
check('fixture 2', solve({'anchor': 0, 'elapsed': -5, 'early': 0, 'late': 1, 'early_rate': 200, 'late_rate': 1, 'query': 0}), [[-6, -3], 3, False, [3, 6], True])
check('fixture 3', solve({'anchor': -1, 'elapsed': 1, 'early': 0, 'late': 0, 'early_rate': 0, 'late_rate': 0, 'query': -3}), [[0, 0], 0, True, [-3, -3], False])
check('fixture 4', solve({'anchor': 20, 'elapsed': 1000, 'early': 3, 'late': 5, 'early_rate': 2, 'late_rate': 7, 'query': 100}), [[1015, 1032], 17, False, [-932, -915], False])
check('fixture 5', solve({'anchor': -10, 'elapsed': 0, 'early': 2, 'late': 3, 'early_rate': 0, 'late_rate': 0, 'query': -20}), [[-12, -7], 5, False, [-13, -8], False])
check('fixture 6', solve({'anchor': 0, 'elapsed': 2, 'early': 5, 'late': 0, 'early_rate': 1, 'late_rate': 2000, 'query': 0}), [[-4, 6], 10, True, [-6, 4], False])
check('fixture 7', solve({'anchor': 10, 'elapsed': -1001, 'early': 0, 'late': 1, 'early_rate': 2, 'late_rate': 1, 'query': 8}), [[-994, -988], 6, False, [996, 1002], True])
check('fixture 8', solve({'anchor': 0, 'elapsed': 0, 'early': 0, 'late': 0, 'early_rate': 0, 'late_rate': 0, 'query': 0}), [[0, 0], 0, True, [0, 0], False])
check('fixture 9', solve({'anchor': 2, 'elapsed': -1, 'early': 0, 'late': 0, 'early_rate': 1000, 'late_rate': 1000, 'query': 2}), [[0, 2], 2, True, [0, 2], False])
check('fixture 10', solve({'anchor': 0, 'elapsed': 10, 'early': 1, 'late': 10, 'early_rate': 90, 'late_rate': 150, 'query': 20}), [[8, 22], 14, False, [-2, 12], False])
variant = [({'anchor': 10, 'elapsed': 1, 'early': 2, 'late': 3, 'early_rate': 1, 'late_rate': 500, 'query': 21}, [[8, 15], 7, False, [6, 13], True]), ({'anchor': 10, 'elapsed': 1, 'early': 2, 'late': 3, 'early_rate': 1, 'late_rate': 500, 'query': 22}, [[8, 15], 7, False, [7, 14], True]), ({'anchor': 10, 'elapsed': 1, 'early': 2, 'late': 3, 'early_rate': 1, 'late_rate': 500, 'query': 23}, [[8, 15], 7, False, [8, 15], True]), ({'anchor': 10, 'elapsed': 1, 'early': 2, 'late': 3, 'early_rate': 1, 'late_rate': 500, 'query': 24}, [[8, 15], 7, False, [9, 16], True]), ({'anchor': 10, 'elapsed': 1, 'early': 2, 'late': 3, 'early_rate': 1, 'late_rate': 500, 'query': 25}, [[8, 15], 7, False, [10, 17], True])]
check("variant capture", solve(variant[N-1][0]), variant[N-1][1])
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)

source:
"""Failure Map reference implementation. Python standard library only."""
import json
from fractions import Fraction
N = 1
observations = []
def solve(r):
    age = abs(r['elapsed'])
    early_growth = (age * r['early_rate'] + 999) // 1000
    late_growth = (age * r['late_rate'] + 999) // 1000
    center = r['anchor'] + r['elapsed']
    low = center - max(r['early'],early_growth)
    high = center + r['late'] + late_growth
    width = high - low
    contains_zero = low <= 0 <= high
    earliest = r['query'] - high
    latest = r['query'] - low
    return [[low,high],width,contains_zero,[earliest,latest],high < r['query']]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve({'anchor': 10, 'elapsed': 1, 'early': 2, 'late': 3, 'early_rate': 1, 'late_rate': 500, 'query': 20}), [[8, 15], 7, False, [5, 12], True])
check('fixture 2', solve({'anchor': 0, 'elapsed': -5, 'early': 0, 'late': 1, 'early_rate': 200, 'late_rate': 1, 'query': 0}), [[-6, -3], 3, False, [3, 6], True])
check('fixture 3', solve({'anchor': -1, 'elapsed': 1, 'early': 0, 'late': 0, 'early_rate': 0, 'late_rate': 0, 'query': -3}), [[0, 0], 0, True, [-3, -3], False])
check('fixture 4', solve({'anchor': 20, 'elapsed': 1000, 'early': 3, 'late': 5, 'early_rate': 2, 'late_rate': 7, 'query': 100}), [[1015, 1032], 17, False, [-932, -915], False])
check('fixture 5', solve({'anchor': -10, 'elapsed': 0, 'early': 2, 'late': 3, 'early_rate': 0, 'late_rate': 0, 'query': -20}), [[-12, -7], 5, False, [-13, -8], False])
check('fixture 6', solve({'anchor': 0, 'elapsed': 2, 'early': 5, 'late': 0, 'early_rate': 1, 'late_rate': 2000, 'query': 0}), [[-4, 6], 10, True, [-6, 4], False])
check('fixture 7', solve({'anchor': 10, 'elapsed': -1001, 'early': 0, 'late': 1, 'early_rate': 2, 'late_rate': 1, 'query': 8}), [[-994, -988], 6, False, [996, 1002], True])
check('fixture 8', solve({'anchor': 0, 'elapsed': 0, 'early': 0, 'late': 0, 'early_rate': 0, 'late_rate': 0, 'query': 0}), [[0, 0], 0, True, [0, 0], False])
check('fixture 9', solve({'anchor': 2, 'elapsed': -1, 'early': 0, 'late': 0, 'early_rate': 1000, 'late_rate': 1000, 'query': 2}), [[0, 2], 2, True, [0, 2], False])
check('fixture 10', solve({'anchor': 0, 'elapsed': 10, 'early': 1, 'late': 10, 'early_rate': 90, 'late_rate': 150, 'query': 20}), [[8, 22], 14, False, [-2, 12], False])
variant = [({'anchor': 10, 'elapsed': 1, 'early': 2, 'late': 3, 'early_rate': 1, 'late_rate': 500, 'query': 21}, [[8, 15], 7, False, [6, 13], True]), ({'anchor': 10, 'elapsed': 1, 'early': 2, 'late': 3, 'early_rate': 1, 'late_rate': 500, 'query': 22}, [[8, 15], 7, False, [7, 14], True]), ({'anchor': 10, 'elapsed': 1, 'early': 2, 'late': 3, 'early_rate': 1, 'late_rate': 500, 'query': 23}, [[8, 15], 7, False, [8, 15], True]), ({'anchor': 10, 'elapsed': 1, 'early': 2, 'late': 3, 'early_rate': 1, 'late_rate': 500, 'query': 24}, [[8, 15], 7, False, [9, 16], True]), ({'anchor': 10, 'elapsed': 1, 'early': 2, 'late': 3, 'early_rate': 1, 'late_rate': 500, 'query': 25}, [[8, 15], 7, False, [10, 17], True])]
check("variant capture", solve(variant[N-1][0]), variant[N-1][1])
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)

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

Project a center with asymmetric early/late error through signed elapsed ticks. Error growth uses elapsed magnitude and independent parts-per-thousand bounds rounded outward. Return projected [low,high], full width, zero containment, earliest/latest signed query duration and strict certainty of preceding query.

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):
    age = abs(r['elapsed'])
    early_growth = (age * r['early_rate'] + 999) // 1000
    late_growth = (age * r['late_rate'] + 999) // 1000
    center = r['anchor'] + r['elapsed']
    low = center - r['early'] - early_growth
    high = center + r['late'] - late_growth
    width = high - low
    contains_zero = low <= 0 <= high
    earliest = r['query'] - high
    latest = r['query'] - low
    return [[low,high],width,contains_zero,[earliest,latest],high < r['query']]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve({'anchor': 10, 'elapsed': 1, 'early': 2, 'late': 3, 'early_rate': 1, 'late_rate': 500, 'query': 20}), [[8, 15], 7, False, [5, 12], True])
check('fixture 2', solve({'anchor': 0, 'elapsed': -5, 'early': 0, 'late': 1, 'early_rate': 200, 'late_rate': 1, 'query': 0}), [[-6, -3], 3, False, [3, 6], True])
check('fixture 3', solve({'anchor': -1, 'elapsed': 1, 'early': 0, 'late': 0, 'early_rate': 0, 'late_rate': 0, 'query': -3}), [[0, 0], 0, True, [-3, -3], False])
check('fixture 4', solve({'anchor': 20, 'elapsed': 1000, 'early': 3, 'late': 5, 'early_rate': 2, 'late_rate': 7, 'query': 100}), [[1015, 1032], 17, False, [-932, -915], False])
check('fixture 5', solve({'anchor': -10, 'elapsed': 0, 'early': 2, 'late': 3, 'early_rate': 0, 'late_rate': 0, 'query': -20}), [[-12, -7], 5, False, [-13, -8], False])
check('fixture 6', solve({'anchor': 0, 'elapsed': 2, 'early': 5, 'late': 0, 'early_rate': 1, 'late_rate': 2000, 'query': 0}), [[-4, 6], 10, True, [-6, 4], False])
check('fixture 7', solve({'anchor': 10, 'elapsed': -1001, 'early': 0, 'late': 1, 'early_rate': 2, 'late_rate': 1, 'query': 8}), [[-994, -988], 6, False, [996, 1002], True])
check('fixture 8', solve({'anchor': 0, 'elapsed': 0, 'early': 0, 'late': 0, 'early_rate': 0, 'late_rate': 0, 'query': 0}), [[0, 0], 0, True, [0, 0], False])
check('fixture 9', solve({'anchor': 2, 'elapsed': -1, 'early': 0, 'late': 0, 'early_rate': 1000, 'late_rate': 1000, 'query': 2}), [[0, 2], 2, True, [0, 2], False])
check('fixture 10', solve({'anchor': 0, 'elapsed': 10, 'early': 1, 'late': 10, 'early_rate': 90, 'late_rate': 150, 'query': 20}), [[8, 22], 14, False, [-2, 12], False])
variant = [({'anchor': 10, 'elapsed': 1, 'early': 2, 'late': 3, 'early_rate': 1, 'late_rate': 500, 'query': 21}, [[8, 15], 7, False, [6, 13], True]), ({'anchor': 10, 'elapsed': 1, 'early': 2, 'late': 3, 'early_rate': 1, 'late_rate': 500, 'query': 22}, [[8, 15], 7, False, [7, 14], True]), ({'anchor': 10, 'elapsed': 1, 'early': 2, 'late': 3, 'early_rate': 1, 'late_rate': 500, 'query': 23}, [[8, 15], 7, False, [8, 15], True]), ({'anchor': 10, 'elapsed': 1, 'early': 2, 'late': 3, 'early_rate': 1, 'late_rate': 500, 'query': 24}, [[8, 15], 7, False, [9, 16], True]), ({'anchor': 10, 'elapsed': 1, 'early': 2, 'late': 3, 'early_rate': 1, 'late_rate': 500, 'query': 25}, [[8, 15], 7, False, [10, 17], True])]
check("variant capture", solve(variant[N-1][0]), variant[N-1][1])
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)

source:
"""Failure Map reference implementation. Python standard library only."""
import json
from fractions import Fraction
N = 1
observations = []
def solve(r):
    age = abs(r['elapsed'])
    early_growth = (age * r['early_rate'] + 999) // 1000
    late_growth = (age * r['late_rate'] + 999) // 1000
    center = r['anchor'] + r['elapsed']
    low = center - r['early'] - early_growth
    high = center + max(r['late'],late_growth)
    width = high - low
    contains_zero = low <= 0 <= high
    earliest = r['query'] - high
    latest = r['query'] - low
    return [[low,high],width,contains_zero,[earliest,latest],high < r['query']]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve({'anchor': 10, 'elapsed': 1, 'early': 2, 'late': 3, 'early_rate': 1, 'late_rate': 500, 'query': 20}), [[8, 15], 7, False, [5, 12], True])
check('fixture 2', solve({'anchor': 0, 'elapsed': -5, 'early': 0, 'late': 1, 'early_rate': 200, 'late_rate': 1, 'query': 0}), [[-6, -3], 3, False, [3, 6], True])
check('fixture 3', solve({'anchor': -1, 'elapsed': 1, 'early': 0, 'late': 0, 'early_rate': 0, 'late_rate': 0, 'query': -3}), [[0, 0], 0, True, [-3, -3], False])
check('fixture 4', solve({'anchor': 20, 'elapsed': 1000, 'early': 3, 'late': 5, 'early_rate': 2, 'late_rate': 7, 'query': 100}), [[1015, 1032], 17, False, [-932, -915], False])
check('fixture 5', solve({'anchor': -10, 'elapsed': 0, 'early': 2, 'late': 3, 'early_rate': 0, 'late_rate': 0, 'query': -20}), [[-12, -7], 5, False, [-13, -8], False])
check('fixture 6', solve({'anchor': 0, 'elapsed': 2, 'early': 5, 'late': 0, 'early_rate': 1, 'late_rate': 2000, 'query': 0}), [[-4, 6], 10, True, [-6, 4], False])
check('fixture 7', solve({'anchor': 10, 'elapsed': -1001, 'early': 0, 'late': 1, 'early_rate': 2, 'late_rate': 1, 'query': 8}), [[-994, -988], 6, False, [996, 1002], True])
check('fixture 8', solve({'anchor': 0, 'elapsed': 0, 'early': 0, 'late': 0, 'early_rate': 0, 'late_rate': 0, 'query': 0}), [[0, 0], 0, True, [0, 0], False])
check('fixture 9', solve({'anchor': 2, 'elapsed': -1, 'early': 0, 'late': 0, 'early_rate': 1000, 'late_rate': 1000, 'query': 2}), [[0, 2], 2, True, [0, 2], False])
check('fixture 10', solve({'anchor': 0, 'elapsed': 10, 'early': 1, 'late': 10, 'early_rate': 90, 'late_rate': 150, 'query': 20}), [[8, 22], 14, False, [-2, 12], False])
variant = [({'anchor': 10, 'elapsed': 1, 'early': 2, 'late': 3, 'early_rate': 1, 'late_rate': 500, 'query': 21}, [[8, 15], 7, False, [6, 13], True]), ({'anchor': 10, 'elapsed': 1, 'early': 2, 'late': 3, 'early_rate': 1, 'late_rate': 500, 'query': 22}, [[8, 15], 7, False, [7, 14], True]), ({'anchor': 10, 'elapsed': 1, 'early': 2, 'late': 3, 'early_rate': 1, 'late_rate': 500, 'query': 23}, [[8, 15], 7, False, [8, 15], True]), ({'anchor': 10, 'elapsed': 1, 'early': 2, 'late': 3, 'early_rate': 1, 'late_rate': 500, 'query': 24}, [[8, 15], 7, False, [9, 16], True]), ({'anchor': 10, 'elapsed': 1, 'early': 2, 'late': 3, 'early_rate': 1, 'late_rate': 500, 'query': 25}, [[8, 15], 7, False, [10, 17], True])]
check("variant capture", solve(variant[N-1][0]), variant[N-1][1])
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)

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

Project a center with asymmetric early/late error through signed elapsed ticks. Error growth uses elapsed magnitude and independent parts-per-thousand bounds rounded outward. Return projected [low,high], full width, zero containment, earliest/latest signed query duration and strict certainty of preceding query.

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):
    age = abs(r['elapsed'])
    early_growth = (age * r['early_rate'] + 999) // 1000
    late_growth = (age * r['late_rate'] + 999) // 1000
    center = r['anchor'] + r['elapsed']
    low = center - r['early'] - early_growth
    high = center + r['late'] + late_growth
    width = high + low
    contains_zero = low <= 0 <= high
    earliest = r['query'] - high
    latest = r['query'] - low
    return [[low,high],width,contains_zero,[earliest,latest],high < r['query']]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve({'anchor': 10, 'elapsed': 1, 'early': 2, 'late': 3, 'early_rate': 1, 'late_rate': 500, 'query': 20}), [[8, 15], 7, False, [5, 12], True])
check('fixture 2', solve({'anchor': 0, 'elapsed': -5, 'early': 0, 'late': 1, 'early_rate': 200, 'late_rate': 1, 'query': 0}), [[-6, -3], 3, False, [3, 6], True])
check('fixture 3', solve({'anchor': -1, 'elapsed': 1, 'early': 0, 'late': 0, 'early_rate': 0, 'late_rate': 0, 'query': -3}), [[0, 0], 0, True, [-3, -3], False])
check('fixture 4', solve({'anchor': 20, 'elapsed': 1000, 'early': 3, 'late': 5, 'early_rate': 2, 'late_rate': 7, 'query': 100}), [[1015, 1032], 17, False, [-932, -915], False])
check('fixture 5', solve({'anchor': -10, 'elapsed': 0, 'early': 2, 'late': 3, 'early_rate': 0, 'late_rate': 0, 'query': -20}), [[-12, -7], 5, False, [-13, -8], False])
check('fixture 6', solve({'anchor': 0, 'elapsed': 2, 'early': 5, 'late': 0, 'early_rate': 1, 'late_rate': 2000, 'query': 0}), [[-4, 6], 10, True, [-6, 4], False])
check('fixture 7', solve({'anchor': 10, 'elapsed': -1001, 'early': 0, 'late': 1, 'early_rate': 2, 'late_rate': 1, 'query': 8}), [[-994, -988], 6, False, [996, 1002], True])
check('fixture 8', solve({'anchor': 0, 'elapsed': 0, 'early': 0, 'late': 0, 'early_rate': 0, 'late_rate': 0, 'query': 0}), [[0, 0], 0, True, [0, 0], False])
check('fixture 9', solve({'anchor': 2, 'elapsed': -1, 'early': 0, 'late': 0, 'early_rate': 1000, 'late_rate': 1000, 'query': 2}), [[0, 2], 2, True, [0, 2], False])
check('fixture 10', solve({'anchor': 0, 'elapsed': 10, 'early': 1, 'late': 10, 'early_rate': 90, 'late_rate': 150, 'query': 20}), [[8, 22], 14, False, [-2, 12], False])
variant = [({'anchor': 10, 'elapsed': 1, 'early': 2, 'late': 3, 'early_rate': 1, 'late_rate': 500, 'query': 21}, [[8, 15], 7, False, [6, 13], True]), ({'anchor': 10, 'elapsed': 1, 'early': 2, 'late': 3, 'early_rate': 1, 'late_rate': 500, 'query': 22}, [[8, 15], 7, False, [7, 14], True]), ({'anchor': 10, 'elapsed': 1, 'early': 2, 'late': 3, 'early_rate': 1, 'late_rate': 500, 'query': 23}, [[8, 15], 7, False, [8, 15], True]), ({'anchor': 10, 'elapsed': 1, 'early': 2, 'late': 3, 'early_rate': 1, 'late_rate': 500, 'query': 24}, [[8, 15], 7, False, [9, 16], True]), ({'anchor': 10, 'elapsed': 1, 'early': 2, 'late': 3, 'early_rate': 1, 'late_rate': 500, 'query': 25}, [[8, 15], 7, False, [10, 17], True])]
check("variant capture", solve(variant[N-1][0]), variant[N-1][1])
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)

source:
"""Failure Map reference implementation. Python standard library only."""
import json
from fractions import Fraction
N = 1
observations = []
def solve(r):
    age = abs(r['elapsed'])
    early_growth = (age * r['early_rate'] + 999) // 1000
    late_growth = (age * r['late_rate'] + 999) // 1000
    center = r['anchor'] + r['elapsed']
    low = center - r['early'] - early_growth
    high = center + r['late'] + late_growth
    width = (high-low)//2
    contains_zero = low <= 0 <= high
    earliest = r['query'] - high
    latest = r['query'] - low
    return [[low,high],width,contains_zero,[earliest,latest],high < r['query']]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve({'anchor': 10, 'elapsed': 1, 'early': 2, 'late': 3, 'early_rate': 1, 'late_rate': 500, 'query': 20}), [[8, 15], 7, False, [5, 12], True])
check('fixture 2', solve({'anchor': 0, 'elapsed': -5, 'early': 0, 'late': 1, 'early_rate': 200, 'late_rate': 1, 'query': 0}), [[-6, -3], 3, False, [3, 6], True])
check('fixture 3', solve({'anchor': -1, 'elapsed': 1, 'early': 0, 'late': 0, 'early_rate': 0, 'late_rate': 0, 'query': -3}), [[0, 0], 0, True, [-3, -3], False])
check('fixture 4', solve({'anchor': 20, 'elapsed': 1000, 'early': 3, 'late': 5, 'early_rate': 2, 'late_rate': 7, 'query': 100}), [[1015, 1032], 17, False, [-932, -915], False])
check('fixture 5', solve({'anchor': -10, 'elapsed': 0, 'early': 2, 'late': 3, 'early_rate': 0, 'late_rate': 0, 'query': -20}), [[-12, -7], 5, False, [-13, -8], False])
check('fixture 6', solve({'anchor': 0, 'elapsed': 2, 'early': 5, 'late': 0, 'early_rate': 1, 'late_rate': 2000, 'query': 0}), [[-4, 6], 10, True, [-6, 4], False])
check('fixture 7', solve({'anchor': 10, 'elapsed': -1001, 'early': 0, 'late': 1, 'early_rate': 2, 'late_rate': 1, 'query': 8}), [[-994, -988], 6, False, [996, 1002], True])
check('fixture 8', solve({'anchor': 0, 'elapsed': 0, 'early': 0, 'late': 0, 'early_rate': 0, 'late_rate': 0, 'query': 0}), [[0, 0], 0, True, [0, 0], False])
check('fixture 9', solve({'anchor': 2, 'elapsed': -1, 'early': 0, 'late': 0, 'early_rate': 1000, 'late_rate': 1000, 'query': 2}), [[0, 2], 2, True, [0, 2], False])
check('fixture 10', solve({'anchor': 0, 'elapsed': 10, 'early': 1, 'late': 10, 'early_rate': 90, 'late_rate': 150, 'query': 20}), [[8, 22], 14, False, [-2, 12], False])
variant = [({'anchor': 10, 'elapsed': 1, 'early': 2, 'late': 3, 'early_rate': 1, 'late_rate': 500, 'query': 21}, [[8, 15], 7, False, [6, 13], True]), ({'anchor': 10, 'elapsed': 1, 'early': 2, 'late': 3, 'early_rate': 1, 'late_rate': 500, 'query': 22}, [[8, 15], 7, False, [7, 14], True]), ({'anchor': 10, 'elapsed': 1, 'early': 2, 'late': 3, 'early_rate': 1, 'late_rate': 500, 'query': 23}, [[8, 15], 7, False, [8, 15], True]), ({'anchor': 10, 'elapsed': 1, 'early': 2, 'late': 3, 'early_rate': 1, 'late_rate': 500, 'query': 24}, [[8, 15], 7, False, [9, 16], True]), ({'anchor': 10, 'elapsed': 1, 'early': 2, 'late': 3, 'early_rate': 1, 'late_rate': 500, 'query': 25}, [[8, 15], 7, False, [10, 17], True])]
check("variant capture", solve(variant[N-1][0]), variant[N-1][1])
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)

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

Project a center with asymmetric early/late error through signed elapsed ticks. Error growth uses elapsed magnitude and independent parts-per-thousand bounds rounded outward. Return projected [low,high], full width, zero containment, earliest/latest signed query duration and strict certainty of preceding query.

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):
    age = abs(r['elapsed'])
    early_growth = (age * r['early_rate'] + 999) // 1000
    late_growth = (age * r['late_rate'] + 999) // 1000
    center = r['anchor'] + r['elapsed']
    low = center - r['early'] - early_growth
    high = center + r['late'] + late_growth
    width = high - low
    contains_zero = low < 0 < high
    earliest = r['query'] - high
    latest = r['query'] - low
    return [[low,high],width,contains_zero,[earliest,latest],high < r['query']]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve({'anchor': 10, 'elapsed': 1, 'early': 2, 'late': 3, 'early_rate': 1, 'late_rate': 500, 'query': 20}), [[8, 15], 7, False, [5, 12], True])
check('fixture 2', solve({'anchor': 0, 'elapsed': -5, 'early': 0, 'late': 1, 'early_rate': 200, 'late_rate': 1, 'query': 0}), [[-6, -3], 3, False, [3, 6], True])
check('fixture 3', solve({'anchor': -1, 'elapsed': 1, 'early': 0, 'late': 0, 'early_rate': 0, 'late_rate': 0, 'query': -3}), [[0, 0], 0, True, [-3, -3], False])
check('fixture 4', solve({'anchor': 20, 'elapsed': 1000, 'early': 3, 'late': 5, 'early_rate': 2, 'late_rate': 7, 'query': 100}), [[1015, 1032], 17, False, [-932, -915], False])
check('fixture 5', solve({'anchor': -10, 'elapsed': 0, 'early': 2, 'late': 3, 'early_rate': 0, 'late_rate': 0, 'query': -20}), [[-12, -7], 5, False, [-13, -8], False])
check('fixture 6', solve({'anchor': 0, 'elapsed': 2, 'early': 5, 'late': 0, 'early_rate': 1, 'late_rate': 2000, 'query': 0}), [[-4, 6], 10, True, [-6, 4], False])
check('fixture 7', solve({'anchor': 10, 'elapsed': -1001, 'early': 0, 'late': 1, 'early_rate': 2, 'late_rate': 1, 'query': 8}), [[-994, -988], 6, False, [996, 1002], True])
check('fixture 8', solve({'anchor': 0, 'elapsed': 0, 'early': 0, 'late': 0, 'early_rate': 0, 'late_rate': 0, 'query': 0}), [[0, 0], 0, True, [0, 0], False])
check('fixture 9', solve({'anchor': 2, 'elapsed': -1, 'early': 0, 'late': 0, 'early_rate': 1000, 'late_rate': 1000, 'query': 2}), [[0, 2], 2, True, [0, 2], False])
check('fixture 10', solve({'anchor': 0, 'elapsed': 10, 'early': 1, 'late': 10, 'early_rate': 90, 'late_rate': 150, 'query': 20}), [[8, 22], 14, False, [-2, 12], False])
variant = [({'anchor': 10, 'elapsed': 1, 'early': 2, 'late': 3, 'early_rate': 1, 'late_rate': 500, 'query': 21}, [[8, 15], 7, False, [6, 13], True]), ({'anchor': 10, 'elapsed': 1, 'early': 2, 'late': 3, 'early_rate': 1, 'late_rate': 500, 'query': 22}, [[8, 15], 7, False, [7, 14], True]), ({'anchor': 10, 'elapsed': 1, 'early': 2, 'late': 3, 'early_rate': 1, 'late_rate': 500, 'query': 23}, [[8, 15], 7, False, [8, 15], True]), ({'anchor': 10, 'elapsed': 1, 'early': 2, 'late': 3, 'early_rate': 1, 'late_rate': 500, 'query': 24}, [[8, 15], 7, False, [9, 16], True]), ({'anchor': 10, 'elapsed': 1, 'early': 2, 'late': 3, 'early_rate': 1, 'late_rate': 500, 'query': 25}, [[8, 15], 7, False, [10, 17], True])]
check("variant capture", solve(variant[N-1][0]), variant[N-1][1])
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)

source:
"""Failure Map reference implementation. Python standard library only."""
import json
from fractions import Fraction
N = 1
observations = []
def solve(r):
    age = abs(r['elapsed'])
    early_growth = (age * r['early_rate'] + 999) // 1000
    late_growth = (age * r['late_rate'] + 999) // 1000
    center = r['anchor'] + r['elapsed']
    low = center - r['early'] - early_growth
    high = center + r['late'] + late_growth
    width = high - low
    contains_zero = low <= 0 or high >= 0
    earliest = r['query'] - high
    latest = r['query'] - low
    return [[low,high],width,contains_zero,[earliest,latest],high < r['query']]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve({'anchor': 10, 'elapsed': 1, 'early': 2, 'late': 3, 'early_rate': 1, 'late_rate': 500, 'query': 20}), [[8, 15], 7, False, [5, 12], True])
check('fixture 2', solve({'anchor': 0, 'elapsed': -5, 'early': 0, 'late': 1, 'early_rate': 200, 'late_rate': 1, 'query': 0}), [[-6, -3], 3, False, [3, 6], True])
check('fixture 3', solve({'anchor': -1, 'elapsed': 1, 'early': 0, 'late': 0, 'early_rate': 0, 'late_rate': 0, 'query': -3}), [[0, 0], 0, True, [-3, -3], False])
check('fixture 4', solve({'anchor': 20, 'elapsed': 1000, 'early': 3, 'late': 5, 'early_rate': 2, 'late_rate': 7, 'query': 100}), [[1015, 1032], 17, False, [-932, -915], False])
check('fixture 5', solve({'anchor': -10, 'elapsed': 0, 'early': 2, 'late': 3, 'early_rate': 0, 'late_rate': 0, 'query': -20}), [[-12, -7], 5, False, [-13, -8], False])
check('fixture 6', solve({'anchor': 0, 'elapsed': 2, 'early': 5, 'late': 0, 'early_rate': 1, 'late_rate': 2000, 'query': 0}), [[-4, 6], 10, True, [-6, 4], False])
check('fixture 7', solve({'anchor': 10, 'elapsed': -1001, 'early': 0, 'late': 1, 'early_rate': 2, 'late_rate': 1, 'query': 8}), [[-994, -988], 6, False, [996, 1002], True])
check('fixture 8', solve({'anchor': 0, 'elapsed': 0, 'early': 0, 'late': 0, 'early_rate': 0, 'late_rate': 0, 'query': 0}), [[0, 0], 0, True, [0, 0], False])
check('fixture 9', solve({'anchor': 2, 'elapsed': -1, 'early': 0, 'late': 0, 'early_rate': 1000, 'late_rate': 1000, 'query': 2}), [[0, 2], 2, True, [0, 2], False])
check('fixture 10', solve({'anchor': 0, 'elapsed': 10, 'early': 1, 'late': 10, 'early_rate': 90, 'late_rate': 150, 'query': 20}), [[8, 22], 14, False, [-2, 12], False])
variant = [({'anchor': 10, 'elapsed': 1, 'early': 2, 'late': 3, 'early_rate': 1, 'late_rate': 500, 'query': 21}, [[8, 15], 7, False, [6, 13], True]), ({'anchor': 10, 'elapsed': 1, 'early': 2, 'late': 3, 'early_rate': 1, 'late_rate': 500, 'query': 22}, [[8, 15], 7, False, [7, 14], True]), ({'anchor': 10, 'elapsed': 1, 'early': 2, 'late': 3, 'early_rate': 1, 'late_rate': 500, 'query': 23}, [[8, 15], 7, False, [8, 15], True]), ({'anchor': 10, 'elapsed': 1, 'early': 2, 'late': 3, 'early_rate': 1, 'late_rate': 500, 'query': 24}, [[8, 15], 7, False, [9, 16], True]), ({'anchor': 10, 'elapsed': 1, 'early': 2, 'late': 3, 'early_rate': 1, 'late_rate': 500, 'query': 25}, [[8, 15], 7, False, [10, 17], True])]
check("variant capture", solve(variant[N-1][0]), variant[N-1][1])
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)

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

Project a center with asymmetric early/late error through signed elapsed ticks. Error growth uses elapsed magnitude and independent parts-per-thousand bounds rounded outward. Return projected [low,high], full width, zero containment, earliest/latest signed query duration and strict certainty of preceding query.

split: open-access