broken_source:
"""Failure Map reference implementation. Python standard library only."""
import json
import ipaddress
import re
from urllib.parse import urlsplit, urljoin
N = 1
observations = []
def solve(routes):
    return max(routes,key=lambda r:r[1],default=(None,))[0]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve([('bad', 9, False), ('a', 5, True)]), 'a')", "check('fixture 2', solve([('a', 5, True), ('b', 9, True)]), 'b')", "check('fixture 3', solve([]), None)", "check('fixture 4', solve([('bad', 9, False)]), None)"]
for _line in _fixtures[N % len(_fixtures):] + _fixtures[:N % len(_fixtures)]:
    exec(_line)
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 ipaddress
import re
from urllib.parse import urlsplit, urljoin
N = 1
observations = []
def solve(routes):
    return min((r for r in routes if r[2]),key=lambda r:r[1],default=(None,))[0]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve([('bad', 9, False), ('a', 5, True)]), 'a')", "check('fixture 2', solve([('a', 5, True), ('b', 9, True)]), 'b')", "check('fixture 3', solve([]), None)", "check('fixture 4', solve([('bad', 9, False)]), None)"]
for _line in _fixtures[N % len(_fixtures):] + _fixtures[:N % len(_fixtures)]:
    exec(_line)
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:
Disabled routes are removed before preference selection.

Bounded offline decision model: disabled routes are removed before preference selection. Inputs are already validated protocol fields; the explicit fixtures define the supported policy, not a complete protocol implementation.

split: open-access


broken_source:
"""Failure Map reference implementation. Python standard library only."""
import json
import ipaddress
import re
from urllib.parse import urlsplit, urljoin
N = 1
observations = []
def solve(path, prefix):
    return path.startswith(prefix)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve('/apiary', '/api'), False)", "check('fixture 2', solve('/api/x', '/api'), True)", "check('fixture 3', solve('/api', '/api'), True)", "check('fixture 4', solve('/else', '/api'), False)"]
for _line in _fixtures[N % len(_fixtures):] + _fixtures[:N % len(_fixtures)]:
    exec(_line)
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 ipaddress
import re
from urllib.parse import urlsplit, urljoin
N = 1
observations = []
def solve(path, prefix):
    return path == prefix
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve('/apiary', '/api'), False)", "check('fixture 2', solve('/api/x', '/api'), True)", "check('fixture 3', solve('/api', '/api'), True)", "check('fixture 4', solve('/else', '/api'), False)"]
for _line in _fixtures[N % len(_fixtures):] + _fixtures[:N % len(_fixtures)]:
    exec(_line)
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:
Path prefix routing requires segment boundaries.

Bounded offline decision model: path prefix routing requires segment boundaries. Inputs are already validated protocol fields; the explicit fixtures define the supported policy, not a complete protocol implementation.

split: open-access


broken_source:
"""Failure Map reference implementation. Python standard library only."""
import json
import ipaddress
import re
from urllib.parse import urlsplit, urljoin
N = 1
observations = []
def solve(host, configured):
    return host == configured
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve('EXAMPLE.com.', 'example.com'), True)", "check('fixture 2', solve('example.com', 'EXAMPLE.COM'), True)", "check('fixture 3', solve('a.example.com', 'example.com'), False)", "check('fixture 4', solve('other', 'example.com'), False)"]
for _line in _fixtures[N % len(_fixtures):] + _fixtures[:N % len(_fixtures)]:
    exec(_line)
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 ipaddress
import re
from urllib.parse import urlsplit, urljoin
N = 1
observations = []
def solve(host, configured):
    return host.lower() == configured.lower()
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve('EXAMPLE.com.', 'example.com'), True)", "check('fixture 2', solve('example.com', 'EXAMPLE.COM'), True)", "check('fixture 3', solve('a.example.com', 'example.com'), False)", "check('fixture 4', solve('other', 'example.com'), False)"]
for _line in _fixtures[N % len(_fixtures):] + _fixtures[:N % len(_fixtures)]:
    exec(_line)
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:
Route host comparison ignores dns name case.

Bounded offline decision model: route host comparison ignores dns name case. Inputs are already validated protocol fields; the explicit fixtures define the supported policy, not a complete protocol implementation.

split: open-access


broken_source:
"""Failure Map reference implementation. Python standard library only."""
import json
import ipaddress
import re
from urllib.parse import urlsplit, urljoin
N = 1
observations = []
def solve(host, suffix):
    return host.endswith(suffix)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve('a.example.com', 'example.com'), True)", "check('fixture 2', solve('example.com', 'example.com'), False)", "check('fixture 3', solve('badexample.com', 'example.com'), False)", "check('fixture 4', solve('a.b.example.com', 'example.com'), True)"]
for _line in _fixtures[N % len(_fixtures):] + _fixtures[:N % len(_fixtures)]:
    exec(_line)
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 ipaddress
import re
from urllib.parse import urlsplit, urljoin
N = 1
observations = []
def solve(host, suffix):
    return host == suffix or host.endswith("."+suffix)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve('a.example.com', 'example.com'), True)", "check('fixture 2', solve('example.com', 'example.com'), False)", "check('fixture 3', solve('badexample.com', 'example.com'), False)", "check('fixture 4', solve('a.b.example.com', 'example.com'), True)"]
for _line in _fixtures[N % len(_fixtures):] + _fixtures[:N % len(_fixtures)]:
    exec(_line)
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:
Wildcard host route covers subdomains but not apex.

Bounded offline decision model: wildcard host route covers subdomains but not apex. Inputs are already validated protocol fields; the explicit fixtures define the supported policy, not a complete protocol implementation.

split: open-access


broken_source:
"""Failure Map reference implementation. Python standard library only."""
import json
import ipaddress
import re
from urllib.parse import urlsplit, urljoin
N = 1
observations = []
def solve(routes, method):
    return max(routes,key=lambda r:r[2],default=(None,))[0]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve([('a', ['GET'], 1), ('b', ['POST'], 9)], 'GET'), 'a')", "check('fixture 2', solve([('a', ['GET'], 1), ('b', ['GET'], 9)], 'GET'), 'b')", "check('fixture 3', solve([], 'GET'), None)", "check('fixture 4', solve([('a', ['POST'], 1)], 'GET'), None)"]
for _line in _fixtures[N % len(_fixtures):] + _fixtures[:N % len(_fixtures)]:
    exec(_line)
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 ipaddress
import re
from urllib.parse import urlsplit, urljoin
N = 1
observations = []
def solve(routes, method):
    return next((r[0] for r in routes if method in r[1]),None)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve([('a', ['GET'], 1), ('b', ['POST'], 9)], 'GET'), 'a')", "check('fixture 2', solve([('a', ['GET'], 1), ('b', ['GET'], 9)], 'GET'), 'b')", "check('fixture 3', solve([], 'GET'), None)", "check('fixture 4', solve([('a', ['POST'], 1)], 'GET'), None)"]
for _line in _fixtures[N % len(_fixtures):] + _fixtures[:N % len(_fixtures)]:
    exec(_line)
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:
Route method filter is applied before priority.

Bounded offline decision model: route method filter is applied before priority. Inputs are already validated protocol fields; the explicit fixtures define the supported policy, not a complete protocol implementation.

split: open-access


broken_source:
"""Failure Map reference implementation. Python standard library only."""
import json
import ipaddress
import re
from urllib.parse import urlsplit, urljoin
N = 1
observations = []
def solve(headers, key):
    return any(name == key and value for name,value in headers)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve([('X', '')], 'x'), True)", "check('fixture 2', solve([('x', '')], 'x'), True)", "check('fixture 3', solve([('y', 'v')], 'x'), False)", "check('fixture 4', solve([], 'x'), False)"]
for _line in _fixtures[N % len(_fixtures):] + _fixtures[:N % len(_fixtures)]:
    exec(_line)
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 ipaddress
import re
from urllib.parse import urlsplit, urljoin
N = 1
observations = []
def solve(headers, key):
    return any(name == key for name,value in headers)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve([('X', '')], 'x'), True)", "check('fixture 2', solve([('x', '')], 'x'), True)", "check('fixture 3', solve([('y', 'v')], 'x'), False)", "check('fixture 4', solve([], 'x'), False)"]
for _line in _fixtures[N % len(_fixtures):] + _fixtures[:N % len(_fixtures)]:
    exec(_line)
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:
Route header constraint distinguishes existence from truthiness.

Given headers, key, route header constraint distinguishes existence from truthiness. Return the protocol decision or transformed value; fields are validated and fixtures state boundary outcomes.

split: open-access


broken_source:
"""Failure Map reference implementation. Python standard library only."""
import json
import ipaddress
import re
from urllib.parse import urlsplit, urljoin
N = 1
observations = []
def solve(query, required):
    return all(dict(query).get(key) == value for key,value in required.items())
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve([('q', 'a'), ('q', 'b')], {'q': 'a'}), True)", "check('fixture 2', solve([('q', 'a')], {'q': 'a', 'page': '1'}), False)", "check('fixture 3', solve([], {}), True)", "check('fixture 4', solve([], {'q': 'a'}), False)"]
for _line in _fixtures[N % len(_fixtures):] + _fixtures[:N % len(_fixtures)]:
    exec(_line)
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 ipaddress
import re
from urllib.parse import urlsplit, urljoin
N = 1
observations = []
def solve(query, required):
    return any(any(k == key and v == value for k,v in query) for key,value in required.items())
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve([('q', 'a'), ('q', 'b')], {'q': 'a'}), True)", "check('fixture 2', solve([('q', 'a')], {'q': 'a', 'page': '1'}), False)", "check('fixture 3', solve([], {}), True)", "check('fixture 4', solve([], {'q': 'a'}), False)"]
for _line in _fixtures[N % len(_fixtures):] + _fixtures[:N % len(_fixtures)]:
    exec(_line)
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:
Query route matches any repeated value.

Given query, required, query route matches any repeated value. Return the protocol decision or transformed value; fields are validated and fixtures state boundary outcomes.

split: open-access


broken_source:
"""Failure Map reference implementation. Python standard library only."""
import json
import ipaddress
import re
from urllib.parse import urlsplit, urljoin
N = 1
observations = []
def solve(weights, draw):
    return next((i for i in range(len(weights)) if draw <= sum(weights[:i+1])),None)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve([2, 3], 2), 1)", "check('fixture 2', solve([2, 3], 4), 1)", "check('fixture 3', solve([0, 2], 0), 1)", "check('fixture 4', solve([], 0), None)"]
for _line in _fixtures[N % len(_fixtures):] + _fixtures[:N % len(_fixtures)]:
    exec(_line)
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 ipaddress
import re
from urllib.parse import urlsplit, urljoin
N = 1
observations = []
def solve(weights, draw):
    return next((i for i,w in enumerate(weights) if draw < w),None)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve([2, 3], 2), 1)", "check('fixture 2', solve([2, 3], 4), 1)", "check('fixture 3', solve([0, 2], 0), 1)", "check('fixture 4', solve([], 0), None)"]
for _line in _fixtures[N % len(_fixtures):] + _fixtures[:N % len(_fixtures)]:
    exec(_line)
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:
Weighted route selection uses cumulative half open buckets.

Bounded offline decision model: weighted route selection uses cumulative half open buckets. Inputs are already validated protocol fields; the explicit fixtures define the supported policy, not a complete protocol implementation.

split: open-access


broken_source:
"""Failure Map reference implementation. Python standard library only."""
import json
import ipaddress
import re
from urllib.parse import urlsplit, urljoin
N = 1
observations = []
def solve(weights):
    return list(range(len(weights)))
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve([0, 2, 0]), [1])", "check('fixture 2', solve([]), [])", "check('fixture 3', solve([1, 2]), [0, 1])", "check('fixture 4', solve([0]), [])"]
for _line in _fixtures[N % len(_fixtures):] + _fixtures[:N % len(_fixtures)]:
    exec(_line)
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 ipaddress
import re
from urllib.parse import urlsplit, urljoin
N = 1
observations = []
def solve(weights):
    return [i for i,w in enumerate(weights) if w >= 0]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve([0, 2, 0]), [1])", "check('fixture 2', solve([]), [])", "check('fixture 3', solve([1, 2]), [0, 1])", "check('fixture 4', solve([0]), [])"]
for _line in _fixtures[N % len(_fixtures):] + _fixtures[:N % len(_fixtures)]:
    exec(_line)
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:
Zero weight upstreams never receive traffic.

Bounded offline decision model: zero weight upstreams never receive traffic. Inputs are already validated protocol fields; the explicit fixtures define the supported policy, not a complete protocol implementation.

split: open-access


broken_source:
"""Failure Map reference implementation. Python standard library only."""
import json
import ipaddress
import re
from urllib.parse import urlsplit, urljoin
N = 1
observations = []
def solve(servers):
    return min(servers,key=lambda s:s[1])[0] if servers else None
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve([('a', 5, 10), ('b', 3, 3)]), 'a')", "check('fixture 2', solve([('a', 1, 10), ('b', 5, 10)]), 'a')", "check('fixture 3', solve([]), None)", "check('fixture 4', solve([('a', 1, 2)]), 'a')"]
for _line in _fixtures[N % len(_fixtures):] + _fixtures[:N % len(_fixtures)]:
    exec(_line)
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 ipaddress
import re
from urllib.parse import urlsplit, urljoin
N = 1
observations = []
def solve(servers):
    return max(servers,key=lambda s:s[1]/s[2])[0] if servers else None
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve([('a', 5, 10), ('b', 3, 3)]), 'a')", "check('fixture 2', solve([('a', 1, 10), ('b', 5, 10)]), 'a')", "check('fixture 3', solve([]), None)", "check('fixture 4', solve([('a', 1, 2)]), 'a')"]
for _line in _fixtures[N % len(_fixtures):] + _fixtures[:N % len(_fixtures)]:
    exec(_line)
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:
Least loaded route normalizes by capacity.

Bounded offline decision model: least loaded route normalizes by capacity. Inputs are already validated protocol fields; the explicit fixtures define the supported policy, not a complete protocol implementation.

split: open-access


broken_source:
"""Failure Map reference implementation. Python standard library only."""
import json
import ipaddress
import re
from urllib.parse import urlsplit, urljoin
N = 1
observations = []
def solve(healthy, attempted):
    return healthy
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve(['a', 'b'], ['a']), ['b'])", "check('fixture 2', solve(['a'], []), ['a'])", "check('fixture 3', solve([], ['a']), [])", "check('fixture 4', solve(['a'], ['a']), [])"]
for _line in _fixtures[N % len(_fixtures):] + _fixtures[:N % len(_fixtures)]:
    exec(_line)
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 ipaddress
import re
from urllib.parse import urlsplit, urljoin
N = 1
observations = []
def solve(healthy, attempted):
    return [h for h in attempted if h in healthy]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve(['a', 'b'], ['a']), ['b'])", "check('fixture 2', solve(['a'], []), ['a'])", "check('fixture 3', solve([], ['a']), [])", "check('fixture 4', solve(['a'], ['a']), [])"]
for _line in _fixtures[N % len(_fixtures):] + _fixtures[:N % len(_fixtures)]:
    exec(_line)
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:
Route failover excludes already attempted upstreams.

Bounded offline decision model: route failover excludes already attempted upstreams. Inputs are already validated protocol fields; the explicit fixtures define the supported policy, not a complete protocol implementation.

split: open-access


broken_source:
"""Failure Map reference implementation. Python standard library only."""
import json
import ipaddress
import re
from urllib.parse import urlsplit, urljoin
N = 1
observations = []
def solve(attempts, cap, replayable):
    return attempts <= cap and replayable
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve(2, 2, True), False)", "check('fixture 2', solve(1, 2, False), False)", "check('fixture 3', solve(1, 2, True), True)", "check('fixture 4', solve(0, 0, True), False)"]
for _line in _fixtures[N % len(_fixtures):] + _fixtures[:N % len(_fixtures)]:
    exec(_line)
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 ipaddress
import re
from urllib.parse import urlsplit, urljoin
N = 1
observations = []
def solve(attempts, cap, replayable):
    return attempts < cap
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve(2, 2, True), False)", "check('fixture 2', solve(1, 2, False), False)", "check('fixture 3', solve(1, 2, True), True)", "check('fixture 4', solve(0, 0, True), False)"]
for _line in _fixtures[N % len(_fixtures):] + _fixtures[:N % len(_fixtures)]:
    exec(_line)
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:
Failover stays within request replay budget.

Bounded offline decision model: failover stays within request replay budget. Inputs are already validated protocol fields; the explicit fixtures define the supported policy, not a complete protocol implementation.

split: open-access


broken_source:
"""Failure Map reference implementation. Python standard library only."""
import json
import ipaddress
import re
from urllib.parse import urlsplit, urljoin
N = 1
observations = []
def solve(healthy, draining, existing):
    return healthy and not draining
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve(True, True, True), True)", "check('fixture 2', solve(True, True, False), False)", "check('fixture 3', solve(False, False, True), False)", "check('fixture 4', solve(True, False, False), True)"]
for _line in _fixtures[N % len(_fixtures):] + _fixtures[:N % len(_fixtures)]:
    exec(_line)
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 ipaddress
import re
from urllib.parse import urlsplit, urljoin
N = 1
observations = []
def solve(healthy, draining, existing):
    return healthy
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve(True, True, True), True)", "check('fixture 2', solve(True, True, False), False)", "check('fixture 3', solve(False, False, True), False)", "check('fixture 4', solve(True, False, False), True)"]
for _line in _fixtures[N % len(_fixtures):] + _fixtures[:N % len(_fixtures)]:
    exec(_line)
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:
Healthy endpoint filter retains draining endpoints only for existing flows.

Bounded offline decision model: healthy endpoint filter retains draining endpoints only for existing flows. Inputs are already validated protocol fields; the explicit fixtures define the supported policy, not a complete protocol implementation.

split: open-access


broken_source:
"""Failure Map reference implementation. Python standard library only."""
import json
import ipaddress
import re
from urllib.parse import urlsplit, urljoin
N = 1
observations = []
def solve(path, prefix):
    return path.replace(prefix,"") or "/"
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve('/api/x/api', '/api'), '/x/api')", "check('fixture 2', solve('/api', '/api'), '/')", "check('fixture 3', solve('/api/a', '/api'), '/a')", "check('fixture 4', solve('/api/', '/api'), '/')"]
for _line in _fixtures[N % len(_fixtures):] + _fixtures[:N % len(_fixtures)]:
    exec(_line)
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 ipaddress
import re
from urllib.parse import urlsplit, urljoin
N = 1
observations = []
def solve(path, prefix):
    return path.strip(prefix) or "/"
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve('/api/x/api', '/api'), '/x/api')", "check('fixture 2', solve('/api', '/api'), '/')", "check('fixture 3', solve('/api/a', '/api'), '/a')", "check('fixture 4', solve('/api/', '/api'), '/')"]
for _line in _fixtures[N % len(_fixtures):] + _fixtures[:N % len(_fixtures)]:
    exec(_line)
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:
Route rewrite removes only the matched leading prefix.

Bounded offline decision model: route rewrite removes only the matched leading prefix. Inputs are already validated protocol fields; the explicit fixtures define the supported policy, not a complete protocol implementation.

split: open-access


broken_source:
"""Failure Map reference implementation. Python standard library only."""
import json
import ipaddress
import re
from urllib.parse import urlsplit, urljoin
N = 1
observations = []
def solve(base, tail):
    return base+tail
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve('/v1/', '/x'), '/v1/x')", "check('fixture 2', solve('/v1', 'x'), '/v1/x')", "check('fixture 3', solve('/', '/'), '/')", "check('fixture 4', solve('/v1/', ''), '/v1/')"]
for _line in _fixtures[N % len(_fixtures):] + _fixtures[:N % len(_fixtures)]:
    exec(_line)
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 ipaddress
import re
from urllib.parse import urlsplit, urljoin
N = 1
observations = []
def solve(base, tail):
    return base+"/"+tail
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve('/v1/', '/x'), '/v1/x')", "check('fixture 2', solve('/v1', 'x'), '/v1/x')", "check('fixture 3', solve('/', '/'), '/')", "check('fixture 4', solve('/v1/', ''), '/v1/')"]
for _line in _fixtures[N % len(_fixtures):] + _fixtures[:N % len(_fixtures)]:
    exec(_line)
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:
Route rewrite adds exactly one path separator.

Bounded offline decision model: route rewrite adds exactly one path separator. Inputs are already validated protocol fields; the explicit fixtures define the supported policy, not a complete protocol implementation.

split: open-access


broken_source:
"""Failure Map reference implementation. Python standard library only."""
import json
import ipaddress
import re
from urllib.parse import urlsplit, urljoin
N = 1
observations = []
def solve(routes):
    return max(routes,key=lambda r:r[2])[0] if routes else None
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve([('a', 3, 1), ('b', 2, 9)]), 'a')", "check('fixture 2', solve([('a', 3, 1), ('b', 3, 9)]), 'b')", "check('fixture 3', solve([]), None)", "check('fixture 4', solve([('a', 1, 1)]), 'a')"]
for _line in _fixtures[N % len(_fixtures):] + _fixtures[:N % len(_fixtures)]:
    exec(_line)
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 ipaddress
import re
from urllib.parse import urlsplit, urljoin
N = 1
observations = []
def solve(routes):
    return max(routes,key=lambda r:r[1])[0] if routes else None
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve([('a', 3, 1), ('b', 2, 9)]), 'a')", "check('fixture 2', solve([('a', 3, 1), ('b', 3, 9)]), 'b')", "check('fixture 3', solve([]), None)", "check('fixture 4', solve([('a', 1, 1)]), 'a')"]
for _line in _fixtures[N % len(_fixtures):] + _fixtures[:N % len(_fixtures)]:
    exec(_line)
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:
Route priority is secondary to match specificity.

Bounded offline decision model: route priority is secondary to match specificity. Inputs are already validated protocol fields; the explicit fixtures define the supported policy, not a complete protocol implementation.

split: open-access


broken_source:
"""Failure Map reference implementation. Python standard library only."""
import json
import ipaddress
import re
from urllib.parse import urlsplit, urljoin
N = 1
observations = []
def solve(address, network):
    return ipaddress.ip_address(address) in ipaddress.ip_network(network)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve('192.0.2.255', '192.0.2.0/24'), False)", "check('fixture 2', solve('192.0.2.0', '192.0.2.0/24'), False)", "check('fixture 3', solve('192.0.2.1', '192.0.2.0/24'), True)", "check('fixture 4', solve('192.0.3.1', '192.0.2.0/24'), False)"]
for _line in _fixtures[N % len(_fixtures):] + _fixtures[:N % len(_fixtures)]:
    exec(_line)
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 ipaddress
import re
from urllib.parse import urlsplit, urljoin
N = 1
observations = []
def solve(address, network):
    return ipaddress.ip_address(address) != ipaddress.ip_network(network).broadcast_address
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve('192.0.2.255', '192.0.2.0/24'), False)", "check('fixture 2', solve('192.0.2.0', '192.0.2.0/24'), False)", "check('fixture 3', solve('192.0.2.1', '192.0.2.0/24'), True)", "check('fixture 4', solve('192.0.3.1', '192.0.2.0/24'), False)"]
for _line in _fixtures[N % len(_fixtures):] + _fixtures[:N % len(_fixtures)]:
    exec(_line)
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:
Ipv4 network broadcast address is not allocated to host.

Bounded offline decision model: ipv4 network broadcast address is not allocated to host. Inputs are already validated protocol fields; the explicit fixtures define the supported policy, not a complete protocol implementation.

split: open-access


broken_source:
"""Failure Map reference implementation. Python standard library only."""
import json
import ipaddress
import re
from urllib.parse import urlsplit, urljoin
N = 1
observations = []
def solve(link_local, interface):
    return True
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve(True, None), False)", "check('fixture 2', solve(False, None), True)", "check('fixture 3', solve(True, 'eth0'), True)", "check('fixture 4', solve(False, 'eth0'), True)"]
for _line in _fixtures[N % len(_fixtures):] + _fixtures[:N % len(_fixtures)]:
    exec(_line)
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 ipaddress
import re
from urllib.parse import urlsplit, urljoin
N = 1
observations = []
def solve(link_local, interface):
    return interface is not None
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve(True, None), False)", "check('fixture 2', solve(False, None), True)", "check('fixture 3', solve(True, 'eth0'), True)", "check('fixture 4', solve(False, 'eth0'), True)"]
for _line in _fixtures[N % len(_fixtures):] + _fixtures[:N % len(_fixtures)]:
    exec(_line)
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:
Link local destination requires interface scope.

Bounded offline decision model: link local destination requires interface scope. Inputs are already validated protocol fields; the explicit fixtures define the supported policy, not a complete protocol implementation.

split: open-access


broken_source:
"""Failure Map reference implementation. Python standard library only."""
import json
import ipaddress
import re
from urllib.parse import urlsplit, urljoin
N = 1
observations = []
def solve(a, b):
    return a.split(":")[-1] == b.split(":")[-1]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve('2001:db8::1', '2001:db8:0:0:0:0:0:1'), True)", "check('fixture 2', solve('::ffff:192.0.2.1', '192.0.2.1'), False)", "check('fixture 3', solve('::1', '::1'), True)", "check('fixture 4', solve('192.0.2.1', '192.0.2.2'), False)"]
for _line in _fixtures[N % len(_fixtures):] + _fixtures[:N % len(_fixtures)]:
    exec(_line)
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 ipaddress
import re
from urllib.parse import urlsplit, urljoin
N = 1
observations = []
def solve(a, b):
    return a == b
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve('2001:db8::1', '2001:db8:0:0:0:0:0:1'), True)", "check('fixture 2', solve('::ffff:192.0.2.1', '192.0.2.1'), False)", "check('fixture 3', solve('::1', '::1'), True)", "check('fixture 4', solve('192.0.2.1', '192.0.2.2'), False)"]
for _line in _fixtures[N % len(_fixtures):] + _fixtures[:N % len(_fixtures)]:
    exec(_line)
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:
Ipv4 and ipv6 endpoint identities remain distinct.

Bounded offline decision model: ipv4 and ipv6 endpoint identities remain distinct. Inputs are already validated protocol fields; the explicit fixtures define the supported policy, not a complete protocol implementation.

split: open-access


broken_source:
"""Failure Map reference implementation. Python standard library only."""
import json
import ipaddress
import re
from urllib.parse import urlsplit, urljoin
N = 1
observations = []
def solve(flow_hash, paths, ordinal):
    return paths[ordinal % len(paths)] if paths else None
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve(3, ['a', 'b'], 0), 'b')", "check('fixture 2', solve(2, ['a', 'b'], 1), 'a')", "check('fixture 3', solve(0, ['x'], 5), 'x')", "check('fixture 4', solve(1, [], 1), None)"]
for _line in _fixtures[N % len(_fixtures):] + _fixtures[:N % len(_fixtures)]:
    exec(_line)
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 ipaddress
import re
from urllib.parse import urlsplit, urljoin
N = 1
observations = []
def solve(flow_hash, paths, ordinal):
    return paths[flow_hash % (len(paths)-1)] if len(paths)>1 else None
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve(3, ['a', 'b'], 0), 'b')", "check('fixture 2', solve(2, ['a', 'b'], 1), 'a')", "check('fixture 3', solve(0, ['x'], 5), 'x')", "check('fixture 4', solve(1, [], 1), None)"]
for _line in _fixtures[N % len(_fixtures):] + _fixtures[:N % len(_fixtures)]:
    exec(_line)
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:
Ecmp selection uses flow identity not packet ordinal.

Bounded offline decision model: ecmp selection uses flow identity not packet ordinal. Inputs are already validated protocol fields; the explicit fixtures define the supported policy, not a complete protocol implementation.

split: open-access


broken_source:
"""Failure Map reference implementation. Python standard library only."""
import json
import ipaddress
import re
from urllib.parse import urlsplit, urljoin
N = 1
observations = []
def solve(decisions, default):
    return decisions[0] if decisions else default
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve(['continue', 'route-a'], 'default'), 'route-a')", "check('fixture 2', solve(['drop', 'route-a'], 'default'), 'drop')", "check('fixture 3', solve(['continue'], 'default'), 'default')", "check('fixture 4', solve([], 'default'), 'default')"]
for _line in _fixtures[N % len(_fixtures):] + _fixtures[:N % len(_fixtures)]:
    exec(_line)
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 ipaddress
import re
from urllib.parse import urlsplit, urljoin
N = 1
observations = []
def solve(decisions, default):
    return next((d for d in decisions if d not in ("continue","drop")),default)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve(['continue', 'route-a'], 'default'), 'route-a')", "check('fixture 2', solve(['drop', 'route-a'], 'default'), 'drop')", "check('fixture 3', solve(['continue'], 'default'), 'default')", "check('fixture 4', solve([], 'default'), 'default')"]
for _line in _fixtures[N % len(_fixtures):] + _fixtures[:N % len(_fixtures)]:
    exec(_line)
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:
Policy route fallback occurs only after no policy match.

Given decisions, default, policy route fallback occurs only after no policy match. Return the protocol decision or transformed value; fields are validated and fixtures state boundary outcomes.

split: open-access


broken_source:
"""Failure Map reference implementation. Python standard library only."""
import json
import ipaddress
import re
from urllib.parse import urlsplit, urljoin
N = 1
observations = []
def solve(old, new):
    return dict(old,**new)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve({'a': 1, 'b': 2}, {'a': 3}), {'a': 3})", "check('fixture 2', solve({}, {'b': 2}), {'b': 2})", "check('fixture 3', solve({'a': 1}, {}), {})", "check('fixture 4', solve({}, {}), {})"]
for _line in _fixtures[N % len(_fixtures):] + _fixtures[:N % len(_fixtures)]:
    exec(_line)
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 ipaddress
import re
from urllib.parse import urlsplit, urljoin
N = 1
observations = []
def solve(old, new):
    return {k:v for k,v in old.items() if k in new}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve({'a': 1, 'b': 2}, {'a': 3}), {'a': 3})", "check('fixture 2', solve({}, {'b': 2}), {'b': 2})", "check('fixture 3', solve({'a': 1}, {}), {})", "check('fixture 4', solve({}, {}), {})"]
for _line in _fixtures[N % len(_fixtures):] + _fixtures[:N % len(_fixtures)]:
    exec(_line)
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:
Route table refresh replaces removed routes.

Bounded offline decision model: route table refresh replaces removed routes. Inputs are already validated protocol fields; the explicit fixtures define the supported policy, not a complete protocol implementation.

split: open-access


broken_source:
"""Failure Map reference implementation. Python standard library only."""
import json
import ipaddress
import re
from urllib.parse import urlsplit, urljoin
N = 1
observations = []
def solve(match, blackhole, fallback):
    return match if match is not None else fallback
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve(None, True, 'default'), None)", "check('fixture 2', solve('a', False, 'default'), 'a')", "check('fixture 3', solve(None, False, 'default'), 'default')", "check('fixture 4', solve(None, False, None), None)"]
for _line in _fixtures[N % len(_fixtures):] + _fixtures[:N % len(_fixtures)]:
    exec(_line)
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 ipaddress
import re
from urllib.parse import urlsplit, urljoin
N = 1
observations = []
def solve(match, blackhole, fallback):
    return None if match is None else match
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve(None, True, 'default'), None)", "check('fixture 2', solve('a', False, 'default'), 'a')", "check('fixture 3', solve(None, False, 'default'), 'default')", "check('fixture 4', solve(None, False, None), None)"]
for _line in _fixtures[N % len(_fixtures):] + _fixtures[:N % len(_fixtures)]:
    exec(_line)
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:
Blackhole route terminates lookup instead of falling back.

Bounded offline decision model: blackhole route terminates lookup instead of falling back. Inputs are already validated protocol fields; the explicit fixtures define the supported policy, not a complete protocol implementation.

split: open-access


broken_source:
"""Failure Map reference implementation. Python standard library only."""
import json
import ipaddress
import re
from urllib.parse import urlsplit, urljoin
N = 1
observations = []
def solve(peer, congestion, flight):
    return max(0,max(peer,congestion)-flight)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve(10, 5, 2), 3)", "check('fixture 2', solve(3, 10, 4), 0)", "check('fixture 3', solve(10, 10, 0), 10)", "check('fixture 4', solve(0, 10, 0), 0)"]
for _line in _fixtures[N % len(_fixtures):] + _fixtures[:N % len(_fixtures)]:
    exec(_line)
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 ipaddress
import re
from urllib.parse import urlsplit, urljoin
N = 1
observations = []
def solve(peer, congestion, flight):
    return min(peer,congestion)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve(10, 5, 2), 3)", "check('fixture 2', solve(3, 10, 4), 0)", "check('fixture 3', solve(10, 10, 0), 10)", "check('fixture 4', solve(0, 10, 0), 0)"]
for _line in _fixtures[N % len(_fixtures):] + _fixtures[:N % len(_fixtures)]:
    exec(_line)
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:
Send window is minimum of peer and congestion windows.

Bounded offline decision model: send window is minimum of peer and congestion windows. Inputs are already validated protocol fields; the explicit fixtures define the supported policy, not a complete protocol implementation.

split: open-access


broken_source:
"""Failure Map reference implementation. Python standard library only."""
import json
import ipaddress
import re
from urllib.parse import urlsplit, urljoin
N = 1
observations = []
def solve(ack, previous, sent):
    return ack
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve(10, 8, 12), 2)", "check('fixture 2', solve(7, 8, 12), 0)", "check('fixture 3', solve(13, 8, 12), None)", "check('fixture 4', solve(8, 8, 12), 0)"]
for _line in _fixtures[N % len(_fixtures):] + _fixtures[:N % len(_fixtures)]:
    exec(_line)
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 ipaddress
import re
from urllib.parse import urlsplit, urljoin
N = 1
observations = []
def solve(ack, previous, sent):
    return max(0,ack-previous)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve(10, 8, 12), 2)", "check('fixture 2', solve(7, 8, 12), 0)", "check('fixture 3', solve(13, 8, 12), None)", "check('fixture 4', solve(8, 8, 12), 0)"]
for _line in _fixtures[N % len(_fixtures):] + _fixtures[:N % len(_fixtures)]:
    exec(_line)
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:
Acknowledged byte count excludes already acknowledged prefix.

Given ack, previous, sent, acknowledged byte count excludes already acknowledged prefix. Return the protocol decision or transformed value; fields are validated and fixtures state boundary outcomes.

split: open-access


broken_source:
"""Failure Map reference implementation. Python standard library only."""
import json
import ipaddress
import re
from urllib.parse import urlsplit, urljoin
N = 1
observations = []
def solve(start, end, window):
    return (start,end)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve(0, 10, (3, 7)), (3, 7))", "check('fixture 2', solve(8, 10, (3, 7)), None)", "check('fixture 3', solve(3, 7, (3, 7)), (3, 7))", "check('fixture 4', solve(0, 3, (3, 7)), None)"]
for _line in _fixtures[N % len(_fixtures):] + _fixtures[:N % len(_fixtures)]:
    exec(_line)
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 ipaddress
import re
from urllib.parse import urlsplit, urljoin
N = 1
observations = []
def solve(start, end, window):
    return (max(start,window[0]),end) if start < window[1] else None
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve(0, 10, (3, 7)), (3, 7))", "check('fixture 2', solve(8, 10, (3, 7)), None)", "check('fixture 3', solve(3, 7, (3, 7)), (3, 7))", "check('fixture 4', solve(0, 3, (3, 7)), None)"]
for _line in _fixtures[N % len(_fixtures):] + _fixtures[:N % len(_fixtures)]:
    exec(_line)
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:
Receive window overlap clips both segment ends.

Bounded offline decision model: receive window overlap clips both segment ends. Inputs are already validated protocol fields; the explicit fixtures define the supported policy, not a complete protocol implementation.

split: open-access


broken_source:
"""Failure Map reference implementation. Python standard library only."""
import json
import ipaddress
import re
from urllib.parse import urlsplit, urljoin
N = 1
observations = []
def solve(payload, fin):
    return payload
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve(3, True), 4)", "check('fixture 2', solve(3, False), 3)", "check('fixture 3', solve(0, True), 1)", "check('fixture 4', solve(0, False), 0)"]
for _line in _fixtures[N % len(_fixtures):] + _fixtures[:N % len(_fixtures)]:
    exec(_line)
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)

evaluation_group: xh-fin-consumes-one-sequence-number

source:
"""Failure Map reference implementation. Python standard library only."""
import json
import ipaddress
import re
from urllib.parse import urlsplit, urljoin
N = 1
observations = []
def solve(payload, fin):
    return payload+1
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve(3, True), 4)", "check('fixture 2', solve(3, False), 3)", "check('fixture 3', solve(0, True), 1)", "check('fixture 4', solve(0, False), 0)"]
for _line in _fixtures[N % len(_fixtures):] + _fixtures[:N % len(_fixtures)]:
    exec(_line)
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:
Fin consumes one sequence number.

Bounded offline decision model: fin consumes one sequence number. Inputs are already validated protocol fields; the explicit fixtures define the supported policy, not a complete protocol implementation.

split: open-access


broken_source:
"""Failure Map reference implementation. Python standard library only."""
import json
import ipaddress
import re
from urllib.parse import urlsplit, urljoin
N = 1
observations = []
def solve(payload, syn, fin):
    return payload+int(fin)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve(0, True, False), 1)", "check('fixture 2', solve(2, True, True), 4)", "check('fixture 3', solve(2, False, False), 2)", "check('fixture 4', solve(0, False, True), 1)"]
for _line in _fixtures[N % len(_fixtures):] + _fixtures[:N % len(_fixtures)]:
    exec(_line)
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 ipaddress
import re
from urllib.parse import urlsplit, urljoin
N = 1
observations = []
def solve(payload, syn, fin):
    return payload+int(syn or fin)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve(0, True, False), 1)", "check('fixture 2', solve(2, True, True), 4)", "check('fixture 3', solve(2, False, False), 2)", "check('fixture 4', solve(0, False, True), 1)"]
for _line in _fixtures[N % len(_fixtures):] + _fixtures[:N % len(_fixtures)]:
    exec(_line)
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:
Syn sequence space is independent of payload.

Bounded offline decision model: syn sequence space is independent of payload. Inputs are already validated protocol fields; the explicit fixtures define the supported policy, not a complete protocol implementation.

split: open-access


broken_source:
"""Failure Map reference implementation. Python standard library only."""
import json
import ipaddress
import re
from urllib.parse import urlsplit, urljoin
N = 1
observations = []
def solve(a, b):
    return a < b
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve(250, 3), True)", "check('fixture 2', solve(3, 250), False)", "check('fixture 3', solve(4, 4), False)", "check('fixture 4', solve(0, 128), False)"]
for _line in _fixtures[N % len(_fixtures):] + _fixtures[:N % len(_fixtures)]:
    exec(_line)
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 ipaddress
import re
from urllib.parse import urlsplit, urljoin
N = 1
observations = []
def solve(a, b):
    return (b-a) % 256 <= 128
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve(250, 3), True)", "check('fixture 2', solve(3, 250), False)", "check('fixture 3', solve(4, 4), False)", "check('fixture 4', solve(0, 128), False)"]
for _line in _fixtures[N % len(_fixtures):] + _fixtures[:N % len(_fixtures)]:
    exec(_line)
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:
Sequence ordering handles modular wraparound.

Bounded offline decision model: sequence ordering handles modular wraparound. Inputs are already validated protocol fields; the explicit fixtures define the supported policy, not a complete protocol implementation.

split: open-access


broken_source:
"""Failure Map reference implementation. Python standard library only."""
import json
import ipaddress
import re
from urllib.parse import urlsplit, urljoin
N = 1
observations = []
def solve(start, end):
    return end-start
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve(250, 3), 9)", "check('fixture 2', solve(3, 250), 247)", "check('fixture 3', solve(10, 10), 0)", "check('fixture 4', solve(0, 1), 1)"]
for _line in _fixtures[N % len(_fixtures):] + _fixtures[:N % len(_fixtures)]:
    exec(_line)
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 ipaddress
import re
from urllib.parse import urlsplit, urljoin
N = 1
observations = []
def solve(start, end):
    return abs(end-start)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve(250, 3), 9)", "check('fixture 2', solve(3, 250), 247)", "check('fixture 3', solve(10, 10), 0)", "check('fixture 4', solve(0, 1), 1)"]
for _line in _fixtures[N % len(_fixtures):] + _fixtures[:N % len(_fixtures)]:
    exec(_line)
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:
Serial distance is forward modular distance.

Bounded offline decision model: serial distance is forward modular distance. Inputs are already validated protocol fields; the explicit fixtures define the supported policy, not a complete protocol implementation.

split: open-access


broken_source:
"""Failure Map reference implementation. Python standard library only."""
import json
import ipaddress
import re
from urllib.parse import urlsplit, urljoin
N = 1
observations = []
def solve(previous, ack, duplicates):
    return duplicates+1
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve(10, 10, 2), 3)", "check('fixture 2', solve(10, 11, 2), 0)", "check('fixture 3', solve(0, 0, 0), 1)", "check('fixture 4', solve(10, 12, 0), 0)"]
for _line in _fixtures[N % len(_fixtures):] + _fixtures[:N % len(_fixtures)]:
    exec(_line)
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 ipaddress
import re
from urllib.parse import urlsplit, urljoin
N = 1
observations = []
def solve(previous, ack, duplicates):
    return duplicates if ack == previous else 0
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve(10, 10, 2), 3)", "check('fixture 2', solve(10, 11, 2), 0)", "check('fixture 3', solve(0, 0, 0), 1)", "check('fixture 4', solve(10, 12, 0), 0)"]
for _line in _fixtures[N % len(_fixtures):] + _fixtures[:N % len(_fixtures)]:
    exec(_line)
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:
Duplicate ack counter resets on forward progress.

Bounded offline decision model: duplicate ack counter resets on forward progress. Inputs are already validated protocol fields; the explicit fixtures define the supported policy, not a complete protocol implementation.

split: open-access


broken_source:
"""Failure Map reference implementation. Python standard library only."""
import json
import ipaddress
import re
from urllib.parse import urlsplit, urljoin
N = 1
observations = []
def solve(old, new, threshold):
    return new >= threshold
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve(2, 3, 3), True)", "check('fixture 2', solve(3, 4, 3), False)", "check('fixture 3', solve(0, 2, 3), False)", "check('fixture 4', solve(1, 4, 3), True)"]
for _line in _fixtures[N % len(_fixtures):] + _fixtures[:N % len(_fixtures)]:
    exec(_line)
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 ipaddress
import re
from urllib.parse import urlsplit, urljoin
N = 1
observations = []
def solve(old, new, threshold):
    return new > threshold
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve(2, 3, 3), True)", "check('fixture 2', solve(3, 4, 3), False)", "check('fixture 3', solve(0, 2, 3), False)", "check('fixture 4', solve(1, 4, 3), True)"]
for _line in _fixtures[N % len(_fixtures):] + _fixtures[:N % len(_fixtures)]:
    exec(_line)
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:
Fast retransmit fires on threshold crossing once.

Bounded offline decision model: fast retransmit fires on threshold crossing once. Inputs are already validated protocol fields; the explicit fixtures define the supported policy, not a complete protocol implementation.

split: open-access


broken_source:
"""Failure Map reference implementation. Python standard library only."""
import json
import ipaddress
import re
from urllib.parse import urlsplit, urljoin
N = 1
observations = []
def solve(retransmitted, sample):
    return sample
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve(True, 10), None)", "check('fixture 2', solve(False, 10), 10)", "check('fixture 3', solve(False, 0), 0)", "check('fixture 4', solve(True, 0), None)"]
for _line in _fixtures[N % len(_fixtures):] + _fixtures[:N % len(_fixtures)]:
    exec(_line)
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 ipaddress
import re
from urllib.parse import urlsplit, urljoin
N = 1
observations = []
def solve(retransmitted, sample):
    return None
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve(True, 10), None)", "check('fixture 2', solve(False, 10), 10)", "check('fixture 3', solve(False, 0), 0)", "check('fixture 4', solve(True, 0), None)"]
for _line in _fixtures[N % len(_fixtures):] + _fixtures[:N % len(_fixtures)]:
    exec(_line)
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:
Retransmitted segments do not supply ambiguous rtt samples.

Bounded offline decision model: retransmitted segments do not supply ambiguous rtt samples. Inputs are already validated protocol fields; the explicit fixtures define the supported policy, not a complete protocol implementation.

split: open-access


broken_source:
"""Failure Map reference implementation. Python standard library only."""
import json
import ipaddress
import re
from urllib.parse import urlsplit, urljoin
N = 1
observations = []
def solve(old, sample, alpha):
    return (old+sample)/2
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve(10, 30, 0.25), 15)", "check('fixture 2', solve(10, 30, 0), 10)", "check('fixture 3', solve(10, 30, 1), 30)", "check('fixture 4', solve(0, 0, 0.5), 0)"]
for _line in _fixtures[N % len(_fixtures):] + _fixtures[:N % len(_fixtures)]:
    exec(_line)
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 ipaddress
import re
from urllib.parse import urlsplit, urljoin
N = 1
observations = []
def solve(old, sample, alpha):
    return alpha*old+(1-alpha)*sample
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve(10, 30, 0.25), 15)", "check('fixture 2', solve(10, 30, 0), 10)", "check('fixture 3', solve(10, 30, 1), 30)", "check('fixture 4', solve(0, 0, 0.5), 0)"]
for _line in _fixtures[N % len(_fixtures):] + _fixtures[:N % len(_fixtures)]:
    exec(_line)
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:
Rtt estimator weights old and new samples.

Bounded offline decision model: rtt estimator weights old and new samples. Inputs are already validated protocol fields; the explicit fixtures define the supported policy, not a complete protocol implementation.

split: open-access


broken_source:
"""Failure Map reference implementation. Python standard library only."""
import json
import ipaddress
import re
from urllib.parse import urlsplit, urljoin
N = 1
observations = []
def solve(srtt, variation, granularity):
    return srtt+variation
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve(10, 2, 1), 18)", "check('fixture 2', solve(10, 0, 3), 13)", "check('fixture 3', solve(0, 0, 1), 1)", "check('fixture 4', solve(10, 1, 8), 18)"]
for _line in _fixtures[N % len(_fixtures):] + _fixtures[:N % len(_fixtures)]:
    exec(_line)
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 ipaddress
import re
from urllib.parse import urlsplit, urljoin
N = 1
observations = []
def solve(srtt, variation, granularity):
    return srtt+4*variation
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve(10, 2, 1), 18)", "check('fixture 2', solve(10, 0, 3), 13)", "check('fixture 3', solve(0, 0, 1), 1)", "check('fixture 4', solve(10, 1, 8), 18)"]
for _line in _fixtures[N % len(_fixtures):] + _fixtures[:N % len(_fixtures)]:
    exec(_line)
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:
Rto includes variation and clock granularity.

Bounded offline decision model: rto includes variation and clock granularity. Inputs are already validated protocol fields; the explicit fixtures define the supported policy, not a complete protocol implementation.

split: open-access


broken_source:
"""Failure Map reference implementation. Python standard library only."""
import json
import ipaddress
import re
from urllib.parse import urlsplit, urljoin
N = 1
observations = []
def solve(rto, cap):
    return 2*rto
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve(8, 10), 10)", "check('fixture 2', solve(2, 10), 4)", "check('fixture 3', solve(0, 10), 0)", "check('fixture 4', solve(5, 10), 10)"]
for _line in _fixtures[N % len(_fixtures):] + _fixtures[:N % len(_fixtures)]:
    exec(_line)
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 ipaddress
import re
from urllib.parse import urlsplit, urljoin
N = 1
observations = []
def solve(rto, cap):
    return max(2*rto,cap)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve(8, 10), 10)", "check('fixture 2', solve(2, 10), 4)", "check('fixture 3', solve(0, 10), 0)", "check('fixture 4', solve(5, 10), 10)"]
for _line in _fixtures[N % len(_fixtures):] + _fixtures[:N % len(_fixtures)]:
    exec(_line)
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:
Retransmission timeout doubles with upper cap.

Bounded offline decision model: retransmission timeout doubles with upper cap. Inputs are already validated protocol fields; the explicit fixtures define the supported policy, not a complete protocol implementation.

split: open-access


broken_source:
"""Failure Map reference implementation. Python standard library only."""
import json
import ipaddress
import re
from urllib.parse import urlsplit, urljoin
N = 1
observations = []
def solve(flight, segment):
    return flight//2
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve(2, 2), 4)", "check('fixture 2', solve(20, 2), 10)", "check('fixture 3', solve(0, 1), 2)", "check('fixture 4', solve(8, 2), 4)"]
for _line in _fixtures[N % len(_fixtures):] + _fixtures[:N % len(_fixtures)]:
    exec(_line)
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 ipaddress
import re
from urllib.parse import urlsplit, urljoin
N = 1
observations = []
def solve(flight, segment):
    return min(flight//2,2*segment)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve(2, 2), 4)", "check('fixture 2', solve(20, 2), 10)", "check('fixture 3', solve(0, 1), 2)", "check('fixture 4', solve(8, 2), 4)"]
for _line in _fixtures[N % len(_fixtures):] + _fixtures[:N % len(_fixtures)]:
    exec(_line)
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:
Congestion loss threshold has two segment floor.

Bounded offline decision model: congestion loss threshold has two segment floor. Inputs are already validated protocol fields; the explicit fixtures define the supported policy, not a complete protocol implementation.

split: open-access


broken_source:
"""Failure Map reference implementation. Python standard library only."""
import json
import ipaddress
import re
from urllib.parse import urlsplit, urljoin
N = 1
observations = []
def solve(window, probe_due):
    return window > 0 and probe_due
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve(0, True), True)", "check('fixture 2', solve(0, False), False)", "check('fixture 3', solve(1, True), False)", "check('fixture 4', solve(1, False), False)"]
for _line in _fixtures[N % len(_fixtures):] + _fixtures[:N % len(_fixtures)]:
    exec(_line)
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 ipaddress
import re
from urllib.parse import urlsplit, urljoin
N = 1
observations = []
def solve(window, probe_due):
    return window == 0
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve(0, True), True)", "check('fixture 2', solve(0, False), False)", "check('fixture 3', solve(1, True), False)", "check('fixture 4', solve(1, False), False)"]
for _line in _fixtures[N % len(_fixtures):] + _fixtures[:N % len(_fixtures)]:
    exec(_line)
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:
Zero window probe remains permitted with no send credit.

Bounded offline decision model: zero window probe remains permitted with no send credit. Inputs are already validated protocol fields; the explicit fixtures define the supported policy, not a complete protocol implementation.

split: open-access


broken_source:
"""Failure Map reference implementation. Python standard library only."""
import json
import ipaddress
import re
from urllib.parse import urlsplit, urljoin
N = 1
observations = []
def solve(outstanding, size, mss):
    return size < mss
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve(0, 2, 10), False)", "check('fixture 2', solve(2, 10, 10), False)", "check('fixture 3', solve(2, 2, 10), True)", "check('fixture 4', solve(0, 10, 10), False)"]
for _line in _fixtures[N % len(_fixtures):] + _fixtures[:N % len(_fixtures)]:
    exec(_line)
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 ipaddress
import re
from urllib.parse import urlsplit, urljoin
N = 1
observations = []
def solve(outstanding, size, mss):
    return outstanding > 0
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve(0, 2, 10), False)", "check('fixture 2', solve(2, 10, 10), False)", "check('fixture 3', solve(2, 2, 10), True)", "check('fixture 4', solve(0, 10, 10), False)"]
for _line in _fixtures[N % len(_fixtures):] + _fixtures[:N % len(_fixtures)]:
    exec(_line)
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:
Nagle buffering applies only with outstanding data and small write.

Bounded offline decision model: nagle buffering applies only with outstanding data and small write. Inputs are already validated protocol fields; the explicit fixtures define the supported policy, not a complete protocol implementation.

split: open-access


broken_source:
"""Failure Map reference implementation. Python standard library only."""
import json
import ipaddress
import re
from urllib.parse import urlsplit, urljoin
N = 1
observations = []
def solve(segments, expired):
    return segments > 2 or expired
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve(2, False), True)", "check('fixture 2', solve(0, True), True)", "check('fixture 3', solve(1, False), False)", "check('fixture 4', solve(2, True), True)"]
for _line in _fixtures[N % len(_fixtures):] + _fixtures[:N % len(_fixtures)]:
    exec(_line)
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 ipaddress
import re
from urllib.parse import urlsplit, urljoin
N = 1
observations = []
def solve(segments, expired):
    return segments >= 2 and expired
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve(2, False), True)", "check('fixture 2', solve(0, True), True)", "check('fixture 3', solve(1, False), False)", "check('fixture 4', solve(2, True), True)"]
for _line in _fixtures[N % len(_fixtures):] + _fixtures[:N % len(_fixtures)]:
    exec(_line)
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:
Delayed ack is forced by second full segment or timer.

Bounded offline decision model: delayed ack is forced by second full segment or timer. Inputs are already validated protocol fields; the explicit fixtures define the supported policy, not a complete protocol implementation.

split: open-access


broken_source:
"""Failure Map reference implementation. Python standard library only."""
import json
import ipaddress
import re
from urllib.parse import urlsplit, urljoin
N = 1
observations = []
def solve(segments, ack):
    return [(s,e) for s,e in segments if s > ack]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve([(0, 5), (5, 10)], 5), [(5, 10)])", "check('fixture 2', solve([(0, 5)], 3), [(0, 5)])", "check('fixture 3', solve([], 0), [])", "check('fixture 4', solve([(0, 5)], 5), [])"]
for _line in _fixtures[N % len(_fixtures):] + _fixtures[:N % len(_fixtures)]:
    exec(_line)
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 ipaddress
import re
from urllib.parse import urlsplit, urljoin
N = 1
observations = []
def solve(segments, ack):
    return [(s,e) for s,e in segments if e >= ack]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve([(0, 5), (5, 10)], 5), [(5, 10)])", "check('fixture 2', solve([(0, 5)], 3), [(0, 5)])", "check('fixture 3', solve([], 0), [])", "check('fixture 4', solve([(0, 5)], 5), [])"]
for _line in _fixtures[N % len(_fixtures):] + _fixtures[:N % len(_fixtures)]:
    exec(_line)
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:
Send buffer removes only cumulatively acknowledged segments.

Bounded offline decision model: send buffer removes only cumulatively acknowledged segments. Inputs are already validated protocol fields; the explicit fixtures define the supported policy, not a complete protocol implementation.

split: open-access


broken_source:
"""Failure Map reference implementation. Python standard library only."""
import json
import ipaddress
import re
from urllib.parse import urlsplit, urljoin
N = 1
observations = []
def solve(next_, start, end):
    return max(next_,end)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve(5, 8, 10), 5)", "check('fixture 2', solve(5, 3, 8), 8)", "check('fixture 3', solve(5, 5, 8), 8)", "check('fixture 4', solve(5, 0, 3), 5)"]
for _line in _fixtures[N % len(_fixtures):] + _fixtures[:N % len(_fixtures)]:
    exec(_line)
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 ipaddress
import re
from urllib.parse import urlsplit, urljoin
N = 1
observations = []
def solve(next_, start, end):
    return end if start == next_ else next_
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve(5, 8, 10), 5)", "check('fixture 2', solve(5, 3, 8), 8)", "check('fixture 3', solve(5, 5, 8), 8)", "check('fixture 4', solve(5, 0, 3), 5)"]
for _line in _fixtures[N % len(_fixtures):] + _fixtures[:N % len(_fixtures)]:
    exec(_line)
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:
Out of order receive does not advance cumulative ack over gap.

Bounded offline decision model: out of order receive does not advance cumulative ack over gap. Inputs are already validated protocol fields; the explicit fixtures define the supported policy, not a complete protocol implementation.

split: open-access


broken_source:
"""Failure Map reference implementation. Python standard library only."""
import json
import ipaddress
import re
from urllib.parse import urlsplit, urljoin
N = 1
observations = []
def solve(blocks, next_):
    return blocks
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve([(0, 5), (8, 10)], 5), [(8, 10)])", "check('fixture 2', solve([(3, 8)], 5), [])", "check('fixture 3', solve([], 5), [])", "check('fixture 4', solve([(9, 10)], 5), [(9, 10)])"]
for _line in _fixtures[N % len(_fixtures):] + _fixtures[:N % len(_fixtures)]:
    exec(_line)
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 ipaddress
import re
from urllib.parse import urlsplit, urljoin
N = 1
observations = []
def solve(blocks, next_):
    return [(s,e) for s,e in blocks if e > next_]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve([(0, 5), (8, 10)], 5), [(8, 10)])", "check('fixture 2', solve([(3, 8)], 5), [])", "check('fixture 3', solve([], 5), [])", "check('fixture 4', solve([(9, 10)], 5), [(9, 10)])"]
for _line in _fixtures[N % len(_fixtures):] + _fixtures[:N % len(_fixtures)]:
    exec(_line)
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:
Sack reports out of order blocks without changing cumulative ack.

Bounded offline decision model: sack reports out of order blocks without changing cumulative ack. Inputs are already validated protocol fields; the explicit fixtures define the supported policy, not a complete protocol implementation.

split: open-access


broken_source:
"""Failure Map reference implementation. Python standard library only."""
import json
import ipaddress
import re
from urllib.parse import urlsplit, urljoin
N = 1
observations = []
def solve(length, datagram):
    return 'data' if length else 'eof'
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve(0, True), 'data')", "check('fixture 2', solve(0, False), 'eof')", "check('fixture 3', solve(3, True), 'data')", "check('fixture 4', solve(3, False), 'data')"]
for _line in _fixtures[N % len(_fixtures):] + _fixtures[:N % len(_fixtures)]:
    exec(_line)
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 ipaddress
import re
from urllib.parse import urlsplit, urljoin
N = 1
observations = []
def solve(length, datagram):
    return 'data'
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve(0, True), 'data')", "check('fixture 2', solve(0, False), 'eof')", "check('fixture 3', solve(3, True), 'data')", "check('fixture 4', solve(3, False), 'data')"]
for _line in _fixtures[N % len(_fixtures):] + _fixtures[:N % len(_fixtures)]:
    exec(_line)
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:
Udp zero length datagram is data not stream eof.

Bounded offline decision model: udp zero length datagram is data not stream eof. Inputs are already validated protocol fields; the explicit fixtures define the supported policy, not a complete protocol implementation.

split: open-access


broken_source:
"""Failure Map reference implementation. Python standard library only."""
import json
import ipaddress
import re
from urllib.parse import urlsplit, urljoin
N = 1
observations = []
def solve(payload, capacity):
    return (payload[:capacity],False)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve('abcdef', 3), ('abc', True))", "check('fixture 2', solve('abc', 3), ('abc', False))", "check('fixture 3', solve('', 0), ('', False))", "check('fixture 4', solve('a', 0), ('', True))"]
for _line in _fixtures[N % len(_fixtures):] + _fixtures[:N % len(_fixtures)]:
    exec(_line)
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 ipaddress
import re
from urllib.parse import urlsplit, urljoin
N = 1
observations = []
def solve(payload, capacity):
    return (payload[:capacity],len(payload)>=capacity)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve('abcdef', 3), ('abc', True))", "check('fixture 2', solve('abc', 3), ('abc', False))", "check('fixture 3', solve('', 0), ('', False))", "check('fixture 4', solve('a', 0), ('', True))"]
for _line in _fixtures[N % len(_fixtures):] + _fixtures[:N % len(_fixtures)]:
    exec(_line)
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:
Datagram truncation is reported separately from copied length.

Bounded offline decision model: datagram truncation is reported separately from copied length. Inputs are already validated protocol fields; the explicit fixtures define the supported policy, not a complete protocol implementation.

split: open-access


broken_source:
"""Failure Map reference implementation. Python standard library only."""
import json
import ipaddress
import re
from urllib.parse import urlsplit, urljoin
N = 1
observations = []
def solve(mtu, ip, transport):
    return mtu-ip
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve(1500, 20, 20), 1460)", "check('fixture 2', solve(30, 20, 20), 0)", "check('fixture 3', solve(100, 0, 0), 100)", "check('fixture 4', solve(1280, 40, 8), 1232)"]
for _line in _fixtures[N % len(_fixtures):] + _fixtures[:N % len(_fixtures)]:
    exec(_line)
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 ipaddress
import re
from urllib.parse import urlsplit, urljoin
N = 1
observations = []
def solve(mtu, ip, transport):
    return max(0,mtu-max(ip,transport))
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve(1500, 20, 20), 1460)", "check('fixture 2', solve(30, 20, 20), 0)", "check('fixture 3', solve(100, 0, 0), 100)", "check('fixture 4', solve(1280, 40, 8), 1232)"]
for _line in _fixtures[N % len(_fixtures):] + _fixtures[:N % len(_fixtures)]:
    exec(_line)
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:
Path mtu payload budget subtracts all protocol overheads.

Bounded offline decision model: path mtu payload budget subtracts all protocol overheads. Inputs are already validated protocol fields; the explicit fixtures define the supported policy, not a complete protocol implementation.

split: open-access


broken_source:
"""Failure Map reference implementation. Python standard library only."""
import json
import ipaddress
import re
from urllib.parse import urlsplit, urljoin
N = 1
observations = []
def solve(size, mtu, df):
    return size <= mtu
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve(1500, 1500, True), True)", "check('fixture 2', solve(1501, 1500, True), False)", "check('fixture 3', solve(1501, 1500, False), True)", "check('fixture 4', solve(0, 0, True), True)"]
for _line in _fixtures[N % len(_fixtures):] + _fixtures[:N % len(_fixtures)]:
    exec(_line)
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 ipaddress
import re
from urllib.parse import urlsplit, urljoin
N = 1
observations = []
def solve(size, mtu, df):
    return not df or size < mtu
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve(1500, 1500, True), True)", "check('fixture 2', solve(1501, 1500, True), False)", "check('fixture 3', solve(1501, 1500, False), True)", "check('fixture 4', solve(0, 0, True), True)"]
for _line in _fixtures[N % len(_fixtures):] + _fixtures[:N % len(_fixtures)]:
    exec(_line)
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:
Dont fragment policy rejects packets exceeding path mtu.

Bounded offline decision model: dont fragment policy rejects packets exceeding path mtu. Inputs are already validated protocol fields; the explicit fixtures define the supported policy, not a complete protocol implementation.

split: open-access