broken_source:
"""Failure Map reference implementation. Python standard library only."""
import json
import math
import struct
def render(x):
    if math.isnan(x): return 'nan'
    if math.isinf(x): return '-infinity' if x<0 else '+infinity'
    return format(x,'.11g')

N = 1
observations = []
def solve(x,y):
    try:
        if y==0: return 'domain'
        ay=abs(y)
        r=math.fmod(x,ay)
        a=abs(r)
        other=ay-a
        odd=math.fmod(abs(x),2*ay)>=ay
        if a>=other:
            r-=math.copysign(ay,x)
        if r==0: r=math.copysign(0.0,x)
        return render(r)
    except (ValueError, OverflowError, ZeroDivisionError, TypeError):
        return "arithmetic-error"
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('even tie', solve(2.0*N*4+2,4.0), "2")
check('odd tie', solve((2.0*N+1)*4+2,4.0), "-2")
check('negative even tie', solve(-2.0*N*4-2,4.0), "-2")
check('negative odd tie', solve(-(2.0*N+1)*4-2,4.0), "2")
check('above half', solve(4.0*N+3,4.0), "-1")
check('below half', solve(4.0*N+1,4.0), "1")
check('negative divisor below half', solve(4.0*N+1,-4.0), "1")
check('negative divisor', solve(4.0*N+3,-4.0), "-1")
check('negative exact', solve(-4.0*N,4.0), "-0")
check('positive exact', solve(4.0*N,4.0), "0")
check('zero divisor', solve(float(N),0.0), "domain")
check('huge finite', solve(1.5e308,1e308), render(math.remainder(1.5e308,1e308)))
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
import math
import struct
def render(x):
    if math.isnan(x): return 'nan'
    if math.isinf(x): return '-infinity' if x<0 else '+infinity'
    return format(x,'.11g')

N = 1
observations = []
def solve(x,y):
    try:
        if y==0: return 'domain'
        ay=abs(y)
        r=math.fmod(x,ay)
        a=abs(r)
        other=ay-a
        odd=math.fmod(abs(x),2*ay)>=ay
        if a>other:
            r-=math.copysign(ay,x)
        if r==0: r=math.copysign(0.0,x)
        return render(r)
    except (ValueError, OverflowError, ZeroDivisionError, TypeError):
        return "arithmetic-error"
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('even tie', solve(2.0*N*4+2,4.0), "2")
check('odd tie', solve((2.0*N+1)*4+2,4.0), "-2")
check('negative even tie', solve(-2.0*N*4-2,4.0), "-2")
check('negative odd tie', solve(-(2.0*N+1)*4-2,4.0), "2")
check('above half', solve(4.0*N+3,4.0), "-1")
check('below half', solve(4.0*N+1,4.0), "1")
check('negative divisor below half', solve(4.0*N+1,-4.0), "1")
check('negative divisor', solve(4.0*N+3,-4.0), "-1")
check('negative exact', solve(-4.0*N,4.0), "-0")
check('positive exact', solve(4.0*N,4.0), "0")
check('zero divisor', solve(float(N),0.0), "domain")
check('huge finite', solve(1.5e308,1e308), render(math.remainder(1.5e308,1e308)))
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:
Nearest floating remainder rounds every quotient tie away from zero.

For finite x and finite nonzero y, return the remainder x-n*y with n the nearest integer quotient, ties to even. The output has magnitude at most abs(y)/2; exact zero has the sign of x. Finite results are rendered to eleven significant decimal digits; modeled domain violations and arithmetic errors are explicit strings.

split: open-access


broken_source:
"""Failure Map reference implementation. Python standard library only."""
import json
import math
import struct
def render(x):
    if math.isnan(x): return 'nan'
    if math.isinf(x): return '-infinity' if x<0 else '+infinity'
    return format(x,'.11g')

N = 1
observations = []
def solve(x,y):
    try:
        if y==0: return 'domain'
        ay=abs(y)
        r=math.fmod(x,ay)
        a=abs(r)
        other=ay-a
        odd=bool(int(abs(r))%2)
        if a>other or (a==other and odd):
            r-=math.copysign(ay,x)
        if r==0: r=math.copysign(0.0,x)
        return render(r)
    except (ValueError, OverflowError, ZeroDivisionError, TypeError):
        return "arithmetic-error"
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('even tie', solve(2.0*N*4+2,4.0), "2")
check('odd tie', solve((2.0*N+1)*4+2,4.0), "-2")
check('negative even tie', solve(-2.0*N*4-2,4.0), "-2")
check('negative odd tie', solve(-(2.0*N+1)*4-2,4.0), "2")
check('above half', solve(4.0*N+3,4.0), "-1")
check('below half', solve(4.0*N+1,4.0), "1")
check('negative divisor below half', solve(4.0*N+1,-4.0), "1")
check('negative divisor', solve(4.0*N+3,-4.0), "-1")
check('negative exact', solve(-4.0*N,4.0), "-0")
check('positive exact', solve(4.0*N,4.0), "0")
check('zero divisor', solve(float(N),0.0), "domain")
check('huge finite', solve(1.5e308,1e308), render(math.remainder(1.5e308,1e308)))
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
import math
import struct
def render(x):
    if math.isnan(x): return 'nan'
    if math.isinf(x): return '-infinity' if x<0 else '+infinity'
    return format(x,'.11g')

N = 1
observations = []
def solve(x,y):
    try:
        if y==0: return 'domain'
        ay=abs(y)
        r=math.fmod(x,ay)
        a=abs(r)
        other=ay-a
        odd=math.fmod(abs(x),2*ay)<ay
        if a>other or (a==other and odd):
            r-=math.copysign(ay,x)
        if r==0: r=math.copysign(0.0,x)
        return render(r)
    except (ValueError, OverflowError, ZeroDivisionError, TypeError):
        return "arithmetic-error"
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('even tie', solve(2.0*N*4+2,4.0), "2")
check('odd tie', solve((2.0*N+1)*4+2,4.0), "-2")
check('negative even tie', solve(-2.0*N*4-2,4.0), "-2")
check('negative odd tie', solve(-(2.0*N+1)*4-2,4.0), "2")
check('above half', solve(4.0*N+3,4.0), "-1")
check('below half', solve(4.0*N+1,4.0), "1")
check('negative divisor below half', solve(4.0*N+1,-4.0), "1")
check('negative divisor', solve(4.0*N+3,-4.0), "-1")
check('negative exact', solve(-4.0*N,4.0), "-0")
check('positive exact', solve(4.0*N,4.0), "0")
check('zero divisor', solve(float(N),0.0), "domain")
check('huge finite', solve(1.5e308,1e308), render(math.remainder(1.5e308,1e308)))
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:
Nearest floating remainder uses residual parity instead of quotient parity.

For finite x and finite nonzero y, return the remainder x-n*y with n the nearest integer quotient, ties to even. The output has magnitude at most abs(y)/2; exact zero has the sign of x. Finite results are rendered to eleven significant decimal digits; modeled domain violations and arithmetic errors are explicit strings.

split: open-access


broken_source:
"""Failure Map reference implementation. Python standard library only."""
import json
import math
import struct
def render(x):
    if math.isnan(x): return 'nan'
    if math.isinf(x): return '-infinity' if x<0 else '+infinity'
    return format(x,'.11g')

N = 1
observations = []
def solve(x,y):
    try:
        if y==0: return 'domain'
        ay=abs(y)
        r=math.fmod(x,ay)
        a=abs(r)
        other=ay-a
        odd=math.fmod(abs(x),2*ay)>=ay
        if a>other or (a==other and odd):
            r-=ay
        if r==0: r=math.copysign(0.0,x)
        return render(r)
    except (ValueError, OverflowError, ZeroDivisionError, TypeError):
        return "arithmetic-error"
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('even tie', solve(2.0*N*4+2,4.0), "2")
check('odd tie', solve((2.0*N+1)*4+2,4.0), "-2")
check('negative even tie', solve(-2.0*N*4-2,4.0), "-2")
check('negative odd tie', solve(-(2.0*N+1)*4-2,4.0), "2")
check('above half', solve(4.0*N+3,4.0), "-1")
check('below half', solve(4.0*N+1,4.0), "1")
check('negative divisor below half', solve(4.0*N+1,-4.0), "1")
check('negative divisor', solve(4.0*N+3,-4.0), "-1")
check('negative exact', solve(-4.0*N,4.0), "-0")
check('positive exact', solve(4.0*N,4.0), "0")
check('zero divisor', solve(float(N),0.0), "domain")
check('huge finite', solve(1.5e308,1e308), render(math.remainder(1.5e308,1e308)))
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
import math
import struct
def render(x):
    if math.isnan(x): return 'nan'
    if math.isinf(x): return '-infinity' if x<0 else '+infinity'
    return format(x,'.11g')

N = 1
observations = []
def solve(x,y):
    try:
        if y==0: return 'domain'
        ay=abs(y)
        r=math.fmod(x,ay)
        a=abs(r)
        other=ay-a
        odd=math.fmod(abs(x),2*ay)>=ay
        if a>other or (a==other and odd):
            r+=math.copysign(ay,x)
        if r==0: r=math.copysign(0.0,x)
        return render(r)
    except (ValueError, OverflowError, ZeroDivisionError, TypeError):
        return "arithmetic-error"
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('even tie', solve(2.0*N*4+2,4.0), "2")
check('odd tie', solve((2.0*N+1)*4+2,4.0), "-2")
check('negative even tie', solve(-2.0*N*4-2,4.0), "-2")
check('negative odd tie', solve(-(2.0*N+1)*4-2,4.0), "2")
check('above half', solve(4.0*N+3,4.0), "-1")
check('below half', solve(4.0*N+1,4.0), "1")
check('negative divisor below half', solve(4.0*N+1,-4.0), "1")
check('negative divisor', solve(4.0*N+3,-4.0), "-1")
check('negative exact', solve(-4.0*N,4.0), "-0")
check('positive exact', solve(4.0*N,4.0), "0")
check('zero divisor', solve(float(N),0.0), "domain")
check('huge finite', solve(1.5e308,1e308), render(math.remainder(1.5e308,1e308)))
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:
Nearest floating remainder subtracts a positive period for negative x.

For finite x and finite nonzero y, return the remainder x-n*y with n the nearest integer quotient, ties to even. The output has magnitude at most abs(y)/2; exact zero has the sign of x. Finite results are rendered to eleven significant decimal digits; modeled domain violations and arithmetic errors are explicit strings.

split: open-access


broken_source:
"""Failure Map reference implementation. Python standard library only."""
import json
import math
import struct
def render(x):
    if math.isnan(x): return 'nan'
    if math.isinf(x): return '-infinity' if x<0 else '+infinity'
    return format(x,'.11g')

N = 1
observations = []
def solve(x,y):
    try:
        if y==0: return 'domain'
        ay=abs(y)
        r=math.fmod(x,ay)
        a=abs(r)
        other=ay-a
        odd=math.fmod(abs(x),2*ay)>=ay
        if a>other or (a==other and odd):
            r-=math.copysign(ay,x)
        if r==0: r=0.0
        return render(r)
    except (ValueError, OverflowError, ZeroDivisionError, TypeError):
        return "arithmetic-error"
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('even tie', solve(2.0*N*4+2,4.0), "2")
check('odd tie', solve((2.0*N+1)*4+2,4.0), "-2")
check('negative even tie', solve(-2.0*N*4-2,4.0), "-2")
check('negative odd tie', solve(-(2.0*N+1)*4-2,4.0), "2")
check('above half', solve(4.0*N+3,4.0), "-1")
check('below half', solve(4.0*N+1,4.0), "1")
check('negative divisor below half', solve(4.0*N+1,-4.0), "1")
check('negative divisor', solve(4.0*N+3,-4.0), "-1")
check('negative exact', solve(-4.0*N,4.0), "-0")
check('positive exact', solve(4.0*N,4.0), "0")
check('zero divisor', solve(float(N),0.0), "domain")
check('huge finite', solve(1.5e308,1e308), render(math.remainder(1.5e308,1e308)))
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
import math
import struct
def render(x):
    if math.isnan(x): return 'nan'
    if math.isinf(x): return '-infinity' if x<0 else '+infinity'
    return format(x,'.11g')

N = 1
observations = []
def solve(x,y):
    try:
        if y==0: return 'domain'
        ay=abs(y)
        r=math.fmod(x,ay)
        a=abs(r)
        other=ay-a
        odd=math.fmod(abs(x),2*ay)>=ay
        if a>other or (a==other and odd):
            r-=math.copysign(ay,x)
        if r==0: r=-0.0
        return render(r)
    except (ValueError, OverflowError, ZeroDivisionError, TypeError):
        return "arithmetic-error"
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('even tie', solve(2.0*N*4+2,4.0), "2")
check('odd tie', solve((2.0*N+1)*4+2,4.0), "-2")
check('negative even tie', solve(-2.0*N*4-2,4.0), "-2")
check('negative odd tie', solve(-(2.0*N+1)*4-2,4.0), "2")
check('above half', solve(4.0*N+3,4.0), "-1")
check('below half', solve(4.0*N+1,4.0), "1")
check('negative divisor below half', solve(4.0*N+1,-4.0), "1")
check('negative divisor', solve(4.0*N+3,-4.0), "-1")
check('negative exact', solve(-4.0*N,4.0), "-0")
check('positive exact', solve(4.0*N,4.0), "0")
check('zero divisor', solve(float(N),0.0), "domain")
check('huge finite', solve(1.5e308,1e308), render(math.remainder(1.5e308,1e308)))
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:
Nearest floating remainder canonicalizes exact negative zero.

For finite x and finite nonzero y, return the remainder x-n*y with n the nearest integer quotient, ties to even. The output has magnitude at most abs(y)/2; exact zero has the sign of x. Finite results are rendered to eleven significant decimal digits; modeled domain violations and arithmetic errors are explicit strings.

split: open-access


broken_source:
"""Failure Map reference implementation. Python standard library only."""
import json
import math
import struct
def render(x):
    if math.isnan(x): return 'nan'
    if math.isinf(x): return '-infinity' if x<0 else '+infinity'
    return format(x,'.11g')

N = 1
observations = []
def solve(x,y):
    try:
        if y==0: return 'domain'
        ay=abs(y)
        r=math.fmod(x,ay)
        a=abs(r)
        other=ay/2; a=2*a
        odd=math.fmod(abs(x),2*ay)>=ay
        if a>other or (a==other and odd):
            r-=math.copysign(ay,x)
        if r==0: r=math.copysign(0.0,x)
        return render(r)
    except (ValueError, OverflowError, ZeroDivisionError, TypeError):
        return "arithmetic-error"
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('even tie', solve(2.0*N*4+2,4.0), "2")
check('odd tie', solve((2.0*N+1)*4+2,4.0), "-2")
check('negative even tie', solve(-2.0*N*4-2,4.0), "-2")
check('negative odd tie', solve(-(2.0*N+1)*4-2,4.0), "2")
check('above half', solve(4.0*N+3,4.0), "-1")
check('below half', solve(4.0*N+1,4.0), "1")
check('negative divisor below half', solve(4.0*N+1,-4.0), "1")
check('negative divisor', solve(4.0*N+3,-4.0), "-1")
check('negative exact', solve(-4.0*N,4.0), "-0")
check('positive exact', solve(4.0*N,4.0), "0")
check('zero divisor', solve(float(N),0.0), "domain")
check('huge finite', solve(1.5e308,1e308), render(math.remainder(1.5e308,1e308)))
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
import math
import struct
def render(x):
    if math.isnan(x): return 'nan'
    if math.isinf(x): return '-infinity' if x<0 else '+infinity'
    return format(x,'.11g')

N = 1
observations = []
def solve(x,y):
    try:
        if y==0: return 'domain'
        ay=abs(y)
        r=math.fmod(x,ay)
        a=abs(r)
        other=ay-2*a
        odd=math.fmod(abs(x),2*ay)>=ay
        if a>other or (a==other and odd):
            r-=math.copysign(ay,x)
        if r==0: r=math.copysign(0.0,x)
        return render(r)
    except (ValueError, OverflowError, ZeroDivisionError, TypeError):
        return "arithmetic-error"
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('even tie', solve(2.0*N*4+2,4.0), "2")
check('odd tie', solve((2.0*N+1)*4+2,4.0), "-2")
check('negative even tie', solve(-2.0*N*4-2,4.0), "-2")
check('negative odd tie', solve(-(2.0*N+1)*4-2,4.0), "2")
check('above half', solve(4.0*N+3,4.0), "-1")
check('below half', solve(4.0*N+1,4.0), "1")
check('negative divisor below half', solve(4.0*N+1,-4.0), "1")
check('negative divisor', solve(4.0*N+3,-4.0), "-1")
check('negative exact', solve(-4.0*N,4.0), "-0")
check('positive exact', solve(4.0*N,4.0), "0")
check('zero divisor', solve(float(N),0.0), "domain")
check('huge finite', solve(1.5e308,1e308), render(math.remainder(1.5e308,1e308)))
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:
Nearest floating remainder compares by doubling a huge residue.

For finite x and finite nonzero y, return the remainder x-n*y with n the nearest integer quotient, ties to even. The output has magnitude at most abs(y)/2; exact zero has the sign of x. Finite results are rendered to eleven significant decimal digits; modeled domain violations and arithmetic errors are explicit strings.

split: open-access


broken_source:
"""Failure Map reference implementation. Python standard library only."""
import json
import math
import struct
def render(x):
    if math.isnan(x): return 'nan'
    if math.isinf(x): return '-infinity' if x<0 else '+infinity'
    return format(x,'.11g')

N = 1
observations = []
def solve(x,y):
    try:
        if y==0: return 'domain'
        ay=y
        r=math.fmod(x,ay)
        a=abs(r)
        other=ay-a
        odd=math.fmod(abs(x),2*ay)>=ay
        if a>other or (a==other and odd):
            r-=math.copysign(ay,x)
        if r==0: r=math.copysign(0.0,x)
        return render(r)
    except (ValueError, OverflowError, ZeroDivisionError, TypeError):
        return "arithmetic-error"
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('even tie', solve(2.0*N*4+2,4.0), "2")
check('odd tie', solve((2.0*N+1)*4+2,4.0), "-2")
check('negative even tie', solve(-2.0*N*4-2,4.0), "-2")
check('negative odd tie', solve(-(2.0*N+1)*4-2,4.0), "2")
check('above half', solve(4.0*N+3,4.0), "-1")
check('below half', solve(4.0*N+1,4.0), "1")
check('negative divisor below half', solve(4.0*N+1,-4.0), "1")
check('negative divisor', solve(4.0*N+3,-4.0), "-1")
check('negative exact', solve(-4.0*N,4.0), "-0")
check('positive exact', solve(4.0*N,4.0), "0")
check('zero divisor', solve(float(N),0.0), "domain")
check('huge finite', solve(1.5e308,1e308), render(math.remainder(1.5e308,1e308)))
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
import math
import struct
def render(x):
    if math.isnan(x): return 'nan'
    if math.isinf(x): return '-infinity' if x<0 else '+infinity'
    return format(x,'.11g')

N = 1
observations = []
def solve(x,y):
    try:
        if y==0: return 'domain'
        ay=-abs(y)
        r=math.fmod(x,ay)
        a=abs(r)
        other=ay-a
        odd=math.fmod(abs(x),2*ay)>=ay
        if a>other or (a==other and odd):
            r-=math.copysign(ay,x)
        if r==0: r=math.copysign(0.0,x)
        return render(r)
    except (ValueError, OverflowError, ZeroDivisionError, TypeError):
        return "arithmetic-error"
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('even tie', solve(2.0*N*4+2,4.0), "2")
check('odd tie', solve((2.0*N+1)*4+2,4.0), "-2")
check('negative even tie', solve(-2.0*N*4-2,4.0), "-2")
check('negative odd tie', solve(-(2.0*N+1)*4-2,4.0), "2")
check('above half', solve(4.0*N+3,4.0), "-1")
check('below half', solve(4.0*N+1,4.0), "1")
check('negative divisor below half', solve(4.0*N+1,-4.0), "1")
check('negative divisor', solve(4.0*N+3,-4.0), "-1")
check('negative exact', solve(-4.0*N,4.0), "-0")
check('positive exact', solve(4.0*N,4.0), "0")
check('zero divisor', solve(float(N),0.0), "domain")
check('huge finite', solve(1.5e308,1e308), render(math.remainder(1.5e308,1e308)))
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:
Nearest floating remainder keeps the sign of the divisor.

For finite x and finite nonzero y, return the remainder x-n*y with n the nearest integer quotient, ties to even. The output has magnitude at most abs(y)/2; exact zero has the sign of x. Finite results are rendered to eleven significant decimal digits; modeled domain violations and arithmetic errors are explicit strings.

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):
    wall_delta = r['wall_now'] - r['mono_saved']
    mono_delta = r['mono_now'] - r['mono_saved']
    reboot = r['boot_now'] != r['boot_saved']
    elapsed = max(0, wall_delta if reboot else mono_delta)
    consumed = 0 if r['paused'] else elapsed
    remaining = max(0, r['budget'] - consumed)
    expired = not r['paused'] and consumed >= r['budget']
    overdue = max(0, consumed - r['budget'])
    deadline = None if r['paused'] else r['mono_now'] + remaining
    base = r['mono_now'] - consumed
    return [remaining,expired,overdue,deadline,base]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve({'wall_now': 130, 'wall_saved': 100, 'mono_now': 50, 'mono_saved': 20, 'boot_now': 'a', 'boot_saved': 'a', 'paused': False, 'budget': 30}), [0, True, 0, 50, 20])
check('fixture 2', solve({'wall_now': 90, 'wall_saved': 100, 'mono_now': 5, 'mono_saved': 20, 'boot_now': 'b', 'boot_saved': 'a', 'paused': False, 'budget': 10}), [10, False, 0, 15, 5])
check('fixture 3', solve({'wall_now': 150, 'wall_saved': 100, 'mono_now': 5, 'mono_saved': 20, 'boot_now': 'b', 'boot_saved': 'a', 'paused': False, 'budget': 20}), [0, True, 30, 5, -45])
check('fixture 4', solve({'wall_now': 130, 'wall_saved': 100, 'mono_now': 50, 'mono_saved': 20, 'boot_now': 'a', 'boot_saved': 'a', 'paused': True, 'budget': 0}), [0, False, 0, None, 50])
check('fixture 5', solve({'wall_now': 140, 'wall_saved': 100, 'mono_now': 60, 'mono_saved': 20, 'boot_now': 'a', 'boot_saved': 'a', 'paused': False, 'budget': 100}), [60, False, 0, 120, 20])
check('fixture 6', solve({'wall_now': 90, 'wall_saved': 100, 'mono_now': -5, 'mono_saved': -20, 'boot_now': 'a', 'boot_saved': 'a', 'paused': False, 'budget': 20}), [5, False, 0, 0, -20])
check('fixture 7', solve({'wall_now': 101, 'wall_saved': 100, 'mono_now': 0, 'mono_saved': 0, 'boot_now': 'c', 'boot_saved': 'a', 'paused': False, 'budget': 0}), [0, True, 1, 0, -1])
check('fixture 8', solve({'wall_now': 100, 'wall_saved': 100, 'mono_now': 20, 'mono_saved': 20, 'boot_now': 'a', 'boot_saved': 'a', 'paused': True, 'budget': 10}), [10, False, 0, None, 20])
check('fixture 9', solve({'wall_now': 105, 'wall_saved': 100, 'mono_now': 24, 'mono_saved': 20, 'boot_now': 'a', 'boot_saved': 'a', 'paused': False, 'budget': 3}), [0, True, 1, 24, 20])
check('fixture 10', solve({'wall_now': 80, 'wall_saved': 100, 'mono_now': -10, 'mono_saved': -20, 'boot_now': 'a', 'boot_saved': 'a', 'paused': False, 'budget': 0}), [0, True, 10, -10, -20])
variant = [({'wall_now': 130, 'wall_saved': 100, 'mono_now': 50, 'mono_saved': 20, 'boot_now': 'a', 'boot_saved': 'a', 'paused': False, 'budget': 31}, [1, False, 0, 51, 20]), ({'wall_now': 130, 'wall_saved': 100, 'mono_now': 50, 'mono_saved': 20, 'boot_now': 'a', 'boot_saved': 'a', 'paused': False, 'budget': 32}, [2, False, 0, 52, 20]), ({'wall_now': 130, 'wall_saved': 100, 'mono_now': 50, 'mono_saved': 20, 'boot_now': 'a', 'boot_saved': 'a', 'paused': False, 'budget': 33}, [3, False, 0, 53, 20]), ({'wall_now': 130, 'wall_saved': 100, 'mono_now': 50, 'mono_saved': 20, 'boot_now': 'a', 'boot_saved': 'a', 'paused': False, 'budget': 34}, [4, False, 0, 54, 20]), ({'wall_now': 130, 'wall_saved': 100, 'mono_now': 50, 'mono_saved': 20, 'boot_now': 'a', 'boot_saved': 'a', 'paused': False, 'budget': 35}, [5, False, 0, 55, 20])]
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):
    wall_delta = abs(r['wall_now'] - r['wall_saved'])
    mono_delta = r['mono_now'] - r['mono_saved']
    reboot = r['boot_now'] != r['boot_saved']
    elapsed = max(0, wall_delta if reboot else mono_delta)
    consumed = 0 if r['paused'] else elapsed
    remaining = max(0, r['budget'] - consumed)
    expired = not r['paused'] and consumed >= r['budget']
    overdue = max(0, consumed - r['budget'])
    deadline = None if r['paused'] else r['mono_now'] + remaining
    base = r['mono_now'] - consumed
    return [remaining,expired,overdue,deadline,base]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve({'wall_now': 130, 'wall_saved': 100, 'mono_now': 50, 'mono_saved': 20, 'boot_now': 'a', 'boot_saved': 'a', 'paused': False, 'budget': 30}), [0, True, 0, 50, 20])
check('fixture 2', solve({'wall_now': 90, 'wall_saved': 100, 'mono_now': 5, 'mono_saved': 20, 'boot_now': 'b', 'boot_saved': 'a', 'paused': False, 'budget': 10}), [10, False, 0, 15, 5])
check('fixture 3', solve({'wall_now': 150, 'wall_saved': 100, 'mono_now': 5, 'mono_saved': 20, 'boot_now': 'b', 'boot_saved': 'a', 'paused': False, 'budget': 20}), [0, True, 30, 5, -45])
check('fixture 4', solve({'wall_now': 130, 'wall_saved': 100, 'mono_now': 50, 'mono_saved': 20, 'boot_now': 'a', 'boot_saved': 'a', 'paused': True, 'budget': 0}), [0, False, 0, None, 50])
check('fixture 5', solve({'wall_now': 140, 'wall_saved': 100, 'mono_now': 60, 'mono_saved': 20, 'boot_now': 'a', 'boot_saved': 'a', 'paused': False, 'budget': 100}), [60, False, 0, 120, 20])
check('fixture 6', solve({'wall_now': 90, 'wall_saved': 100, 'mono_now': -5, 'mono_saved': -20, 'boot_now': 'a', 'boot_saved': 'a', 'paused': False, 'budget': 20}), [5, False, 0, 0, -20])
check('fixture 7', solve({'wall_now': 101, 'wall_saved': 100, 'mono_now': 0, 'mono_saved': 0, 'boot_now': 'c', 'boot_saved': 'a', 'paused': False, 'budget': 0}), [0, True, 1, 0, -1])
check('fixture 8', solve({'wall_now': 100, 'wall_saved': 100, 'mono_now': 20, 'mono_saved': 20, 'boot_now': 'a', 'boot_saved': 'a', 'paused': True, 'budget': 10}), [10, False, 0, None, 20])
check('fixture 9', solve({'wall_now': 105, 'wall_saved': 100, 'mono_now': 24, 'mono_saved': 20, 'boot_now': 'a', 'boot_saved': 'a', 'paused': False, 'budget': 3}), [0, True, 1, 24, 20])
check('fixture 10', solve({'wall_now': 80, 'wall_saved': 100, 'mono_now': -10, 'mono_saved': -20, 'boot_now': 'a', 'boot_saved': 'a', 'paused': False, 'budget': 0}), [0, True, 10, -10, -20])
variant = [({'wall_now': 130, 'wall_saved': 100, 'mono_now': 50, 'mono_saved': 20, 'boot_now': 'a', 'boot_saved': 'a', 'paused': False, 'budget': 31}, [1, False, 0, 51, 20]), ({'wall_now': 130, 'wall_saved': 100, 'mono_now': 50, 'mono_saved': 20, 'boot_now': 'a', 'boot_saved': 'a', 'paused': False, 'budget': 32}, [2, False, 0, 52, 20]), ({'wall_now': 130, 'wall_saved': 100, 'mono_now': 50, 'mono_saved': 20, 'boot_now': 'a', 'boot_saved': 'a', 'paused': False, 'budget': 33}, [3, False, 0, 53, 20]), ({'wall_now': 130, 'wall_saved': 100, 'mono_now': 50, 'mono_saved': 20, 'boot_now': 'a', 'boot_saved': 'a', 'paused': False, 'budget': 34}, [4, False, 0, 54, 20]), ({'wall_now': 130, 'wall_saved': 100, 'mono_now': 50, 'mono_saved': 20, 'boot_now': 'a', 'boot_saved': 'a', 'paused': False, 'budget': 35}, [5, False, 0, 55, 20])]
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 wall_delta.

A checkpoint stores wall and monotonic coordinates, boot identity, budget and pause state. Same-boot restore uses monotonic elapsed; reboot restore uses nonnegative wall elapsed. Paused timers consume no elapsed ticks. Return remaining budget, expiration flag, overdue ticks, current-domain deadline (None while paused), and reconstructed running base. All units are identical integer ticks.

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):
    wall_delta = r['wall_now'] - r['wall_saved']
    mono_delta = r['mono_saved'] - r['mono_now']
    reboot = r['boot_now'] != r['boot_saved']
    elapsed = max(0, wall_delta if reboot else mono_delta)
    consumed = 0 if r['paused'] else elapsed
    remaining = max(0, r['budget'] - consumed)
    expired = not r['paused'] and consumed >= r['budget']
    overdue = max(0, consumed - r['budget'])
    deadline = None if r['paused'] else r['mono_now'] + remaining
    base = r['mono_now'] - consumed
    return [remaining,expired,overdue,deadline,base]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve({'wall_now': 130, 'wall_saved': 100, 'mono_now': 50, 'mono_saved': 20, 'boot_now': 'a', 'boot_saved': 'a', 'paused': False, 'budget': 30}), [0, True, 0, 50, 20])
check('fixture 2', solve({'wall_now': 90, 'wall_saved': 100, 'mono_now': 5, 'mono_saved': 20, 'boot_now': 'b', 'boot_saved': 'a', 'paused': False, 'budget': 10}), [10, False, 0, 15, 5])
check('fixture 3', solve({'wall_now': 150, 'wall_saved': 100, 'mono_now': 5, 'mono_saved': 20, 'boot_now': 'b', 'boot_saved': 'a', 'paused': False, 'budget': 20}), [0, True, 30, 5, -45])
check('fixture 4', solve({'wall_now': 130, 'wall_saved': 100, 'mono_now': 50, 'mono_saved': 20, 'boot_now': 'a', 'boot_saved': 'a', 'paused': True, 'budget': 0}), [0, False, 0, None, 50])
check('fixture 5', solve({'wall_now': 140, 'wall_saved': 100, 'mono_now': 60, 'mono_saved': 20, 'boot_now': 'a', 'boot_saved': 'a', 'paused': False, 'budget': 100}), [60, False, 0, 120, 20])
check('fixture 6', solve({'wall_now': 90, 'wall_saved': 100, 'mono_now': -5, 'mono_saved': -20, 'boot_now': 'a', 'boot_saved': 'a', 'paused': False, 'budget': 20}), [5, False, 0, 0, -20])
check('fixture 7', solve({'wall_now': 101, 'wall_saved': 100, 'mono_now': 0, 'mono_saved': 0, 'boot_now': 'c', 'boot_saved': 'a', 'paused': False, 'budget': 0}), [0, True, 1, 0, -1])
check('fixture 8', solve({'wall_now': 100, 'wall_saved': 100, 'mono_now': 20, 'mono_saved': 20, 'boot_now': 'a', 'boot_saved': 'a', 'paused': True, 'budget': 10}), [10, False, 0, None, 20])
check('fixture 9', solve({'wall_now': 105, 'wall_saved': 100, 'mono_now': 24, 'mono_saved': 20, 'boot_now': 'a', 'boot_saved': 'a', 'paused': False, 'budget': 3}), [0, True, 1, 24, 20])
check('fixture 10', solve({'wall_now': 80, 'wall_saved': 100, 'mono_now': -10, 'mono_saved': -20, 'boot_now': 'a', 'boot_saved': 'a', 'paused': False, 'budget': 0}), [0, True, 10, -10, -20])
variant = [({'wall_now': 130, 'wall_saved': 100, 'mono_now': 50, 'mono_saved': 20, 'boot_now': 'a', 'boot_saved': 'a', 'paused': False, 'budget': 31}, [1, False, 0, 51, 20]), ({'wall_now': 130, 'wall_saved': 100, 'mono_now': 50, 'mono_saved': 20, 'boot_now': 'a', 'boot_saved': 'a', 'paused': False, 'budget': 32}, [2, False, 0, 52, 20]), ({'wall_now': 130, 'wall_saved': 100, 'mono_now': 50, 'mono_saved': 20, 'boot_now': 'a', 'boot_saved': 'a', 'paused': False, 'budget': 33}, [3, False, 0, 53, 20]), ({'wall_now': 130, 'wall_saved': 100, 'mono_now': 50, 'mono_saved': 20, 'boot_now': 'a', 'boot_saved': 'a', 'paused': False, 'budget': 34}, [4, False, 0, 54, 20]), ({'wall_now': 130, 'wall_saved': 100, 'mono_now': 50, 'mono_saved': 20, 'boot_now': 'a', 'boot_saved': 'a', 'paused': False, 'budget': 35}, [5, False, 0, 55, 20])]
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):
    wall_delta = r['wall_now'] - r['wall_saved']
    mono_delta = abs(r['mono_now']) - abs(r['mono_saved'])
    reboot = r['boot_now'] != r['boot_saved']
    elapsed = max(0, wall_delta if reboot else mono_delta)
    consumed = 0 if r['paused'] else elapsed
    remaining = max(0, r['budget'] - consumed)
    expired = not r['paused'] and consumed >= r['budget']
    overdue = max(0, consumed - r['budget'])
    deadline = None if r['paused'] else r['mono_now'] + remaining
    base = r['mono_now'] - consumed
    return [remaining,expired,overdue,deadline,base]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve({'wall_now': 130, 'wall_saved': 100, 'mono_now': 50, 'mono_saved': 20, 'boot_now': 'a', 'boot_saved': 'a', 'paused': False, 'budget': 30}), [0, True, 0, 50, 20])
check('fixture 2', solve({'wall_now': 90, 'wall_saved': 100, 'mono_now': 5, 'mono_saved': 20, 'boot_now': 'b', 'boot_saved': 'a', 'paused': False, 'budget': 10}), [10, False, 0, 15, 5])
check('fixture 3', solve({'wall_now': 150, 'wall_saved': 100, 'mono_now': 5, 'mono_saved': 20, 'boot_now': 'b', 'boot_saved': 'a', 'paused': False, 'budget': 20}), [0, True, 30, 5, -45])
check('fixture 4', solve({'wall_now': 130, 'wall_saved': 100, 'mono_now': 50, 'mono_saved': 20, 'boot_now': 'a', 'boot_saved': 'a', 'paused': True, 'budget': 0}), [0, False, 0, None, 50])
check('fixture 5', solve({'wall_now': 140, 'wall_saved': 100, 'mono_now': 60, 'mono_saved': 20, 'boot_now': 'a', 'boot_saved': 'a', 'paused': False, 'budget': 100}), [60, False, 0, 120, 20])
check('fixture 6', solve({'wall_now': 90, 'wall_saved': 100, 'mono_now': -5, 'mono_saved': -20, 'boot_now': 'a', 'boot_saved': 'a', 'paused': False, 'budget': 20}), [5, False, 0, 0, -20])
check('fixture 7', solve({'wall_now': 101, 'wall_saved': 100, 'mono_now': 0, 'mono_saved': 0, 'boot_now': 'c', 'boot_saved': 'a', 'paused': False, 'budget': 0}), [0, True, 1, 0, -1])
check('fixture 8', solve({'wall_now': 100, 'wall_saved': 100, 'mono_now': 20, 'mono_saved': 20, 'boot_now': 'a', 'boot_saved': 'a', 'paused': True, 'budget': 10}), [10, False, 0, None, 20])
check('fixture 9', solve({'wall_now': 105, 'wall_saved': 100, 'mono_now': 24, 'mono_saved': 20, 'boot_now': 'a', 'boot_saved': 'a', 'paused': False, 'budget': 3}), [0, True, 1, 24, 20])
check('fixture 10', solve({'wall_now': 80, 'wall_saved': 100, 'mono_now': -10, 'mono_saved': -20, 'boot_now': 'a', 'boot_saved': 'a', 'paused': False, 'budget': 0}), [0, True, 10, -10, -20])
variant = [({'wall_now': 130, 'wall_saved': 100, 'mono_now': 50, 'mono_saved': 20, 'boot_now': 'a', 'boot_saved': 'a', 'paused': False, 'budget': 31}, [1, False, 0, 51, 20]), ({'wall_now': 130, 'wall_saved': 100, 'mono_now': 50, 'mono_saved': 20, 'boot_now': 'a', 'boot_saved': 'a', 'paused': False, 'budget': 32}, [2, False, 0, 52, 20]), ({'wall_now': 130, 'wall_saved': 100, 'mono_now': 50, 'mono_saved': 20, 'boot_now': 'a', 'boot_saved': 'a', 'paused': False, 'budget': 33}, [3, False, 0, 53, 20]), ({'wall_now': 130, 'wall_saved': 100, 'mono_now': 50, 'mono_saved': 20, 'boot_now': 'a', 'boot_saved': 'a', 'paused': False, 'budget': 34}, [4, False, 0, 54, 20]), ({'wall_now': 130, 'wall_saved': 100, 'mono_now': 50, 'mono_saved': 20, 'boot_now': 'a', 'boot_saved': 'a', 'paused': False, 'budget': 35}, [5, False, 0, 55, 20])]
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 mono_delta.

A checkpoint stores wall and monotonic coordinates, boot identity, budget and pause state. Same-boot restore uses monotonic elapsed; reboot restore uses nonnegative wall elapsed. Paused timers consume no elapsed ticks. Return remaining budget, expiration flag, overdue ticks, current-domain deadline (None while paused), and reconstructed running base. All units are identical integer ticks.

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):
    wall_delta = r['wall_now'] - r['wall_saved']
    mono_delta = r['mono_now'] - r['mono_saved']
    reboot = False
    elapsed = max(0, wall_delta if reboot else mono_delta)
    consumed = 0 if r['paused'] else elapsed
    remaining = max(0, r['budget'] - consumed)
    expired = not r['paused'] and consumed >= r['budget']
    overdue = max(0, consumed - r['budget'])
    deadline = None if r['paused'] else r['mono_now'] + remaining
    base = r['mono_now'] - consumed
    return [remaining,expired,overdue,deadline,base]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve({'wall_now': 130, 'wall_saved': 100, 'mono_now': 50, 'mono_saved': 20, 'boot_now': 'a', 'boot_saved': 'a', 'paused': False, 'budget': 30}), [0, True, 0, 50, 20])
check('fixture 2', solve({'wall_now': 90, 'wall_saved': 100, 'mono_now': 5, 'mono_saved': 20, 'boot_now': 'b', 'boot_saved': 'a', 'paused': False, 'budget': 10}), [10, False, 0, 15, 5])
check('fixture 3', solve({'wall_now': 150, 'wall_saved': 100, 'mono_now': 5, 'mono_saved': 20, 'boot_now': 'b', 'boot_saved': 'a', 'paused': False, 'budget': 20}), [0, True, 30, 5, -45])
check('fixture 4', solve({'wall_now': 130, 'wall_saved': 100, 'mono_now': 50, 'mono_saved': 20, 'boot_now': 'a', 'boot_saved': 'a', 'paused': True, 'budget': 0}), [0, False, 0, None, 50])
check('fixture 5', solve({'wall_now': 140, 'wall_saved': 100, 'mono_now': 60, 'mono_saved': 20, 'boot_now': 'a', 'boot_saved': 'a', 'paused': False, 'budget': 100}), [60, False, 0, 120, 20])
check('fixture 6', solve({'wall_now': 90, 'wall_saved': 100, 'mono_now': -5, 'mono_saved': -20, 'boot_now': 'a', 'boot_saved': 'a', 'paused': False, 'budget': 20}), [5, False, 0, 0, -20])
check('fixture 7', solve({'wall_now': 101, 'wall_saved': 100, 'mono_now': 0, 'mono_saved': 0, 'boot_now': 'c', 'boot_saved': 'a', 'paused': False, 'budget': 0}), [0, True, 1, 0, -1])
check('fixture 8', solve({'wall_now': 100, 'wall_saved': 100, 'mono_now': 20, 'mono_saved': 20, 'boot_now': 'a', 'boot_saved': 'a', 'paused': True, 'budget': 10}), [10, False, 0, None, 20])
check('fixture 9', solve({'wall_now': 105, 'wall_saved': 100, 'mono_now': 24, 'mono_saved': 20, 'boot_now': 'a', 'boot_saved': 'a', 'paused': False, 'budget': 3}), [0, True, 1, 24, 20])
check('fixture 10', solve({'wall_now': 80, 'wall_saved': 100, 'mono_now': -10, 'mono_saved': -20, 'boot_now': 'a', 'boot_saved': 'a', 'paused': False, 'budget': 0}), [0, True, 10, -10, -20])
variant = [({'wall_now': 130, 'wall_saved': 100, 'mono_now': 50, 'mono_saved': 20, 'boot_now': 'a', 'boot_saved': 'a', 'paused': False, 'budget': 31}, [1, False, 0, 51, 20]), ({'wall_now': 130, 'wall_saved': 100, 'mono_now': 50, 'mono_saved': 20, 'boot_now': 'a', 'boot_saved': 'a', 'paused': False, 'budget': 32}, [2, False, 0, 52, 20]), ({'wall_now': 130, 'wall_saved': 100, 'mono_now': 50, 'mono_saved': 20, 'boot_now': 'a', 'boot_saved': 'a', 'paused': False, 'budget': 33}, [3, False, 0, 53, 20]), ({'wall_now': 130, 'wall_saved': 100, 'mono_now': 50, 'mono_saved': 20, 'boot_now': 'a', 'boot_saved': 'a', 'paused': False, 'budget': 34}, [4, False, 0, 54, 20]), ({'wall_now': 130, 'wall_saved': 100, 'mono_now': 50, 'mono_saved': 20, 'boot_now': 'a', 'boot_saved': 'a', 'paused': False, 'budget': 35}, [5, False, 0, 55, 20])]
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):
    wall_delta = r['wall_now'] - r['wall_saved']
    mono_delta = r['mono_now'] - r['mono_saved']
    reboot = r['boot_now'] < r['boot_saved']
    elapsed = max(0, wall_delta if reboot else mono_delta)
    consumed = 0 if r['paused'] else elapsed
    remaining = max(0, r['budget'] - consumed)
    expired = not r['paused'] and consumed >= r['budget']
    overdue = max(0, consumed - r['budget'])
    deadline = None if r['paused'] else r['mono_now'] + remaining
    base = r['mono_now'] - consumed
    return [remaining,expired,overdue,deadline,base]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve({'wall_now': 130, 'wall_saved': 100, 'mono_now': 50, 'mono_saved': 20, 'boot_now': 'a', 'boot_saved': 'a', 'paused': False, 'budget': 30}), [0, True, 0, 50, 20])
check('fixture 2', solve({'wall_now': 90, 'wall_saved': 100, 'mono_now': 5, 'mono_saved': 20, 'boot_now': 'b', 'boot_saved': 'a', 'paused': False, 'budget': 10}), [10, False, 0, 15, 5])
check('fixture 3', solve({'wall_now': 150, 'wall_saved': 100, 'mono_now': 5, 'mono_saved': 20, 'boot_now': 'b', 'boot_saved': 'a', 'paused': False, 'budget': 20}), [0, True, 30, 5, -45])
check('fixture 4', solve({'wall_now': 130, 'wall_saved': 100, 'mono_now': 50, 'mono_saved': 20, 'boot_now': 'a', 'boot_saved': 'a', 'paused': True, 'budget': 0}), [0, False, 0, None, 50])
check('fixture 5', solve({'wall_now': 140, 'wall_saved': 100, 'mono_now': 60, 'mono_saved': 20, 'boot_now': 'a', 'boot_saved': 'a', 'paused': False, 'budget': 100}), [60, False, 0, 120, 20])
check('fixture 6', solve({'wall_now': 90, 'wall_saved': 100, 'mono_now': -5, 'mono_saved': -20, 'boot_now': 'a', 'boot_saved': 'a', 'paused': False, 'budget': 20}), [5, False, 0, 0, -20])
check('fixture 7', solve({'wall_now': 101, 'wall_saved': 100, 'mono_now': 0, 'mono_saved': 0, 'boot_now': 'c', 'boot_saved': 'a', 'paused': False, 'budget': 0}), [0, True, 1, 0, -1])
check('fixture 8', solve({'wall_now': 100, 'wall_saved': 100, 'mono_now': 20, 'mono_saved': 20, 'boot_now': 'a', 'boot_saved': 'a', 'paused': True, 'budget': 10}), [10, False, 0, None, 20])
check('fixture 9', solve({'wall_now': 105, 'wall_saved': 100, 'mono_now': 24, 'mono_saved': 20, 'boot_now': 'a', 'boot_saved': 'a', 'paused': False, 'budget': 3}), [0, True, 1, 24, 20])
check('fixture 10', solve({'wall_now': 80, 'wall_saved': 100, 'mono_now': -10, 'mono_saved': -20, 'boot_now': 'a', 'boot_saved': 'a', 'paused': False, 'budget': 0}), [0, True, 10, -10, -20])
variant = [({'wall_now': 130, 'wall_saved': 100, 'mono_now': 50, 'mono_saved': 20, 'boot_now': 'a', 'boot_saved': 'a', 'paused': False, 'budget': 31}, [1, False, 0, 51, 20]), ({'wall_now': 130, 'wall_saved': 100, 'mono_now': 50, 'mono_saved': 20, 'boot_now': 'a', 'boot_saved': 'a', 'paused': False, 'budget': 32}, [2, False, 0, 52, 20]), ({'wall_now': 130, 'wall_saved': 100, 'mono_now': 50, 'mono_saved': 20, 'boot_now': 'a', 'boot_saved': 'a', 'paused': False, 'budget': 33}, [3, False, 0, 53, 20]), ({'wall_now': 130, 'wall_saved': 100, 'mono_now': 50, 'mono_saved': 20, 'boot_now': 'a', 'boot_saved': 'a', 'paused': False, 'budget': 34}, [4, False, 0, 54, 20]), ({'wall_now': 130, 'wall_saved': 100, 'mono_now': 50, 'mono_saved': 20, 'boot_now': 'a', 'boot_saved': 'a', 'paused': False, 'budget': 35}, [5, False, 0, 55, 20])]
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 reboot.

A checkpoint stores wall and monotonic coordinates, boot identity, budget and pause state. Same-boot restore uses monotonic elapsed; reboot restore uses nonnegative wall elapsed. Paused timers consume no elapsed ticks. Return remaining budget, expiration flag, overdue ticks, current-domain deadline (None while paused), and reconstructed running base. All units are identical integer ticks.

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):
    wall_delta = r['wall_now'] - r['wall_saved']
    mono_delta = r['mono_now'] - r['mono_saved']
    reboot = r['boot_now'] != r['boot_saved']
    elapsed = wall_delta if reboot else mono_delta
    consumed = 0 if r['paused'] else elapsed
    remaining = max(0, r['budget'] - consumed)
    expired = not r['paused'] and consumed >= r['budget']
    overdue = max(0, consumed - r['budget'])
    deadline = None if r['paused'] else r['mono_now'] + remaining
    base = r['mono_now'] - consumed
    return [remaining,expired,overdue,deadline,base]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve({'wall_now': 130, 'wall_saved': 100, 'mono_now': 50, 'mono_saved': 20, 'boot_now': 'a', 'boot_saved': 'a', 'paused': False, 'budget': 30}), [0, True, 0, 50, 20])
check('fixture 2', solve({'wall_now': 90, 'wall_saved': 100, 'mono_now': 5, 'mono_saved': 20, 'boot_now': 'b', 'boot_saved': 'a', 'paused': False, 'budget': 10}), [10, False, 0, 15, 5])
check('fixture 3', solve({'wall_now': 150, 'wall_saved': 100, 'mono_now': 5, 'mono_saved': 20, 'boot_now': 'b', 'boot_saved': 'a', 'paused': False, 'budget': 20}), [0, True, 30, 5, -45])
check('fixture 4', solve({'wall_now': 130, 'wall_saved': 100, 'mono_now': 50, 'mono_saved': 20, 'boot_now': 'a', 'boot_saved': 'a', 'paused': True, 'budget': 0}), [0, False, 0, None, 50])
check('fixture 5', solve({'wall_now': 140, 'wall_saved': 100, 'mono_now': 60, 'mono_saved': 20, 'boot_now': 'a', 'boot_saved': 'a', 'paused': False, 'budget': 100}), [60, False, 0, 120, 20])
check('fixture 6', solve({'wall_now': 90, 'wall_saved': 100, 'mono_now': -5, 'mono_saved': -20, 'boot_now': 'a', 'boot_saved': 'a', 'paused': False, 'budget': 20}), [5, False, 0, 0, -20])
check('fixture 7', solve({'wall_now': 101, 'wall_saved': 100, 'mono_now': 0, 'mono_saved': 0, 'boot_now': 'c', 'boot_saved': 'a', 'paused': False, 'budget': 0}), [0, True, 1, 0, -1])
check('fixture 8', solve({'wall_now': 100, 'wall_saved': 100, 'mono_now': 20, 'mono_saved': 20, 'boot_now': 'a', 'boot_saved': 'a', 'paused': True, 'budget': 10}), [10, False, 0, None, 20])
check('fixture 9', solve({'wall_now': 105, 'wall_saved': 100, 'mono_now': 24, 'mono_saved': 20, 'boot_now': 'a', 'boot_saved': 'a', 'paused': False, 'budget': 3}), [0, True, 1, 24, 20])
check('fixture 10', solve({'wall_now': 80, 'wall_saved': 100, 'mono_now': -10, 'mono_saved': -20, 'boot_now': 'a', 'boot_saved': 'a', 'paused': False, 'budget': 0}), [0, True, 10, -10, -20])
variant = [({'wall_now': 130, 'wall_saved': 100, 'mono_now': 50, 'mono_saved': 20, 'boot_now': 'a', 'boot_saved': 'a', 'paused': False, 'budget': 31}, [1, False, 0, 51, 20]), ({'wall_now': 130, 'wall_saved': 100, 'mono_now': 50, 'mono_saved': 20, 'boot_now': 'a', 'boot_saved': 'a', 'paused': False, 'budget': 32}, [2, False, 0, 52, 20]), ({'wall_now': 130, 'wall_saved': 100, 'mono_now': 50, 'mono_saved': 20, 'boot_now': 'a', 'boot_saved': 'a', 'paused': False, 'budget': 33}, [3, False, 0, 53, 20]), ({'wall_now': 130, 'wall_saved': 100, 'mono_now': 50, 'mono_saved': 20, 'boot_now': 'a', 'boot_saved': 'a', 'paused': False, 'budget': 34}, [4, False, 0, 54, 20]), ({'wall_now': 130, 'wall_saved': 100, 'mono_now': 50, 'mono_saved': 20, 'boot_now': 'a', 'boot_saved': 'a', 'paused': False, 'budget': 35}, [5, False, 0, 55, 20])]
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):
    wall_delta = r['wall_now'] - r['wall_saved']
    mono_delta = r['mono_now'] - r['mono_saved']
    reboot = r['boot_now'] != r['boot_saved']
    elapsed = abs(wall_delta if reboot else mono_delta)
    consumed = 0 if r['paused'] else elapsed
    remaining = max(0, r['budget'] - consumed)
    expired = not r['paused'] and consumed >= r['budget']
    overdue = max(0, consumed - r['budget'])
    deadline = None if r['paused'] else r['mono_now'] + remaining
    base = r['mono_now'] - consumed
    return [remaining,expired,overdue,deadline,base]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve({'wall_now': 130, 'wall_saved': 100, 'mono_now': 50, 'mono_saved': 20, 'boot_now': 'a', 'boot_saved': 'a', 'paused': False, 'budget': 30}), [0, True, 0, 50, 20])
check('fixture 2', solve({'wall_now': 90, 'wall_saved': 100, 'mono_now': 5, 'mono_saved': 20, 'boot_now': 'b', 'boot_saved': 'a', 'paused': False, 'budget': 10}), [10, False, 0, 15, 5])
check('fixture 3', solve({'wall_now': 150, 'wall_saved': 100, 'mono_now': 5, 'mono_saved': 20, 'boot_now': 'b', 'boot_saved': 'a', 'paused': False, 'budget': 20}), [0, True, 30, 5, -45])
check('fixture 4', solve({'wall_now': 130, 'wall_saved': 100, 'mono_now': 50, 'mono_saved': 20, 'boot_now': 'a', 'boot_saved': 'a', 'paused': True, 'budget': 0}), [0, False, 0, None, 50])
check('fixture 5', solve({'wall_now': 140, 'wall_saved': 100, 'mono_now': 60, 'mono_saved': 20, 'boot_now': 'a', 'boot_saved': 'a', 'paused': False, 'budget': 100}), [60, False, 0, 120, 20])
check('fixture 6', solve({'wall_now': 90, 'wall_saved': 100, 'mono_now': -5, 'mono_saved': -20, 'boot_now': 'a', 'boot_saved': 'a', 'paused': False, 'budget': 20}), [5, False, 0, 0, -20])
check('fixture 7', solve({'wall_now': 101, 'wall_saved': 100, 'mono_now': 0, 'mono_saved': 0, 'boot_now': 'c', 'boot_saved': 'a', 'paused': False, 'budget': 0}), [0, True, 1, 0, -1])
check('fixture 8', solve({'wall_now': 100, 'wall_saved': 100, 'mono_now': 20, 'mono_saved': 20, 'boot_now': 'a', 'boot_saved': 'a', 'paused': True, 'budget': 10}), [10, False, 0, None, 20])
check('fixture 9', solve({'wall_now': 105, 'wall_saved': 100, 'mono_now': 24, 'mono_saved': 20, 'boot_now': 'a', 'boot_saved': 'a', 'paused': False, 'budget': 3}), [0, True, 1, 24, 20])
check('fixture 10', solve({'wall_now': 80, 'wall_saved': 100, 'mono_now': -10, 'mono_saved': -20, 'boot_now': 'a', 'boot_saved': 'a', 'paused': False, 'budget': 0}), [0, True, 10, -10, -20])
variant = [({'wall_now': 130, 'wall_saved': 100, 'mono_now': 50, 'mono_saved': 20, 'boot_now': 'a', 'boot_saved': 'a', 'paused': False, 'budget': 31}, [1, False, 0, 51, 20]), ({'wall_now': 130, 'wall_saved': 100, 'mono_now': 50, 'mono_saved': 20, 'boot_now': 'a', 'boot_saved': 'a', 'paused': False, 'budget': 32}, [2, False, 0, 52, 20]), ({'wall_now': 130, 'wall_saved': 100, 'mono_now': 50, 'mono_saved': 20, 'boot_now': 'a', 'boot_saved': 'a', 'paused': False, 'budget': 33}, [3, False, 0, 53, 20]), ({'wall_now': 130, 'wall_saved': 100, 'mono_now': 50, 'mono_saved': 20, 'boot_now': 'a', 'boot_saved': 'a', 'paused': False, 'budget': 34}, [4, False, 0, 54, 20]), ({'wall_now': 130, 'wall_saved': 100, 'mono_now': 50, 'mono_saved': 20, 'boot_now': 'a', 'boot_saved': 'a', 'paused': False, 'budget': 35}, [5, False, 0, 55, 20])]
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 elapsed.

A checkpoint stores wall and monotonic coordinates, boot identity, budget and pause state. Same-boot restore uses monotonic elapsed; reboot restore uses nonnegative wall elapsed. Paused timers consume no elapsed ticks. Return remaining budget, expiration flag, overdue ticks, current-domain deadline (None while paused), and reconstructed running base. All units are identical integer ticks.

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):
    wall_delta = r['wall_now'] - r['wall_saved']
    mono_delta = r['mono_now'] - r['mono_saved']
    reboot = r['boot_now'] != r['boot_saved']
    elapsed = max(0, wall_delta if reboot else mono_delta)
    consumed = elapsed
    remaining = max(0, r['budget'] - consumed)
    expired = not r['paused'] and consumed >= r['budget']
    overdue = max(0, consumed - r['budget'])
    deadline = None if r['paused'] else r['mono_now'] + remaining
    base = r['mono_now'] - consumed
    return [remaining,expired,overdue,deadline,base]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve({'wall_now': 130, 'wall_saved': 100, 'mono_now': 50, 'mono_saved': 20, 'boot_now': 'a', 'boot_saved': 'a', 'paused': False, 'budget': 30}), [0, True, 0, 50, 20])
check('fixture 2', solve({'wall_now': 90, 'wall_saved': 100, 'mono_now': 5, 'mono_saved': 20, 'boot_now': 'b', 'boot_saved': 'a', 'paused': False, 'budget': 10}), [10, False, 0, 15, 5])
check('fixture 3', solve({'wall_now': 150, 'wall_saved': 100, 'mono_now': 5, 'mono_saved': 20, 'boot_now': 'b', 'boot_saved': 'a', 'paused': False, 'budget': 20}), [0, True, 30, 5, -45])
check('fixture 4', solve({'wall_now': 130, 'wall_saved': 100, 'mono_now': 50, 'mono_saved': 20, 'boot_now': 'a', 'boot_saved': 'a', 'paused': True, 'budget': 0}), [0, False, 0, None, 50])
check('fixture 5', solve({'wall_now': 140, 'wall_saved': 100, 'mono_now': 60, 'mono_saved': 20, 'boot_now': 'a', 'boot_saved': 'a', 'paused': False, 'budget': 100}), [60, False, 0, 120, 20])
check('fixture 6', solve({'wall_now': 90, 'wall_saved': 100, 'mono_now': -5, 'mono_saved': -20, 'boot_now': 'a', 'boot_saved': 'a', 'paused': False, 'budget': 20}), [5, False, 0, 0, -20])
check('fixture 7', solve({'wall_now': 101, 'wall_saved': 100, 'mono_now': 0, 'mono_saved': 0, 'boot_now': 'c', 'boot_saved': 'a', 'paused': False, 'budget': 0}), [0, True, 1, 0, -1])
check('fixture 8', solve({'wall_now': 100, 'wall_saved': 100, 'mono_now': 20, 'mono_saved': 20, 'boot_now': 'a', 'boot_saved': 'a', 'paused': True, 'budget': 10}), [10, False, 0, None, 20])
check('fixture 9', solve({'wall_now': 105, 'wall_saved': 100, 'mono_now': 24, 'mono_saved': 20, 'boot_now': 'a', 'boot_saved': 'a', 'paused': False, 'budget': 3}), [0, True, 1, 24, 20])
check('fixture 10', solve({'wall_now': 80, 'wall_saved': 100, 'mono_now': -10, 'mono_saved': -20, 'boot_now': 'a', 'boot_saved': 'a', 'paused': False, 'budget': 0}), [0, True, 10, -10, -20])
variant = [({'wall_now': 130, 'wall_saved': 100, 'mono_now': 50, 'mono_saved': 20, 'boot_now': 'a', 'boot_saved': 'a', 'paused': False, 'budget': 31}, [1, False, 0, 51, 20]), ({'wall_now': 130, 'wall_saved': 100, 'mono_now': 50, 'mono_saved': 20, 'boot_now': 'a', 'boot_saved': 'a', 'paused': False, 'budget': 32}, [2, False, 0, 52, 20]), ({'wall_now': 130, 'wall_saved': 100, 'mono_now': 50, 'mono_saved': 20, 'boot_now': 'a', 'boot_saved': 'a', 'paused': False, 'budget': 33}, [3, False, 0, 53, 20]), ({'wall_now': 130, 'wall_saved': 100, 'mono_now': 50, 'mono_saved': 20, 'boot_now': 'a', 'boot_saved': 'a', 'paused': False, 'budget': 34}, [4, False, 0, 54, 20]), ({'wall_now': 130, 'wall_saved': 100, 'mono_now': 50, 'mono_saved': 20, 'boot_now': 'a', 'boot_saved': 'a', 'paused': False, 'budget': 35}, [5, False, 0, 55, 20])]
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):
    wall_delta = r['wall_now'] - r['wall_saved']
    mono_delta = r['mono_now'] - r['mono_saved']
    reboot = r['boot_now'] != r['boot_saved']
    elapsed = max(0, wall_delta if reboot else mono_delta)
    consumed = 0 if not r['paused'] else elapsed
    remaining = max(0, r['budget'] - consumed)
    expired = not r['paused'] and consumed >= r['budget']
    overdue = max(0, consumed - r['budget'])
    deadline = None if r['paused'] else r['mono_now'] + remaining
    base = r['mono_now'] - consumed
    return [remaining,expired,overdue,deadline,base]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve({'wall_now': 130, 'wall_saved': 100, 'mono_now': 50, 'mono_saved': 20, 'boot_now': 'a', 'boot_saved': 'a', 'paused': False, 'budget': 30}), [0, True, 0, 50, 20])
check('fixture 2', solve({'wall_now': 90, 'wall_saved': 100, 'mono_now': 5, 'mono_saved': 20, 'boot_now': 'b', 'boot_saved': 'a', 'paused': False, 'budget': 10}), [10, False, 0, 15, 5])
check('fixture 3', solve({'wall_now': 150, 'wall_saved': 100, 'mono_now': 5, 'mono_saved': 20, 'boot_now': 'b', 'boot_saved': 'a', 'paused': False, 'budget': 20}), [0, True, 30, 5, -45])
check('fixture 4', solve({'wall_now': 130, 'wall_saved': 100, 'mono_now': 50, 'mono_saved': 20, 'boot_now': 'a', 'boot_saved': 'a', 'paused': True, 'budget': 0}), [0, False, 0, None, 50])
check('fixture 5', solve({'wall_now': 140, 'wall_saved': 100, 'mono_now': 60, 'mono_saved': 20, 'boot_now': 'a', 'boot_saved': 'a', 'paused': False, 'budget': 100}), [60, False, 0, 120, 20])
check('fixture 6', solve({'wall_now': 90, 'wall_saved': 100, 'mono_now': -5, 'mono_saved': -20, 'boot_now': 'a', 'boot_saved': 'a', 'paused': False, 'budget': 20}), [5, False, 0, 0, -20])
check('fixture 7', solve({'wall_now': 101, 'wall_saved': 100, 'mono_now': 0, 'mono_saved': 0, 'boot_now': 'c', 'boot_saved': 'a', 'paused': False, 'budget': 0}), [0, True, 1, 0, -1])
check('fixture 8', solve({'wall_now': 100, 'wall_saved': 100, 'mono_now': 20, 'mono_saved': 20, 'boot_now': 'a', 'boot_saved': 'a', 'paused': True, 'budget': 10}), [10, False, 0, None, 20])
check('fixture 9', solve({'wall_now': 105, 'wall_saved': 100, 'mono_now': 24, 'mono_saved': 20, 'boot_now': 'a', 'boot_saved': 'a', 'paused': False, 'budget': 3}), [0, True, 1, 24, 20])
check('fixture 10', solve({'wall_now': 80, 'wall_saved': 100, 'mono_now': -10, 'mono_saved': -20, 'boot_now': 'a', 'boot_saved': 'a', 'paused': False, 'budget': 0}), [0, True, 10, -10, -20])
variant = [({'wall_now': 130, 'wall_saved': 100, 'mono_now': 50, 'mono_saved': 20, 'boot_now': 'a', 'boot_saved': 'a', 'paused': False, 'budget': 31}, [1, False, 0, 51, 20]), ({'wall_now': 130, 'wall_saved': 100, 'mono_now': 50, 'mono_saved': 20, 'boot_now': 'a', 'boot_saved': 'a', 'paused': False, 'budget': 32}, [2, False, 0, 52, 20]), ({'wall_now': 130, 'wall_saved': 100, 'mono_now': 50, 'mono_saved': 20, 'boot_now': 'a', 'boot_saved': 'a', 'paused': False, 'budget': 33}, [3, False, 0, 53, 20]), ({'wall_now': 130, 'wall_saved': 100, 'mono_now': 50, 'mono_saved': 20, 'boot_now': 'a', 'boot_saved': 'a', 'paused': False, 'budget': 34}, [4, False, 0, 54, 20]), ({'wall_now': 130, 'wall_saved': 100, 'mono_now': 50, 'mono_saved': 20, 'boot_now': 'a', 'boot_saved': 'a', 'paused': False, 'budget': 35}, [5, False, 0, 55, 20])]
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 consumed.

A checkpoint stores wall and monotonic coordinates, boot identity, budget and pause state. Same-boot restore uses monotonic elapsed; reboot restore uses nonnegative wall elapsed. Paused timers consume no elapsed ticks. Return remaining budget, expiration flag, overdue ticks, current-domain deadline (None while paused), and reconstructed running base. All units are identical integer ticks.

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):
    wall_delta = r['wall_now'] - r['wall_saved']
    mono_delta = r['mono_now'] - r['mono_saved']
    reboot = r['boot_now'] != r['boot_saved']
    elapsed = max(0, wall_delta if reboot else mono_delta)
    consumed = 0 if r['paused'] else elapsed
    remaining = r['budget'] - consumed
    expired = not r['paused'] and consumed >= r['budget']
    overdue = max(0, consumed - r['budget'])
    deadline = None if r['paused'] else r['mono_now'] + remaining
    base = r['mono_now'] - consumed
    return [remaining,expired,overdue,deadline,base]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve({'wall_now': 130, 'wall_saved': 100, 'mono_now': 50, 'mono_saved': 20, 'boot_now': 'a', 'boot_saved': 'a', 'paused': False, 'budget': 30}), [0, True, 0, 50, 20])
check('fixture 2', solve({'wall_now': 90, 'wall_saved': 100, 'mono_now': 5, 'mono_saved': 20, 'boot_now': 'b', 'boot_saved': 'a', 'paused': False, 'budget': 10}), [10, False, 0, 15, 5])
check('fixture 3', solve({'wall_now': 150, 'wall_saved': 100, 'mono_now': 5, 'mono_saved': 20, 'boot_now': 'b', 'boot_saved': 'a', 'paused': False, 'budget': 20}), [0, True, 30, 5, -45])
check('fixture 4', solve({'wall_now': 130, 'wall_saved': 100, 'mono_now': 50, 'mono_saved': 20, 'boot_now': 'a', 'boot_saved': 'a', 'paused': True, 'budget': 0}), [0, False, 0, None, 50])
check('fixture 5', solve({'wall_now': 140, 'wall_saved': 100, 'mono_now': 60, 'mono_saved': 20, 'boot_now': 'a', 'boot_saved': 'a', 'paused': False, 'budget': 100}), [60, False, 0, 120, 20])
check('fixture 6', solve({'wall_now': 90, 'wall_saved': 100, 'mono_now': -5, 'mono_saved': -20, 'boot_now': 'a', 'boot_saved': 'a', 'paused': False, 'budget': 20}), [5, False, 0, 0, -20])
check('fixture 7', solve({'wall_now': 101, 'wall_saved': 100, 'mono_now': 0, 'mono_saved': 0, 'boot_now': 'c', 'boot_saved': 'a', 'paused': False, 'budget': 0}), [0, True, 1, 0, -1])
check('fixture 8', solve({'wall_now': 100, 'wall_saved': 100, 'mono_now': 20, 'mono_saved': 20, 'boot_now': 'a', 'boot_saved': 'a', 'paused': True, 'budget': 10}), [10, False, 0, None, 20])
check('fixture 9', solve({'wall_now': 105, 'wall_saved': 100, 'mono_now': 24, 'mono_saved': 20, 'boot_now': 'a', 'boot_saved': 'a', 'paused': False, 'budget': 3}), [0, True, 1, 24, 20])
check('fixture 10', solve({'wall_now': 80, 'wall_saved': 100, 'mono_now': -10, 'mono_saved': -20, 'boot_now': 'a', 'boot_saved': 'a', 'paused': False, 'budget': 0}), [0, True, 10, -10, -20])
variant = [({'wall_now': 130, 'wall_saved': 100, 'mono_now': 50, 'mono_saved': 20, 'boot_now': 'a', 'boot_saved': 'a', 'paused': False, 'budget': 31}, [1, False, 0, 51, 20]), ({'wall_now': 130, 'wall_saved': 100, 'mono_now': 50, 'mono_saved': 20, 'boot_now': 'a', 'boot_saved': 'a', 'paused': False, 'budget': 32}, [2, False, 0, 52, 20]), ({'wall_now': 130, 'wall_saved': 100, 'mono_now': 50, 'mono_saved': 20, 'boot_now': 'a', 'boot_saved': 'a', 'paused': False, 'budget': 33}, [3, False, 0, 53, 20]), ({'wall_now': 130, 'wall_saved': 100, 'mono_now': 50, 'mono_saved': 20, 'boot_now': 'a', 'boot_saved': 'a', 'paused': False, 'budget': 34}, [4, False, 0, 54, 20]), ({'wall_now': 130, 'wall_saved': 100, 'mono_now': 50, 'mono_saved': 20, 'boot_now': 'a', 'boot_saved': 'a', 'paused': False, 'budget': 35}, [5, False, 0, 55, 20])]
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):
    wall_delta = r['wall_now'] - r['wall_saved']
    mono_delta = r['mono_now'] - r['mono_saved']
    reboot = r['boot_now'] != r['boot_saved']
    elapsed = max(0, wall_delta if reboot else mono_delta)
    consumed = 0 if r['paused'] else elapsed
    remaining = abs(r['budget'] - consumed)
    expired = not r['paused'] and consumed >= r['budget']
    overdue = max(0, consumed - r['budget'])
    deadline = None if r['paused'] else r['mono_now'] + remaining
    base = r['mono_now'] - consumed
    return [remaining,expired,overdue,deadline,base]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve({'wall_now': 130, 'wall_saved': 100, 'mono_now': 50, 'mono_saved': 20, 'boot_now': 'a', 'boot_saved': 'a', 'paused': False, 'budget': 30}), [0, True, 0, 50, 20])
check('fixture 2', solve({'wall_now': 90, 'wall_saved': 100, 'mono_now': 5, 'mono_saved': 20, 'boot_now': 'b', 'boot_saved': 'a', 'paused': False, 'budget': 10}), [10, False, 0, 15, 5])
check('fixture 3', solve({'wall_now': 150, 'wall_saved': 100, 'mono_now': 5, 'mono_saved': 20, 'boot_now': 'b', 'boot_saved': 'a', 'paused': False, 'budget': 20}), [0, True, 30, 5, -45])
check('fixture 4', solve({'wall_now': 130, 'wall_saved': 100, 'mono_now': 50, 'mono_saved': 20, 'boot_now': 'a', 'boot_saved': 'a', 'paused': True, 'budget': 0}), [0, False, 0, None, 50])
check('fixture 5', solve({'wall_now': 140, 'wall_saved': 100, 'mono_now': 60, 'mono_saved': 20, 'boot_now': 'a', 'boot_saved': 'a', 'paused': False, 'budget': 100}), [60, False, 0, 120, 20])
check('fixture 6', solve({'wall_now': 90, 'wall_saved': 100, 'mono_now': -5, 'mono_saved': -20, 'boot_now': 'a', 'boot_saved': 'a', 'paused': False, 'budget': 20}), [5, False, 0, 0, -20])
check('fixture 7', solve({'wall_now': 101, 'wall_saved': 100, 'mono_now': 0, 'mono_saved': 0, 'boot_now': 'c', 'boot_saved': 'a', 'paused': False, 'budget': 0}), [0, True, 1, 0, -1])
check('fixture 8', solve({'wall_now': 100, 'wall_saved': 100, 'mono_now': 20, 'mono_saved': 20, 'boot_now': 'a', 'boot_saved': 'a', 'paused': True, 'budget': 10}), [10, False, 0, None, 20])
check('fixture 9', solve({'wall_now': 105, 'wall_saved': 100, 'mono_now': 24, 'mono_saved': 20, 'boot_now': 'a', 'boot_saved': 'a', 'paused': False, 'budget': 3}), [0, True, 1, 24, 20])
check('fixture 10', solve({'wall_now': 80, 'wall_saved': 100, 'mono_now': -10, 'mono_saved': -20, 'boot_now': 'a', 'boot_saved': 'a', 'paused': False, 'budget': 0}), [0, True, 10, -10, -20])
variant = [({'wall_now': 130, 'wall_saved': 100, 'mono_now': 50, 'mono_saved': 20, 'boot_now': 'a', 'boot_saved': 'a', 'paused': False, 'budget': 31}, [1, False, 0, 51, 20]), ({'wall_now': 130, 'wall_saved': 100, 'mono_now': 50, 'mono_saved': 20, 'boot_now': 'a', 'boot_saved': 'a', 'paused': False, 'budget': 32}, [2, False, 0, 52, 20]), ({'wall_now': 130, 'wall_saved': 100, 'mono_now': 50, 'mono_saved': 20, 'boot_now': 'a', 'boot_saved': 'a', 'paused': False, 'budget': 33}, [3, False, 0, 53, 20]), ({'wall_now': 130, 'wall_saved': 100, 'mono_now': 50, 'mono_saved': 20, 'boot_now': 'a', 'boot_saved': 'a', 'paused': False, 'budget': 34}, [4, False, 0, 54, 20]), ({'wall_now': 130, 'wall_saved': 100, 'mono_now': 50, 'mono_saved': 20, 'boot_now': 'a', 'boot_saved': 'a', 'paused': False, 'budget': 35}, [5, False, 0, 55, 20])]
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 remaining.

A checkpoint stores wall and monotonic coordinates, boot identity, budget and pause state. Same-boot restore uses monotonic elapsed; reboot restore uses nonnegative wall elapsed. Paused timers consume no elapsed ticks. Return remaining budget, expiration flag, overdue ticks, current-domain deadline (None while paused), and reconstructed running base. All units are identical integer ticks.

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):
    wall_delta = r['wall_now'] - r['wall_saved']
    mono_delta = r['mono_now'] - r['mono_saved']
    reboot = r['boot_now'] != r['boot_saved']
    elapsed = max(0, wall_delta if reboot else mono_delta)
    consumed = 0 if r['paused'] else elapsed
    remaining = max(0, r['budget'] - consumed)
    expired = consumed > r['budget']
    overdue = max(0, consumed - r['budget'])
    deadline = None if r['paused'] else r['mono_now'] + remaining
    base = r['mono_now'] - consumed
    return [remaining,expired,overdue,deadline,base]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve({'wall_now': 130, 'wall_saved': 100, 'mono_now': 50, 'mono_saved': 20, 'boot_now': 'a', 'boot_saved': 'a', 'paused': False, 'budget': 30}), [0, True, 0, 50, 20])
check('fixture 2', solve({'wall_now': 90, 'wall_saved': 100, 'mono_now': 5, 'mono_saved': 20, 'boot_now': 'b', 'boot_saved': 'a', 'paused': False, 'budget': 10}), [10, False, 0, 15, 5])
check('fixture 3', solve({'wall_now': 150, 'wall_saved': 100, 'mono_now': 5, 'mono_saved': 20, 'boot_now': 'b', 'boot_saved': 'a', 'paused': False, 'budget': 20}), [0, True, 30, 5, -45])
check('fixture 4', solve({'wall_now': 130, 'wall_saved': 100, 'mono_now': 50, 'mono_saved': 20, 'boot_now': 'a', 'boot_saved': 'a', 'paused': True, 'budget': 0}), [0, False, 0, None, 50])
check('fixture 5', solve({'wall_now': 140, 'wall_saved': 100, 'mono_now': 60, 'mono_saved': 20, 'boot_now': 'a', 'boot_saved': 'a', 'paused': False, 'budget': 100}), [60, False, 0, 120, 20])
check('fixture 6', solve({'wall_now': 90, 'wall_saved': 100, 'mono_now': -5, 'mono_saved': -20, 'boot_now': 'a', 'boot_saved': 'a', 'paused': False, 'budget': 20}), [5, False, 0, 0, -20])
check('fixture 7', solve({'wall_now': 101, 'wall_saved': 100, 'mono_now': 0, 'mono_saved': 0, 'boot_now': 'c', 'boot_saved': 'a', 'paused': False, 'budget': 0}), [0, True, 1, 0, -1])
check('fixture 8', solve({'wall_now': 100, 'wall_saved': 100, 'mono_now': 20, 'mono_saved': 20, 'boot_now': 'a', 'boot_saved': 'a', 'paused': True, 'budget': 10}), [10, False, 0, None, 20])
check('fixture 9', solve({'wall_now': 105, 'wall_saved': 100, 'mono_now': 24, 'mono_saved': 20, 'boot_now': 'a', 'boot_saved': 'a', 'paused': False, 'budget': 3}), [0, True, 1, 24, 20])
check('fixture 10', solve({'wall_now': 80, 'wall_saved': 100, 'mono_now': -10, 'mono_saved': -20, 'boot_now': 'a', 'boot_saved': 'a', 'paused': False, 'budget': 0}), [0, True, 10, -10, -20])
variant = [({'wall_now': 130, 'wall_saved': 100, 'mono_now': 50, 'mono_saved': 20, 'boot_now': 'a', 'boot_saved': 'a', 'paused': False, 'budget': 31}, [1, False, 0, 51, 20]), ({'wall_now': 130, 'wall_saved': 100, 'mono_now': 50, 'mono_saved': 20, 'boot_now': 'a', 'boot_saved': 'a', 'paused': False, 'budget': 32}, [2, False, 0, 52, 20]), ({'wall_now': 130, 'wall_saved': 100, 'mono_now': 50, 'mono_saved': 20, 'boot_now': 'a', 'boot_saved': 'a', 'paused': False, 'budget': 33}, [3, False, 0, 53, 20]), ({'wall_now': 130, 'wall_saved': 100, 'mono_now': 50, 'mono_saved': 20, 'boot_now': 'a', 'boot_saved': 'a', 'paused': False, 'budget': 34}, [4, False, 0, 54, 20]), ({'wall_now': 130, 'wall_saved': 100, 'mono_now': 50, 'mono_saved': 20, 'boot_now': 'a', 'boot_saved': 'a', 'paused': False, 'budget': 35}, [5, False, 0, 55, 20])]
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):
    wall_delta = r['wall_now'] - r['wall_saved']
    mono_delta = r['mono_now'] - r['mono_saved']
    reboot = r['boot_now'] != r['boot_saved']
    elapsed = max(0, wall_delta if reboot else mono_delta)
    consumed = 0 if r['paused'] else elapsed
    remaining = max(0, r['budget'] - consumed)
    expired = consumed >= r['budget']
    overdue = max(0, consumed - r['budget'])
    deadline = None if r['paused'] else r['mono_now'] + remaining
    base = r['mono_now'] - consumed
    return [remaining,expired,overdue,deadline,base]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve({'wall_now': 130, 'wall_saved': 100, 'mono_now': 50, 'mono_saved': 20, 'boot_now': 'a', 'boot_saved': 'a', 'paused': False, 'budget': 30}), [0, True, 0, 50, 20])
check('fixture 2', solve({'wall_now': 90, 'wall_saved': 100, 'mono_now': 5, 'mono_saved': 20, 'boot_now': 'b', 'boot_saved': 'a', 'paused': False, 'budget': 10}), [10, False, 0, 15, 5])
check('fixture 3', solve({'wall_now': 150, 'wall_saved': 100, 'mono_now': 5, 'mono_saved': 20, 'boot_now': 'b', 'boot_saved': 'a', 'paused': False, 'budget': 20}), [0, True, 30, 5, -45])
check('fixture 4', solve({'wall_now': 130, 'wall_saved': 100, 'mono_now': 50, 'mono_saved': 20, 'boot_now': 'a', 'boot_saved': 'a', 'paused': True, 'budget': 0}), [0, False, 0, None, 50])
check('fixture 5', solve({'wall_now': 140, 'wall_saved': 100, 'mono_now': 60, 'mono_saved': 20, 'boot_now': 'a', 'boot_saved': 'a', 'paused': False, 'budget': 100}), [60, False, 0, 120, 20])
check('fixture 6', solve({'wall_now': 90, 'wall_saved': 100, 'mono_now': -5, 'mono_saved': -20, 'boot_now': 'a', 'boot_saved': 'a', 'paused': False, 'budget': 20}), [5, False, 0, 0, -20])
check('fixture 7', solve({'wall_now': 101, 'wall_saved': 100, 'mono_now': 0, 'mono_saved': 0, 'boot_now': 'c', 'boot_saved': 'a', 'paused': False, 'budget': 0}), [0, True, 1, 0, -1])
check('fixture 8', solve({'wall_now': 100, 'wall_saved': 100, 'mono_now': 20, 'mono_saved': 20, 'boot_now': 'a', 'boot_saved': 'a', 'paused': True, 'budget': 10}), [10, False, 0, None, 20])
check('fixture 9', solve({'wall_now': 105, 'wall_saved': 100, 'mono_now': 24, 'mono_saved': 20, 'boot_now': 'a', 'boot_saved': 'a', 'paused': False, 'budget': 3}), [0, True, 1, 24, 20])
check('fixture 10', solve({'wall_now': 80, 'wall_saved': 100, 'mono_now': -10, 'mono_saved': -20, 'boot_now': 'a', 'boot_saved': 'a', 'paused': False, 'budget': 0}), [0, True, 10, -10, -20])
variant = [({'wall_now': 130, 'wall_saved': 100, 'mono_now': 50, 'mono_saved': 20, 'boot_now': 'a', 'boot_saved': 'a', 'paused': False, 'budget': 31}, [1, False, 0, 51, 20]), ({'wall_now': 130, 'wall_saved': 100, 'mono_now': 50, 'mono_saved': 20, 'boot_now': 'a', 'boot_saved': 'a', 'paused': False, 'budget': 32}, [2, False, 0, 52, 20]), ({'wall_now': 130, 'wall_saved': 100, 'mono_now': 50, 'mono_saved': 20, 'boot_now': 'a', 'boot_saved': 'a', 'paused': False, 'budget': 33}, [3, False, 0, 53, 20]), ({'wall_now': 130, 'wall_saved': 100, 'mono_now': 50, 'mono_saved': 20, 'boot_now': 'a', 'boot_saved': 'a', 'paused': False, 'budget': 34}, [4, False, 0, 54, 20]), ({'wall_now': 130, 'wall_saved': 100, 'mono_now': 50, 'mono_saved': 20, 'boot_now': 'a', 'boot_saved': 'a', 'paused': False, 'budget': 35}, [5, False, 0, 55, 20])]
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 expired.

A checkpoint stores wall and monotonic coordinates, boot identity, budget and pause state. Same-boot restore uses monotonic elapsed; reboot restore uses nonnegative wall elapsed. Paused timers consume no elapsed ticks. Return remaining budget, expiration flag, overdue ticks, current-domain deadline (None while paused), and reconstructed running base. All units are identical integer ticks.

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):
    wall_delta = r['wall_now'] - r['wall_saved']
    mono_delta = r['mono_now'] - r['mono_saved']
    reboot = r['boot_now'] != r['boot_saved']
    elapsed = max(0, wall_delta if reboot else mono_delta)
    consumed = 0 if r['paused'] else elapsed
    remaining = max(0, r['budget'] - consumed)
    expired = not r['paused'] and consumed >= r['budget']
    overdue = max(0, r['budget'] - consumed)
    deadline = None if r['paused'] else r['mono_now'] + remaining
    base = r['mono_now'] - consumed
    return [remaining,expired,overdue,deadline,base]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve({'wall_now': 130, 'wall_saved': 100, 'mono_now': 50, 'mono_saved': 20, 'boot_now': 'a', 'boot_saved': 'a', 'paused': False, 'budget': 30}), [0, True, 0, 50, 20])
check('fixture 2', solve({'wall_now': 90, 'wall_saved': 100, 'mono_now': 5, 'mono_saved': 20, 'boot_now': 'b', 'boot_saved': 'a', 'paused': False, 'budget': 10}), [10, False, 0, 15, 5])
check('fixture 3', solve({'wall_now': 150, 'wall_saved': 100, 'mono_now': 5, 'mono_saved': 20, 'boot_now': 'b', 'boot_saved': 'a', 'paused': False, 'budget': 20}), [0, True, 30, 5, -45])
check('fixture 4', solve({'wall_now': 130, 'wall_saved': 100, 'mono_now': 50, 'mono_saved': 20, 'boot_now': 'a', 'boot_saved': 'a', 'paused': True, 'budget': 0}), [0, False, 0, None, 50])
check('fixture 5', solve({'wall_now': 140, 'wall_saved': 100, 'mono_now': 60, 'mono_saved': 20, 'boot_now': 'a', 'boot_saved': 'a', 'paused': False, 'budget': 100}), [60, False, 0, 120, 20])
check('fixture 6', solve({'wall_now': 90, 'wall_saved': 100, 'mono_now': -5, 'mono_saved': -20, 'boot_now': 'a', 'boot_saved': 'a', 'paused': False, 'budget': 20}), [5, False, 0, 0, -20])
check('fixture 7', solve({'wall_now': 101, 'wall_saved': 100, 'mono_now': 0, 'mono_saved': 0, 'boot_now': 'c', 'boot_saved': 'a', 'paused': False, 'budget': 0}), [0, True, 1, 0, -1])
check('fixture 8', solve({'wall_now': 100, 'wall_saved': 100, 'mono_now': 20, 'mono_saved': 20, 'boot_now': 'a', 'boot_saved': 'a', 'paused': True, 'budget': 10}), [10, False, 0, None, 20])
check('fixture 9', solve({'wall_now': 105, 'wall_saved': 100, 'mono_now': 24, 'mono_saved': 20, 'boot_now': 'a', 'boot_saved': 'a', 'paused': False, 'budget': 3}), [0, True, 1, 24, 20])
check('fixture 10', solve({'wall_now': 80, 'wall_saved': 100, 'mono_now': -10, 'mono_saved': -20, 'boot_now': 'a', 'boot_saved': 'a', 'paused': False, 'budget': 0}), [0, True, 10, -10, -20])
variant = [({'wall_now': 130, 'wall_saved': 100, 'mono_now': 50, 'mono_saved': 20, 'boot_now': 'a', 'boot_saved': 'a', 'paused': False, 'budget': 31}, [1, False, 0, 51, 20]), ({'wall_now': 130, 'wall_saved': 100, 'mono_now': 50, 'mono_saved': 20, 'boot_now': 'a', 'boot_saved': 'a', 'paused': False, 'budget': 32}, [2, False, 0, 52, 20]), ({'wall_now': 130, 'wall_saved': 100, 'mono_now': 50, 'mono_saved': 20, 'boot_now': 'a', 'boot_saved': 'a', 'paused': False, 'budget': 33}, [3, False, 0, 53, 20]), ({'wall_now': 130, 'wall_saved': 100, 'mono_now': 50, 'mono_saved': 20, 'boot_now': 'a', 'boot_saved': 'a', 'paused': False, 'budget': 34}, [4, False, 0, 54, 20]), ({'wall_now': 130, 'wall_saved': 100, 'mono_now': 50, 'mono_saved': 20, 'boot_now': 'a', 'boot_saved': 'a', 'paused': False, 'budget': 35}, [5, False, 0, 55, 20])]
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):
    wall_delta = r['wall_now'] - r['wall_saved']
    mono_delta = r['mono_now'] - r['mono_saved']
    reboot = r['boot_now'] != r['boot_saved']
    elapsed = max(0, wall_delta if reboot else mono_delta)
    consumed = 0 if r['paused'] else elapsed
    remaining = max(0, r['budget'] - consumed)
    expired = not r['paused'] and consumed >= r['budget']
    overdue = consumed
    deadline = None if r['paused'] else r['mono_now'] + remaining
    base = r['mono_now'] - consumed
    return [remaining,expired,overdue,deadline,base]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve({'wall_now': 130, 'wall_saved': 100, 'mono_now': 50, 'mono_saved': 20, 'boot_now': 'a', 'boot_saved': 'a', 'paused': False, 'budget': 30}), [0, True, 0, 50, 20])
check('fixture 2', solve({'wall_now': 90, 'wall_saved': 100, 'mono_now': 5, 'mono_saved': 20, 'boot_now': 'b', 'boot_saved': 'a', 'paused': False, 'budget': 10}), [10, False, 0, 15, 5])
check('fixture 3', solve({'wall_now': 150, 'wall_saved': 100, 'mono_now': 5, 'mono_saved': 20, 'boot_now': 'b', 'boot_saved': 'a', 'paused': False, 'budget': 20}), [0, True, 30, 5, -45])
check('fixture 4', solve({'wall_now': 130, 'wall_saved': 100, 'mono_now': 50, 'mono_saved': 20, 'boot_now': 'a', 'boot_saved': 'a', 'paused': True, 'budget': 0}), [0, False, 0, None, 50])
check('fixture 5', solve({'wall_now': 140, 'wall_saved': 100, 'mono_now': 60, 'mono_saved': 20, 'boot_now': 'a', 'boot_saved': 'a', 'paused': False, 'budget': 100}), [60, False, 0, 120, 20])
check('fixture 6', solve({'wall_now': 90, 'wall_saved': 100, 'mono_now': -5, 'mono_saved': -20, 'boot_now': 'a', 'boot_saved': 'a', 'paused': False, 'budget': 20}), [5, False, 0, 0, -20])
check('fixture 7', solve({'wall_now': 101, 'wall_saved': 100, 'mono_now': 0, 'mono_saved': 0, 'boot_now': 'c', 'boot_saved': 'a', 'paused': False, 'budget': 0}), [0, True, 1, 0, -1])
check('fixture 8', solve({'wall_now': 100, 'wall_saved': 100, 'mono_now': 20, 'mono_saved': 20, 'boot_now': 'a', 'boot_saved': 'a', 'paused': True, 'budget': 10}), [10, False, 0, None, 20])
check('fixture 9', solve({'wall_now': 105, 'wall_saved': 100, 'mono_now': 24, 'mono_saved': 20, 'boot_now': 'a', 'boot_saved': 'a', 'paused': False, 'budget': 3}), [0, True, 1, 24, 20])
check('fixture 10', solve({'wall_now': 80, 'wall_saved': 100, 'mono_now': -10, 'mono_saved': -20, 'boot_now': 'a', 'boot_saved': 'a', 'paused': False, 'budget': 0}), [0, True, 10, -10, -20])
variant = [({'wall_now': 130, 'wall_saved': 100, 'mono_now': 50, 'mono_saved': 20, 'boot_now': 'a', 'boot_saved': 'a', 'paused': False, 'budget': 31}, [1, False, 0, 51, 20]), ({'wall_now': 130, 'wall_saved': 100, 'mono_now': 50, 'mono_saved': 20, 'boot_now': 'a', 'boot_saved': 'a', 'paused': False, 'budget': 32}, [2, False, 0, 52, 20]), ({'wall_now': 130, 'wall_saved': 100, 'mono_now': 50, 'mono_saved': 20, 'boot_now': 'a', 'boot_saved': 'a', 'paused': False, 'budget': 33}, [3, False, 0, 53, 20]), ({'wall_now': 130, 'wall_saved': 100, 'mono_now': 50, 'mono_saved': 20, 'boot_now': 'a', 'boot_saved': 'a', 'paused': False, 'budget': 34}, [4, False, 0, 54, 20]), ({'wall_now': 130, 'wall_saved': 100, 'mono_now': 50, 'mono_saved': 20, 'boot_now': 'a', 'boot_saved': 'a', 'paused': False, 'budget': 35}, [5, False, 0, 55, 20])]
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 overdue.

A checkpoint stores wall and monotonic coordinates, boot identity, budget and pause state. Same-boot restore uses monotonic elapsed; reboot restore uses nonnegative wall elapsed. Paused timers consume no elapsed ticks. Return remaining budget, expiration flag, overdue ticks, current-domain deadline (None while paused), and reconstructed running base. All units are identical integer ticks.

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):
    wall_delta = r['wall_now'] - r['wall_saved']
    mono_delta = r['mono_now'] - r['mono_saved']
    reboot = r['boot_now'] != r['boot_saved']
    elapsed = max(0, wall_delta if reboot else mono_delta)
    consumed = 0 if r['paused'] else elapsed
    remaining = max(0, r['budget'] - consumed)
    expired = not r['paused'] and consumed >= r['budget']
    overdue = max(0, consumed - r['budget'])
    deadline = r['mono_saved'] + remaining
    base = r['mono_now'] - consumed
    return [remaining,expired,overdue,deadline,base]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve({'wall_now': 130, 'wall_saved': 100, 'mono_now': 50, 'mono_saved': 20, 'boot_now': 'a', 'boot_saved': 'a', 'paused': False, 'budget': 30}), [0, True, 0, 50, 20])
check('fixture 2', solve({'wall_now': 90, 'wall_saved': 100, 'mono_now': 5, 'mono_saved': 20, 'boot_now': 'b', 'boot_saved': 'a', 'paused': False, 'budget': 10}), [10, False, 0, 15, 5])
check('fixture 3', solve({'wall_now': 150, 'wall_saved': 100, 'mono_now': 5, 'mono_saved': 20, 'boot_now': 'b', 'boot_saved': 'a', 'paused': False, 'budget': 20}), [0, True, 30, 5, -45])
check('fixture 4', solve({'wall_now': 130, 'wall_saved': 100, 'mono_now': 50, 'mono_saved': 20, 'boot_now': 'a', 'boot_saved': 'a', 'paused': True, 'budget': 0}), [0, False, 0, None, 50])
check('fixture 5', solve({'wall_now': 140, 'wall_saved': 100, 'mono_now': 60, 'mono_saved': 20, 'boot_now': 'a', 'boot_saved': 'a', 'paused': False, 'budget': 100}), [60, False, 0, 120, 20])
check('fixture 6', solve({'wall_now': 90, 'wall_saved': 100, 'mono_now': -5, 'mono_saved': -20, 'boot_now': 'a', 'boot_saved': 'a', 'paused': False, 'budget': 20}), [5, False, 0, 0, -20])
check('fixture 7', solve({'wall_now': 101, 'wall_saved': 100, 'mono_now': 0, 'mono_saved': 0, 'boot_now': 'c', 'boot_saved': 'a', 'paused': False, 'budget': 0}), [0, True, 1, 0, -1])
check('fixture 8', solve({'wall_now': 100, 'wall_saved': 100, 'mono_now': 20, 'mono_saved': 20, 'boot_now': 'a', 'boot_saved': 'a', 'paused': True, 'budget': 10}), [10, False, 0, None, 20])
check('fixture 9', solve({'wall_now': 105, 'wall_saved': 100, 'mono_now': 24, 'mono_saved': 20, 'boot_now': 'a', 'boot_saved': 'a', 'paused': False, 'budget': 3}), [0, True, 1, 24, 20])
check('fixture 10', solve({'wall_now': 80, 'wall_saved': 100, 'mono_now': -10, 'mono_saved': -20, 'boot_now': 'a', 'boot_saved': 'a', 'paused': False, 'budget': 0}), [0, True, 10, -10, -20])
variant = [({'wall_now': 130, 'wall_saved': 100, 'mono_now': 50, 'mono_saved': 20, 'boot_now': 'a', 'boot_saved': 'a', 'paused': False, 'budget': 31}, [1, False, 0, 51, 20]), ({'wall_now': 130, 'wall_saved': 100, 'mono_now': 50, 'mono_saved': 20, 'boot_now': 'a', 'boot_saved': 'a', 'paused': False, 'budget': 32}, [2, False, 0, 52, 20]), ({'wall_now': 130, 'wall_saved': 100, 'mono_now': 50, 'mono_saved': 20, 'boot_now': 'a', 'boot_saved': 'a', 'paused': False, 'budget': 33}, [3, False, 0, 53, 20]), ({'wall_now': 130, 'wall_saved': 100, 'mono_now': 50, 'mono_saved': 20, 'boot_now': 'a', 'boot_saved': 'a', 'paused': False, 'budget': 34}, [4, False, 0, 54, 20]), ({'wall_now': 130, 'wall_saved': 100, 'mono_now': 50, 'mono_saved': 20, 'boot_now': 'a', 'boot_saved': 'a', 'paused': False, 'budget': 35}, [5, False, 0, 55, 20])]
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):
    wall_delta = r['wall_now'] - r['wall_saved']
    mono_delta = r['mono_now'] - r['mono_saved']
    reboot = r['boot_now'] != r['boot_saved']
    elapsed = max(0, wall_delta if reboot else mono_delta)
    consumed = 0 if r['paused'] else elapsed
    remaining = max(0, r['budget'] - consumed)
    expired = not r['paused'] and consumed >= r['budget']
    overdue = max(0, consumed - r['budget'])
    deadline = None if r['paused'] else r['wall_now'] + remaining
    base = r['mono_now'] - consumed
    return [remaining,expired,overdue,deadline,base]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve({'wall_now': 130, 'wall_saved': 100, 'mono_now': 50, 'mono_saved': 20, 'boot_now': 'a', 'boot_saved': 'a', 'paused': False, 'budget': 30}), [0, True, 0, 50, 20])
check('fixture 2', solve({'wall_now': 90, 'wall_saved': 100, 'mono_now': 5, 'mono_saved': 20, 'boot_now': 'b', 'boot_saved': 'a', 'paused': False, 'budget': 10}), [10, False, 0, 15, 5])
check('fixture 3', solve({'wall_now': 150, 'wall_saved': 100, 'mono_now': 5, 'mono_saved': 20, 'boot_now': 'b', 'boot_saved': 'a', 'paused': False, 'budget': 20}), [0, True, 30, 5, -45])
check('fixture 4', solve({'wall_now': 130, 'wall_saved': 100, 'mono_now': 50, 'mono_saved': 20, 'boot_now': 'a', 'boot_saved': 'a', 'paused': True, 'budget': 0}), [0, False, 0, None, 50])
check('fixture 5', solve({'wall_now': 140, 'wall_saved': 100, 'mono_now': 60, 'mono_saved': 20, 'boot_now': 'a', 'boot_saved': 'a', 'paused': False, 'budget': 100}), [60, False, 0, 120, 20])
check('fixture 6', solve({'wall_now': 90, 'wall_saved': 100, 'mono_now': -5, 'mono_saved': -20, 'boot_now': 'a', 'boot_saved': 'a', 'paused': False, 'budget': 20}), [5, False, 0, 0, -20])
check('fixture 7', solve({'wall_now': 101, 'wall_saved': 100, 'mono_now': 0, 'mono_saved': 0, 'boot_now': 'c', 'boot_saved': 'a', 'paused': False, 'budget': 0}), [0, True, 1, 0, -1])
check('fixture 8', solve({'wall_now': 100, 'wall_saved': 100, 'mono_now': 20, 'mono_saved': 20, 'boot_now': 'a', 'boot_saved': 'a', 'paused': True, 'budget': 10}), [10, False, 0, None, 20])
check('fixture 9', solve({'wall_now': 105, 'wall_saved': 100, 'mono_now': 24, 'mono_saved': 20, 'boot_now': 'a', 'boot_saved': 'a', 'paused': False, 'budget': 3}), [0, True, 1, 24, 20])
check('fixture 10', solve({'wall_now': 80, 'wall_saved': 100, 'mono_now': -10, 'mono_saved': -20, 'boot_now': 'a', 'boot_saved': 'a', 'paused': False, 'budget': 0}), [0, True, 10, -10, -20])
variant = [({'wall_now': 130, 'wall_saved': 100, 'mono_now': 50, 'mono_saved': 20, 'boot_now': 'a', 'boot_saved': 'a', 'paused': False, 'budget': 31}, [1, False, 0, 51, 20]), ({'wall_now': 130, 'wall_saved': 100, 'mono_now': 50, 'mono_saved': 20, 'boot_now': 'a', 'boot_saved': 'a', 'paused': False, 'budget': 32}, [2, False, 0, 52, 20]), ({'wall_now': 130, 'wall_saved': 100, 'mono_now': 50, 'mono_saved': 20, 'boot_now': 'a', 'boot_saved': 'a', 'paused': False, 'budget': 33}, [3, False, 0, 53, 20]), ({'wall_now': 130, 'wall_saved': 100, 'mono_now': 50, 'mono_saved': 20, 'boot_now': 'a', 'boot_saved': 'a', 'paused': False, 'budget': 34}, [4, False, 0, 54, 20]), ({'wall_now': 130, 'wall_saved': 100, 'mono_now': 50, 'mono_saved': 20, 'boot_now': 'a', 'boot_saved': 'a', 'paused': False, 'budget': 35}, [5, False, 0, 55, 20])]
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 deadline.

A checkpoint stores wall and monotonic coordinates, boot identity, budget and pause state. Same-boot restore uses monotonic elapsed; reboot restore uses nonnegative wall elapsed. Paused timers consume no elapsed ticks. Return remaining budget, expiration flag, overdue ticks, current-domain deadline (None while paused), and reconstructed running base. All units are identical integer ticks.

split: open-access