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(qualities):
    return qualities.get("identity",0)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve({}), 1)", "check('fixture 2', solve({'*': 0}), 0)", "check('fixture 3', solve({'identity': 0.2, '*': 0}), 0.2)", "check('fixture 4', solve({'gzip': 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(qualities):
    return qualities.get("identity",1)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve({}), 1)", "check('fixture 2', solve({'*': 0}), 0)", "check('fixture 3', solve({'identity': 0.2, '*': 0}), 0.2)", "check('fixture 4', solve({'gzip': 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:
Identity encoding is implicit unless specifically excluded.

Bounded offline decision model: identity encoding is implicit unless specifically excluded. 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(present, encodings):
    return encodings
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve(True, []), ['identity'])", "check('fixture 2', solve(False, []), [])", "check('fixture 3', solve(True, ['gzip']), ['gzip'])", "check('fixture 4', solve(False, ['br']), ['br'])"]
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(present, encodings):
    return ['identity'] if not encodings else encodings
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve(True, []), ['identity'])", "check('fixture 2', solve(False, []), [])", "check('fixture 3', solve(True, ['gzip']), ['gzip'])", "check('fixture 4', solve(False, ['br']), ['br'])"]
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:
Empty accept encoding requires identity.

Bounded offline decision model: empty accept encoding requires identity. 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(existing, acceptable):
    return acceptable
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve(True, True), False)", "check('fixture 2', solve(False, False), False)", "check('fixture 3', solve(False, True), True)", "check('fixture 4', solve(True, 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(existing, acceptable):
    return not existing
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve(True, True), False)", "check('fixture 2', solve(False, False), False)", "check('fixture 3', solve(False, True), True)", "check('fixture 4', solve(True, 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:
Compression skips already coded representations.

Bounded offline decision model: compression skips already coded representations. 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(raw, candidates, overhead):
    return min(candidates,key=lambda c:c[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(100, [('gzip', 95)], 10), None)", "check('fixture 2', solve(100, [('gzip', 90)], 10), None)", "check('fixture 3', solve(100, [('gzip', 70), ('br', 60)], 10), 'br')", "check('fixture 4', solve(100, [], 10), 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(raw, candidates, overhead):
    return min((c for c in candidates if c[1]+overhead <= raw),key=lambda c:c[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(100, [('gzip', 95)], 10), None)", "check('fixture 2', solve(100, [('gzip', 90)], 10), None)", "check('fixture 3', solve(100, [('gzip', 70), ('br', 60)], 10), 'br')", "check('fixture 4', solve(100, [], 10), 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:
Compression benefit includes content coding overhead.

Given raw, candidates, overhead, compression benefit includes content coding overhead. 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(plain, coded):
    return len(plain)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve('é', None), 2)", "check('fixture 2', solve('hello', ['a', 'bc']), 3)", "check('fixture 3', solve('hello', []), 0)", "check('fixture 4', solve('', None), 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(plain, coded):
    return sum(len(chunk) for chunk in coded) if coded else len(plain.encode("utf-8"))
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve('é', None), 2)", "check('fixture 2', solve('hello', ['a', 'bc']), 3)", "check('fixture 3', solve('hello', []), 0)", "check('fixture 4', solve('', None), 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:
Content length after coding describes transmitted octets.

Given plain, coded, content length after coding describes transmitted octets. 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(range_, language):
    return language.lower().startswith(range_.lower())
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve('en', 'en-US'), True)", "check('fixture 2', solve('en', 'english'), False)", "check('fixture 3', solve('*', 'fr'), True)", "check('fixture 4', solve('fr', 'EN-us'), 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(range_, language):
    return language.lower() == range_.lower()
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve('en', 'en-US'), True)", "check('fixture 2', solve('en', 'english'), False)", "check('fixture 3', solve('*', 'fr'), True)", "check('fixture 4', solve('fr', 'EN-us'), 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:
Language basic filtering requires subtag boundary.

Bounded offline decision model: language basic filtering requires subtag boundary. 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(language):
    return language.split('-',1)[0] if '-' in language else None
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve('zh-Hant-TW'), 'zh-Hant')", "check('fixture 2', solve('en-US'), 'en')", "check('fixture 3', solve('en'), None)", "check('fixture 4', solve('sr-Latn-RS'), 'sr-Latn')"]
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(language):
    return language
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve('zh-Hant-TW'), 'zh-Hant')", "check('fixture 2', solve('en-US'), 'en')", "check('fixture 3', solve('en'), None)", "check('fixture 4', solve('sr-Latn-RS'), 'sr-Latn')"]
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:
Language lookup truncates rightmost subtags.

Bounded offline decision model: language lookup truncates rightmost subtags. 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(qualities):
    return max(qualities,key=lambda p:p[1])[0] if qualities else None
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve([('en', '0.9'), ('fr', '0.10')]), 'en')", "check('fixture 2', solve([('en', '1'), ('fr', '1.0')]), 'en')", "check('fixture 3', solve([]), None)", "check('fixture 4', solve([('fr', '0.5')]), 'fr')"]
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(qualities):
    return min(qualities,key=lambda p:float(p[1]))[0] if qualities else None
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve([('en', '0.9'), ('fr', '0.10')]), 'en')", "check('fixture 2', solve([('en', '1'), ('fr', '1.0')]), 'en')", "check('fixture 3', solve([]), None)", "check('fixture 4', solve([('fr', '0.5')]), 'fr')"]
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:
Language selection does not sort quality lexicographically.

Bounded offline decision model: language selection does not sort quality lexicographically. 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(requested, supported):
    return requested in supported
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve('UTF-8', ['utf-8']), True)", "check('fixture 2', solve('utf-8', ['UTF-8']), True)", "check('fixture 3', solve('ascii', ['utf-8']), False)", "check('fixture 4', solve('ascii', []), 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(requested, supported):
    return requested.lower() in supported
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve('UTF-8', ['utf-8']), True)", "check('fixture 2', solve('utf-8', ['UTF-8']), True)", "check('fixture 3', solve('ascii', ['utf-8']), False)", "check('fixture 4', solve('ascii', []), 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:
Charset name comparison is case insensitive.

Bounded offline decision model: charset name comparison is case insensitive. 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(media, declared):
    return declared or 'utf-8'
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve('text/plain', None), None)", "check('fixture 2', solve('application/json', None), 'utf-8')", "check('fixture 3', solve('text/plain', 'latin1'), 'latin1')", "check('fixture 4', solve('image/png', 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(media, declared):
    return 'utf-8' if media == 'application/json' else None
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve('text/plain', None), None)", "check('fixture 2', solve('application/json', None), 'utf-8')", "check('fixture 3', solve('text/plain', 'latin1'), 'latin1')", "check('fixture 4', solve('image/png', 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:
Charset default is not inferred from an unrelated media type.

Bounded offline decision model: charset default is not inferred from an unrelated media type. 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):
    return old+new
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve(['Accept'], ['accept', 'Encoding']), ['accept', 'encoding'])", "check('fixture 2', solve([], []), [])", "check('fixture 3', solve(['z'], ['a']), ['z', '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(old, new):
    return sorted(set(old+new))
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve(['Accept'], ['accept', 'Encoding']), ['accept', 'encoding'])", "check('fixture 2', solve([], []), [])", "check('fixture 3', solve(['z'], ['a']), ['z', '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:
Vary header union is case insensitive and stable.

Bounded offline decision model: vary header union is case insensitive and stable. 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(fields):
    return fields
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve(['accept', '*']), ['*'])", "check('fixture 2', solve(['accept']), ['accept'])", "check('fixture 3', solve([]), [])", "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(fields):
    return ['*'] if fields else []
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve(['accept', '*']), ['*'])", "check('fixture 2', solve(['accept']), ['accept'])", "check('fixture 3', solve([]), [])", "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:
Wildcard vary absorbs other vary fields.

Bounded offline decision model: wildcard vary absorbs other vary fields. 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(encoded, coded, plain, start, end):
    return plain[start:end+1]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve(True, 'abcd', '0123456789', 1, 2), 'bc')", "check('fixture 2', solve(False, 'abcd', '0123456789', 1, 2), '12')", "check('fixture 3', solve(True, 'abc', 'x', 0, 0), 'a')", "check('fixture 4', solve(False, 'a', 'xyz', 1, 9), 'yz')"]
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(encoded, coded, plain, start, end):
    return (coded if encoded else plain)[start:end]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve(True, 'abcd', '0123456789', 1, 2), 'bc')", "check('fixture 2', solve(False, 'abcd', '0123456789', 1, 2), '12')", "check('fixture 3', solve(True, 'abc', 'x', 0, 0), 'a')", "check('fixture 4', solve(False, 'a', 'xyz', 1, 9), 'yz')"]
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:
Range on encoded response addresses coded representation.

Given encoded, coded, plain, start, end, range on encoded response addresses coded representation. 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(type_, parameters):
    return type_
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve('text/plain', [('charset', 'utf-8')]), 'text/plain; charset=utf-8')", "check('fixture 2', solve('image/png', []), 'image/png')", "check('fixture 3', solve('text/html', [('level', '1'), ('charset', 'utf-8')]), 'text/html; level=1; charset=utf-8')", "check('fixture 4', solve('application/json', []), 'application/json')"]
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(type_, parameters):
    return type_ + "; " + "; ".join(k+"="+v for k,v in parameters)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve('text/plain', [('charset', 'utf-8')]), 'text/plain; charset=utf-8')", "check('fixture 2', solve('image/png', []), 'image/png')", "check('fixture 3', solve('text/html', [('level', '1'), ('charset', 'utf-8')]), 'text/html; level=1; charset=utf-8')", "check('fixture 4', solve('application/json', []), 'application/json')"]
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:
Negotiated content type retains selected parameters.

Bounded offline decision model: negotiated content type retains selected parameters. 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(media, encoding, language):
    return max(media,encoding,language)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve(1, 0, 1), 0)", "check('fixture 2', solve(0.5, 0.5, 0.5), 0.125)", "check('fixture 3', solve(1, 1, 1), 1)", "check('fixture 4', solve(0, 0, 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(media, encoding, language):
    return (media+encoding+language)/3
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve(1, 0, 1), 0)", "check('fixture 2', solve(0.5, 0.5, 0.5), 0.125)", "check('fixture 3', solve(1, 1, 1), 1)", "check('fixture 4', solve(0, 0, 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:
Accept quality product combines independent dimensions.

Bounded offline decision model: accept quality product combines independent dimensions. 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(available, allowed):
    return '406' if not allowed else 'ok'
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve(['a'], []), '406')", "check('fixture 2', solve([], []), 'ok')", "check('fixture 3', solve(['a'], ['a']), 'ok')", "check('fixture 4', solve([], ['a']), 'ok')"]
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(available, allowed):
    return 'ok'
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve(['a'], []), '406')", "check('fixture 2', solve([], []), 'ok')", "check('fixture 3', solve(['a'], ['a']), 'ok')", "check('fixture 4', solve([], ['a']), 'ok')"]
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:
Negotiation failure is distinct from empty representation.

Bounded offline decision model: negotiation failure is distinct from empty representation. 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(required, actual):
    return len(actual)
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': 1, 'b': 3, 'c': 4}), 1)", "check('fixture 2', solve({}, {'x': 1}), 0)", "check('fixture 3', solve({'a': 1}, {'a': 1}), 1)", "check('fixture 4', solve({'a': 1}, {}), 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(required, actual):
    return len(required)
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': 1, 'b': 3, 'c': 4}), 1)", "check('fixture 2', solve({}, {'x': 1}), 0)", "check('fixture 3', solve({'a': 1}, {'a': 1}), 1)", "check('fixture 4', solve({'a': 1}, {}), 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:
Parameter specificity counts matched constraints.

Bounded offline decision model: parameter specificity counts matched constraints. 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(codings):
    return codings
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve(['gzip', 'br']), ['br', 'gzip'])", "check('fixture 2', solve(['br', 'gzip']), ['gzip', 'br'])", "check('fixture 3', solve([]), [])", "check('fixture 4', solve(['gzip']), ['gzip'])"]
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(codings):
    return sorted(codings)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve(['gzip', 'br']), ['br', 'gzip'])", "check('fixture 2', solve(['br', 'gzip']), ['gzip', 'br'])", "check('fixture 3', solve([]), [])", "check('fixture 4', solve(['gzip']), ['gzip'])"]
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:
Content coding decode order reverses application order.

Bounded offline decision model: content coding decode order reverses application order. 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(codings, supported):
    return any(c in supported for c in codings)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve(['gzip', 'z'], ['gzip']), False)", "check('fixture 2', solve([], ['gzip']), True)", "check('fixture 3', solve(['gzip'], ['gzip']), True)", "check('fixture 4', solve(['z'], []), 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(codings, supported):
    return bool(codings) and all(c in supported for c in codings)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve(['gzip', 'z'], ['gzip']), False)", "check('fixture 2', solve([], ['gzip']), True)", "check('fixture 3', solve(['gzip'], ['gzip']), True)", "check('fixture 4', solve(['z'], []), 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:
Unsupported coding is rejected before body decoding.

Bounded offline decision model: unsupported coding is rejected before body decoding. 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, tokens):
    return {k:v for k,v in headers.items() if k.lower() != "connection"}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve({'Connection': 'X', 'X': 'v', 'End': 'e'}, ['x']), {'End': 'e'})", "check('fixture 2', solve({}, []), {})", "check('fixture 3', solve({'end': 'e'}, []), {'end': 'e'})", "check('fixture 4', solve({'x': 'v'}, ['X']), {})"]
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, tokens):
    return {k:v for k,v in headers.items() if k not in tokens}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve({'Connection': 'X', 'X': 'v', 'End': 'e'}, ['x']), {'End': 'e'})", "check('fixture 2', solve({}, []), {})", "check('fixture 3', solve({'end': 'e'}, []), {'end': 'e'})", "check('fixture 4', solve({'x': 'v'}, ['X']), {})"]
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:
Connection nominated fields are removed case insensitively.

Bounded offline decision model: connection nominated fields are removed case insensitively. 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(chain, hop):
    return [hop]+chain
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', 'b'], 'c'), ['a', 'b', 'c'])", "check('fixture 4', solve(['a'], 'a'), ['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)

evaluation_group: xh-forwarded-chain-appends-current-hop

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(chain, hop):
    return [hop]
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', 'b'], 'c'), ['a', 'b', 'c'])", "check('fixture 4', solve(['a'], 'a'), ['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:
Forwarded chain appends current hop.

Bounded offline decision model: forwarded chain appends current hop. 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(chain, trusted):
    return chain[0] if chain else None
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve(['spoof', 'client', 'proxy'], ['proxy']), 'client')", "check('fixture 2', solve(['proxy'], ['proxy']), None)", "check('fixture 3', solve([], []), None)", "check('fixture 4', solve(['a', 'b'], []), 'b')"]
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(chain, trusted):
    return next((h for h in chain if h not in trusted),None)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve(['spoof', 'client', 'proxy'], ['proxy']), 'client')", "check('fixture 2', solve(['proxy'], ['proxy']), None)", "check('fixture 3', solve([], []), None)", "check('fixture 4', solve(['a', 'b'], []), 'b')"]
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:
Trusted proxy walk stops at first untrusted hop.

Bounded offline decision model: trusted proxy walk stops at first untrusted hop. 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, chain, trusted):
    return chain
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve('p', ['c'], ['p']), ['c'])", "check('fixture 2', solve('p', ['spoof'], []), ['p'])", "check('fixture 3', solve('p', [], []), ['p'])", "check('fixture 4', solve('p', [], ['p']), [])"]
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, chain, trusted):
    return [peer]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve('p', ['c'], ['p']), ['c'])", "check('fixture 2', solve('p', ['spoof'], []), ['p'])", "check('fixture 3', solve('p', [], []), ['p'])", "check('fixture 4', solve('p', [], ['p']), [])"]
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:
Untrusted peer cannot supply forwarding identity.

Bounded offline decision model: untrusted peer cannot supply forwarding identity. 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(self_, hops):
    return any(self_ in h for h in hops)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve('a', ['aa']), False)", "check('fixture 2', solve('a', ['a', 'b']), True)", "check('fixture 3', solve('a', []), False)", "check('fixture 4', solve('a', ['b', 'a']), 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(self_, hops):
    return hops[-1] == self_ if hops else False
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve('a', ['aa']), False)", "check('fixture 2', solve('a', ['a', 'b']), True)", "check('fixture 3', solve('a', []), False)", "check('fixture 4', solve('a', ['b', 'a']), 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:
Via loop detection matches hop identities not substrings.

Bounded offline decision model: via loop detection matches hop identities not substrings. 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(url, downstream, preserve):
    return downstream
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve('https://up:8443/a', 'down', False), 'up:8443')", "check('fixture 2', solve('https://up/a', 'down', True), 'down')", "check('fixture 3', solve('https://up/a', 'down', False), 'up')", "check('fixture 4', solve('http://up:80/a', 'down', False), 'up:80')"]
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(url, downstream, preserve):
    return urlsplit(url).hostname
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve('https://up:8443/a', 'down', False), 'up:8443')", "check('fixture 2', solve('https://up/a', 'down', True), 'down')", "check('fixture 3', solve('https://up/a', 'down', False), 'up')", "check('fixture 4', solve('http://up:80/a', 'down', False), 'up:80')"]
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:
Proxy host header follows upstream authority not downstream host.

Given url, downstream, preserve, proxy host header follows upstream authority not downstream host. 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(tls, forwarded, trusted):
    return forwarded or ('https' if tls else 'http')
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve(False, 'https', False), 'http')", "check('fixture 2', solve(False, 'https', True), 'https')", "check('fixture 3', solve(True, 'other', True), 'https')", "check('fixture 4', solve(False, None, True), 'http')"]
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(tls, forwarded, trusted):
    return 'https' if tls else 'http'
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve(False, 'https', False), 'http')", "check('fixture 2', solve(False, 'https', True), 'https')", "check('fixture 3', solve(True, 'other', True), 'https')", "check('fixture 4', solve(False, None, True), 'http')"]
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:
Forwarded protocol is accepted only from trusted peer.

Bounded offline decision model: forwarded protocol is accepted only from trusted peer. 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(method, count):
    return max(0,count-1)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve('GET', 5), 5)", "check('fixture 2', solve('OPTIONS', 5), 4)", "check('fixture 3', solve('TRACE', 0), 0)", "check('fixture 4', solve('POST', 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(method, count):
    return count
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve('GET', 5), 5)", "check('fixture 2', solve('OPTIONS', 5), 4)", "check('fixture 3', solve('TRACE', 0), 0)", "check('fixture 4', solve('POST', 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:
Max forwards is decremented only for trace and options.

Bounded offline decision model: max forwards is decremented only for trace and options. 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(method, count):
    return count == 0
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve('GET', 0), False)", "check('fixture 2', solve('OPTIONS', 0), True)", "check('fixture 3', solve('TRACE', 0), True)", "check('fixture 4', solve('TRACE', 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(method, count):
    return method == 'TRACE' and count == 0
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve('GET', 0), False)", "check('fixture 2', solve('OPTIONS', 0), True)", "check('fixture 3', solve('TRACE', 0), True)", "check('fixture 4', solve('TRACE', 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:
Zero max forwards terminates forwarding.

Bounded offline decision model: zero max forwards terminates forwarding. 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(values):
    return values
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve(['gzip', 'trailers']), ['trailers'])", "check('fixture 2', solve([]), [])", "check('fixture 3', solve(['Trailers']), ['Trailers'])", "check('fixture 4', solve(['gzip']), [])"]
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(values):
    return []
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve(['gzip', 'trailers']), ['trailers'])", "check('fixture 2', solve([]), [])", "check('fixture 3', solve(['Trailers']), ['Trailers'])", "check('fixture 4', solve(['gzip']), [])"]
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:
Te forwarding allows trailers but not transfer codings.

Bounded offline decision model: te forwarding allows trailers but not transfer codings. 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(fields):
    return [", ".join(fields)] if fields else []
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=1', 'b=2'])", "check('fixture 2', solve(['a=1', 'a=1']), ['a=1', 'a=1'])", "check('fixture 3', solve([]), [])", "check('fixture 4', solve(['a=1']), ['a=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(fields):
    return list(dict.fromkeys(fields))
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=1', 'b=2'])", "check('fixture 2', solve(['a=1', 'a=1']), ['a=1', 'a=1'])", "check('fixture 3', solve([]), [])", "check('fixture 4', solve(['a=1']), ['a=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:
Multiple set cookie fields are not comma coalesced.

Bounded offline decision model: multiple set cookie fields are not comma coalesced. 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(timeout, connected):
    return 502 if not connected else 200
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve(True, False), 504)", "check('fixture 2', solve(False, False), 502)", "check('fixture 3', solve(False, True), 200)", "check('fixture 4', solve(True, True), 504)"]
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(timeout, connected):
    return 504 if not connected else 200
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve(True, False), 504)", "check('fixture 2', solve(False, False), 502)", "check('fixture 3', solve(False, True), 200)", "check('fixture 4', solve(True, True), 504)"]
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:
Proxy error status distinguishes timeout from connect failure.

Bounded offline decision model: proxy error status distinguishes timeout from connect failure. 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(tunnel, payload, transform):
    return transform+payload
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve(True, 'abc', 'x'), 'abc')", "check('fixture 2', solve(False, 'abc', 'x'), 'xabc')", "check('fixture 3', solve(True, '', 'x'), '')", "check('fixture 4', solve(False, '', 'x'), 'x')"]
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(tunnel, payload, transform):
    return payload
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve(True, 'abc', 'x'), 'abc')", "check('fixture 2', solve(False, 'abc', 'x'), 'xabc')", "check('fixture 3', solve(True, '', 'x'), '')", "check('fixture 4', solve(False, '', 'x'), 'x')"]
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:
Tunnel bytes bypass http transformation after upgrade.

Bounded offline decision model: tunnel bytes bypass http transformation after upgrade. 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(close, drained, healthy):
    return drained and 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), False)", "check('fixture 2', solve(False, False, True), False)", "check('fixture 3', solve(False, True, True), True)", "check('fixture 4', solve(False, True, 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(close, drained, healthy):
    return not close and 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), False)", "check('fixture 2', solve(False, False, True), False)", "check('fixture 3', solve(False, True, True), True)", "check('fixture 4', solve(False, True, 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:
Upstream close prevents connection reuse.

Bounded offline decision model: upstream close prevents connection reuse. 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(final, queued, sent):
    return sent+queued
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve(True, 10, 3), 3)", "check('fixture 2', solve(False, 10, 3), 13)", "check('fixture 3', solve(True, 0, 0), 0)", "check('fixture 4', solve(False, 0, 2), 2)"]
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(final, queued, sent):
    return 0 if final else sent+queued
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve(True, 10, 3), 3)", "check('fixture 2', solve(False, 10, 3), 13)", "check('fixture 3', solve(True, 0, 0), 0)", "check('fixture 4', solve(False, 0, 2), 2)"]
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:
Early final response stops request body forwarding.

Bounded offline decision model: early final response stops request body forwarding. 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(chunks, limit):
    return all(len(c)<=limit for c in chunks)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve(['abc', 'def'], 5), False)", "check('fixture 2', solve(['abc', 'de'], 5), True)", "check('fixture 3', solve([], 0), True)", "check('fixture 4', solve(['abcd'], 3), 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(chunks, limit):
    return sum(map(len,chunks)) < limit
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve(['abc', 'def'], 5), False)", "check('fixture 2', solve(['abc', 'de'], 5), True)", "check('fixture 3', solve([], 0), True)", "check('fixture 4', solve(['abcd'], 3), 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:
Proxy buffer limit counts all pending chunks.

Bounded offline decision model: proxy buffer limit counts all pending chunks. 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(trailers):
    return trailers
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve({'Host': 'x', 'Digest': 'd'}), {'Digest': 'd'})", "check('fixture 2', solve({'content-length': '2'}), {})", "check('fixture 3', solve({}), {})", "check('fixture 4', solve({'checksum': 'a'}), {'checksum': '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(trailers):
    return {k:v for k,v in trailers.items() if k not in {"host","content-length","transfer-encoding"}}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve({'Host': 'x', 'Digest': 'd'}), {'Digest': 'd'})", "check('fixture 2', solve({'content-length': '2'}), {})", "check('fixture 3', solve({}), {})", "check('fixture 4', solve({'checksum': 'a'}), {'checksum': '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:
Response trailers exclude forbidden routing fields.

Bounded offline decision model: response trailers exclude forbidden routing fields. 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(url):
    return urlsplit(url).path
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve('https://h/a?q=1'), '/a?q=1')", "check('fixture 2', solve('https://h'), '/')", "check('fixture 3', solve('https://h/a#f'), '/a')", "check('fixture 4', solve('https://h/?q=x'), '/?q=x')"]
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(url):
    return urlsplit(url).path or "/"
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve('https://h/a?q=1'), '/a?q=1')", "check('fixture 2', solve('https://h'), '/')", "check('fixture 3', solve('https://h/a#f'), '/a')", "check('fixture 4', solve('https://h/?q=x'), '/?q=x')"]
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:
Origin form forwarding retains path and query.

Bounded offline decision model: origin form forwarding retains path and query. 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(scheme, port):
    return port or 80
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve('https', None), 443)", "check('fixture 2', solve('http', 8080), 8080)", "check('fixture 3', solve('http', None), 80)", "check('fixture 4', solve('https', 8443), 8443)"]
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(scheme, port):
    return 443 if scheme == "https" else 80
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve('https', None), 443)", "check('fixture 2', solve('http', 8080), 8080)", "check('fixture 3', solve('http', None), 80)", "check('fixture 4', solve('https', 8443), 8443)"]
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:
Upstream port default depends on scheme.

Bounded offline decision model: upstream port default depends on scheme. 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('badexample.com', 'example.com'), False)", "check('fixture 2', solve('a.example.com', 'example.com'), True)", "check('fixture 3', solve('example.com', 'example.com'), True)", "check('fixture 4', solve('else.com', '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, suffix):
    return host == suffix
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve('badexample.com', 'example.com'), False)", "check('fixture 2', solve('a.example.com', 'example.com'), True)", "check('fixture 3', solve('example.com', 'example.com'), True)", "check('fixture 4', solve('else.com', '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:
Proxy bypass host suffix requires domain boundary.

Bounded offline decision model: proxy bypass host suffix requires domain boundary. 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(hostmatch, expected, actual):
    return hostmatch
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve(True, 80, 443), False)", "check('fixture 2', solve(True, None, 443), True)", "check('fixture 3', solve(False, None, 80), False)", "check('fixture 4', solve(True, 80, 80), 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(hostmatch, expected, actual):
    return hostmatch and expected == actual
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve(True, 80, 443), False)", "check('fixture 2', solve(True, None, 443), True)", "check('fixture 3', solve(False, None, 80), False)", "check('fixture 4', solve(True, 80, 80), 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:
Proxy bypass port constraint must match request port.

Bounded offline decision model: proxy bypass port constraint must match request port. 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 address == network.split("/")[0]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve('10.1.2.3', '10.0.0.0/8'), True)", "check('fixture 2', solve('10.0.0.200', '10.0.0.0/25'), False)", "check('fixture 3', solve('192.0.2.1', '10.0.0.0/8'), False)", "check('fixture 4', solve('10.0.0.0', '10.0.0.0/8'), 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(address, network):
    return address.startswith(network.split("/")[0].rsplit(".",1)[0])
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve('10.1.2.3', '10.0.0.0/8'), True)", "check('fixture 2', solve('10.0.0.200', '10.0.0.0/25'), False)", "check('fixture 3', solve('192.0.2.1', '10.0.0.0/8'), False)", "check('fixture 4', solve('10.0.0.0', '10.0.0.0/8'), 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:
Proxy bypass cidr matches address network membership.

Bounded offline decision model: proxy bypass cidr matches address network membership. 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(budget, elapsed):
    return budget
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve(10, 3), 7)", "check('fixture 2', solve(2, 5), 0)", "check('fixture 3', solve(0, 0), 0)", "check('fixture 4', solve(5, 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(budget, elapsed):
    return budget-elapsed
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve(10, 3), 7)", "check('fixture 2', solve(2, 5), 0)", "check('fixture 3', solve(0, 0), 0)", "check('fixture 4', solve(5, 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:
Hop timeout consumes time already spent in proxy.

Bounded offline decision model: hop timeout consumes time already spent in proxy. 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(paused, size, low):
    return paused and size < low
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve(True, 2, 2), True)", "check('fixture 2', solve(False, 1, 2), False)", "check('fixture 3', solve(True, 3, 2), False)", "check('fixture 4', solve(True, 0, 2), 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(paused, size, low):
    return size <= low
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve(True, 2, 2), True)", "check('fixture 2', solve(False, 1, 2), False)", "check('fixture 3', solve(True, 3, 2), False)", "check('fixture 4', solve(True, 0, 2), 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:
Buffer watermark resume requires low threshold.

Bounded offline decision model: buffer watermark resume requires low threshold. 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):
    return [{"attempt":i+1,"status":status,"elapsed":elapsed} for i,(status,elapsed) in enumerate(dict.fromkeys(attempts))]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve([(502, 2), (502, 2), (200, 1)]), [{'attempt': 1, 'status': 502, 'elapsed': 2}, {'attempt': 2, 'status': 502, 'elapsed': 2}, {'attempt': 3, 'status': 200, 'elapsed': 1}])", "check('fixture 2', solve([]), [])", "check('fixture 3', solve([(200, 1)]), [{'attempt': 1, 'status': 200, 'elapsed': 1}])", "check('fixture 4', solve([(503, 2), (200, 3)]), [{'attempt': 1, 'status': 503, 'elapsed': 2}, {'attempt': 2, 'status': 200, 'elapsed': 3}])"]
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):
    return [{"attempt":1,"status":attempts[-1][0],"elapsed":attempts[-1][1]}] if attempts else []
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve([(502, 2), (502, 2), (200, 1)]), [{'attempt': 1, 'status': 502, 'elapsed': 2}, {'attempt': 2, 'status': 502, 'elapsed': 2}, {'attempt': 3, 'status': 200, 'elapsed': 1}])", "check('fixture 2', solve([]), [])", "check('fixture 3', solve([(200, 1)]), [{'attempt': 1, 'status': 200, 'elapsed': 1}])", "check('fixture 4', solve([(503, 2), (200, 3)]), [{'attempt': 1, 'status': 503, 'elapsed': 2}, {'attempt': 2, 'status': 200, 'elapsed': 3}])"]
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:
Upstream attempt history preserves equal statuses.

Given attempts, upstream attempt history preserves equal statuses. 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(address, routes):
    return next((r for r in routes if ipaddress.ip_address(address) in ipaddress.ip_network(r)),None)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve('10.1.2.3', ['0.0.0.0/0', '10.0.0.0/8']), '10.0.0.0/8')", "check('fixture 2', solve('192.0.2.1', ['10.0.0.0/8']), None)", "check('fixture 3', solve('10.1.2.3', []), None)", "check('fixture 4', solve('10.1.2.3', ['10.0.0.0/8']), '10.0.0.0/8')"]
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, routes):
    return max(routes,key=lambda r:ipaddress.ip_network(r).prefixlen) 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('10.1.2.3', ['0.0.0.0/0', '10.0.0.0/8']), '10.0.0.0/8')", "check('fixture 2', solve('192.0.2.1', ['10.0.0.0/8']), None)", "check('fixture 3', solve('10.1.2.3', []), None)", "check('fixture 4', solve('10.1.2.3', ['10.0.0.0/8']), '10.0.0.0/8')"]
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:
Longest prefix route wins over first matching route.

Bounded offline decision model: longest prefix route wins over first matching route. 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[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', 20), ('b', 10)]), 'b')", "check('fixture 2', solve([('a', 10), ('b', 20)]), 'a')", "check('fixture 3', solve([]), None)", "check('fixture 4', solve([('a', 0)]), '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 routes[0][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', 20), ('b', 10)]), 'b')", "check('fixture 2', solve([('a', 10), ('b', 20)]), 'a')", "check('fixture 3', solve([]), None)", "check('fixture 4', solve([('a', 0)]), '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 metric breaks equal prefix ties in ascending order.

Bounded offline decision model: route metric breaks equal prefix ties in ascending order. Inputs are already validated protocol fields; the explicit fixtures define the supported policy, not a complete protocol implementation.

split: open-access