broken_source:
"""Failure Map reference implementation. Python standard library only."""
import json
from urllib.parse import urlsplit, unquote, quote
import posixpath
import re
N = 1
observations = []
def solve(request, drained, remaining, reusable, closed, canceled, http2):
    return {'request': request, 'decision': [not drained and remaining > 0, reusable and drained and not closed, not http2 and remaining > 0 and not reusable, http2, not canceled and not closed, 'eof' if remaining == 0 else 'pending', not closed, remaining if not drained else 0, 'stream' if http2 else 'connection', 'released' if closed else ('canceling' if canceled else 'owned')]}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve('/requests/' + str(N) + '/0', False, 8, True, False, False, False), {'request': '/requests/' + str(N) + '/0', 'decision': [True, False, False, False, True, 'pending', True, 8, 'connection', 'owned']})
check('fixture 2', solve('/requests/' + str(N) + '/1', True, 0, True, False, False, False), {'request': '/requests/' + str(N) + '/1', 'decision': [False, True, False, False, True, 'eof', True, 0, 'connection', 'owned']})
check('fixture 3', solve('/requests/' + str(N) + '/2', False, 3, False, False, False, False), {'request': '/requests/' + str(N) + '/2', 'decision': [True, False, True, False, True, 'pending', True, 3, 'connection', 'owned']})
check('fixture 4', solve('/requests/' + str(N) + '/3', False, 5, True, False, True, True), {'request': '/requests/' + str(N) + '/3', 'decision': [True, False, False, True, False, 'pending', True, 5, 'stream', 'canceling']})
check('fixture 5', solve('/requests/' + str(N) + '/4', True, 0, True, True, False, True), {'request': '/requests/' + str(N) + '/4', 'decision': [False, False, False, False, False, 'eof', False, 0, 'stream', 'released']})
check('fixture 6', solve('/requests/' + str(N) + '/5', False, 0, False, True, True, False), {'request': '/requests/' + str(N) + '/5', 'decision': [False, False, False, False, False, 'eof', False, 0, 'connection', 'released']})
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)

source:
"""Failure Map reference implementation. Python standard library only."""
import json
from urllib.parse import urlsplit, unquote, quote
import posixpath
import re
N = 1
observations = []
def solve(request, drained, remaining, reusable, closed, canceled, http2):
    return {'request': request, 'decision': [not drained and remaining > 0, reusable and drained and not closed, not http2 and remaining > 0 and not reusable, remaining > 0, not canceled and not closed, 'eof' if remaining == 0 else 'pending', not closed, remaining if not drained else 0, 'stream' if http2 else 'connection', 'released' if closed else ('canceling' if canceled else 'owned')]}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve('/requests/' + str(N) + '/0', False, 8, True, False, False, False), {'request': '/requests/' + str(N) + '/0', 'decision': [True, False, False, False, True, 'pending', True, 8, 'connection', 'owned']})
check('fixture 2', solve('/requests/' + str(N) + '/1', True, 0, True, False, False, False), {'request': '/requests/' + str(N) + '/1', 'decision': [False, True, False, False, True, 'eof', True, 0, 'connection', 'owned']})
check('fixture 3', solve('/requests/' + str(N) + '/2', False, 3, False, False, False, False), {'request': '/requests/' + str(N) + '/2', 'decision': [True, False, True, False, True, 'pending', True, 3, 'connection', 'owned']})
check('fixture 4', solve('/requests/' + str(N) + '/3', False, 5, True, False, True, True), {'request': '/requests/' + str(N) + '/3', 'decision': [True, False, False, True, False, 'pending', True, 5, 'stream', 'canceling']})
check('fixture 5', solve('/requests/' + str(N) + '/4', True, 0, True, True, False, True), {'request': '/requests/' + str(N) + '/4', 'decision': [False, False, False, False, False, 'eof', False, 0, 'stream', 'released']})
check('fixture 6', solve('/requests/' + str(N) + '/5', False, 0, False, True, True, False), {'request': '/requests/' + str(N) + '/5', 'decision': [False, False, False, False, False, 'eof', False, 0, 'connection', 'released']})
print(json.dumps({"observations": observations, "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:
Release an intermediate response before following its target: the h2 stream reset branch emits an incorrect decision.

Release an intermediate response before following its target. The explicit fixture inputs and outputs define a bounded offline policy; request identity must accompany the decision.

split: open-access


broken_source:
"""Failure Map reference implementation. Python standard library only."""
import json
from urllib.parse import urlsplit, unquote, quote
import posixpath
import re
N = 1
observations = []
def solve(request, drained, remaining, reusable, closed, canceled, http2):
    return {'request': request, 'decision': [not drained and remaining > 0, reusable and drained and not closed, not http2 and remaining > 0 and not reusable, http2 and remaining > 0, not closed, 'eof' if remaining == 0 else 'pending', not closed, remaining if not drained else 0, 'stream' if http2 else 'connection', 'released' if closed else ('canceling' if canceled else 'owned')]}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve('/requests/' + str(N) + '/0', False, 8, True, False, False, False), {'request': '/requests/' + str(N) + '/0', 'decision': [True, False, False, False, True, 'pending', True, 8, 'connection', 'owned']})
check('fixture 2', solve('/requests/' + str(N) + '/1', True, 0, True, False, False, False), {'request': '/requests/' + str(N) + '/1', 'decision': [False, True, False, False, True, 'eof', True, 0, 'connection', 'owned']})
check('fixture 3', solve('/requests/' + str(N) + '/2', False, 3, False, False, False, False), {'request': '/requests/' + str(N) + '/2', 'decision': [True, False, True, False, True, 'pending', True, 3, 'connection', 'owned']})
check('fixture 4', solve('/requests/' + str(N) + '/3', False, 5, True, False, True, True), {'request': '/requests/' + str(N) + '/3', 'decision': [True, False, False, True, False, 'pending', True, 5, 'stream', 'canceling']})
check('fixture 5', solve('/requests/' + str(N) + '/4', True, 0, True, True, False, True), {'request': '/requests/' + str(N) + '/4', 'decision': [False, False, False, False, False, 'eof', False, 0, 'stream', 'released']})
check('fixture 6', solve('/requests/' + str(N) + '/5', False, 0, False, True, True, False), {'request': '/requests/' + str(N) + '/5', 'decision': [False, False, False, False, False, 'eof', False, 0, 'connection', 'released']})
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)

meaning: Fixture-count band, not measured model difficulty

deps: stdlib

source:
"""Failure Map reference implementation. Python standard library only."""
import json
from urllib.parse import urlsplit, unquote, quote
import posixpath
import re
N = 1
observations = []
def solve(request, drained, remaining, reusable, closed, canceled, http2):
    return {'request': request, 'decision': [not drained and remaining > 0, reusable and drained and not closed, not http2 and remaining > 0 and not reusable, http2 and remaining > 0, not canceled, 'eof' if remaining == 0 else 'pending', not closed, remaining if not drained else 0, 'stream' if http2 else 'connection', 'released' if closed else ('canceling' if canceled else 'owned')]}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve('/requests/' + str(N) + '/0', False, 8, True, False, False, False), {'request': '/requests/' + str(N) + '/0', 'decision': [True, False, False, False, True, 'pending', True, 8, 'connection', 'owned']})
check('fixture 2', solve('/requests/' + str(N) + '/1', True, 0, True, False, False, False), {'request': '/requests/' + str(N) + '/1', 'decision': [False, True, False, False, True, 'eof', True, 0, 'connection', 'owned']})
check('fixture 3', solve('/requests/' + str(N) + '/2', False, 3, False, False, False, False), {'request': '/requests/' + str(N) + '/2', 'decision': [True, False, True, False, True, 'pending', True, 3, 'connection', 'owned']})
check('fixture 4', solve('/requests/' + str(N) + '/3', False, 5, True, False, True, True), {'request': '/requests/' + str(N) + '/3', 'decision': [True, False, False, True, False, 'pending', True, 5, 'stream', 'canceling']})
check('fixture 5', solve('/requests/' + str(N) + '/4', True, 0, True, True, False, True), {'request': '/requests/' + str(N) + '/4', 'decision': [False, False, False, False, False, 'eof', False, 0, 'stream', 'released']})
check('fixture 6', solve('/requests/' + str(N) + '/5', False, 0, False, True, True, False), {'request': '/requests/' + str(N) + '/5', 'decision': [False, False, False, False, False, 'eof', False, 0, 'connection', 'released']})
print(json.dumps({"observations": observations, "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:
Release an intermediate response before following its target: the cancel prevents follow branch emits an incorrect decision.

Release an intermediate response before following its target. The explicit fixture inputs and outputs define a bounded offline policy; request identity must accompany the decision.

split: open-access


broken_source:
"""Failure Map reference implementation. Python standard library only."""
import json
from urllib.parse import urlsplit, unquote, quote
import posixpath
import re
N = 1
observations = []
def solve(request, drained, remaining, reusable, closed, canceled, http2):
    return {'request': request, 'decision': [not drained and remaining > 0, reusable and drained and not closed, not http2 and remaining > 0 and not reusable, http2 and remaining > 0, not canceled and not closed, 'eof' if drained else 'pending', not closed, remaining if not drained else 0, 'stream' if http2 else 'connection', 'released' if closed else ('canceling' if canceled else 'owned')]}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve('/requests/' + str(N) + '/0', False, 8, True, False, False, False), {'request': '/requests/' + str(N) + '/0', 'decision': [True, False, False, False, True, 'pending', True, 8, 'connection', 'owned']})
check('fixture 2', solve('/requests/' + str(N) + '/1', True, 0, True, False, False, False), {'request': '/requests/' + str(N) + '/1', 'decision': [False, True, False, False, True, 'eof', True, 0, 'connection', 'owned']})
check('fixture 3', solve('/requests/' + str(N) + '/2', False, 3, False, False, False, False), {'request': '/requests/' + str(N) + '/2', 'decision': [True, False, True, False, True, 'pending', True, 3, 'connection', 'owned']})
check('fixture 4', solve('/requests/' + str(N) + '/3', False, 5, True, False, True, True), {'request': '/requests/' + str(N) + '/3', 'decision': [True, False, False, True, False, 'pending', True, 5, 'stream', 'canceling']})
check('fixture 5', solve('/requests/' + str(N) + '/4', True, 0, True, True, False, True), {'request': '/requests/' + str(N) + '/4', 'decision': [False, False, False, False, False, 'eof', False, 0, 'stream', 'released']})
check('fixture 6', solve('/requests/' + str(N) + '/5', False, 0, False, True, True, False), {'request': '/requests/' + str(N) + '/5', 'decision': [False, False, False, False, False, 'eof', False, 0, 'connection', 'released']})
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)

source:
"""Failure Map reference implementation. Python standard library only."""
import json
from urllib.parse import urlsplit, unquote, quote
import posixpath
import re
N = 1
observations = []
def solve(request, drained, remaining, reusable, closed, canceled, http2):
    return {'request': request, 'decision': [not drained and remaining > 0, reusable and drained and not closed, not http2 and remaining > 0 and not reusable, http2 and remaining > 0, not canceled and not closed, 'eof' if remaining <= 3 else 'pending', not closed, remaining if not drained else 0, 'stream' if http2 else 'connection', 'released' if closed else ('canceling' if canceled else 'owned')]}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve('/requests/' + str(N) + '/0', False, 8, True, False, False, False), {'request': '/requests/' + str(N) + '/0', 'decision': [True, False, False, False, True, 'pending', True, 8, 'connection', 'owned']})
check('fixture 2', solve('/requests/' + str(N) + '/1', True, 0, True, False, False, False), {'request': '/requests/' + str(N) + '/1', 'decision': [False, True, False, False, True, 'eof', True, 0, 'connection', 'owned']})
check('fixture 3', solve('/requests/' + str(N) + '/2', False, 3, False, False, False, False), {'request': '/requests/' + str(N) + '/2', 'decision': [True, False, True, False, True, 'pending', True, 3, 'connection', 'owned']})
check('fixture 4', solve('/requests/' + str(N) + '/3', False, 5, True, False, True, True), {'request': '/requests/' + str(N) + '/3', 'decision': [True, False, False, True, False, 'pending', True, 5, 'stream', 'canceling']})
check('fixture 5', solve('/requests/' + str(N) + '/4', True, 0, True, True, False, True), {'request': '/requests/' + str(N) + '/4', 'decision': [False, False, False, False, False, 'eof', False, 0, 'stream', 'released']})
check('fixture 6', solve('/requests/' + str(N) + '/5', False, 0, False, True, True, False), {'request': '/requests/' + str(N) + '/5', 'decision': [False, False, False, False, False, 'eof', False, 0, 'connection', 'released']})
print(json.dumps({"observations": observations, "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:
Release an intermediate response before following its target: the eof diagnostic branch emits an incorrect decision.

Release an intermediate response before following its target. The explicit fixture inputs and outputs define a bounded offline policy; request identity must accompany the decision.

split: open-access


broken_source:
"""Failure Map reference implementation. Python standard library only."""
import json
from urllib.parse import urlsplit, unquote, quote
import posixpath
import re
N = 1
observations = []
def solve(request, drained, remaining, reusable, closed, canceled, http2):
    return {'request': request, 'decision': [not drained and remaining > 0, reusable and drained and not closed, not http2 and remaining > 0 and not reusable, http2 and remaining > 0, not canceled and not closed, 'eof' if remaining == 0 else 'pending', True, remaining if not drained else 0, 'stream' if http2 else 'connection', 'released' if closed else ('canceling' if canceled else 'owned')]}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve('/requests/' + str(N) + '/0', False, 8, True, False, False, False), {'request': '/requests/' + str(N) + '/0', 'decision': [True, False, False, False, True, 'pending', True, 8, 'connection', 'owned']})
check('fixture 2', solve('/requests/' + str(N) + '/1', True, 0, True, False, False, False), {'request': '/requests/' + str(N) + '/1', 'decision': [False, True, False, False, True, 'eof', True, 0, 'connection', 'owned']})
check('fixture 3', solve('/requests/' + str(N) + '/2', False, 3, False, False, False, False), {'request': '/requests/' + str(N) + '/2', 'decision': [True, False, True, False, True, 'pending', True, 3, 'connection', 'owned']})
check('fixture 4', solve('/requests/' + str(N) + '/3', False, 5, True, False, True, True), {'request': '/requests/' + str(N) + '/3', 'decision': [True, False, False, True, False, 'pending', True, 5, 'stream', 'canceling']})
check('fixture 5', solve('/requests/' + str(N) + '/4', True, 0, True, True, False, True), {'request': '/requests/' + str(N) + '/4', 'decision': [False, False, False, False, False, 'eof', False, 0, 'stream', 'released']})
check('fixture 6', solve('/requests/' + str(N) + '/5', False, 0, False, True, True, False), {'request': '/requests/' + str(N) + '/5', 'decision': [False, False, False, False, False, 'eof', False, 0, 'connection', 'released']})
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)

source:
"""Failure Map reference implementation. Python standard library only."""
import json
from urllib.parse import urlsplit, unquote, quote
import posixpath
import re
N = 1
observations = []
def solve(request, drained, remaining, reusable, closed, canceled, http2):
    return {'request': request, 'decision': [not drained and remaining > 0, reusable and drained and not closed, not http2 and remaining > 0 and not reusable, http2 and remaining > 0, not canceled and not closed, 'eof' if remaining == 0 else 'pending', not drained, remaining if not drained else 0, 'stream' if http2 else 'connection', 'released' if closed else ('canceling' if canceled else 'owned')]}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve('/requests/' + str(N) + '/0', False, 8, True, False, False, False), {'request': '/requests/' + str(N) + '/0', 'decision': [True, False, False, False, True, 'pending', True, 8, 'connection', 'owned']})
check('fixture 2', solve('/requests/' + str(N) + '/1', True, 0, True, False, False, False), {'request': '/requests/' + str(N) + '/1', 'decision': [False, True, False, False, True, 'eof', True, 0, 'connection', 'owned']})
check('fixture 3', solve('/requests/' + str(N) + '/2', False, 3, False, False, False, False), {'request': '/requests/' + str(N) + '/2', 'decision': [True, False, True, False, True, 'pending', True, 3, 'connection', 'owned']})
check('fixture 4', solve('/requests/' + str(N) + '/3', False, 5, True, False, True, True), {'request': '/requests/' + str(N) + '/3', 'decision': [True, False, False, True, False, 'pending', True, 5, 'stream', 'canceling']})
check('fixture 5', solve('/requests/' + str(N) + '/4', True, 0, True, True, False, True), {'request': '/requests/' + str(N) + '/4', 'decision': [False, False, False, False, False, 'eof', False, 0, 'stream', 'released']})
check('fixture 6', solve('/requests/' + str(N) + '/5', False, 0, False, True, True, False), {'request': '/requests/' + str(N) + '/5', 'decision': [False, False, False, False, False, 'eof', False, 0, 'connection', 'released']})
print(json.dumps({"observations": observations, "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:
Release an intermediate response before following its target: the idempotent close branch emits an incorrect decision.

Release an intermediate response before following its target. The explicit fixture inputs and outputs define a bounded offline policy; request identity must accompany the decision.

split: open-access


broken_source:
"""Failure Map reference implementation. Python standard library only."""
import json
from urllib.parse import urlsplit, unquote, quote
import posixpath
import re
N = 1
observations = []
def solve(request, drained, remaining, reusable, closed, canceled, http2):
    return {'request': request, 'decision': [not drained and remaining > 0, reusable and drained and not closed, not http2 and remaining > 0 and not reusable, http2 and remaining > 0, not canceled and not closed, 'eof' if remaining == 0 else 'pending', not closed, 0, 'stream' if http2 else 'connection', 'released' if closed else ('canceling' if canceled else 'owned')]}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve('/requests/' + str(N) + '/0', False, 8, True, False, False, False), {'request': '/requests/' + str(N) + '/0', 'decision': [True, False, False, False, True, 'pending', True, 8, 'connection', 'owned']})
check('fixture 2', solve('/requests/' + str(N) + '/1', True, 0, True, False, False, False), {'request': '/requests/' + str(N) + '/1', 'decision': [False, True, False, False, True, 'eof', True, 0, 'connection', 'owned']})
check('fixture 3', solve('/requests/' + str(N) + '/2', False, 3, False, False, False, False), {'request': '/requests/' + str(N) + '/2', 'decision': [True, False, True, False, True, 'pending', True, 3, 'connection', 'owned']})
check('fixture 4', solve('/requests/' + str(N) + '/3', False, 5, True, False, True, True), {'request': '/requests/' + str(N) + '/3', 'decision': [True, False, False, True, False, 'pending', True, 5, 'stream', 'canceling']})
check('fixture 5', solve('/requests/' + str(N) + '/4', True, 0, True, True, False, True), {'request': '/requests/' + str(N) + '/4', 'decision': [False, False, False, False, False, 'eof', False, 0, 'stream', 'released']})
check('fixture 6', solve('/requests/' + str(N) + '/5', False, 0, False, True, True, False), {'request': '/requests/' + str(N) + '/5', 'decision': [False, False, False, False, False, 'eof', False, 0, 'connection', 'released']})
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)

source:
"""Failure Map reference implementation. Python standard library only."""
import json
from urllib.parse import urlsplit, unquote, quote
import posixpath
import re
N = 1
observations = []
def solve(request, drained, remaining, reusable, closed, canceled, http2):
    return {'request': request, 'decision': [not drained and remaining > 0, reusable and drained and not closed, not http2 and remaining > 0 and not reusable, http2 and remaining > 0, not canceled and not closed, 'eof' if remaining == 0 else 'pending', not closed, remaining+1, 'stream' if http2 else 'connection', 'released' if closed else ('canceling' if canceled else 'owned')]}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve('/requests/' + str(N) + '/0', False, 8, True, False, False, False), {'request': '/requests/' + str(N) + '/0', 'decision': [True, False, False, False, True, 'pending', True, 8, 'connection', 'owned']})
check('fixture 2', solve('/requests/' + str(N) + '/1', True, 0, True, False, False, False), {'request': '/requests/' + str(N) + '/1', 'decision': [False, True, False, False, True, 'eof', True, 0, 'connection', 'owned']})
check('fixture 3', solve('/requests/' + str(N) + '/2', False, 3, False, False, False, False), {'request': '/requests/' + str(N) + '/2', 'decision': [True, False, True, False, True, 'pending', True, 3, 'connection', 'owned']})
check('fixture 4', solve('/requests/' + str(N) + '/3', False, 5, True, False, True, True), {'request': '/requests/' + str(N) + '/3', 'decision': [True, False, False, True, False, 'pending', True, 5, 'stream', 'canceling']})
check('fixture 5', solve('/requests/' + str(N) + '/4', True, 0, True, True, False, True), {'request': '/requests/' + str(N) + '/4', 'decision': [False, False, False, False, False, 'eof', False, 0, 'stream', 'released']})
check('fixture 6', solve('/requests/' + str(N) + '/5', False, 0, False, True, True, False), {'request': '/requests/' + str(N) + '/5', 'decision': [False, False, False, False, False, 'eof', False, 0, 'connection', 'released']})
print(json.dumps({"observations": observations, "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:
Release an intermediate response before following its target: the discard byte accounting branch emits an incorrect decision.

Release an intermediate response before following its target. The explicit fixture inputs and outputs define a bounded offline policy; request identity must accompany the decision.

split: open-access


broken_source:
"""Failure Map reference implementation. Python standard library only."""
import json
from urllib.parse import urlsplit, unquote, quote
import posixpath
import re
N = 1
observations = []
def solve(request, drained, remaining, reusable, closed, canceled, http2):
    return {'request': request, 'decision': [not drained and remaining > 0, reusable and drained and not closed, not http2 and remaining > 0 and not reusable, http2 and remaining > 0, not canceled and not closed, 'eof' if remaining == 0 else 'pending', not closed, remaining if not drained else 0, 'connection', 'released' if closed else ('canceling' if canceled else 'owned')]}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve('/requests/' + str(N) + '/0', False, 8, True, False, False, False), {'request': '/requests/' + str(N) + '/0', 'decision': [True, False, False, False, True, 'pending', True, 8, 'connection', 'owned']})
check('fixture 2', solve('/requests/' + str(N) + '/1', True, 0, True, False, False, False), {'request': '/requests/' + str(N) + '/1', 'decision': [False, True, False, False, True, 'eof', True, 0, 'connection', 'owned']})
check('fixture 3', solve('/requests/' + str(N) + '/2', False, 3, False, False, False, False), {'request': '/requests/' + str(N) + '/2', 'decision': [True, False, True, False, True, 'pending', True, 3, 'connection', 'owned']})
check('fixture 4', solve('/requests/' + str(N) + '/3', False, 5, True, False, True, True), {'request': '/requests/' + str(N) + '/3', 'decision': [True, False, False, True, False, 'pending', True, 5, 'stream', 'canceling']})
check('fixture 5', solve('/requests/' + str(N) + '/4', True, 0, True, True, False, True), {'request': '/requests/' + str(N) + '/4', 'decision': [False, False, False, False, False, 'eof', False, 0, 'stream', 'released']})
check('fixture 6', solve('/requests/' + str(N) + '/5', False, 0, False, True, True, False), {'request': '/requests/' + str(N) + '/5', 'decision': [False, False, False, False, False, 'eof', False, 0, 'connection', 'released']})
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)

source:
"""Failure Map reference implementation. Python standard library only."""
import json
from urllib.parse import urlsplit, unquote, quote
import posixpath
import re
N = 1
observations = []
def solve(request, drained, remaining, reusable, closed, canceled, http2):
    return {'request': request, 'decision': [not drained and remaining > 0, reusable and drained and not closed, not http2 and remaining > 0 and not reusable, http2 and remaining > 0, not canceled and not closed, 'eof' if remaining == 0 else 'pending', not closed, remaining if not drained else 0, 'stream', 'released' if closed else ('canceling' if canceled else 'owned')]}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve('/requests/' + str(N) + '/0', False, 8, True, False, False, False), {'request': '/requests/' + str(N) + '/0', 'decision': [True, False, False, False, True, 'pending', True, 8, 'connection', 'owned']})
check('fixture 2', solve('/requests/' + str(N) + '/1', True, 0, True, False, False, False), {'request': '/requests/' + str(N) + '/1', 'decision': [False, True, False, False, True, 'eof', True, 0, 'connection', 'owned']})
check('fixture 3', solve('/requests/' + str(N) + '/2', False, 3, False, False, False, False), {'request': '/requests/' + str(N) + '/2', 'decision': [True, False, True, False, True, 'pending', True, 3, 'connection', 'owned']})
check('fixture 4', solve('/requests/' + str(N) + '/3', False, 5, True, False, True, True), {'request': '/requests/' + str(N) + '/3', 'decision': [True, False, False, True, False, 'pending', True, 5, 'stream', 'canceling']})
check('fixture 5', solve('/requests/' + str(N) + '/4', True, 0, True, True, False, True), {'request': '/requests/' + str(N) + '/4', 'decision': [False, False, False, False, False, 'eof', False, 0, 'stream', 'released']})
check('fixture 6', solve('/requests/' + str(N) + '/5', False, 0, False, True, True, False), {'request': '/requests/' + str(N) + '/5', 'decision': [False, False, False, False, False, 'eof', False, 0, 'connection', 'released']})
print(json.dumps({"observations": observations, "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:
Release an intermediate response before following its target: the connection vs stream branch emits an incorrect decision.

Release an intermediate response before following its target. The explicit fixture inputs and outputs define a bounded offline policy; request identity must accompany the decision.

split: open-access


broken_source:
"""Failure Map reference implementation. Python standard library only."""
import json
from urllib.parse import urlsplit, unquote, quote
import posixpath
import re
N = 1
observations = []
def solve(request, drained, remaining, reusable, closed, canceled, http2):
    return {'request': request, 'decision': [not drained and remaining > 0, reusable and drained and not closed, not http2 and remaining > 0 and not reusable, http2 and remaining > 0, not canceled and not closed, 'eof' if remaining == 0 else 'pending', not closed, remaining if not drained else 0, 'stream' if http2 else 'connection', 'owned' if not closed else 'released']}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve('/requests/' + str(N) + '/0', False, 8, True, False, False, False), {'request': '/requests/' + str(N) + '/0', 'decision': [True, False, False, False, True, 'pending', True, 8, 'connection', 'owned']})
check('fixture 2', solve('/requests/' + str(N) + '/1', True, 0, True, False, False, False), {'request': '/requests/' + str(N) + '/1', 'decision': [False, True, False, False, True, 'eof', True, 0, 'connection', 'owned']})
check('fixture 3', solve('/requests/' + str(N) + '/2', False, 3, False, False, False, False), {'request': '/requests/' + str(N) + '/2', 'decision': [True, False, True, False, True, 'pending', True, 3, 'connection', 'owned']})
check('fixture 4', solve('/requests/' + str(N) + '/3', False, 5, True, False, True, True), {'request': '/requests/' + str(N) + '/3', 'decision': [True, False, False, True, False, 'pending', True, 5, 'stream', 'canceling']})
check('fixture 5', solve('/requests/' + str(N) + '/4', True, 0, True, True, False, True), {'request': '/requests/' + str(N) + '/4', 'decision': [False, False, False, False, False, 'eof', False, 0, 'stream', 'released']})
check('fixture 6', solve('/requests/' + str(N) + '/5', False, 0, False, True, True, False), {'request': '/requests/' + str(N) + '/5', 'decision': [False, False, False, False, False, 'eof', False, 0, 'connection', 'released']})
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)

source:
"""Failure Map reference implementation. Python standard library only."""
import json
from urllib.parse import urlsplit, unquote, quote
import posixpath
import re
N = 1
observations = []
def solve(request, drained, remaining, reusable, closed, canceled, http2):
    return {'request': request, 'decision': [not drained and remaining > 0, reusable and drained and not closed, not http2 and remaining > 0 and not reusable, http2 and remaining > 0, not canceled and not closed, 'eof' if remaining == 0 else 'pending', not closed, remaining if not drained else 0, 'stream' if http2 else 'connection', 'released' if closed or canceled else 'owned']}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve('/requests/' + str(N) + '/0', False, 8, True, False, False, False), {'request': '/requests/' + str(N) + '/0', 'decision': [True, False, False, False, True, 'pending', True, 8, 'connection', 'owned']})
check('fixture 2', solve('/requests/' + str(N) + '/1', True, 0, True, False, False, False), {'request': '/requests/' + str(N) + '/1', 'decision': [False, True, False, False, True, 'eof', True, 0, 'connection', 'owned']})
check('fixture 3', solve('/requests/' + str(N) + '/2', False, 3, False, False, False, False), {'request': '/requests/' + str(N) + '/2', 'decision': [True, False, True, False, True, 'pending', True, 3, 'connection', 'owned']})
check('fixture 4', solve('/requests/' + str(N) + '/3', False, 5, True, False, True, True), {'request': '/requests/' + str(N) + '/3', 'decision': [True, False, False, True, False, 'pending', True, 5, 'stream', 'canceling']})
check('fixture 5', solve('/requests/' + str(N) + '/4', True, 0, True, True, False, True), {'request': '/requests/' + str(N) + '/4', 'decision': [False, False, False, False, False, 'eof', False, 0, 'stream', 'released']})
check('fixture 6', solve('/requests/' + str(N) + '/5', False, 0, False, True, True, False), {'request': '/requests/' + str(N) + '/5', 'decision': [False, False, False, False, False, 'eof', False, 0, 'connection', 'released']})
print(json.dumps({"observations": observations, "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:
Release an intermediate response before following its target: the closed response ownership branch emits an incorrect decision.

Release an intermediate response before following its target. The explicit fixture inputs and outputs define a bounded offline policy; request identity must accompany the decision.

split: open-access


broken_source:
"""Failure Map reference implementation. Python standard library only."""
import json
from urllib.parse import urlsplit, unquote, quote
import posixpath
import re
N = 1
observations = []
def solve(request, original, current, location, override, action, status, callback_status, headers, synthetic, cached):
    return {'request': request, 'decision': [override or location, status, action == 'follow', current, headers, action == 'follow' and not synthetic, action != 'error', True, urlsplit(location if override is None else override).scheme in ('','http','https'), callback_status if synthetic else None]}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve('/requests/' + str(N) + '/0', 'https://a/x', 'https://b/y', '/next', 'https://c/z', 'follow', 302, 200, [['X', '1'], ['X', '2']], False, False), {'request': '/requests/' + str(N) + '/0', 'decision': ['https://c/z', 302, True, 'https://b/y', [['X', '1'], ['X', '2']], True, True, True, True, None]})
check('fixture 2', solve('/requests/' + str(N) + '/1', 'https://a/x', 'https://a/x', '/next', None, 'manual', 307, None, [], False, True), {'request': '/requests/' + str(N) + '/1', 'decision': ['/next', 307, False, 'https://a/x', [], False, True, True, True, None]})
check('fixture 3', solve('/requests/' + str(N) + '/2', 'https://a/x', 'https://b/y', '/next', '', 'follow', 303, 204, [['Y', 'v']], True, True), {'request': '/requests/' + str(N) + '/2', 'decision': ['', 303, True, 'https://b/y', [['Y', 'v']], False, True, True, True, 204]})
check('fixture 4', solve('/requests/' + str(N) + '/3', 'https://a/x', 'https://b/y', 'https://safe/x', 'file:/local', 'cancel', 301, 201, [], False, False), {'request': '/requests/' + str(N) + '/3', 'decision': ['file:/local', 301, False, 'https://b/y', [], False, True, True, False, None]})
check('fixture 5', solve('/requests/' + str(N) + '/4', 'https://a/x', 'https://b/y', '/next', None, 'error', 308, None, [['X', '1']], False, True), {'request': '/requests/' + str(N) + '/4', 'decision': ['/next', 308, False, 'https://b/y', [['X', '1']], False, False, True, True, None]})
check('fixture 6', solve('/requests/' + str(N) + '/5', 'https://a/x', 'https://b/y', '/next', '/custom', 'manual', 302, 202, [['Z', '1']], True, False), {'request': '/requests/' + str(N) + '/5', 'decision': ['/custom', 302, False, 'https://b/y', [['Z', '1']], False, True, True, True, 202]})
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)

source:
"""Failure Map reference implementation. Python standard library only."""
import json
from urllib.parse import urlsplit, unquote, quote
import posixpath
import re
N = 1
observations = []
def solve(request, original, current, location, override, action, status, callback_status, headers, synthetic, cached):
    return {'request': request, 'decision': [location, status, action == 'follow', current, headers, action == 'follow' and not synthetic, action != 'error', True, urlsplit(location if override is None else override).scheme in ('','http','https'), callback_status if synthetic else None]}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve('/requests/' + str(N) + '/0', 'https://a/x', 'https://b/y', '/next', 'https://c/z', 'follow', 302, 200, [['X', '1'], ['X', '2']], False, False), {'request': '/requests/' + str(N) + '/0', 'decision': ['https://c/z', 302, True, 'https://b/y', [['X', '1'], ['X', '2']], True, True, True, True, None]})
check('fixture 2', solve('/requests/' + str(N) + '/1', 'https://a/x', 'https://a/x', '/next', None, 'manual', 307, None, [], False, True), {'request': '/requests/' + str(N) + '/1', 'decision': ['/next', 307, False, 'https://a/x', [], False, True, True, True, None]})
check('fixture 3', solve('/requests/' + str(N) + '/2', 'https://a/x', 'https://b/y', '/next', '', 'follow', 303, 204, [['Y', 'v']], True, True), {'request': '/requests/' + str(N) + '/2', 'decision': ['', 303, True, 'https://b/y', [['Y', 'v']], False, True, True, True, 204]})
check('fixture 4', solve('/requests/' + str(N) + '/3', 'https://a/x', 'https://b/y', 'https://safe/x', 'file:/local', 'cancel', 301, 201, [], False, False), {'request': '/requests/' + str(N) + '/3', 'decision': ['file:/local', 301, False, 'https://b/y', [], False, True, True, False, None]})
check('fixture 5', solve('/requests/' + str(N) + '/4', 'https://a/x', 'https://b/y', '/next', None, 'error', 308, None, [['X', '1']], False, True), {'request': '/requests/' + str(N) + '/4', 'decision': ['/next', 308, False, 'https://b/y', [['X', '1']], False, False, True, True, None]})
check('fixture 6', solve('/requests/' + str(N) + '/5', 'https://a/x', 'https://b/y', '/next', '/custom', 'manual', 302, 202, [['Z', '1']], True, False), {'request': '/requests/' + str(N) + '/5', 'decision': ['/custom', 302, False, 'https://b/y', [['Z', '1']], False, True, True, True, 202]})
print(json.dumps({"observations": observations, "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:
Apply redirect interception to the current hop before validating and dispatching the selected target: the explicit empty override branch emits an incorrect decision.

Apply redirect interception to the current hop before validating and dispatching the selected target. The explicit fixture inputs and outputs define a bounded offline policy; request identity must accompany the decision.

split: open-access


broken_source:
"""Failure Map reference implementation. Python standard library only."""
import json
from urllib.parse import urlsplit, unquote, quote
import posixpath
import re
N = 1
observations = []
def solve(request, original, current, location, override, action, status, callback_status, headers, synthetic, cached):
    return {'request': request, 'decision': [location if override is None else override, callback_status if callback_status is not None else status, action == 'follow', current, headers, action == 'follow' and not synthetic, action != 'error', True, urlsplit(location if override is None else override).scheme in ('','http','https'), callback_status if synthetic else None]}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve('/requests/' + str(N) + '/0', 'https://a/x', 'https://b/y', '/next', 'https://c/z', 'follow', 302, 200, [['X', '1'], ['X', '2']], False, False), {'request': '/requests/' + str(N) + '/0', 'decision': ['https://c/z', 302, True, 'https://b/y', [['X', '1'], ['X', '2']], True, True, True, True, None]})
check('fixture 2', solve('/requests/' + str(N) + '/1', 'https://a/x', 'https://a/x', '/next', None, 'manual', 307, None, [], False, True), {'request': '/requests/' + str(N) + '/1', 'decision': ['/next', 307, False, 'https://a/x', [], False, True, True, True, None]})
check('fixture 3', solve('/requests/' + str(N) + '/2', 'https://a/x', 'https://b/y', '/next', '', 'follow', 303, 204, [['Y', 'v']], True, True), {'request': '/requests/' + str(N) + '/2', 'decision': ['', 303, True, 'https://b/y', [['Y', 'v']], False, True, True, True, 204]})
check('fixture 4', solve('/requests/' + str(N) + '/3', 'https://a/x', 'https://b/y', 'https://safe/x', 'file:/local', 'cancel', 301, 201, [], False, False), {'request': '/requests/' + str(N) + '/3', 'decision': ['file:/local', 301, False, 'https://b/y', [], False, True, True, False, None]})
check('fixture 5', solve('/requests/' + str(N) + '/4', 'https://a/x', 'https://b/y', '/next', None, 'error', 308, None, [['X', '1']], False, True), {'request': '/requests/' + str(N) + '/4', 'decision': ['/next', 308, False, 'https://b/y', [['X', '1']], False, False, True, True, None]})
check('fixture 6', solve('/requests/' + str(N) + '/5', 'https://a/x', 'https://b/y', '/next', '/custom', 'manual', 302, 202, [['Z', '1']], True, False), {'request': '/requests/' + str(N) + '/5', 'decision': ['/custom', 302, False, 'https://b/y', [['Z', '1']], False, True, True, True, 202]})
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)

source:
"""Failure Map reference implementation. Python standard library only."""
import json
from urllib.parse import urlsplit, unquote, quote
import posixpath
import re
N = 1
observations = []
def solve(request, original, current, location, override, action, status, callback_status, headers, synthetic, cached):
    return {'request': request, 'decision': [location if override is None else override, callback_status or status, action == 'follow', current, headers, action == 'follow' and not synthetic, action != 'error', True, urlsplit(location if override is None else override).scheme in ('','http','https'), callback_status if synthetic else None]}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve('/requests/' + str(N) + '/0', 'https://a/x', 'https://b/y', '/next', 'https://c/z', 'follow', 302, 200, [['X', '1'], ['X', '2']], False, False), {'request': '/requests/' + str(N) + '/0', 'decision': ['https://c/z', 302, True, 'https://b/y', [['X', '1'], ['X', '2']], True, True, True, True, None]})
check('fixture 2', solve('/requests/' + str(N) + '/1', 'https://a/x', 'https://a/x', '/next', None, 'manual', 307, None, [], False, True), {'request': '/requests/' + str(N) + '/1', 'decision': ['/next', 307, False, 'https://a/x', [], False, True, True, True, None]})
check('fixture 3', solve('/requests/' + str(N) + '/2', 'https://a/x', 'https://b/y', '/next', '', 'follow', 303, 204, [['Y', 'v']], True, True), {'request': '/requests/' + str(N) + '/2', 'decision': ['', 303, True, 'https://b/y', [['Y', 'v']], False, True, True, True, 204]})
check('fixture 4', solve('/requests/' + str(N) + '/3', 'https://a/x', 'https://b/y', 'https://safe/x', 'file:/local', 'cancel', 301, 201, [], False, False), {'request': '/requests/' + str(N) + '/3', 'decision': ['file:/local', 301, False, 'https://b/y', [], False, True, True, False, None]})
check('fixture 5', solve('/requests/' + str(N) + '/4', 'https://a/x', 'https://b/y', '/next', None, 'error', 308, None, [['X', '1']], False, True), {'request': '/requests/' + str(N) + '/4', 'decision': ['/next', 308, False, 'https://b/y', [['X', '1']], False, False, True, True, None]})
check('fixture 6', solve('/requests/' + str(N) + '/5', 'https://a/x', 'https://b/y', '/next', '/custom', 'manual', 302, 202, [['Z', '1']], True, False), {'request': '/requests/' + str(N) + '/5', 'decision': ['/custom', 302, False, 'https://b/y', [['Z', '1']], False, True, True, True, 202]})
print(json.dumps({"observations": observations, "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:
Apply redirect interception to the current hop before validating and dispatching the selected target: the response status is hop evidence branch emits an incorrect decision.

Apply redirect interception to the current hop before validating and dispatching the selected target. The explicit fixture inputs and outputs define a bounded offline policy; request identity must accompany the decision.

split: open-access


broken_source:
"""Failure Map reference implementation. Python standard library only."""
import json
from urllib.parse import urlsplit, unquote, quote
import posixpath
import re
N = 1
observations = []
def solve(request, original, current, location, override, action, status, callback_status, headers, synthetic, cached):
    return {'request': request, 'decision': [location if override is None else override, status, action != 'cancel', current, headers, action == 'follow' and not synthetic, action != 'error', True, urlsplit(location if override is None else override).scheme in ('','http','https'), callback_status if synthetic else None]}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve('/requests/' + str(N) + '/0', 'https://a/x', 'https://b/y', '/next', 'https://c/z', 'follow', 302, 200, [['X', '1'], ['X', '2']], False, False), {'request': '/requests/' + str(N) + '/0', 'decision': ['https://c/z', 302, True, 'https://b/y', [['X', '1'], ['X', '2']], True, True, True, True, None]})
check('fixture 2', solve('/requests/' + str(N) + '/1', 'https://a/x', 'https://a/x', '/next', None, 'manual', 307, None, [], False, True), {'request': '/requests/' + str(N) + '/1', 'decision': ['/next', 307, False, 'https://a/x', [], False, True, True, True, None]})
check('fixture 3', solve('/requests/' + str(N) + '/2', 'https://a/x', 'https://b/y', '/next', '', 'follow', 303, 204, [['Y', 'v']], True, True), {'request': '/requests/' + str(N) + '/2', 'decision': ['', 303, True, 'https://b/y', [['Y', 'v']], False, True, True, True, 204]})
check('fixture 4', solve('/requests/' + str(N) + '/3', 'https://a/x', 'https://b/y', 'https://safe/x', 'file:/local', 'cancel', 301, 201, [], False, False), {'request': '/requests/' + str(N) + '/3', 'decision': ['file:/local', 301, False, 'https://b/y', [], False, True, True, False, None]})
check('fixture 5', solve('/requests/' + str(N) + '/4', 'https://a/x', 'https://b/y', '/next', None, 'error', 308, None, [['X', '1']], False, True), {'request': '/requests/' + str(N) + '/4', 'decision': ['/next', 308, False, 'https://b/y', [['X', '1']], False, False, True, True, None]})
check('fixture 6', solve('/requests/' + str(N) + '/5', 'https://a/x', 'https://b/y', '/next', '/custom', 'manual', 302, 202, [['Z', '1']], True, False), {'request': '/requests/' + str(N) + '/5', 'decision': ['/custom', 302, False, 'https://b/y', [['Z', '1']], False, True, True, True, 202]})
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)

source:
"""Failure Map reference implementation. Python standard library only."""
import json
from urllib.parse import urlsplit, unquote, quote
import posixpath
import re
N = 1
observations = []
def solve(request, original, current, location, override, action, status, callback_status, headers, synthetic, cached):
    return {'request': request, 'decision': [location if override is None else override, status, action in ('follow','manual'), current, headers, action == 'follow' and not synthetic, action != 'error', True, urlsplit(location if override is None else override).scheme in ('','http','https'), callback_status if synthetic else None]}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve('/requests/' + str(N) + '/0', 'https://a/x', 'https://b/y', '/next', 'https://c/z', 'follow', 302, 200, [['X', '1'], ['X', '2']], False, False), {'request': '/requests/' + str(N) + '/0', 'decision': ['https://c/z', 302, True, 'https://b/y', [['X', '1'], ['X', '2']], True, True, True, True, None]})
check('fixture 2', solve('/requests/' + str(N) + '/1', 'https://a/x', 'https://a/x', '/next', None, 'manual', 307, None, [], False, True), {'request': '/requests/' + str(N) + '/1', 'decision': ['/next', 307, False, 'https://a/x', [], False, True, True, True, None]})
check('fixture 3', solve('/requests/' + str(N) + '/2', 'https://a/x', 'https://b/y', '/next', '', 'follow', 303, 204, [['Y', 'v']], True, True), {'request': '/requests/' + str(N) + '/2', 'decision': ['', 303, True, 'https://b/y', [['Y', 'v']], False, True, True, True, 204]})
check('fixture 4', solve('/requests/' + str(N) + '/3', 'https://a/x', 'https://b/y', 'https://safe/x', 'file:/local', 'cancel', 301, 201, [], False, False), {'request': '/requests/' + str(N) + '/3', 'decision': ['file:/local', 301, False, 'https://b/y', [], False, True, True, False, None]})
check('fixture 5', solve('/requests/' + str(N) + '/4', 'https://a/x', 'https://b/y', '/next', None, 'error', 308, None, [['X', '1']], False, True), {'request': '/requests/' + str(N) + '/4', 'decision': ['/next', 308, False, 'https://b/y', [['X', '1']], False, False, True, True, None]})
check('fixture 6', solve('/requests/' + str(N) + '/5', 'https://a/x', 'https://b/y', '/next', '/custom', 'manual', 302, 202, [['Z', '1']], True, False), {'request': '/requests/' + str(N) + '/5', 'decision': ['/custom', 302, False, 'https://b/y', [['Z', '1']], False, True, True, True, 202]})
print(json.dumps({"observations": observations, "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:
Apply redirect interception to the current hop before validating and dispatching the selected target: the follow action only branch emits an incorrect decision.

Apply redirect interception to the current hop before validating and dispatching the selected target. The explicit fixture inputs and outputs define a bounded offline policy; request identity must accompany the decision.

split: open-access


broken_source:
"""Failure Map reference implementation. Python standard library only."""
import json
from urllib.parse import urlsplit, unquote, quote
import posixpath
import re
N = 1
observations = []
def solve(request, original, current, location, override, action, status, callback_status, headers, synthetic, cached):
    return {'request': request, 'decision': [location if override is None else override, status, action == 'follow', original, headers, action == 'follow' and not synthetic, action != 'error', True, urlsplit(location if override is None else override).scheme in ('','http','https'), callback_status if synthetic else None]}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve('/requests/' + str(N) + '/0', 'https://a/x', 'https://b/y', '/next', 'https://c/z', 'follow', 302, 200, [['X', '1'], ['X', '2']], False, False), {'request': '/requests/' + str(N) + '/0', 'decision': ['https://c/z', 302, True, 'https://b/y', [['X', '1'], ['X', '2']], True, True, True, True, None]})
check('fixture 2', solve('/requests/' + str(N) + '/1', 'https://a/x', 'https://a/x', '/next', None, 'manual', 307, None, [], False, True), {'request': '/requests/' + str(N) + '/1', 'decision': ['/next', 307, False, 'https://a/x', [], False, True, True, True, None]})
check('fixture 3', solve('/requests/' + str(N) + '/2', 'https://a/x', 'https://b/y', '/next', '', 'follow', 303, 204, [['Y', 'v']], True, True), {'request': '/requests/' + str(N) + '/2', 'decision': ['', 303, True, 'https://b/y', [['Y', 'v']], False, True, True, True, 204]})
check('fixture 4', solve('/requests/' + str(N) + '/3', 'https://a/x', 'https://b/y', 'https://safe/x', 'file:/local', 'cancel', 301, 201, [], False, False), {'request': '/requests/' + str(N) + '/3', 'decision': ['file:/local', 301, False, 'https://b/y', [], False, True, True, False, None]})
check('fixture 5', solve('/requests/' + str(N) + '/4', 'https://a/x', 'https://b/y', '/next', None, 'error', 308, None, [['X', '1']], False, True), {'request': '/requests/' + str(N) + '/4', 'decision': ['/next', 308, False, 'https://b/y', [['X', '1']], False, False, True, True, None]})
check('fixture 6', solve('/requests/' + str(N) + '/5', 'https://a/x', 'https://b/y', '/next', '/custom', 'manual', 302, 202, [['Z', '1']], True, False), {'request': '/requests/' + str(N) + '/5', 'decision': ['/custom', 302, False, 'https://b/y', [['Z', '1']], False, True, True, True, 202]})
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)

source:
"""Failure Map reference implementation. Python standard library only."""
import json
from urllib.parse import urlsplit, unquote, quote
import posixpath
import re
N = 1
observations = []
def solve(request, original, current, location, override, action, status, callback_status, headers, synthetic, cached):
    return {'request': request, 'decision': [location if override is None else override, status, action == 'follow', location, headers, action == 'follow' and not synthetic, action != 'error', True, urlsplit(location if override is None else override).scheme in ('','http','https'), callback_status if synthetic else None]}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve('/requests/' + str(N) + '/0', 'https://a/x', 'https://b/y', '/next', 'https://c/z', 'follow', 302, 200, [['X', '1'], ['X', '2']], False, False), {'request': '/requests/' + str(N) + '/0', 'decision': ['https://c/z', 302, True, 'https://b/y', [['X', '1'], ['X', '2']], True, True, True, True, None]})
check('fixture 2', solve('/requests/' + str(N) + '/1', 'https://a/x', 'https://a/x', '/next', None, 'manual', 307, None, [], False, True), {'request': '/requests/' + str(N) + '/1', 'decision': ['/next', 307, False, 'https://a/x', [], False, True, True, True, None]})
check('fixture 3', solve('/requests/' + str(N) + '/2', 'https://a/x', 'https://b/y', '/next', '', 'follow', 303, 204, [['Y', 'v']], True, True), {'request': '/requests/' + str(N) + '/2', 'decision': ['', 303, True, 'https://b/y', [['Y', 'v']], False, True, True, True, 204]})
check('fixture 4', solve('/requests/' + str(N) + '/3', 'https://a/x', 'https://b/y', 'https://safe/x', 'file:/local', 'cancel', 301, 201, [], False, False), {'request': '/requests/' + str(N) + '/3', 'decision': ['file:/local', 301, False, 'https://b/y', [], False, True, True, False, None]})
check('fixture 5', solve('/requests/' + str(N) + '/4', 'https://a/x', 'https://b/y', '/next', None, 'error', 308, None, [['X', '1']], False, True), {'request': '/requests/' + str(N) + '/4', 'decision': ['/next', 308, False, 'https://b/y', [['X', '1']], False, False, True, True, None]})
check('fixture 6', solve('/requests/' + str(N) + '/5', 'https://a/x', 'https://b/y', '/next', '/custom', 'manual', 302, 202, [['Z', '1']], True, False), {'request': '/requests/' + str(N) + '/5', 'decision': ['/custom', 302, False, 'https://b/y', [['Z', '1']], False, True, True, True, 202]})
print(json.dumps({"observations": observations, "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:
Apply redirect interception to the current hop before validating and dispatching the selected target: the callback current hop url branch emits an incorrect decision.

Apply redirect interception to the current hop before validating and dispatching the selected target. The explicit fixture inputs and outputs define a bounded offline policy; request identity must accompany the decision.

split: open-access


broken_source:
"""Failure Map reference implementation. Python standard library only."""
import json
from urllib.parse import urlsplit, unquote, quote
import posixpath
import re
N = 1
observations = []
def solve(request, original, current, location, override, action, status, callback_status, headers, synthetic, cached):
    return {'request': request, 'decision': [location if override is None else override, status, action == 'follow', current, [[k,v] for k,v in dict(headers).items()], action == 'follow' and not synthetic, action != 'error', True, urlsplit(location if override is None else override).scheme in ('','http','https'), callback_status if synthetic else None]}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve('/requests/' + str(N) + '/0', 'https://a/x', 'https://b/y', '/next', 'https://c/z', 'follow', 302, 200, [['X', '1'], ['X', '2']], False, False), {'request': '/requests/' + str(N) + '/0', 'decision': ['https://c/z', 302, True, 'https://b/y', [['X', '1'], ['X', '2']], True, True, True, True, None]})
check('fixture 2', solve('/requests/' + str(N) + '/1', 'https://a/x', 'https://a/x', '/next', None, 'manual', 307, None, [], False, True), {'request': '/requests/' + str(N) + '/1', 'decision': ['/next', 307, False, 'https://a/x', [], False, True, True, True, None]})
check('fixture 3', solve('/requests/' + str(N) + '/2', 'https://a/x', 'https://b/y', '/next', '', 'follow', 303, 204, [['Y', 'v']], True, True), {'request': '/requests/' + str(N) + '/2', 'decision': ['', 303, True, 'https://b/y', [['Y', 'v']], False, True, True, True, 204]})
check('fixture 4', solve('/requests/' + str(N) + '/3', 'https://a/x', 'https://b/y', 'https://safe/x', 'file:/local', 'cancel', 301, 201, [], False, False), {'request': '/requests/' + str(N) + '/3', 'decision': ['file:/local', 301, False, 'https://b/y', [], False, True, True, False, None]})
check('fixture 5', solve('/requests/' + str(N) + '/4', 'https://a/x', 'https://b/y', '/next', None, 'error', 308, None, [['X', '1']], False, True), {'request': '/requests/' + str(N) + '/4', 'decision': ['/next', 308, False, 'https://b/y', [['X', '1']], False, False, True, True, None]})
check('fixture 6', solve('/requests/' + str(N) + '/5', 'https://a/x', 'https://b/y', '/next', '/custom', 'manual', 302, 202, [['Z', '1']], True, False), {'request': '/requests/' + str(N) + '/5', 'decision': ['/custom', 302, False, 'https://b/y', [['Z', '1']], False, True, True, True, 202]})
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)

source:
"""Failure Map reference implementation. Python standard library only."""
import json
from urllib.parse import urlsplit, unquote, quote
import posixpath
import re
N = 1
observations = []
def solve(request, original, current, location, override, action, status, callback_status, headers, synthetic, cached):
    return {'request': request, 'decision': [location if override is None else override, status, action == 'follow', current, headers[:1], action == 'follow' and not synthetic, action != 'error', True, urlsplit(location if override is None else override).scheme in ('','http','https'), callback_status if synthetic else None]}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve('/requests/' + str(N) + '/0', 'https://a/x', 'https://b/y', '/next', 'https://c/z', 'follow', 302, 200, [['X', '1'], ['X', '2']], False, False), {'request': '/requests/' + str(N) + '/0', 'decision': ['https://c/z', 302, True, 'https://b/y', [['X', '1'], ['X', '2']], True, True, True, True, None]})
check('fixture 2', solve('/requests/' + str(N) + '/1', 'https://a/x', 'https://a/x', '/next', None, 'manual', 307, None, [], False, True), {'request': '/requests/' + str(N) + '/1', 'decision': ['/next', 307, False, 'https://a/x', [], False, True, True, True, None]})
check('fixture 3', solve('/requests/' + str(N) + '/2', 'https://a/x', 'https://b/y', '/next', '', 'follow', 303, 204, [['Y', 'v']], True, True), {'request': '/requests/' + str(N) + '/2', 'decision': ['', 303, True, 'https://b/y', [['Y', 'v']], False, True, True, True, 204]})
check('fixture 4', solve('/requests/' + str(N) + '/3', 'https://a/x', 'https://b/y', 'https://safe/x', 'file:/local', 'cancel', 301, 201, [], False, False), {'request': '/requests/' + str(N) + '/3', 'decision': ['file:/local', 301, False, 'https://b/y', [], False, True, True, False, None]})
check('fixture 5', solve('/requests/' + str(N) + '/4', 'https://a/x', 'https://b/y', '/next', None, 'error', 308, None, [['X', '1']], False, True), {'request': '/requests/' + str(N) + '/4', 'decision': ['/next', 308, False, 'https://b/y', [['X', '1']], False, False, True, True, None]})
check('fixture 6', solve('/requests/' + str(N) + '/5', 'https://a/x', 'https://b/y', '/next', '/custom', 'manual', 302, 202, [['Z', '1']], True, False), {'request': '/requests/' + str(N) + '/5', 'decision': ['/custom', 302, False, 'https://b/y', [['Z', '1']], False, True, True, True, 202]})
print(json.dumps({"observations": observations, "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:
Apply redirect interception to the current hop before validating and dispatching the selected target: the raw header occurrences branch emits an incorrect decision.

Apply redirect interception to the current hop before validating and dispatching the selected target. The explicit fixture inputs and outputs define a bounded offline policy; request identity must accompany the decision.

split: open-access


broken_source:
"""Failure Map reference implementation. Python standard library only."""
import json
from urllib.parse import urlsplit, unquote, quote
import posixpath
import re
N = 1
observations = []
def solve(request, original, current, location, override, action, status, callback_status, headers, synthetic, cached):
    return {'request': request, 'decision': [location if override is None else override, status, action == 'follow', current, headers, action == 'follow', action != 'error', True, urlsplit(location if override is None else override).scheme in ('','http','https'), callback_status if synthetic else None]}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve('/requests/' + str(N) + '/0', 'https://a/x', 'https://b/y', '/next', 'https://c/z', 'follow', 302, 200, [['X', '1'], ['X', '2']], False, False), {'request': '/requests/' + str(N) + '/0', 'decision': ['https://c/z', 302, True, 'https://b/y', [['X', '1'], ['X', '2']], True, True, True, True, None]})
check('fixture 2', solve('/requests/' + str(N) + '/1', 'https://a/x', 'https://a/x', '/next', None, 'manual', 307, None, [], False, True), {'request': '/requests/' + str(N) + '/1', 'decision': ['/next', 307, False, 'https://a/x', [], False, True, True, True, None]})
check('fixture 3', solve('/requests/' + str(N) + '/2', 'https://a/x', 'https://b/y', '/next', '', 'follow', 303, 204, [['Y', 'v']], True, True), {'request': '/requests/' + str(N) + '/2', 'decision': ['', 303, True, 'https://b/y', [['Y', 'v']], False, True, True, True, 204]})
check('fixture 4', solve('/requests/' + str(N) + '/3', 'https://a/x', 'https://b/y', 'https://safe/x', 'file:/local', 'cancel', 301, 201, [], False, False), {'request': '/requests/' + str(N) + '/3', 'decision': ['file:/local', 301, False, 'https://b/y', [], False, True, True, False, None]})
check('fixture 5', solve('/requests/' + str(N) + '/4', 'https://a/x', 'https://b/y', '/next', None, 'error', 308, None, [['X', '1']], False, True), {'request': '/requests/' + str(N) + '/4', 'decision': ['/next', 308, False, 'https://b/y', [['X', '1']], False, False, True, True, None]})
check('fixture 6', solve('/requests/' + str(N) + '/5', 'https://a/x', 'https://b/y', '/next', '/custom', 'manual', 302, 202, [['Z', '1']], True, False), {'request': '/requests/' + str(N) + '/5', 'decision': ['/custom', 302, False, 'https://b/y', [['Z', '1']], False, True, True, True, 202]})
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)

source:
"""Failure Map reference implementation. Python standard library only."""
import json
from urllib.parse import urlsplit, unquote, quote
import posixpath
import re
N = 1
observations = []
def solve(request, original, current, location, override, action, status, callback_status, headers, synthetic, cached):
    return {'request': request, 'decision': [location if override is None else override, status, action == 'follow', current, headers, not synthetic, action != 'error', True, urlsplit(location if override is None else override).scheme in ('','http','https'), callback_status if synthetic else None]}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve('/requests/' + str(N) + '/0', 'https://a/x', 'https://b/y', '/next', 'https://c/z', 'follow', 302, 200, [['X', '1'], ['X', '2']], False, False), {'request': '/requests/' + str(N) + '/0', 'decision': ['https://c/z', 302, True, 'https://b/y', [['X', '1'], ['X', '2']], True, True, True, True, None]})
check('fixture 2', solve('/requests/' + str(N) + '/1', 'https://a/x', 'https://a/x', '/next', None, 'manual', 307, None, [], False, True), {'request': '/requests/' + str(N) + '/1', 'decision': ['/next', 307, False, 'https://a/x', [], False, True, True, True, None]})
check('fixture 3', solve('/requests/' + str(N) + '/2', 'https://a/x', 'https://b/y', '/next', '', 'follow', 303, 204, [['Y', 'v']], True, True), {'request': '/requests/' + str(N) + '/2', 'decision': ['', 303, True, 'https://b/y', [['Y', 'v']], False, True, True, True, 204]})
check('fixture 4', solve('/requests/' + str(N) + '/3', 'https://a/x', 'https://b/y', 'https://safe/x', 'file:/local', 'cancel', 301, 201, [], False, False), {'request': '/requests/' + str(N) + '/3', 'decision': ['file:/local', 301, False, 'https://b/y', [], False, True, True, False, None]})
check('fixture 5', solve('/requests/' + str(N) + '/4', 'https://a/x', 'https://b/y', '/next', None, 'error', 308, None, [['X', '1']], False, True), {'request': '/requests/' + str(N) + '/4', 'decision': ['/next', 308, False, 'https://b/y', [['X', '1']], False, False, True, True, None]})
check('fixture 6', solve('/requests/' + str(N) + '/5', 'https://a/x', 'https://b/y', '/next', '/custom', 'manual', 302, 202, [['Z', '1']], True, False), {'request': '/requests/' + str(N) + '/5', 'decision': ['/custom', 302, False, 'https://b/y', [['Z', '1']], False, True, True, True, 202]})
print(json.dumps({"observations": observations, "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:
Apply redirect interception to the current hop before validating and dispatching the selected target: the synthetic stops network follow branch emits an incorrect decision.

Apply redirect interception to the current hop before validating and dispatching the selected target. The explicit fixture inputs and outputs define a bounded offline policy; request identity must accompany the decision.

split: open-access


broken_source:
"""Failure Map reference implementation. Python standard library only."""
import json
from urllib.parse import urlsplit, unquote, quote
import posixpath
import re
N = 1
observations = []
def solve(request, original, current, location, override, action, status, callback_status, headers, synthetic, cached):
    return {'request': request, 'decision': [location if override is None else override, status, action == 'follow', current, headers, action == 'follow' and not synthetic, True, True, urlsplit(location if override is None else override).scheme in ('','http','https'), callback_status if synthetic else None]}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve('/requests/' + str(N) + '/0', 'https://a/x', 'https://b/y', '/next', 'https://c/z', 'follow', 302, 200, [['X', '1'], ['X', '2']], False, False), {'request': '/requests/' + str(N) + '/0', 'decision': ['https://c/z', 302, True, 'https://b/y', [['X', '1'], ['X', '2']], True, True, True, True, None]})
check('fixture 2', solve('/requests/' + str(N) + '/1', 'https://a/x', 'https://a/x', '/next', None, 'manual', 307, None, [], False, True), {'request': '/requests/' + str(N) + '/1', 'decision': ['/next', 307, False, 'https://a/x', [], False, True, True, True, None]})
check('fixture 3', solve('/requests/' + str(N) + '/2', 'https://a/x', 'https://b/y', '/next', '', 'follow', 303, 204, [['Y', 'v']], True, True), {'request': '/requests/' + str(N) + '/2', 'decision': ['', 303, True, 'https://b/y', [['Y', 'v']], False, True, True, True, 204]})
check('fixture 4', solve('/requests/' + str(N) + '/3', 'https://a/x', 'https://b/y', 'https://safe/x', 'file:/local', 'cancel', 301, 201, [], False, False), {'request': '/requests/' + str(N) + '/3', 'decision': ['file:/local', 301, False, 'https://b/y', [], False, True, True, False, None]})
check('fixture 5', solve('/requests/' + str(N) + '/4', 'https://a/x', 'https://b/y', '/next', None, 'error', 308, None, [['X', '1']], False, True), {'request': '/requests/' + str(N) + '/4', 'decision': ['/next', 308, False, 'https://b/y', [['X', '1']], False, False, True, True, None]})
check('fixture 6', solve('/requests/' + str(N) + '/5', 'https://a/x', 'https://b/y', '/next', '/custom', 'manual', 302, 202, [['Z', '1']], True, False), {'request': '/requests/' + str(N) + '/5', 'decision': ['/custom', 302, False, 'https://b/y', [['Z', '1']], False, True, True, True, 202]})
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)

source:
"""Failure Map reference implementation. Python standard library only."""
import json
from urllib.parse import urlsplit, unquote, quote
import posixpath
import re
N = 1
observations = []
def solve(request, original, current, location, override, action, status, callback_status, headers, synthetic, cached):
    return {'request': request, 'decision': [location if override is None else override, status, action == 'follow', current, headers, action == 'follow' and not synthetic, action == 'follow', True, urlsplit(location if override is None else override).scheme in ('','http','https'), callback_status if synthetic else None]}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve('/requests/' + str(N) + '/0', 'https://a/x', 'https://b/y', '/next', 'https://c/z', 'follow', 302, 200, [['X', '1'], ['X', '2']], False, False), {'request': '/requests/' + str(N) + '/0', 'decision': ['https://c/z', 302, True, 'https://b/y', [['X', '1'], ['X', '2']], True, True, True, True, None]})
check('fixture 2', solve('/requests/' + str(N) + '/1', 'https://a/x', 'https://a/x', '/next', None, 'manual', 307, None, [], False, True), {'request': '/requests/' + str(N) + '/1', 'decision': ['/next', 307, False, 'https://a/x', [], False, True, True, True, None]})
check('fixture 3', solve('/requests/' + str(N) + '/2', 'https://a/x', 'https://b/y', '/next', '', 'follow', 303, 204, [['Y', 'v']], True, True), {'request': '/requests/' + str(N) + '/2', 'decision': ['', 303, True, 'https://b/y', [['Y', 'v']], False, True, True, True, 204]})
check('fixture 4', solve('/requests/' + str(N) + '/3', 'https://a/x', 'https://b/y', 'https://safe/x', 'file:/local', 'cancel', 301, 201, [], False, False), {'request': '/requests/' + str(N) + '/3', 'decision': ['file:/local', 301, False, 'https://b/y', [], False, True, True, False, None]})
check('fixture 5', solve('/requests/' + str(N) + '/4', 'https://a/x', 'https://b/y', '/next', None, 'error', 308, None, [['X', '1']], False, True), {'request': '/requests/' + str(N) + '/4', 'decision': ['/next', 308, False, 'https://b/y', [['X', '1']], False, False, True, True, None]})
check('fixture 6', solve('/requests/' + str(N) + '/5', 'https://a/x', 'https://b/y', '/next', '/custom', 'manual', 302, 202, [['Z', '1']], True, False), {'request': '/requests/' + str(N) + '/5', 'decision': ['/custom', 302, False, 'https://b/y', [['Z', '1']], False, True, True, True, 202]})
print(json.dumps({"observations": observations, "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:
Apply redirect interception to the current hop before validating and dispatching the selected target: the callback error fails chain branch emits an incorrect decision.

Apply redirect interception to the current hop before validating and dispatching the selected target. The explicit fixture inputs and outputs define a bounded offline policy; request identity must accompany the decision.

split: open-access


broken_source:
"""Failure Map reference implementation. Python standard library only."""
import json
from urllib.parse import urlsplit, unquote, quote
import posixpath
import re
N = 1
observations = []
def solve(request, original, current, location, override, action, status, callback_status, headers, synthetic, cached):
    return {'request': request, 'decision': [location if override is None else override, status, action == 'follow', current, headers, action == 'follow' and not synthetic, action != 'error', not cached, urlsplit(location if override is None else override).scheme in ('','http','https'), callback_status if synthetic else None]}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve('/requests/' + str(N) + '/0', 'https://a/x', 'https://b/y', '/next', 'https://c/z', 'follow', 302, 200, [['X', '1'], ['X', '2']], False, False), {'request': '/requests/' + str(N) + '/0', 'decision': ['https://c/z', 302, True, 'https://b/y', [['X', '1'], ['X', '2']], True, True, True, True, None]})
check('fixture 2', solve('/requests/' + str(N) + '/1', 'https://a/x', 'https://a/x', '/next', None, 'manual', 307, None, [], False, True), {'request': '/requests/' + str(N) + '/1', 'decision': ['/next', 307, False, 'https://a/x', [], False, True, True, True, None]})
check('fixture 3', solve('/requests/' + str(N) + '/2', 'https://a/x', 'https://b/y', '/next', '', 'follow', 303, 204, [['Y', 'v']], True, True), {'request': '/requests/' + str(N) + '/2', 'decision': ['', 303, True, 'https://b/y', [['Y', 'v']], False, True, True, True, 204]})
check('fixture 4', solve('/requests/' + str(N) + '/3', 'https://a/x', 'https://b/y', 'https://safe/x', 'file:/local', 'cancel', 301, 201, [], False, False), {'request': '/requests/' + str(N) + '/3', 'decision': ['file:/local', 301, False, 'https://b/y', [], False, True, True, False, None]})
check('fixture 5', solve('/requests/' + str(N) + '/4', 'https://a/x', 'https://b/y', '/next', None, 'error', 308, None, [['X', '1']], False, True), {'request': '/requests/' + str(N) + '/4', 'decision': ['/next', 308, False, 'https://b/y', [['X', '1']], False, False, True, True, None]})
check('fixture 6', solve('/requests/' + str(N) + '/5', 'https://a/x', 'https://b/y', '/next', '/custom', 'manual', 302, 202, [['Z', '1']], True, False), {'request': '/requests/' + str(N) + '/5', 'decision': ['/custom', 302, False, 'https://b/y', [['Z', '1']], False, True, True, True, 202]})
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)

source:
"""Failure Map reference implementation. Python standard library only."""
import json
from urllib.parse import urlsplit, unquote, quote
import posixpath
import re
N = 1
observations = []
def solve(request, original, current, location, override, action, status, callback_status, headers, synthetic, cached):
    return {'request': request, 'decision': [location if override is None else override, status, action == 'follow', current, headers, action == 'follow' and not synthetic, action != 'error', cached, urlsplit(location if override is None else override).scheme in ('','http','https'), callback_status if synthetic else None]}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve('/requests/' + str(N) + '/0', 'https://a/x', 'https://b/y', '/next', 'https://c/z', 'follow', 302, 200, [['X', '1'], ['X', '2']], False, False), {'request': '/requests/' + str(N) + '/0', 'decision': ['https://c/z', 302, True, 'https://b/y', [['X', '1'], ['X', '2']], True, True, True, True, None]})
check('fixture 2', solve('/requests/' + str(N) + '/1', 'https://a/x', 'https://a/x', '/next', None, 'manual', 307, None, [], False, True), {'request': '/requests/' + str(N) + '/1', 'decision': ['/next', 307, False, 'https://a/x', [], False, True, True, True, None]})
check('fixture 3', solve('/requests/' + str(N) + '/2', 'https://a/x', 'https://b/y', '/next', '', 'follow', 303, 204, [['Y', 'v']], True, True), {'request': '/requests/' + str(N) + '/2', 'decision': ['', 303, True, 'https://b/y', [['Y', 'v']], False, True, True, True, 204]})
check('fixture 4', solve('/requests/' + str(N) + '/3', 'https://a/x', 'https://b/y', 'https://safe/x', 'file:/local', 'cancel', 301, 201, [], False, False), {'request': '/requests/' + str(N) + '/3', 'decision': ['file:/local', 301, False, 'https://b/y', [], False, True, True, False, None]})
check('fixture 5', solve('/requests/' + str(N) + '/4', 'https://a/x', 'https://b/y', '/next', None, 'error', 308, None, [['X', '1']], False, True), {'request': '/requests/' + str(N) + '/4', 'decision': ['/next', 308, False, 'https://b/y', [['X', '1']], False, False, True, True, None]})
check('fixture 6', solve('/requests/' + str(N) + '/5', 'https://a/x', 'https://b/y', '/next', '/custom', 'manual', 302, 202, [['Z', '1']], True, False), {'request': '/requests/' + str(N) + '/5', 'decision': ['/custom', 302, False, 'https://b/y', [['Z', '1']], False, True, True, True, 202]})
print(json.dumps({"observations": observations, "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:
Apply redirect interception to the current hop before validating and dispatching the selected target: the cached hop still intercepted branch emits an incorrect decision.

Apply redirect interception to the current hop before validating and dispatching the selected target. The explicit fixture inputs and outputs define a bounded offline policy; request identity must accompany the decision.

split: open-access


broken_source:
"""Failure Map reference implementation. Python standard library only."""
import json
from urllib.parse import urlsplit, unquote, quote
import posixpath
import re
N = 1
observations = []
def solve(request, original, current, location, override, action, status, callback_status, headers, synthetic, cached):
    return {'request': request, 'decision': [location if override is None else override, status, action == 'follow', current, headers, action == 'follow' and not synthetic, action != 'error', True, urlsplit(location).scheme in ('','http','https'), callback_status if synthetic else None]}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve('/requests/' + str(N) + '/0', 'https://a/x', 'https://b/y', '/next', 'https://c/z', 'follow', 302, 200, [['X', '1'], ['X', '2']], False, False), {'request': '/requests/' + str(N) + '/0', 'decision': ['https://c/z', 302, True, 'https://b/y', [['X', '1'], ['X', '2']], True, True, True, True, None]})
check('fixture 2', solve('/requests/' + str(N) + '/1', 'https://a/x', 'https://a/x', '/next', None, 'manual', 307, None, [], False, True), {'request': '/requests/' + str(N) + '/1', 'decision': ['/next', 307, False, 'https://a/x', [], False, True, True, True, None]})
check('fixture 3', solve('/requests/' + str(N) + '/2', 'https://a/x', 'https://b/y', '/next', '', 'follow', 303, 204, [['Y', 'v']], True, True), {'request': '/requests/' + str(N) + '/2', 'decision': ['', 303, True, 'https://b/y', [['Y', 'v']], False, True, True, True, 204]})
check('fixture 4', solve('/requests/' + str(N) + '/3', 'https://a/x', 'https://b/y', 'https://safe/x', 'file:/local', 'cancel', 301, 201, [], False, False), {'request': '/requests/' + str(N) + '/3', 'decision': ['file:/local', 301, False, 'https://b/y', [], False, True, True, False, None]})
check('fixture 5', solve('/requests/' + str(N) + '/4', 'https://a/x', 'https://b/y', '/next', None, 'error', 308, None, [['X', '1']], False, True), {'request': '/requests/' + str(N) + '/4', 'decision': ['/next', 308, False, 'https://b/y', [['X', '1']], False, False, True, True, None]})
check('fixture 6', solve('/requests/' + str(N) + '/5', 'https://a/x', 'https://b/y', '/next', '/custom', 'manual', 302, 202, [['Z', '1']], True, False), {'request': '/requests/' + str(N) + '/5', 'decision': ['/custom', 302, False, 'https://b/y', [['Z', '1']], False, True, True, True, 202]})
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)

source:
"""Failure Map reference implementation. Python standard library only."""
import json
from urllib.parse import urlsplit, unquote, quote
import posixpath
import re
N = 1
observations = []
def solve(request, original, current, location, override, action, status, callback_status, headers, synthetic, cached):
    return {'request': request, 'decision': [location if override is None else override, status, action == 'follow', current, headers, action == 'follow' and not synthetic, action != 'error', True, urlsplit(location if override is None else override).scheme in ('http','https'), callback_status if synthetic else None]}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve('/requests/' + str(N) + '/0', 'https://a/x', 'https://b/y', '/next', 'https://c/z', 'follow', 302, 200, [['X', '1'], ['X', '2']], False, False), {'request': '/requests/' + str(N) + '/0', 'decision': ['https://c/z', 302, True, 'https://b/y', [['X', '1'], ['X', '2']], True, True, True, True, None]})
check('fixture 2', solve('/requests/' + str(N) + '/1', 'https://a/x', 'https://a/x', '/next', None, 'manual', 307, None, [], False, True), {'request': '/requests/' + str(N) + '/1', 'decision': ['/next', 307, False, 'https://a/x', [], False, True, True, True, None]})
check('fixture 3', solve('/requests/' + str(N) + '/2', 'https://a/x', 'https://b/y', '/next', '', 'follow', 303, 204, [['Y', 'v']], True, True), {'request': '/requests/' + str(N) + '/2', 'decision': ['', 303, True, 'https://b/y', [['Y', 'v']], False, True, True, True, 204]})
check('fixture 4', solve('/requests/' + str(N) + '/3', 'https://a/x', 'https://b/y', 'https://safe/x', 'file:/local', 'cancel', 301, 201, [], False, False), {'request': '/requests/' + str(N) + '/3', 'decision': ['file:/local', 301, False, 'https://b/y', [], False, True, True, False, None]})
check('fixture 5', solve('/requests/' + str(N) + '/4', 'https://a/x', 'https://b/y', '/next', None, 'error', 308, None, [['X', '1']], False, True), {'request': '/requests/' + str(N) + '/4', 'decision': ['/next', 308, False, 'https://b/y', [['X', '1']], False, False, True, True, None]})
check('fixture 6', solve('/requests/' + str(N) + '/5', 'https://a/x', 'https://b/y', '/next', '/custom', 'manual', 302, 202, [['Z', '1']], True, False), {'request': '/requests/' + str(N) + '/5', 'decision': ['/custom', 302, False, 'https://b/y', [['Z', '1']], False, True, True, True, 202]})
print(json.dumps({"observations": observations, "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:
Apply redirect interception to the current hop before validating and dispatching the selected target: the validate after target override branch emits an incorrect decision.

Apply redirect interception to the current hop before validating and dispatching the selected target. The explicit fixture inputs and outputs define a bounded offline policy; request identity must accompany the decision.

split: open-access


broken_source:
"""Failure Map reference implementation. Python standard library only."""
import json
from urllib.parse import urlsplit, unquote, quote
import posixpath
import re
N = 1
observations = []
def solve(request, original, current, location, override, action, status, callback_status, headers, synthetic, cached):
    return {'request': request, 'decision': [location if override is None else override, status, action == 'follow', current, headers, action == 'follow' and not synthetic, action != 'error', True, urlsplit(location if override is None else override).scheme in ('','http','https'), callback_status]}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve('/requests/' + str(N) + '/0', 'https://a/x', 'https://b/y', '/next', 'https://c/z', 'follow', 302, 200, [['X', '1'], ['X', '2']], False, False), {'request': '/requests/' + str(N) + '/0', 'decision': ['https://c/z', 302, True, 'https://b/y', [['X', '1'], ['X', '2']], True, True, True, True, None]})
check('fixture 2', solve('/requests/' + str(N) + '/1', 'https://a/x', 'https://a/x', '/next', None, 'manual', 307, None, [], False, True), {'request': '/requests/' + str(N) + '/1', 'decision': ['/next', 307, False, 'https://a/x', [], False, True, True, True, None]})
check('fixture 3', solve('/requests/' + str(N) + '/2', 'https://a/x', 'https://b/y', '/next', '', 'follow', 303, 204, [['Y', 'v']], True, True), {'request': '/requests/' + str(N) + '/2', 'decision': ['', 303, True, 'https://b/y', [['Y', 'v']], False, True, True, True, 204]})
check('fixture 4', solve('/requests/' + str(N) + '/3', 'https://a/x', 'https://b/y', 'https://safe/x', 'file:/local', 'cancel', 301, 201, [], False, False), {'request': '/requests/' + str(N) + '/3', 'decision': ['file:/local', 301, False, 'https://b/y', [], False, True, True, False, None]})
check('fixture 5', solve('/requests/' + str(N) + '/4', 'https://a/x', 'https://b/y', '/next', None, 'error', 308, None, [['X', '1']], False, True), {'request': '/requests/' + str(N) + '/4', 'decision': ['/next', 308, False, 'https://b/y', [['X', '1']], False, False, True, True, None]})
check('fixture 6', solve('/requests/' + str(N) + '/5', 'https://a/x', 'https://b/y', '/next', '/custom', 'manual', 302, 202, [['Z', '1']], True, False), {'request': '/requests/' + str(N) + '/5', 'decision': ['/custom', 302, False, 'https://b/y', [['Z', '1']], False, True, True, True, 202]})
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)

source:
"""Failure Map reference implementation. Python standard library only."""
import json
from urllib.parse import urlsplit, unquote, quote
import posixpath
import re
N = 1
observations = []
def solve(request, original, current, location, override, action, status, callback_status, headers, synthetic, cached):
    return {'request': request, 'decision': [location if override is None else override, status, action == 'follow', current, headers, action == 'follow' and not synthetic, action != 'error', True, urlsplit(location if override is None else override).scheme in ('','http','https'), callback_status if action == 'manual' else None]}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve('/requests/' + str(N) + '/0', 'https://a/x', 'https://b/y', '/next', 'https://c/z', 'follow', 302, 200, [['X', '1'], ['X', '2']], False, False), {'request': '/requests/' + str(N) + '/0', 'decision': ['https://c/z', 302, True, 'https://b/y', [['X', '1'], ['X', '2']], True, True, True, True, None]})
check('fixture 2', solve('/requests/' + str(N) + '/1', 'https://a/x', 'https://a/x', '/next', None, 'manual', 307, None, [], False, True), {'request': '/requests/' + str(N) + '/1', 'decision': ['/next', 307, False, 'https://a/x', [], False, True, True, True, None]})
check('fixture 3', solve('/requests/' + str(N) + '/2', 'https://a/x', 'https://b/y', '/next', '', 'follow', 303, 204, [['Y', 'v']], True, True), {'request': '/requests/' + str(N) + '/2', 'decision': ['', 303, True, 'https://b/y', [['Y', 'v']], False, True, True, True, 204]})
check('fixture 4', solve('/requests/' + str(N) + '/3', 'https://a/x', 'https://b/y', 'https://safe/x', 'file:/local', 'cancel', 301, 201, [], False, False), {'request': '/requests/' + str(N) + '/3', 'decision': ['file:/local', 301, False, 'https://b/y', [], False, True, True, False, None]})
check('fixture 5', solve('/requests/' + str(N) + '/4', 'https://a/x', 'https://b/y', '/next', None, 'error', 308, None, [['X', '1']], False, True), {'request': '/requests/' + str(N) + '/4', 'decision': ['/next', 308, False, 'https://b/y', [['X', '1']], False, False, True, True, None]})
check('fixture 6', solve('/requests/' + str(N) + '/5', 'https://a/x', 'https://b/y', '/next', '/custom', 'manual', 302, 202, [['Z', '1']], True, False), {'request': '/requests/' + str(N) + '/5', 'decision': ['/custom', 302, False, 'https://b/y', [['Z', '1']], False, True, True, True, 202]})
print(json.dumps({"observations": observations, "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:
Apply redirect interception to the current hop before validating and dispatching the selected target: the synthetic status separate from hop branch emits an incorrect decision.

Apply redirect interception to the current hop before validating and dispatching the selected target. The explicit fixture inputs and outputs define a bounded offline policy; request identity must accompany the decision.

split: open-access


broken_source:
"""Failure Map reference implementation. Python standard library only."""
import json
from urllib.parse import urlsplit, unquote, quote
import posixpath
import re
N = 1
observations = []
def solve(request, mode, location, exposed, origin, body, status):
    return {'request': request, 'decision': [location, mode == 'follow' and location is not None, mode == 'error' and location is not None, status if exposed else 0, body if exposed else '', 'manual-redirect' if mode == 'manual' and location is not None else 'response', exposed and origin == 'same', exposed and mode != 'error', location is not None, status//100]}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve('/requests/' + str(N) + '/0', 'manual', '/b', True, 'same', 'abc', 302), {'request': '/requests/' + str(N) + '/0', 'decision': ['/b', False, False, 302, 'abc', 'manual-redirect', True, True, True, 3]})
check('fixture 2', solve('/requests/' + str(N) + '/1', 'follow', '', True, 'cross', 'read', 307), {'request': '/requests/' + str(N) + '/1', 'decision': ['', True, False, 307, 'read', 'response', False, True, True, 3]})
check('fixture 3', solve('/requests/' + str(N) + '/2', 'error', '/d', True, 'same', 'err', 301), {'request': '/requests/' + str(N) + '/2', 'decision': ['/d', False, True, 301, 'err', 'response', True, False, True, 3]})
check('fixture 4', solve('/requests/' + str(N) + '/3', 'manual', '/e', False, 'same', 'abc', 303), {'request': '/requests/' + str(N) + '/3', 'decision': [None, False, False, 0, '', 'manual-redirect', False, False, True, 3]})
check('fixture 5', solve('/requests/' + str(N) + '/4', 'error', None, True, 'same', '', 200), {'request': '/requests/' + str(N) + '/4', 'decision': [None, False, False, 200, '', 'response', True, False, False, 2]})
check('fixture 6', solve('/requests/' + str(N) + '/5', 'follow', None, False, 'cross', 'body', 404), {'request': '/requests/' + str(N) + '/5', 'decision': [None, False, False, 0, '', 'response', False, False, False, 4]})
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)

source:
"""Failure Map reference implementation. Python standard library only."""
import json
from urllib.parse import urlsplit, unquote, quote
import posixpath
import re
N = 1
observations = []
def solve(request, mode, location, exposed, origin, body, status):
    return {'request': request, 'decision': [location if origin == 'same' else None, mode == 'follow' and location is not None, mode == 'error' and location is not None, status if exposed else 0, body if exposed else '', 'manual-redirect' if mode == 'manual' and location is not None else 'response', exposed and origin == 'same', exposed and mode != 'error', location is not None, status//100]}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve('/requests/' + str(N) + '/0', 'manual', '/b', True, 'same', 'abc', 302), {'request': '/requests/' + str(N) + '/0', 'decision': ['/b', False, False, 302, 'abc', 'manual-redirect', True, True, True, 3]})
check('fixture 2', solve('/requests/' + str(N) + '/1', 'follow', '', True, 'cross', 'read', 307), {'request': '/requests/' + str(N) + '/1', 'decision': ['', True, False, 307, 'read', 'response', False, True, True, 3]})
check('fixture 3', solve('/requests/' + str(N) + '/2', 'error', '/d', True, 'same', 'err', 301), {'request': '/requests/' + str(N) + '/2', 'decision': ['/d', False, True, 301, 'err', 'response', True, False, True, 3]})
check('fixture 4', solve('/requests/' + str(N) + '/3', 'manual', '/e', False, 'same', 'abc', 303), {'request': '/requests/' + str(N) + '/3', 'decision': [None, False, False, 0, '', 'manual-redirect', False, False, True, 3]})
check('fixture 5', solve('/requests/' + str(N) + '/4', 'error', None, True, 'same', '', 200), {'request': '/requests/' + str(N) + '/4', 'decision': [None, False, False, 200, '', 'response', True, False, False, 2]})
check('fixture 6', solve('/requests/' + str(N) + '/5', 'follow', None, False, 'cross', 'body', 404), {'request': '/requests/' + str(N) + '/5', 'decision': [None, False, False, 0, '', 'response', False, False, False, 4]})
print(json.dumps({"observations": observations, "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:
Build a bounded manual redirect result without issuing the next request: the opaque location branch emits an incorrect decision.

Build a bounded manual redirect result without issuing the next request. The explicit fixture inputs and outputs define a bounded offline policy; request identity must accompany the decision.

split: open-access