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(offset, length, final):
    return final is None or offset <= final
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve(8, 3, 10), False)", "check('fixture 2', solve(8, 2, 10), True)", "check('fixture 3', solve(100, 20, None), True)", "check('fixture 4', solve(-1, 1, 10), False)"]
for _line in _fixtures[N % len(_fixtures):] + _fixtures[:N % len(_fixtures)]:
    exec(_line)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)

source:
"""Failure Map reference implementation. Python standard library only."""
import json
import ipaddress
import re
from urllib.parse import urlsplit, urljoin
N = 1
observations = []
def solve(offset, length, final):
    return offset >= 0 and length >= 0 and (final is None or offset+length < final)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve(8, 3, 10), False)", "check('fixture 2', solve(8, 2, 10), True)", "check('fixture 3', solve(100, 20, None), True)", "check('fixture 4', solve(-1, 1, 10), False)"]
for _line in _fixtures[N % len(_fixtures):] + _fixtures[:N % len(_fixtures)]:
    exec(_line)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)

prompt:
Quic stream offset plus length cannot exceed final size.

Given offset, length, final, quic stream offset plus length cannot exceed final size. 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(received, sent, validated):
    return max(0,3*received-sent)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve(10, 20, False), 10)", "check('fixture 2', solve(10, 40, False), 0)", "check('fixture 3', solve(0, 0, True), None)", "check('fixture 4', solve(10, 0, False), 30)"]
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(received, sent, validated):
    return None if validated else 3*received
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve(10, 20, False), 10)", "check('fixture 2', solve(10, 40, False), 0)", "check('fixture 3', solve(0, 0, True), None)", "check('fixture 4', solve(10, 0, False), 30)"]
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:
Quic amplification budget applies before address validation.

Bounded offline decision model: quic amplification budget applies before address validation. 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(rtt, delay, maximum):
    return max(0,rtt-delay)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve(100, 80, 25), 75)", "check('fixture 2', solve(100, 10, 25), 90)", "check('fixture 3', solve(10, 25, 25), 0)", "check('fixture 4', solve(0, 0, 25), 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(rtt, delay, maximum):
    return rtt
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve(100, 80, 25), 75)", "check('fixture 2', solve(100, 10, 25), 90)", "check('fixture 3', solve(10, 25, 25), 0)", "check('fixture 4', solve(0, 0, 25), 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:
Quic ack delay is subtracted only up to peer limit.

Bounded offline decision model: quic ack delay is subtracted only up to peer limit. 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(upgrade, connection):
    return upgrade.lower() == "websocket"
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve('websocket', []), False)", "check('fixture 2', solve('other', ['upgrade']), False)", "check('fixture 3', solve('WebSocket', ['Upgrade']), True)", "check('fixture 4', solve('websocket', ['keep-alive', 'upgrade']), 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(upgrade, connection):
    return "upgrade" in connection
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve('websocket', []), False)", "check('fixture 2', solve('other', ['upgrade']), False)", "check('fixture 3', solve('WebSocket', ['Upgrade']), True)", "check('fixture 4', solve('websocket', ['keep-alive', 'upgrade']), 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:
Websocket upgrade requires both upgrade and connection tokens.

Bounded offline decision model: websocket upgrade requires both upgrade and connection tokens. 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(status, upgrade_ok):
    return upgrade_ok
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve(200, True), False)", "check('fixture 2', solve(101, False), False)", "check('fixture 3', solve(101, True), True)", "check('fixture 4', solve(500, 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(status, upgrade_ok):
    return status == 101
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve(200, True), False)", "check('fixture 2', solve(101, False), False)", "check('fixture 3', solve(101, True), True)", "check('fixture 4', solve(500, 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:
Websocket handshake response must be switching protocols.

Bounded offline decision model: websocket handshake response must be switching protocols. 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(client, masked):
    return masked
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve(True, True), True)", "check('fixture 2', solve(True, False), False)", "check('fixture 3', solve(False, True), False)", "check('fixture 4', solve(False, False), True)"]
for _line in _fixtures[N % len(_fixtures):] + _fixtures[:N % len(_fixtures)]:
    exec(_line)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)

source:
"""Failure Map reference implementation. Python standard library only."""
import json
import ipaddress
import re
from urllib.parse import urlsplit, urljoin
N = 1
observations = []
def solve(client, masked):
    return not masked
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve(True, True), True)", "check('fixture 2', solve(True, False), False)", "check('fixture 3', solve(False, True), False)", "check('fixture 4', solve(False, False), True)"]
for _line in _fixtures[N % len(_fixtures):] + _fixtures[:N % len(_fixtures)]:
    exec(_line)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)

prompt:
Websocket client frames require masking and server frames forbid it.

Bounded offline decision model: websocket client frames require masking and server frames forbid it. 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(control, final, length):
    return not control or final
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve(True, False, 1), False)", "check('fixture 2', solve(True, True, 126), False)", "check('fixture 3', solve(True, True, 125), True)", "check('fixture 4', solve(False, False, 1000), 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(control, final, length):
    return not control or length <= 125
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve(True, False, 1), False)", "check('fixture 2', solve(True, True, 126), False)", "check('fixture 3', solve(True, True, 125), True)", "check('fixture 4', solve(False, False, 1000), 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:
Websocket control frames must be final and at most 125 bytes.

Bounded offline decision model: websocket control frames must be final and at most 125 bytes. 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(opcode, fragmented):
    return not fragmented if opcode in (1,2) else True
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve(0, False), False)", "check('fixture 2', solve(1, True), False)", "check('fixture 3', solve(9, True), True)", "check('fixture 4', solve(0, True), True)"]
for _line in _fixtures[N % len(_fixtures):] + _fixtures[:N % len(_fixtures)]:
    exec(_line)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)

source:
"""Failure Map reference implementation. Python standard library only."""
import json
import ipaddress
import re
from urllib.parse import urlsplit, urljoin
N = 1
observations = []
def solve(opcode, fragmented):
    return fragmented if opcode == 0 else not fragmented
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve(0, False), False)", "check('fixture 2', solve(1, True), False)", "check('fixture 3', solve(9, True), True)", "check('fixture 4', solve(0, True), True)"]
for _line in _fixtures[N % len(_fixtures):] + _fixtures[:N % len(_fixtures)]:
    exec(_line)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)

prompt:
Websocket continuation requires an open fragmented message.

Bounded offline decision model: websocket continuation requires an open fragmented message. 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(fragmented, opcode, final):
    return not final
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve(True, 9, True), True)", "check('fixture 2', solve(True, 0, True), False)", "check('fixture 3', solve(False, 1, False), True)", "check('fixture 4', solve(False, 9, True), False)"]
for _line in _fixtures[N % len(_fixtures):] + _fixtures[:N % len(_fixtures)]:
    exec(_line)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)

source:
"""Failure Map reference implementation. Python standard library only."""
import json
import ipaddress
import re
from urllib.parse import urlsplit, urljoin
N = 1
observations = []
def solve(fragmented, opcode, final):
    return fragmented or not final
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve(True, 9, True), True)", "check('fixture 2', solve(True, 0, True), False)", "check('fixture 3', solve(False, 1, False), True)", "check('fixture 4', solve(False, 9, True), False)"]
for _line in _fixtures[N % len(_fixtures):] + _fixtures[:N % len(_fixtures)]:
    exec(_line)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)

prompt:
Websocket control frames do not close fragmented message state.

Bounded offline decision model: websocket control frames do not close fragmented message state. 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(offset, mask_length):
    return 0
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve(5, 4), 1)", "check('fixture 2', solve(7, 4), 3)", "check('fixture 3', solve(0, 4), 0)", "check('fixture 4', solve(4, 4), 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(offset, mask_length):
    return offset // mask_length
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve(5, 4), 1)", "check('fixture 2', solve(7, 4), 3)", "check('fixture 3', solve(0, 4), 0)", "check('fixture 4', solve(4, 4), 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:
Websocket mask index continues across buffer chunks.

Bounded offline decision model: websocket mask index continues across buffer 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(length):
    return True
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve(1), False)", "check('fixture 2', solve(0), True)", "check('fixture 3', solve(2), True)", "check('fixture 4', solve(125), 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(length):
    return length >= 2
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve(1), False)", "check('fixture 2', solve(0), True)", "check('fixture 3', solve(2), True)", "check('fixture 4', solve(125), 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:
Websocket close payload cannot contain a single byte.

Bounded offline decision model: websocket close payload cannot contain a single byte. 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(code):
    return 1000 <= code < 5000
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve(1006), False)", "check('fixture 2', solve(5000), False)", "check('fixture 3', solve(1000), True)", "check('fixture 4', solve(4000), 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(code):
    return code >= 1000
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve(1006), False)", "check('fixture 2', solve(5000), False)", "check('fixture 3', solve(1000), True)", "check('fixture 4', solve(4000), 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:
Websocket reserved close codes are not transmitted.

Bounded offline decision model: websocket reserved close codes are not transmitted. 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(ping, closing):
    return None if closing else {"opcode":10,"final":True,"payload":""}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve('abc', False), {'opcode': 10, 'final': True, 'payload': 'abc'})", "check('fixture 2', solve('abc', True), None)", "check('fixture 3', solve('', False), {'opcode': 10, 'final': True, 'payload': ''})", "check('fixture 4', solve('', True), 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(ping, closing):
    return {"opcode":10,"final":True,"payload":ping}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve('abc', False), {'opcode': 10, 'final': True, 'payload': 'abc'})", "check('fixture 2', solve('abc', True), None)", "check('fixture 3', solve('', False), {'opcode': 10, 'final': True, 'payload': ''})", "check('fixture 4', solve('', True), 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:
Websocket pong echoes the entire ping payload.

Given ping, closing, websocket pong echoes the entire ping payload. 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(sent, received, transport_closed):
    return "complete" if sent or received else "pending"
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve(True, False, False), 'pending')", "check('fixture 2', solve(False, False, True), 'abnormal')", "check('fixture 3', solve(True, True, False), 'complete')", "check('fixture 4', solve(False, False, False), 'pending')"]
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(sent, received, transport_closed):
    return "complete" if sent and received else "pending"
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve(True, False, False), 'pending')", "check('fixture 2', solve(False, False, True), 'abnormal')", "check('fixture 3', solve(True, True, False), 'complete')", "check('fixture 4', solve(False, False, False), 'pending')"]
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:
Websocket close handshake completes after both close directions.

Given sent, received, transport_closed, websocket close handshake completes after both close directions. 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(sent_close, received_close):
    return not received_close
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve(True, False), False)", "check('fixture 2', solve(False, True), False)", "check('fixture 3', solve(False, False), True)", "check('fixture 4', solve(True, True), False)"]
for _line in _fixtures[N % len(_fixtures):] + _fixtures[:N % len(_fixtures)]:
    exec(_line)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)

source:
"""Failure Map reference implementation. Python standard library only."""
import json
import ipaddress
import re
from urllib.parse import urlsplit, urljoin
N = 1
observations = []
def solve(sent_close, received_close):
    return not (sent_close and received_close)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve(True, False), False)", "check('fixture 2', solve(False, True), False)", "check('fixture 3', solve(False, False), True)", "check('fixture 4', solve(True, True), False)"]
for _line in _fixtures[N % len(_fixtures):] + _fixtures[:N % len(_fixtures)]:
    exec(_line)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)

prompt:
Websocket application data is disallowed after close starts.

Bounded offline decision model: websocket application data is disallowed after close starts. 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, present, value):
    return value if present else old
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve('a', True, ''), '')", "check('fixture 2', solve('a', True, 'b\\x00c'), 'a')", "check('fixture 3', solve('a', False, 'b'), 'a')", "check('fixture 4', solve('a', True, '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(old, present, value):
    return value if present and value and "\x00" not in value else old
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve('a', True, ''), '')", "check('fixture 2', solve('a', True, 'b\\x00c'), 'a')", "check('fixture 3', solve('a', False, 'b'), 'a')", "check('fixture 4', solve('a', True, '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:
Sse empty id clears the reconnection event identifier.

Given old, present, value, sse empty id clears the reconnection event identifier. 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(value):
    return int(value) if value.lstrip("-").isdigit() else None
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve('-1'), None)", "check('fixture 2', solve('１２'), None)", "check('fixture 3', solve('100'), 100)", "check('fixture 4', solve(''), 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(value):
    return int(value) if value.isdigit() else None
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve('-1'), None)", "check('fixture 2', solve('１２'), None)", "check('fixture 3', solve('100'), 100)", "check('fixture 4', solve(''), 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:
Sse retry field accepts only nonempty ascii digits.

Bounded offline decision model: sse retry field accepts only nonempty ascii digits. 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(lines):
    return "".join(lines)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve(['a', 'b']), 'a\\nb')", "check('fixture 2', solve([]), '')", "check('fixture 3', solve(['']), '')", "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(lines):
    return "\n".join(lines)+"\n"
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve(['a', 'b']), 'a\\nb')", "check('fixture 2', solve([]), '')", "check('fixture 3', solve(['']), '')", "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:
Sse data lines join with newlines not concatenation.

Bounded offline decision model: sse data lines join with newlines not concatenation. 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(data_fields, event_type):
    return bool(event_type)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve([], 'message'), False)", "check('fixture 2', solve([''], ''), True)", "check('fixture 3', solve(['a'], 'x'), True)", "check('fixture 4', solve([], ''), 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(data_fields, event_type):
    return any(data_fields)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve([], 'message'), False)", "check('fixture 2', solve([''], ''), True)", "check('fixture 3', solve(['a'], 'x'), True)", "check('fixture 4', solve([], ''), 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:
Sse dispatch requires at least one data field.

Bounded offline decision model: sse dispatch requires at least one data field. 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(buffer, line):
    return buffer+[line]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve(['a'], ':keepalive'), ['a'])", "check('fixture 2', solve(['a'], 'b'), ['a', 'b'])", "check('fixture 3', solve([], ':'), [])", "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(buffer, line):
    return buffer
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve(['a'], ':keepalive'), ['a'])", "check('fixture 2', solve(['a'], 'b'), ['a', 'b'])", "check('fixture 3', solve([], ':'), [])", "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:
Sse comments do not change data buffer.

Bounded offline decision model: sse comments do not change data buffer. 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(origin, credentials):
    return True
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve('*', True), False)", "check('fixture 2', solve('*', False), True)", "check('fixture 3', solve('https://a', True), True)", "check('fixture 4', solve('https://a', False), True)"]
for _line in _fixtures[N % len(_fixtures):] + _fixtures[:N % len(_fixtures)]:
    exec(_line)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)

source:
"""Failure Map reference implementation. Python standard library only."""
import json
import ipaddress
import re
from urllib.parse import urlsplit, urljoin
N = 1
observations = []
def solve(origin, credentials):
    return origin != "*"
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve('*', True), False)", "check('fixture 2', solve('*', False), True)", "check('fixture 3', solve('https://a', True), True)", "check('fixture 4', solve('https://a', False), True)"]
for _line in _fixtures[N % len(_fixtures):] + _fixtures[:N % len(_fixtures)]:
    exec(_line)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)

prompt:
Cors origin wildcard is incompatible with credentialed response.

Bounded offline decision model: cors origin wildcard is incompatible with credentialed response. 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, allowed, credentialed):
    return method.upper() in {a.upper() for a in allowed} or "*" in allowed
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve('get', ['GET'], False), False)", "check('fixture 2', solve('PUT', ['*'], False), True)", "check('fixture 3', solve('PUT', ['*'], True), False)", "check('fixture 4', solve('GET', ['GET'], True), True)"]
for _line in _fixtures[N % len(_fixtures):] + _fixtures[:N % len(_fixtures)]:
    exec(_line)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)

source:
"""Failure Map reference implementation. Python standard library only."""
import json
import ipaddress
import re
from urllib.parse import urlsplit, urljoin
N = 1
observations = []
def solve(method, allowed, credentialed):
    return method in allowed
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve('get', ['GET'], False), False)", "check('fixture 2', solve('PUT', ['*'], False), True)", "check('fixture 3', solve('PUT', ['*'], True), False)", "check('fixture 4', solve('GET', ['GET'], True), True)"]
for _line in _fixtures[N % len(_fixtures):] + _fixtures[:N % len(_fixtures)]:
    exec(_line)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)

prompt:
Cors preflight method matching is case sensitive.

Given method, allowed, credentialed, cors preflight method matching is case sensitive. 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(requested, allowed):
    return set(requested) <= set(allowed)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve(['X-Test'], ['x-test']), True)", "check('fixture 2', solve(['x', 'y'], ['x']), False)", "check('fixture 3', solve([], []), True)", "check('fixture 4', solve(['x'], []), False)"]
for _line in _fixtures[N % len(_fixtures):] + _fixtures[:N % len(_fixtures)]:
    exec(_line)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)

source:
"""Failure Map reference implementation. Python standard library only."""
import json
import ipaddress
import re
from urllib.parse import urlsplit, urljoin
N = 1
observations = []
def solve(requested, allowed):
    return bool(set(requested)&set(allowed))
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve(['X-Test'], ['x-test']), True)", "check('fixture 2', solve(['x', 'y'], ['x']), False)", "check('fixture 3', solve([], []), True)", "check('fixture 4', solve(['x'], []), False)"]
for _line in _fixtures[N % len(_fixtures):] + _fixtures[:N % len(_fixtures)]:
    exec(_line)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)

prompt:
Cors preflight header names are case insensitive.

Bounded offline decision model: cors preflight header names are 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(a, b):
    return urlsplit(a).hostname == urlsplit(b).hostname
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve('https://EXAMPLE:443', 'https://example:443'), True)", "check('fixture 2', solve('https://a:443', 'https://a:8443'), False)", "check('fixture 3', solve('http://a', 'https://a'), False)", "check('fixture 4', solve('https://a', 'https://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(a, b):
    return a == b
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve('https://EXAMPLE:443', 'https://example:443'), True)", "check('fixture 2', solve('https://a:443', 'https://a:8443'), False)", "check('fixture 3', solve('http://a', 'https://a'), False)", "check('fixture 4', solve('https://a', 'https://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:
Cors origin comparison includes scheme host and port.

Bounded offline decision model: cors origin comparison includes scheme host and 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(origin, method):
    return origin
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve('https://a', 'PUT'), ('https://a', 'PUT'))", "check('fixture 2', solve('https://b', 'PUT'), ('https://b', 'PUT'))", "check('fixture 3', solve('https://a', 'DELETE'), ('https://a', 'DELETE'))", "check('fixture 4', solve('null', 'GET'), ('null', 'GET'))"]
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(origin, method):
    return method
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve('https://a', 'PUT'), ('https://a', 'PUT'))", "check('fixture 2', solve('https://b', 'PUT'), ('https://b', 'PUT'))", "check('fixture 3', solve('https://a', 'DELETE'), ('https://a', 'DELETE'))", "check('fixture 4', solve('null', 'GET'), ('null', 'GET'))"]
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:
Cors preflight cache key includes origin and method.

Bounded offline decision model: cors preflight cache key includes origin and method. 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(header, exposed, credentials):
    return header in exposed or "*" in exposed
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve('x', ['*'], True), False)", "check('fixture 2', solve('x', ['*'], False), True)", "check('fixture 3', solve('X', ['x'], True), True)", "check('fixture 4', solve('x', [], 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(header, exposed, credentials):
    return header in exposed
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve('x', ['*'], True), False)", "check('fixture 2', solve('x', ['*'], False), True)", "check('fixture 3', solve('X', ['x'], True), True)", "check('fixture 4', solve('x', [], 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:
Cors exposed header wildcard is literal with credentials.

Bounded offline decision model: cors exposed header wildcard is literal with credentials. 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(advertised, cap):
    return advertised
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve(1000, 600), 600)", "check('fixture 2', solve(-1, 600), 0)", "check('fixture 3', solve(10, 600), 10)", "check('fixture 4', solve(0, 600), 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(advertised, cap):
    return min(advertised,cap)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve(1000, 600), 600)", "check('fixture 2', solve(-1, 600), 0)", "check('fixture 3', solve(10, 600), 10)", "check('fixture 4', solve(0, 600), 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:
Cors preflight max age is capped by browser policy.

Bounded offline decision model: cors preflight max age is capped by browser policy. 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, media):
    return method not in ("GET","HEAD","POST")
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve('POST', 'application/json'), True)", "check('fixture 2', solve('PUT', 'text/plain'), True)", "check('fixture 3', solve('POST', 'multipart/form-data'), False)", "check('fixture 4', solve('GET', 'text/plain'), 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, media):
    return media != "text/plain"
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve('POST', 'application/json'), True)", "check('fixture 2', solve('PUT', 'text/plain'), True)", "check('fixture 3', solve('POST', 'multipart/form-data'), False)", "check('fixture 4', solve('GET', 'text/plain'), 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:
Cors non simple content type triggers preflight.

Bounded offline decision model: cors non simple content type triggers preflight. 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(version, tokens):
    return version == "1.1"
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve('1.1', ['Close']), False)", "check('fixture 2', solve('1.0', []), False)", "check('fixture 3', solve('1.0', ['keep-alive']), True)", "check('fixture 4', solve('1.1', []), 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(version, tokens):
    return "close" not in tokens
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve('1.1', ['Close']), False)", "check('fixture 2', solve('1.0', []), False)", "check('fixture 3', solve('1.0', ['keep-alive']), True)", "check('fixture 4', solve('1.1', []), 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:
Http11 default persistence is disabled by close token.

Bounded offline decision model: http11 default persistence is disabled by close token. 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, host, port):
    return host.lower()
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve('https', 'EXAMPLE', 443), ('https', 'example', 443))", "check('fixture 2', solve('http', 'example', 443), ('http', 'example', 443))", "check('fixture 3', solve('https', 'example', 8443), ('https', 'example', 8443))", "check('fixture 4', solve('http', 'x', 80), ('http', 'x', 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(scheme, host, port):
    return (host.lower(),port)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve('https', 'EXAMPLE', 443), ('https', 'example', 443))", "check('fixture 2', solve('http', 'example', 443), ('http', 'example', 443))", "check('fixture 3', solve('https', 'example', 8443), ('https', 'example', 8443))", "check('fixture 4', solve('http', 'x', 80), ('http', 'x', 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:
Connection pool key includes scheme host and port.

Bounded offline decision model: connection pool key includes scheme host and 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(now, created, last_used):
    return now-created
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve(100, 0, 90), 10)", "check('fixture 2', solve(100, 90, 90), 10)", "check('fixture 3', solve(10, 0, 10), 0)", "check('fixture 4', solve(10, 0, 0), 10)"]
for _line in _fixtures[N % len(_fixtures):] + _fixtures[:N % len(_fixtures)]:
    exec(_line)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)

source:
"""Failure Map reference implementation. Python standard library only."""
import json
import ipaddress
import re
from urllib.parse import urlsplit, urljoin
N = 1
observations = []
def solve(now, created, last_used):
    return last_used-created
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve(100, 0, 90), 10)", "check('fixture 2', solve(100, 90, 90), 10)", "check('fixture 3', solve(10, 0, 10), 0)", "check('fixture 4', solve(10, 0, 0), 10)"]
for _line in _fixtures[N % len(_fixtures):] + _fixtures[:N % len(_fixtures)]:
    exec(_line)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)

prompt:
Pool idle expiry measures time since last use.

Bounded offline decision model: pool idle expiry measures time since last use. 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(now, created, lifetime):
    return True
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve(100, 0, 100), False)", "check('fixture 2', solve(99, 0, 100), True)", "check('fixture 3', solve(0, 0, 0), False)", "check('fixture 4', solve(10, 5, 20), 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(now, created, lifetime):
    return now-created <= lifetime
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve(100, 0, 100), False)", "check('fixture 2', solve(99, 0, 100), True)", "check('fixture 3', solve(0, 0, 0), False)", "check('fixture 4', solve(10, 5, 20), 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:
Pool absolute lifetime is not reset by recent activity.

Bounded offline decision model: pool absolute lifetime is not reset by recent activity. 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_counts, host, host_cap, global_cap):
    return sum(o for o,c in host_counts.values()) < global_cap and host_counts.get(host,(0,0))[0] < host_cap
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve({'a': (1, 1)}, 'a', 2, 10), False)", "check('fixture 2', solve({'a': (1, 0), 'b': (2, 1)}, 'a', 3, 4), False)", "check('fixture 3', solve({}, 'a', 1, 1), True)", "check('fixture 4', solve({'a': (1, 0)}, 'a', 2, 3), True)"]
for _line in _fixtures[N % len(_fixtures):] + _fixtures[:N % len(_fixtures)]:
    exec(_line)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)

source:
"""Failure Map reference implementation. Python standard library only."""
import json
import ipaddress
import re
from urllib.parse import urlsplit, urljoin
N = 1
observations = []
def solve(host_counts, host, host_cap, global_cap):
    return sum(o+c for o,c in host_counts.values()) <= global_cap and sum(host_counts.get(host,(0,0))) <= host_cap
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve({'a': (1, 1)}, 'a', 2, 10), False)", "check('fixture 2', solve({'a': (1, 0), 'b': (2, 1)}, 'a', 3, 4), False)", "check('fixture 3', solve({}, 'a', 1, 1), True)", "check('fixture 4', solve({'a': (1, 0)}, 'a', 2, 3), True)"]
for _line in _fixtures[N % len(_fixtures):] + _fixtures[:N % len(_fixtures)]:
    exec(_line)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)

prompt:
Pool cap includes in progress connection attempts.

Given host_counts, host, host_cap, global_cap, pool cap includes in progress connection attempts. 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(sockets):
    return max(sockets,key=lambda s:s[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([('a', 1, True), ('b', 2, True), ('bad', 3, False)]), 'b')", "check('fixture 2', solve([]), None)", "check('fixture 3', solve([('bad', 3, False)]), None)", "check('fixture 4', solve([('a', 1, True)]), '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(sockets):
    return min((s for s in sockets if s[2]),key=lambda s:s[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([('a', 1, True), ('b', 2, True), ('bad', 3, False)]), 'b')", "check('fixture 2', solve([]), None)", "check('fixture 3', solve([('bad', 3, False)]), None)", "check('fixture 4', solve([('a', 1, True)]), '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:
Pool idle selection chooses most recently used healthy socket.

Bounded offline decision model: pool idle selection chooses most recently used healthy socket. 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(remaining, eof_delimited, open_):
    return remaining == 0 and open_
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve(0, True, True), False)", "check('fixture 2', solve(2, False, True), False)", "check('fixture 3', solve(0, False, True), True)", "check('fixture 4', solve(0, False, 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(remaining, eof_delimited, open_):
    return not eof_delimited and open_
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve(0, True, True), False)", "check('fixture 2', solve(2, False, True), False)", "check('fixture 3', solve(0, False, True), True)", "check('fixture 4', solve(0, False, 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:
Pool return requires complete message boundary.

Bounded offline decision model: pool return requires complete message 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(counts, socket):
    return {}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve({'a': 2, 'b': 1}, 'a'), {'a': 1, 'b': 1})", "check('fixture 2', solve({}, 'a'), {})", "check('fixture 3', solve({'a': 0}, 'a'), {'a': 0})", "check('fixture 4', solve({'b': 1}, 'a'), {'b': 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(counts, socket):
    return {k:v for k,v in counts.items() if k != socket}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve({'a': 2, 'b': 1}, 'a'), {'a': 1, 'b': 1})", "check('fixture 2', solve({}, 'a'), {})", "check('fixture 3', solve({'a': 0}, 'a'), {'a': 0})", "check('fixture 4', solve({'b': 1}, 'a'), {'b': 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:
Pool lease release removes one lease not every socket.

Given counts, socket, pool lease release removes one lease not every socket. 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(write_closed, read_closed):
    return (not write_closed,not write_closed)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve(True, False), (True, False))", "check('fixture 2', solve(False, True), (False, True))", "check('fixture 3', solve(False, False), (True, True))", "check('fixture 4', solve(True, 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(write_closed, read_closed):
    return (not read_closed,not read_closed)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve(True, False), (True, False))", "check('fixture 2', solve(False, True), (False, True))", "check('fixture 3', solve(False, False), (True, True))", "check('fixture 4', solve(True, 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:
Half close keeps receive direction open.

Bounded offline decision model: half close keeps receive direction open. 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(writable, error):
    return writable
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve(True, 111), False)", "check('fixture 2', solve(False, 0), False)", "check('fixture 3', solve(True, 0), True)", "check('fixture 4', solve(False, 111), 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(writable, error):
    return error == 0
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve(True, 111), False)", "check('fixture 2', solve(False, 0), False)", "check('fixture 3', solve(True, 0), True)", "check('fixture 4', solve(False, 111), 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:
Connect completion checks socket error not writability alone.

Bounded offline decision model: connect completion checks socket error not writability alone. 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(elapsed, delay, failed):
    return elapsed > delay
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve(10, 10, False), True)", "check('fixture 2', solve(0, 10, True), True)", "check('fixture 3', solve(0, 10, False), False)", "check('fixture 4', solve(20, 10, False), True)"]
for _line in _fixtures[N % len(_fixtures):] + _fixtures[:N % len(_fixtures)]:
    exec(_line)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)

source:
"""Failure Map reference implementation. Python standard library only."""
import json
import ipaddress
import re
from urllib.parse import urlsplit, urljoin
N = 1
observations = []
def solve(elapsed, delay, failed):
    return failed and elapsed >= delay
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve(10, 10, False), True)", "check('fixture 2', solve(0, 10, True), True)", "check('fixture 3', solve(0, 10, False), False)", "check('fixture 4', solve(20, 10, False), True)"]
for _line in _fixtures[N % len(_fixtures):] + _fixtures[:N % len(_fixtures)]:
    exec(_line)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)

prompt:
Happy eyeballs second family starts after delay unless first failed.

Bounded offline decision model: happy eyeballs second family starts after delay unless first failed. 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, winner):
    return [a for a,state in attempts if a != winner]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve([('v6', 'pending'), ('v4', 'pending'), ('old', 'failed')], 'v4'), ['v6'])", "check('fixture 2', solve([], 'v4'), [])", "check('fixture 3', solve([('v4', 'pending')], 'v4'), [])", "check('fixture 4', solve([('v6', 'failed')], 'v4'), [])"]
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, winner):
    return [a for a,state in attempts if state == "pending"]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve([('v6', 'pending'), ('v4', 'pending'), ('old', 'failed')], 'v4'), ['v6'])", "check('fixture 2', solve([], 'v4'), [])", "check('fixture 3', solve([('v4', 'pending')], 'v4'), [])", "check('fixture 4', solve([('v6', 'failed')], 'v4'), [])"]
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:
Happy eyeballs winner cancels only other attempts.

Given attempts, winner, happy eyeballs winner cancels only other attempts. 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(phase, connect_timeout, read_timeout, remaining):
    return min(remaining,read_timeout)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve('connect', 2, 30, 100), 2)", "check('fixture 2', solve('read', 2, 30, 5), 5)", "check('fixture 3', solve('connect', 2, 30, 0), 0)", "check('fixture 4', solve('read', 2, 30, 100), 30)"]
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(phase, connect_timeout, read_timeout, remaining):
    return connect_timeout if phase == "connect" else read_timeout
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve('connect', 2, 30, 100), 2)", "check('fixture 2', solve('read', 2, 30, 5), 5)", "check('fixture 3', solve('connect', 2, 30, 0), 0)", "check('fixture 4', solve('read', 2, 30, 100), 30)"]
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 attempt timeout is separate from read timeout.

Given phase, connect_timeout, read_timeout, remaining, connection attempt timeout is separate from read timeout. 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(now, idle, total):
    return now+idle
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve(10, 5, 100), 15)", "check('fixture 2', solve(98, 5, 100), 100)", "check('fixture 3', solve(100, 0, 100), 100)", "check('fixture 4', solve(0, 1, 5), 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(now, idle, total):
    return total
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve(10, 5, 100), 15)", "check('fixture 2', solve(98, 5, 100), 100)", "check('fixture 3', solve(100, 0, 100), 100)", "check('fixture 4', solve(0, 1, 5), 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:
Read progress resets idle deadline without extending total deadline.

Bounded offline decision model: read progress resets idle deadline without extending total deadline. 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(state, existing):
    return state != "closed"
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve('draining', True), True)", "check('fixture 2', solve('draining', False), False)", "check('fixture 3', solve('closed', True), False)", "check('fixture 4', solve('open', False), True)"]
for _line in _fixtures[N % len(_fixtures):] + _fixtures[:N % len(_fixtures)]:
    exec(_line)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)

source:
"""Failure Map reference implementation. Python standard library only."""
import json
import ipaddress
import re
from urllib.parse import urlsplit, urljoin
N = 1
observations = []
def solve(state, existing):
    return state == "open"
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve('draining', True), True)", "check('fixture 2', solve('draining', False), False)", "check('fixture 3', solve('closed', True), False)", "check('fixture 4', solve('open', False), True)"]
for _line in _fixtures[N % len(_fixtures):] + _fixtures[:N % len(_fixtures)]:
    exec(_line)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)

prompt:
Connection drain accepts existing streams but not new streams.

Given state, existing, connection drain accepts existing streams but not new streams. 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(draining, active, expired):
    return "complete" if active == 0 else "wait"
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve(False, 0, False), 'idle')", "check('fixture 2', solve(True, 1, True), 'force')", "check('fixture 3', solve(True, 0, False), 'complete')", "check('fixture 4', solve(True, 1, False), 'wait')"]
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(draining, active, expired):
    return "idle" if not draining else ("complete" if active == 0 else "wait")
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve(False, 0, False), 'idle')", "check('fixture 2', solve(True, 1, True), 'force')", "check('fixture 3', solve(True, 0, False), 'complete')", "check('fixture 4', solve(True, 1, False), 'wait')"]
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:
Graceful drain completes when active stream count reaches zero.

Given draining, active, expired, graceful drain completes when active stream count reaches zero. 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(was_closed, now_closed, leased):
    return ["notify","release"] if now_closed else []
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve(False, True, True), ['notify', 'release'])", "check('fixture 2', solve(True, True, True), [])", "check('fixture 3', solve(False, True, False), ['notify'])", "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(was_closed, now_closed, leased):
    return ["notify"] if now_closed and not was_closed else []
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve(False, True, True), ['notify', 'release'])", "check('fixture 2', solve(True, True, True), [])", "check('fixture 3', solve(False, True, False), ['notify'])", "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:
Connection close notification is emitted once.

Given was_closed, now_closed, leased, connection close notification is emitted once. 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(data, written):
    return ""
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve('abcdef', 2), 'cdef')", "check('fixture 2', solve('abc', 0), 'abc')", "check('fixture 3', solve('abc', 3), '')", "check('fixture 4', solve('', 0), '')"]
for _line in _fixtures[N % len(_fixtures):] + _fixtures[:N % len(_fixtures)]:
    exec(_line)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)

source:
"""Failure Map reference implementation. Python standard library only."""
import json
import ipaddress
import re
from urllib.parse import urlsplit, urljoin
N = 1
observations = []
def solve(data, written):
    return data[:written]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve('abcdef', 2), 'cdef')", "check('fixture 2', solve('abc', 0), 'abc')", "check('fixture 3', solve('abc', 3), '')", "check('fixture 4', solve('', 0), '')"]
for _line in _fixtures[N % len(_fixtures):] + _fixtures[:N % len(_fixtures)]:
    exec(_line)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)

prompt:
Partial write advances only by successfully written count.

Bounded offline decision model: partial write advances only by successfully written count. Inputs are already validated protocol fields; the explicit fixtures define the supported policy, not a complete protocol implementation.

split: open-access