broken_source:
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(state, errors, event, result):
    if event == 'submit':
        if state == 'submitting': return (state, errors)
        if errors: return ('submitting', errors)
        return ('submitting', {})
    if event == 'success': return ('succeeded', {})
    if event == 'failure': return ('failed', result)
    if event == 'edit': return ('idle', {})
    return (state, errors)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('duplicate', solve('submitting', {}, 'submit', None), ('submitting', {}))
check('invalid', solve('idle', {'a':'required'}, 'submit', None), ('invalid', {'a': 'required'}))
check('valid', solve('idle', {}, 'submit', None), ('submitting', {}))
check('success', solve('submitting', {'old':'stale'}, 'success', None), ('succeeded', {}))
check('failure', solve('submitting', {'old':'stale'}, 'failure', {'a':'conflict'}), ('failed', {'a': 'conflict'}))
check('edit', solve('failed', {'a':'stale'}, 'edit', None), ('idle', {}))
check('parameterized failure details', solve('submitting', {}, 'failure', {'field':str(N)}), ('failed',{'field':str(N)}))
for repetition in range(N):
    check('repeat edit', solve('failed', {'a':'stale'}, 'edit', None), ('idle', {}))
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)

evaluation_group: xi-submit-state

source:
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(state, errors, event, result):
    if event == 'submit':
        if state == 'submitting': return (state, errors)
        if errors: return ('invalid', {})
        return ('submitting', {})
    if event == 'success': return ('succeeded', {})
    if event == 'failure': return ('failed', result)
    if event == 'edit': return ('idle', {})
    return (state, errors)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('duplicate', solve('submitting', {}, 'submit', None), ('submitting', {}))
check('invalid', solve('idle', {'a':'required'}, 'submit', None), ('invalid', {'a': 'required'}))
check('valid', solve('idle', {}, 'submit', None), ('submitting', {}))
check('success', solve('submitting', {'old':'stale'}, 'success', None), ('succeeded', {}))
check('failure', solve('submitting', {'old':'stale'}, 'failure', {'a':'conflict'}), ('failed', {'a': 'conflict'}))
check('edit', solve('failed', {'a':'stale'}, 'edit', None), ('idle', {}))
check('parameterized failure details', solve('submitting', {}, 'failure', {'field':str(N)}), ('failed',{'field':str(N)}))
for repetition in range(N):
    check('repeat edit', solve('failed', {'a':'stale'}, 'edit', None), ('idle', {}))
print(json.dumps({"observations": observations, "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:
Invalid forms enter the submitting state.

A duplicate pending submit preserves pending; invalid submit retains errors; success clears errors; failure installs result errors; editing resets status and stale errors.

split: open-access


broken_source:
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(state, errors, event, result):
    if event == 'submit':
        if state == 'submitting': return (state, errors)
        if errors: return ('invalid', errors)
        return ('submitting', {})
    if event == 'success': return ('succeeded', errors)
    if event == 'failure': return ('failed', result)
    if event == 'edit': return ('idle', {})
    return (state, errors)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('duplicate', solve('submitting', {}, 'submit', None), ('submitting', {}))
check('invalid', solve('idle', {'a':'required'}, 'submit', None), ('invalid', {'a': 'required'}))
check('valid', solve('idle', {}, 'submit', None), ('submitting', {}))
check('success', solve('submitting', {'old':'stale'}, 'success', None), ('succeeded', {}))
check('failure', solve('submitting', {'old':'stale'}, 'failure', {'a':'conflict'}), ('failed', {'a': 'conflict'}))
check('edit', solve('failed', {'a':'stale'}, 'edit', None), ('idle', {}))
check('parameterized failure details', solve('submitting', {}, 'failure', {'field':str(N)}), ('failed',{'field':str(N)}))
for repetition in range(N):
    check('repeat edit', solve('failed', {'a':'stale'}, 'edit', None), ('idle', {}))
print(json.dumps({"observations": observations, "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

evaluation_group: xi-submit-state

source:
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(state, errors, event, result):
    if event == 'submit':
        if state == 'submitting': return (state, errors)
        if errors: return ('invalid', errors)
        return ('submitting', {})
    if event == 'success': return ('idle', errors)
    if event == 'failure': return ('failed', result)
    if event == 'edit': return ('idle', {})
    return (state, errors)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('duplicate', solve('submitting', {}, 'submit', None), ('submitting', {}))
check('invalid', solve('idle', {'a':'required'}, 'submit', None), ('invalid', {'a': 'required'}))
check('valid', solve('idle', {}, 'submit', None), ('submitting', {}))
check('success', solve('submitting', {'old':'stale'}, 'success', None), ('succeeded', {}))
check('failure', solve('submitting', {'old':'stale'}, 'failure', {'a':'conflict'}), ('failed', {'a': 'conflict'}))
check('edit', solve('failed', {'a':'stale'}, 'edit', None), ('idle', {}))
check('parameterized failure details', solve('submitting', {}, 'failure', {'field':str(N)}), ('failed',{'field':str(N)}))
for repetition in range(N):
    check('repeat edit', solve('failed', {'a':'stale'}, 'edit', None), ('idle', {}))
print(json.dumps({"observations": observations, "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:
Successful submission retains stale errors.

A duplicate pending submit preserves pending; invalid submit retains errors; success clears errors; failure installs result errors; editing resets status and stale errors.

split: open-access


broken_source:
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(state, errors, event, result):
    if event == 'submit':
        if state == 'submitting': return (state, errors)
        if errors: return ('invalid', errors)
        return ('submitting', {})
    if event == 'success': return ('succeeded', {})
    if event == 'failure': return ('failed', errors)
    if event == 'edit': return ('idle', {})
    return (state, errors)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('duplicate', solve('submitting', {}, 'submit', None), ('submitting', {}))
check('invalid', solve('idle', {'a':'required'}, 'submit', None), ('invalid', {'a': 'required'}))
check('valid', solve('idle', {}, 'submit', None), ('submitting', {}))
check('success', solve('submitting', {'old':'stale'}, 'success', None), ('succeeded', {}))
check('failure', solve('submitting', {'old':'stale'}, 'failure', {'a':'conflict'}), ('failed', {'a': 'conflict'}))
check('edit', solve('failed', {'a':'stale'}, 'edit', None), ('idle', {}))
check('parameterized failure details', solve('submitting', {}, 'failure', {'field':str(N)}), ('failed',{'field':str(N)}))
for repetition in range(N):
    check('repeat edit', solve('failed', {'a':'stale'}, 'edit', None), ('idle', {}))
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)

evaluation_group: xi-submit-state

source:
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(state, errors, event, result):
    if event == 'submit':
        if state == 'submitting': return (state, errors)
        if errors: return ('invalid', errors)
        return ('submitting', {})
    if event == 'success': return ('succeeded', {})
    if event == 'failure': return ('succeeded', result)
    if event == 'edit': return ('idle', {})
    return (state, errors)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('duplicate', solve('submitting', {}, 'submit', None), ('submitting', {}))
check('invalid', solve('idle', {'a':'required'}, 'submit', None), ('invalid', {'a': 'required'}))
check('valid', solve('idle', {}, 'submit', None), ('submitting', {}))
check('success', solve('submitting', {'old':'stale'}, 'success', None), ('succeeded', {}))
check('failure', solve('submitting', {'old':'stale'}, 'failure', {'a':'conflict'}), ('failed', {'a': 'conflict'}))
check('edit', solve('failed', {'a':'stale'}, 'edit', None), ('idle', {}))
check('parameterized failure details', solve('submitting', {}, 'failure', {'field':str(N)}), ('failed',{'field':str(N)}))
for repetition in range(N):
    check('repeat edit', solve('failed', {'a':'stale'}, 'edit', None), ('idle', {}))
print(json.dumps({"observations": observations, "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:
Server failure details never replace old error messages.

A duplicate pending submit preserves pending; invalid submit retains errors; success clears errors; failure installs result errors; editing resets status and stale errors.

split: open-access


broken_source:
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(state, errors, event, result):
    if event == 'submit':
        if state == 'submitting': return (state, errors)
        if errors: return ('invalid', errors)
        return ('submitting', {})
    if event == 'success': return ('succeeded', {})
    if event == 'failure': return ('failed', result)
    if event == 'edit': return (state, errors)
    return (state, errors)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('duplicate', solve('submitting', {}, 'submit', None), ('submitting', {}))
check('invalid', solve('idle', {'a':'required'}, 'submit', None), ('invalid', {'a': 'required'}))
check('valid', solve('idle', {}, 'submit', None), ('submitting', {}))
check('success', solve('submitting', {'old':'stale'}, 'success', None), ('succeeded', {}))
check('failure', solve('submitting', {'old':'stale'}, 'failure', {'a':'conflict'}), ('failed', {'a': 'conflict'}))
check('edit', solve('failed', {'a':'stale'}, 'edit', None), ('idle', {}))
check('parameterized failure details', solve('submitting', {}, 'failure', {'field':str(N)}), ('failed',{'field':str(N)}))
for repetition in range(N):
    check('repeat edit', solve('failed', {'a':'stale'}, 'edit', None), ('idle', {}))
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)

evaluation_group: xi-submit-state

source:
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(state, errors, event, result):
    if event == 'submit':
        if state == 'submitting': return (state, errors)
        if errors: return ('invalid', errors)
        return ('submitting', {})
    if event == 'success': return ('succeeded', {})
    if event == 'failure': return ('failed', result)
    if event == 'edit': return ('idle', errors)
    return (state, errors)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('duplicate', solve('submitting', {}, 'submit', None), ('submitting', {}))
check('invalid', solve('idle', {'a':'required'}, 'submit', None), ('invalid', {'a': 'required'}))
check('valid', solve('idle', {}, 'submit', None), ('submitting', {}))
check('success', solve('submitting', {'old':'stale'}, 'success', None), ('succeeded', {}))
check('failure', solve('submitting', {'old':'stale'}, 'failure', {'a':'conflict'}), ('failed', {'a': 'conflict'}))
check('edit', solve('failed', {'a':'stale'}, 'edit', None), ('idle', {}))
check('parameterized failure details', solve('submitting', {}, 'failure', {'field':str(N)}), ('failed',{'field':str(N)}))
for repetition in range(N):
    check('repeat edit', solve('failed', {'a':'stale'}, 'edit', None), ('idle', {}))
print(json.dumps({"observations": observations, "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:
Editing keeps a stale completed submission state.

A duplicate pending submit preserves pending; invalid submit retains errors; success clears errors; failure installs result errors; editing resets status and stale errors.

split: open-access


broken_source:
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(required, value, bad_input, minimum, maximum, pattern_ok):
    if required and not value: return 'required'
    if bad_input: return 'bad-input'
    if value == '': return None
    if minimum is not None and value < minimum: return 'underflow'
    if maximum is not None and value > maximum: return 'overflow'
    if not pattern_ok: return 'pattern'
    return None
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('zero', solve(True, 0, False, 0, 5, True), None)
check('optional blank', solve(False, '', False, 1, 5, False), None)
check('required blank', solve(True, '', False, None, None, True), 'required')
check('bad', solve(False, 'oops', True, None, None, True), 'bad-input')
check('at min', solve(False, 2, False, 2, 5, True), None)
check('below min', solve(False, 1, False, 2, 5, True), 'underflow')
check('at max', solve(False, 5, False, 2, 5, True), None)
check('above max', solve(False, 6, False, 2, 5, True), 'overflow')
check('parameterized minimum', solve(False,N,False,N,N+10,True), None)
for repetition in range(N):
    check('repeat above max', solve(False, 6, False, 2, 5, True), 'overflow')
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)

evaluation_group: xi-constraint-message

source:
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(required, value, bad_input, minimum, maximum, pattern_ok):
    if value == '': return 'required'
    if bad_input: return 'bad-input'
    if value == '': return None
    if minimum is not None and value < minimum: return 'underflow'
    if maximum is not None and value > maximum: return 'overflow'
    if not pattern_ok: return 'pattern'
    return None
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('zero', solve(True, 0, False, 0, 5, True), None)
check('optional blank', solve(False, '', False, 1, 5, False), None)
check('required blank', solve(True, '', False, None, None, True), 'required')
check('bad', solve(False, 'oops', True, None, None, True), 'bad-input')
check('at min', solve(False, 2, False, 2, 5, True), None)
check('below min', solve(False, 1, False, 2, 5, True), 'underflow')
check('at max', solve(False, 5, False, 2, 5, True), None)
check('above max', solve(False, 6, False, 2, 5, True), 'overflow')
check('parameterized minimum', solve(False,N,False,N,N+10,True), None)
for repetition in range(N):
    check('repeat above max', solve(False, 6, False, 2, 5, True), 'overflow')
print(json.dumps({"observations": observations, "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:
A required zero value is mistaken for missing input.

Required checks distinguish blank from zero; malformed input precedes numeric checks; optional blank is valid; min/max are inclusive; pattern applies last.

split: open-access


broken_source:
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(required, value, bad_input, minimum, maximum, pattern_ok):
    if required and value == '': return 'required'
    if bad_input: return None
    if value == '': return None
    if minimum is not None and value < minimum: return 'underflow'
    if maximum is not None and value > maximum: return 'overflow'
    if not pattern_ok: return 'pattern'
    return None
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('zero', solve(True, 0, False, 0, 5, True), None)
check('optional blank', solve(False, '', False, 1, 5, False), None)
check('required blank', solve(True, '', False, None, None, True), 'required')
check('bad', solve(False, 'oops', True, None, None, True), 'bad-input')
check('at min', solve(False, 2, False, 2, 5, True), None)
check('below min', solve(False, 1, False, 2, 5, True), 'underflow')
check('at max', solve(False, 5, False, 2, 5, True), None)
check('above max', solve(False, 6, False, 2, 5, True), 'overflow')
check('parameterized minimum', solve(False,N,False,N,N+10,True), None)
for repetition in range(N):
    check('repeat above max', solve(False, 6, False, 2, 5, True), 'overflow')
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)

evaluation_group: xi-constraint-message

source:
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(required, value, bad_input, minimum, maximum, pattern_ok):
    if required and value == '': return 'required'
    if bad_input: return 'required'
    if value == '': return None
    if minimum is not None and value < minimum: return 'underflow'
    if maximum is not None and value > maximum: return 'overflow'
    if not pattern_ok: return 'pattern'
    return None
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('zero', solve(True, 0, False, 0, 5, True), None)
check('optional blank', solve(False, '', False, 1, 5, False), None)
check('required blank', solve(True, '', False, None, None, True), 'required')
check('bad', solve(False, 'oops', True, None, None, True), 'bad-input')
check('at min', solve(False, 2, False, 2, 5, True), None)
check('below min', solve(False, 1, False, 2, 5, True), 'underflow')
check('at max', solve(False, 5, False, 2, 5, True), None)
check('above max', solve(False, 6, False, 2, 5, True), 'overflow')
check('parameterized minimum', solve(False,N,False,N,N+10,True), None)
for repetition in range(N):
    check('repeat above max', solve(False, 6, False, 2, 5, True), 'overflow')
print(json.dumps({"observations": observations, "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:
Unparseable user input is reported valid.

Required checks distinguish blank from zero; malformed input precedes numeric checks; optional blank is valid; min/max are inclusive; pattern applies last.

split: open-access


broken_source:
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(required, value, bad_input, minimum, maximum, pattern_ok):
    if required and value == '': return 'required'
    if bad_input: return 'bad-input'
    if value == '': return 'pattern'
    if minimum is not None and value < minimum: return 'underflow'
    if maximum is not None and value > maximum: return 'overflow'
    if not pattern_ok: return 'pattern'
    return None
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('zero', solve(True, 0, False, 0, 5, True), None)
check('optional blank', solve(False, '', False, 1, 5, False), None)
check('required blank', solve(True, '', False, None, None, True), 'required')
check('bad', solve(False, 'oops', True, None, None, True), 'bad-input')
check('at min', solve(False, 2, False, 2, 5, True), None)
check('below min', solve(False, 1, False, 2, 5, True), 'underflow')
check('at max', solve(False, 5, False, 2, 5, True), None)
check('above max', solve(False, 6, False, 2, 5, True), 'overflow')
check('parameterized minimum', solve(False,N,False,N,N+10,True), None)
for repetition in range(N):
    check('repeat above max', solve(False, 6, False, 2, 5, True), 'overflow')
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)

evaluation_group: xi-constraint-message

source:
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(required, value, bad_input, minimum, maximum, pattern_ok):
    if required and value == '': return 'required'
    if bad_input: return 'bad-input'
    if value == '': return 'underflow'
    if minimum is not None and value < minimum: return 'underflow'
    if maximum is not None and value > maximum: return 'overflow'
    if not pattern_ok: return 'pattern'
    return None
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('zero', solve(True, 0, False, 0, 5, True), None)
check('optional blank', solve(False, '', False, 1, 5, False), None)
check('required blank', solve(True, '', False, None, None, True), 'required')
check('bad', solve(False, 'oops', True, None, None, True), 'bad-input')
check('at min', solve(False, 2, False, 2, 5, True), None)
check('below min', solve(False, 1, False, 2, 5, True), 'underflow')
check('at max', solve(False, 5, False, 2, 5, True), None)
check('above max', solve(False, 6, False, 2, 5, True), 'overflow')
check('parameterized minimum', solve(False,N,False,N,N+10,True), None)
for repetition in range(N):
    check('repeat above max', solve(False, 6, False, 2, 5, True), 'overflow')
print(json.dumps({"observations": observations, "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:
Optional blank fields are subjected to a pattern failure.

Required checks distinguish blank from zero; malformed input precedes numeric checks; optional blank is valid; min/max are inclusive; pattern applies last.

split: open-access


broken_source:
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(required, value, bad_input, minimum, maximum, pattern_ok):
    if required and value == '': return 'required'
    if bad_input: return 'bad-input'
    if value == '': return None
    if minimum is not None and value <= minimum: return 'underflow'
    if maximum is not None and value > maximum: return 'overflow'
    if not pattern_ok: return 'pattern'
    return None
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('zero', solve(True, 0, False, 0, 5, True), None)
check('optional blank', solve(False, '', False, 1, 5, False), None)
check('required blank', solve(True, '', False, None, None, True), 'required')
check('bad', solve(False, 'oops', True, None, None, True), 'bad-input')
check('at min', solve(False, 2, False, 2, 5, True), None)
check('below min', solve(False, 1, False, 2, 5, True), 'underflow')
check('at max', solve(False, 5, False, 2, 5, True), None)
check('above max', solve(False, 6, False, 2, 5, True), 'overflow')
check('parameterized minimum', solve(False,N,False,N,N+10,True), None)
for repetition in range(N):
    check('repeat above max', solve(False, 6, False, 2, 5, True), 'overflow')
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)

evaluation_group: xi-constraint-message

source:
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(required, value, bad_input, minimum, maximum, pattern_ok):
    if required and value == '': return 'required'
    if bad_input: return 'bad-input'
    if value == '': return None
    if minimum is not None and value < 0: return 'underflow'
    if maximum is not None and value > maximum: return 'overflow'
    if not pattern_ok: return 'pattern'
    return None
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('zero', solve(True, 0, False, 0, 5, True), None)
check('optional blank', solve(False, '', False, 1, 5, False), None)
check('required blank', solve(True, '', False, None, None, True), 'required')
check('bad', solve(False, 'oops', True, None, None, True), 'bad-input')
check('at min', solve(False, 2, False, 2, 5, True), None)
check('below min', solve(False, 1, False, 2, 5, True), 'underflow')
check('at max', solve(False, 5, False, 2, 5, True), None)
check('above max', solve(False, 6, False, 2, 5, True), 'overflow')
check('parameterized minimum', solve(False,N,False,N,N+10,True), None)
for repetition in range(N):
    check('repeat above max', solve(False, 6, False, 2, 5, True), 'overflow')
print(json.dumps({"observations": observations, "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:
A value equal to the inclusive minimum is rejected.

Required checks distinguish blank from zero; malformed input precedes numeric checks; optional blank is valid; min/max are inclusive; pattern applies last.

split: open-access


broken_source:
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(required, value, bad_input, minimum, maximum, pattern_ok):
    if required and value == '': return 'required'
    if bad_input: return 'bad-input'
    if value == '': return None
    if minimum is not None and value < minimum: return 'underflow'
    if maximum is not None and value >= maximum: return 'overflow'
    if not pattern_ok: return 'pattern'
    return None
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('zero', solve(True, 0, False, 0, 5, True), None)
check('optional blank', solve(False, '', False, 1, 5, False), None)
check('required blank', solve(True, '', False, None, None, True), 'required')
check('bad', solve(False, 'oops', True, None, None, True), 'bad-input')
check('at min', solve(False, 2, False, 2, 5, True), None)
check('below min', solve(False, 1, False, 2, 5, True), 'underflow')
check('at max', solve(False, 5, False, 2, 5, True), None)
check('above max', solve(False, 6, False, 2, 5, True), 'overflow')
check('parameterized minimum', solve(False,N,False,N,N+10,True), None)
for repetition in range(N):
    check('repeat above max', solve(False, 6, False, 2, 5, True), 'overflow')
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)

evaluation_group: xi-constraint-message

source:
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(required, value, bad_input, minimum, maximum, pattern_ok):
    if required and value == '': return 'required'
    if bad_input: return 'bad-input'
    if value == '': return None
    if minimum is not None and value < minimum: return 'underflow'
    if maximum is not None and value > 100: return 'overflow'
    if not pattern_ok: return 'pattern'
    return None
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('zero', solve(True, 0, False, 0, 5, True), None)
check('optional blank', solve(False, '', False, 1, 5, False), None)
check('required blank', solve(True, '', False, None, None, True), 'required')
check('bad', solve(False, 'oops', True, None, None, True), 'bad-input')
check('at min', solve(False, 2, False, 2, 5, True), None)
check('below min', solve(False, 1, False, 2, 5, True), 'underflow')
check('at max', solve(False, 5, False, 2, 5, True), None)
check('above max', solve(False, 6, False, 2, 5, True), 'overflow')
check('parameterized minimum', solve(False,N,False,N,N+10,True), None)
for repetition in range(N):
    check('repeat above max', solve(False, 6, False, 2, 5, True), 'overflow')
print(json.dumps({"observations": observations, "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:
A value equal to the inclusive maximum is rejected.

Required checks distinguish blank from zero; malformed input precedes numeric checks; optional blank is valid; min/max are inclusive; pattern applies last.

split: open-access


broken_source:
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(tabs, focused, selected, key, automatic, disabled):
    available = [t for t in tabs if True]
    if not available: return (None, None)
    if focused not in available: focused = available[0]
    if key == 'Next': focused = available[(available.index(focused)+1) % len(available)]
    if key == 'Previous': focused = available[(available.index(focused)-1) % len(available)]
    if automatic or key in ('Enter','Space'): selected = focused
    if selected not in available: selected = available[0]
    return (focused, selected)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('disabled', solve(['a','b','c'], 'a', 'a', 'Next', True, ['b']), ('c', 'c'))
check('removed focus', solve(['a','b','c'], 'gone', 'a', 'none', False, []), ('a', 'a'))
check('next', solve(['a','b','c'], 'a', 'a', 'Next', True, []), ('b', 'b'))
check('manual', solve(['a','b','c'], 'a', 'a', 'Next', False, []), ('b', 'a'))
check('space', solve(['a','b'], 'b', 'a', 'Space', False, []), ('b', 'b'))
check('removed selection', solve(['a','b'], 'b', 'gone', 'none', False, []), ('b', 'a'))
check('empty', solve([], None, None, 'Next', True, []), (None, None))
check('parameterized tab identities', solve(list(range(N+2)), N, N, 'Next', True, []), (N+1,N+1))
for repetition in range(N):
    check('repeat empty', solve([], None, None, 'Next', True, []), (None, None))
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)

evaluation_group: xi-tab-panels

source:
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(tabs, focused, selected, key, automatic, disabled):
    available = [t for t in tabs if t in disabled]
    if not available: return (None, None)
    if focused not in available: focused = available[0]
    if key == 'Next': focused = available[(available.index(focused)+1) % len(available)]
    if key == 'Previous': focused = available[(available.index(focused)-1) % len(available)]
    if automatic or key in ('Enter','Space'): selected = focused
    if selected not in available: selected = available[0]
    return (focused, selected)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('disabled', solve(['a','b','c'], 'a', 'a', 'Next', True, ['b']), ('c', 'c'))
check('removed focus', solve(['a','b','c'], 'gone', 'a', 'none', False, []), ('a', 'a'))
check('next', solve(['a','b','c'], 'a', 'a', 'Next', True, []), ('b', 'b'))
check('manual', solve(['a','b','c'], 'a', 'a', 'Next', False, []), ('b', 'a'))
check('space', solve(['a','b'], 'b', 'a', 'Space', False, []), ('b', 'b'))
check('removed selection', solve(['a','b'], 'b', 'gone', 'none', False, []), ('b', 'a'))
check('empty', solve([], None, None, 'Next', True, []), (None, None))
check('parameterized tab identities', solve(list(range(N+2)), N, N, 'Next', True, []), (N+1,N+1))
for repetition in range(N):
    check('repeat empty', solve([], None, None, 'Next', True, []), (None, None))
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)

prompt:
Disabled tabs remain keyboard navigable.

Focus traverses enabled tabs; automatic mode activates on focus, manual mode requires Enter or Space; removed focus or selection falls back to first enabled tab.

split: open-access


broken_source:
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(tabs, focused, selected, key, automatic, disabled):
    available = [t for t in tabs if t not in disabled]
    if not available: return (None, None)
    if focused not in available: focused = available[-1]
    if key == 'Next': focused = available[(available.index(focused)+1) % len(available)]
    if key == 'Previous': focused = available[(available.index(focused)-1) % len(available)]
    if automatic or key in ('Enter','Space'): selected = focused
    if selected not in available: selected = available[0]
    return (focused, selected)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('disabled', solve(['a','b','c'], 'a', 'a', 'Next', True, ['b']), ('c', 'c'))
check('removed focus', solve(['a','b','c'], 'gone', 'a', 'none', False, []), ('a', 'a'))
check('next', solve(['a','b','c'], 'a', 'a', 'Next', True, []), ('b', 'b'))
check('manual', solve(['a','b','c'], 'a', 'a', 'Next', False, []), ('b', 'a'))
check('space', solve(['a','b'], 'b', 'a', 'Space', False, []), ('b', 'b'))
check('removed selection', solve(['a','b'], 'b', 'gone', 'none', False, []), ('b', 'a'))
check('empty', solve([], None, None, 'Next', True, []), (None, None))
check('parameterized tab identities', solve(list(range(N+2)), N, N, 'Next', True, []), (N+1,N+1))
for repetition in range(N):
    check('repeat empty', solve([], None, None, 'Next', True, []), (None, None))
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)

evaluation_group: xi-tab-panels

source:
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(tabs, focused, selected, key, automatic, disabled):
    available = [t for t in tabs if t not in disabled]
    if not available: return (None, None)
    if focused not in available: return (focused, selected)
    if key == 'Next': focused = available[(available.index(focused)+1) % len(available)]
    if key == 'Previous': focused = available[(available.index(focused)-1) % len(available)]
    if automatic or key in ('Enter','Space'): selected = focused
    if selected not in available: selected = available[0]
    return (focused, selected)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('disabled', solve(['a','b','c'], 'a', 'a', 'Next', True, ['b']), ('c', 'c'))
check('removed focus', solve(['a','b','c'], 'gone', 'a', 'none', False, []), ('a', 'a'))
check('next', solve(['a','b','c'], 'a', 'a', 'Next', True, []), ('b', 'b'))
check('manual', solve(['a','b','c'], 'a', 'a', 'Next', False, []), ('b', 'a'))
check('space', solve(['a','b'], 'b', 'a', 'Space', False, []), ('b', 'b'))
check('removed selection', solve(['a','b'], 'b', 'gone', 'none', False, []), ('b', 'a'))
check('empty', solve([], None, None, 'Next', True, []), (None, None))
check('parameterized tab identities', solve(list(range(N+2)), N, N, 'Next', True, []), (N+1,N+1))
for repetition in range(N):
    check('repeat empty', solve([], None, None, 'Next', True, []), (None, None))
print(json.dumps({"observations": observations, "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:
Removing the focused tab selects the wrong fallback.

Focus traverses enabled tabs; automatic mode activates on focus, manual mode requires Enter or Space; removed focus or selection falls back to first enabled tab.

split: open-access


broken_source:
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(tabs, focused, selected, key, automatic, disabled):
    available = [t for t in tabs if t not in disabled]
    if not available: return (None, None)
    if focused not in available: focused = available[0]
    if key == 'Next': focused = available[(available.index(focused)-1) % len(available)]
    if key == 'Previous': focused = available[(available.index(focused)-1) % len(available)]
    if automatic or key in ('Enter','Space'): selected = focused
    if selected not in available: selected = available[0]
    return (focused, selected)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('disabled', solve(['a','b','c'], 'a', 'a', 'Next', True, ['b']), ('c', 'c'))
check('removed focus', solve(['a','b','c'], 'gone', 'a', 'none', False, []), ('a', 'a'))
check('next', solve(['a','b','c'], 'a', 'a', 'Next', True, []), ('b', 'b'))
check('manual', solve(['a','b','c'], 'a', 'a', 'Next', False, []), ('b', 'a'))
check('space', solve(['a','b'], 'b', 'a', 'Space', False, []), ('b', 'b'))
check('removed selection', solve(['a','b'], 'b', 'gone', 'none', False, []), ('b', 'a'))
check('empty', solve([], None, None, 'Next', True, []), (None, None))
check('parameterized tab identities', solve(list(range(N+2)), N, N, 'Next', True, []), (N+1,N+1))
for repetition in range(N):
    check('repeat empty', solve([], None, None, 'Next', True, []), (None, None))
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)

evaluation_group: xi-tab-panels

source:
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(tabs, focused, selected, key, automatic, disabled):
    available = [t for t in tabs if t not in disabled]
    if not available: return (None, None)
    if focused not in available: focused = available[0]
    if key == 'Next': focused = available[available.index(focused)]
    if key == 'Previous': focused = available[(available.index(focused)-1) % len(available)]
    if automatic or key in ('Enter','Space'): selected = focused
    if selected not in available: selected = available[0]
    return (focused, selected)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('disabled', solve(['a','b','c'], 'a', 'a', 'Next', True, ['b']), ('c', 'c'))
check('removed focus', solve(['a','b','c'], 'gone', 'a', 'none', False, []), ('a', 'a'))
check('next', solve(['a','b','c'], 'a', 'a', 'Next', True, []), ('b', 'b'))
check('manual', solve(['a','b','c'], 'a', 'a', 'Next', False, []), ('b', 'a'))
check('space', solve(['a','b'], 'b', 'a', 'Space', False, []), ('b', 'b'))
check('removed selection', solve(['a','b'], 'b', 'gone', 'none', False, []), ('b', 'a'))
check('empty', solve([], None, None, 'Next', True, []), (None, None))
check('parameterized tab identities', solve(list(range(N+2)), N, N, 'Next', True, []), (N+1,N+1))
for repetition in range(N):
    check('repeat empty', solve([], None, None, 'Next', True, []), (None, None))
print(json.dumps({"observations": observations, "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:
Next-tab traversal runs backwards.

Focus traverses enabled tabs; automatic mode activates on focus, manual mode requires Enter or Space; removed focus or selection falls back to first enabled tab.

split: open-access


broken_source:
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(tabs, focused, selected, key, automatic, disabled):
    available = [t for t in tabs if t not in disabled]
    if not available: return (None, None)
    if focused not in available: focused = available[0]
    if key == 'Next': focused = available[(available.index(focused)+1) % len(available)]
    if key == 'Previous': focused = available[(available.index(focused)-1) % len(available)]
    if True: selected = focused
    if selected not in available: selected = available[0]
    return (focused, selected)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('disabled', solve(['a','b','c'], 'a', 'a', 'Next', True, ['b']), ('c', 'c'))
check('removed focus', solve(['a','b','c'], 'gone', 'a', 'none', False, []), ('a', 'a'))
check('next', solve(['a','b','c'], 'a', 'a', 'Next', True, []), ('b', 'b'))
check('manual', solve(['a','b','c'], 'a', 'a', 'Next', False, []), ('b', 'a'))
check('space', solve(['a','b'], 'b', 'a', 'Space', False, []), ('b', 'b'))
check('removed selection', solve(['a','b'], 'b', 'gone', 'none', False, []), ('b', 'a'))
check('empty', solve([], None, None, 'Next', True, []), (None, None))
check('parameterized tab identities', solve(list(range(N+2)), N, N, 'Next', True, []), (N+1,N+1))
for repetition in range(N):
    check('repeat empty', solve([], None, None, 'Next', True, []), (None, None))
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)

evaluation_group: xi-tab-panels

source:
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(tabs, focused, selected, key, automatic, disabled):
    available = [t for t in tabs if t not in disabled]
    if not available: return (None, None)
    if focused not in available: focused = available[0]
    if key == 'Next': focused = available[(available.index(focused)+1) % len(available)]
    if key == 'Previous': focused = available[(available.index(focused)-1) % len(available)]
    if automatic or key == 'Enter': selected = focused
    if selected not in available: selected = available[0]
    return (focused, selected)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('disabled', solve(['a','b','c'], 'a', 'a', 'Next', True, ['b']), ('c', 'c'))
check('removed focus', solve(['a','b','c'], 'gone', 'a', 'none', False, []), ('a', 'a'))
check('next', solve(['a','b','c'], 'a', 'a', 'Next', True, []), ('b', 'b'))
check('manual', solve(['a','b','c'], 'a', 'a', 'Next', False, []), ('b', 'a'))
check('space', solve(['a','b'], 'b', 'a', 'Space', False, []), ('b', 'b'))
check('removed selection', solve(['a','b'], 'b', 'gone', 'none', False, []), ('b', 'a'))
check('empty', solve([], None, None, 'Next', True, []), (None, None))
check('parameterized tab identities', solve(list(range(N+2)), N, N, 'Next', True, []), (N+1,N+1))
for repetition in range(N):
    check('repeat empty', solve([], None, None, 'Next', True, []), (None, None))
print(json.dumps({"observations": observations, "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:
Manual-activation tabs switch panels on arrow navigation.

Focus traverses enabled tabs; automatic mode activates on focus, manual mode requires Enter or Space; removed focus or selection falls back to first enabled tab.

split: open-access


broken_source:
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(tabs, focused, selected, key, automatic, disabled):
    available = [t for t in tabs if t not in disabled]
    if not available: return (None, None)
    if focused not in available: focused = available[0]
    if key == 'Next': focused = available[(available.index(focused)+1) % len(available)]
    if key == 'Previous': focused = available[(available.index(focused)-1) % len(available)]
    if automatic or key in ('Enter','Space'): selected = focused
    if selected not in available: selected = None
    return (focused, selected)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('disabled', solve(['a','b','c'], 'a', 'a', 'Next', True, ['b']), ('c', 'c'))
check('removed focus', solve(['a','b','c'], 'gone', 'a', 'none', False, []), ('a', 'a'))
check('next', solve(['a','b','c'], 'a', 'a', 'Next', True, []), ('b', 'b'))
check('manual', solve(['a','b','c'], 'a', 'a', 'Next', False, []), ('b', 'a'))
check('space', solve(['a','b'], 'b', 'a', 'Space', False, []), ('b', 'b'))
check('removed selection', solve(['a','b'], 'b', 'gone', 'none', False, []), ('b', 'a'))
check('empty', solve([], None, None, 'Next', True, []), (None, None))
check('parameterized tab identities', solve(list(range(N+2)), N, N, 'Next', True, []), (N+1,N+1))
for repetition in range(N):
    check('repeat empty', solve([], None, None, 'Next', True, []), (None, None))
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)

evaluation_group: xi-tab-panels

source:
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(tabs, focused, selected, key, automatic, disabled):
    available = [t for t in tabs if t not in disabled]
    if not available: return (None, None)
    if focused not in available: focused = available[0]
    if key == 'Next': focused = available[(available.index(focused)+1) % len(available)]
    if key == 'Previous': focused = available[(available.index(focused)-1) % len(available)]
    if automatic or key in ('Enter','Space'): selected = focused
    if selected not in available: selected = available[-1]
    return (focused, selected)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('disabled', solve(['a','b','c'], 'a', 'a', 'Next', True, ['b']), ('c', 'c'))
check('removed focus', solve(['a','b','c'], 'gone', 'a', 'none', False, []), ('a', 'a'))
check('next', solve(['a','b','c'], 'a', 'a', 'Next', True, []), ('b', 'b'))
check('manual', solve(['a','b','c'], 'a', 'a', 'Next', False, []), ('b', 'a'))
check('space', solve(['a','b'], 'b', 'a', 'Space', False, []), ('b', 'b'))
check('removed selection', solve(['a','b'], 'b', 'gone', 'none', False, []), ('b', 'a'))
check('empty', solve([], None, None, 'Next', True, []), (None, None))
check('parameterized tab identities', solve(list(range(N+2)), N, N, 'Next', True, []), (N+1,N+1))
for repetition in range(N):
    check('repeat empty', solve([], None, None, 'Next', True, []), (None, None))
print(json.dumps({"observations": observations, "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:
Removing a selected tab leaves no panel active.

Focus traverses enabled tabs; automatic mode activates on focus, manual mode requires Enter or Space; removed focus or selection falls back to first enabled tab.

split: open-access


broken_source:
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(page, pages, action):
    if pages == 0: return (1, False, False)
    page = max(1, min(page, pages))
    if action == 'first': page = 1
    elif action == 'last': page = pages
    elif action == 'next': page = min(pages, page+1)
    elif action == 'previous': page = max(1, page-1)
    return (page, page > 1, page < pages)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('empty', solve(1, 0, "none"), (0, False, False))
check('shrink', solve(8, 3, "none"), (3, True, False))
check('zero', solve(0, 3, "none"), (1, False, True))
check('last', solve(1, 5, "last"), (5, True, False))
check('next end', solve(5, 5, "next"), (5, True, False))
check('next step', solve(1, 5, "next"), (2, True, True))
check('previous start', solve(1, 5, "previous"), (1, False, True))
check('previous step', solve(4, 5, "previous"), (3, True, True))
check('parameterized page count', solve(N,N+1,'next'), (N+1,True,False))
for repetition in range(N):
    check('repeat previous step', solve(4, 5, "previous"), (3, True, True))
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)

evaluation_group: xi-pagination-controls

source:
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(page, pages, action):
    if pages == 0: return (0, True, True)
    page = max(1, min(page, pages))
    if action == 'first': page = 1
    elif action == 'last': page = pages
    elif action == 'next': page = min(pages, page+1)
    elif action == 'previous': page = max(1, page-1)
    return (page, page > 1, page < pages)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('empty', solve(1, 0, "none"), (0, False, False))
check('shrink', solve(8, 3, "none"), (3, True, False))
check('zero', solve(0, 3, "none"), (1, False, True))
check('last', solve(1, 5, "last"), (5, True, False))
check('next end', solve(5, 5, "next"), (5, True, False))
check('next step', solve(1, 5, "next"), (2, True, True))
check('previous start', solve(1, 5, "previous"), (1, False, True))
check('previous step', solve(4, 5, "previous"), (3, True, True))
check('parameterized page count', solve(N,N+1,'next'), (N+1,True,False))
for repetition in range(N):
    check('repeat previous step', solve(4, 5, "previous"), (3, True, True))
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)

prompt:
Empty results display a nonexistent first page.

Empty pagination uses page zero with disabled controls; nonempty page clamps to 1..pages; actions move by one or to endpoints; availability reflects resulting page.

split: open-access


broken_source:
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(page, pages, action):
    if pages == 0: return (0, False, False)
    page = max(1, page)
    if action == 'first': page = 1
    elif action == 'last': page = pages
    elif action == 'next': page = min(pages, page+1)
    elif action == 'previous': page = max(1, page-1)
    return (page, page > 1, page < pages)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('empty', solve(1, 0, "none"), (0, False, False))
check('shrink', solve(8, 3, "none"), (3, True, False))
check('zero', solve(0, 3, "none"), (1, False, True))
check('last', solve(1, 5, "last"), (5, True, False))
check('next end', solve(5, 5, "next"), (5, True, False))
check('next step', solve(1, 5, "next"), (2, True, True))
check('previous start', solve(1, 5, "previous"), (1, False, True))
check('previous step', solve(4, 5, "previous"), (3, True, True))
check('parameterized page count', solve(N,N+1,'next'), (N+1,True,False))
for repetition in range(N):
    check('repeat previous step', solve(4, 5, "previous"), (3, True, True))
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)

evaluation_group: xi-pagination-controls

source:
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(page, pages, action):
    if pages == 0: return (0, False, False)
    page = min(page, pages)
    if action == 'first': page = 1
    elif action == 'last': page = pages
    elif action == 'next': page = min(pages, page+1)
    elif action == 'previous': page = max(1, page-1)
    return (page, page > 1, page < pages)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('empty', solve(1, 0, "none"), (0, False, False))
check('shrink', solve(8, 3, "none"), (3, True, False))
check('zero', solve(0, 3, "none"), (1, False, True))
check('last', solve(1, 5, "last"), (5, True, False))
check('next end', solve(5, 5, "next"), (5, True, False))
check('next step', solve(1, 5, "next"), (2, True, True))
check('previous start', solve(1, 5, "previous"), (1, False, True))
check('previous step', solve(4, 5, "previous"), (3, True, True))
check('parameterized page count', solve(N,N+1,'next'), (N+1,True,False))
for repetition in range(N):
    check('repeat previous step', solve(4, 5, "previous"), (3, True, True))
print(json.dumps({"observations": observations, "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:
Result shrink leaves the current page beyond the last page.

Empty pagination uses page zero with disabled controls; nonempty page clamps to 1..pages; actions move by one or to endpoints; availability reflects resulting page.

split: open-access


broken_source:
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(page, pages, action):
    if pages == 0: return (0, False, False)
    page = max(1, min(page, pages))
    if action == 'first': page = 1
    elif action == 'last': page = pages-1
    elif action == 'next': page = min(pages, page+1)
    elif action == 'previous': page = max(1, page-1)
    return (page, page > 1, page < pages)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('empty', solve(1, 0, "none"), (0, False, False))
check('shrink', solve(8, 3, "none"), (3, True, False))
check('zero', solve(0, 3, "none"), (1, False, True))
check('last', solve(1, 5, "last"), (5, True, False))
check('next end', solve(5, 5, "next"), (5, True, False))
check('next step', solve(1, 5, "next"), (2, True, True))
check('previous start', solve(1, 5, "previous"), (1, False, True))
check('previous step', solve(4, 5, "previous"), (3, True, True))
check('parameterized page count', solve(N,N+1,'next'), (N+1,True,False))
for repetition in range(N):
    check('repeat previous step', solve(4, 5, "previous"), (3, True, True))
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)

evaluation_group: xi-pagination-controls

source:
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(page, pages, action):
    if pages == 0: return (0, False, False)
    page = max(1, min(page, pages))
    if action == 'first': page = 1
    elif action == 'last': page = 1
    elif action == 'next': page = min(pages, page+1)
    elif action == 'previous': page = max(1, page-1)
    return (page, page > 1, page < pages)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('empty', solve(1, 0, "none"), (0, False, False))
check('shrink', solve(8, 3, "none"), (3, True, False))
check('zero', solve(0, 3, "none"), (1, False, True))
check('last', solve(1, 5, "last"), (5, True, False))
check('next end', solve(5, 5, "next"), (5, True, False))
check('next step', solve(1, 5, "next"), (2, True, True))
check('previous start', solve(1, 5, "previous"), (1, False, True))
check('previous step', solve(4, 5, "previous"), (3, True, True))
check('parameterized page count', solve(N,N+1,'next'), (N+1,True,False))
for repetition in range(N):
    check('repeat previous step', solve(4, 5, "previous"), (3, True, True))
print(json.dumps({"observations": observations, "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:
Last-page navigation stops one page early.

Empty pagination uses page zero with disabled controls; nonempty page clamps to 1..pages; actions move by one or to endpoints; availability reflects resulting page.

split: open-access


broken_source:
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(page, pages, action):
    if pages == 0: return (0, False, False)
    page = max(1, min(page, pages))
    if action == 'first': page = 1
    elif action == 'last': page = pages
    elif action == 'next': page = page+1
    elif action == 'previous': page = max(1, page-1)
    return (page, page > 1, page < pages)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('empty', solve(1, 0, "none"), (0, False, False))
check('shrink', solve(8, 3, "none"), (3, True, False))
check('zero', solve(0, 3, "none"), (1, False, True))
check('last', solve(1, 5, "last"), (5, True, False))
check('next end', solve(5, 5, "next"), (5, True, False))
check('next step', solve(1, 5, "next"), (2, True, True))
check('previous start', solve(1, 5, "previous"), (1, False, True))
check('previous step', solve(4, 5, "previous"), (3, True, True))
check('parameterized page count', solve(N,N+1,'next'), (N+1,True,False))
for repetition in range(N):
    check('repeat previous step', solve(4, 5, "previous"), (3, True, True))
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)

evaluation_group: xi-pagination-controls

source:
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(page, pages, action):
    if pages == 0: return (0, False, False)
    page = max(1, min(page, pages))
    if action == 'first': page = 1
    elif action == 'last': page = pages
    elif action == 'next': page = min(pages, page+2)
    elif action == 'previous': page = max(1, page-1)
    return (page, page > 1, page < pages)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('empty', solve(1, 0, "none"), (0, False, False))
check('shrink', solve(8, 3, "none"), (3, True, False))
check('zero', solve(0, 3, "none"), (1, False, True))
check('last', solve(1, 5, "last"), (5, True, False))
check('next end', solve(5, 5, "next"), (5, True, False))
check('next step', solve(1, 5, "next"), (2, True, True))
check('previous start', solve(1, 5, "previous"), (1, False, True))
check('previous step', solve(4, 5, "previous"), (3, True, True))
check('parameterized page count', solve(N,N+1,'next'), (N+1,True,False))
for repetition in range(N):
    check('repeat previous step', solve(4, 5, "previous"), (3, True, True))
print(json.dumps({"observations": observations, "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:
Next navigates beyond the final page.

Empty pagination uses page zero with disabled controls; nonempty page clamps to 1..pages; actions move by one or to endpoints; availability reflects resulting page.

split: open-access


broken_source:
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(page, pages, action):
    if pages == 0: return (0, False, False)
    page = max(1, min(page, pages))
    if action == 'first': page = 1
    elif action == 'last': page = pages
    elif action == 'next': page = min(pages, page+1)
    elif action == 'previous': page = page-1
    return (page, page > 1, page < pages)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('empty', solve(1, 0, "none"), (0, False, False))
check('shrink', solve(8, 3, "none"), (3, True, False))
check('zero', solve(0, 3, "none"), (1, False, True))
check('last', solve(1, 5, "last"), (5, True, False))
check('next end', solve(5, 5, "next"), (5, True, False))
check('next step', solve(1, 5, "next"), (2, True, True))
check('previous start', solve(1, 5, "previous"), (1, False, True))
check('previous step', solve(4, 5, "previous"), (3, True, True))
check('parameterized page count', solve(N,N+1,'next'), (N+1,True,False))
for repetition in range(N):
    check('repeat previous step', solve(4, 5, "previous"), (3, True, True))
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)

evaluation_group: xi-pagination-controls

source:
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(page, pages, action):
    if pages == 0: return (0, False, False)
    page = max(1, min(page, pages))
    if action == 'first': page = 1
    elif action == 'last': page = pages
    elif action == 'next': page = min(pages, page+1)
    elif action == 'previous': page = max(1, page-2)
    return (page, page > 1, page < pages)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('empty', solve(1, 0, "none"), (0, False, False))
check('shrink', solve(8, 3, "none"), (3, True, False))
check('zero', solve(0, 3, "none"), (1, False, True))
check('last', solve(1, 5, "last"), (5, True, False))
check('next end', solve(5, 5, "next"), (5, True, False))
check('next step', solve(1, 5, "next"), (2, True, True))
check('previous start', solve(1, 5, "previous"), (1, False, True))
check('previous step', solve(4, 5, "previous"), (3, True, True))
check('parameterized page count', solve(N,N+1,'next'), (N+1,True,False))
for repetition in range(N):
    check('repeat previous step', solve(4, 5, "previous"), (3, True, True))
print(json.dumps({"observations": observations, "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:
Previous navigates before page one.

Empty pagination uses page zero with disabled controls; nonempty page clamps to 1..pages; actions move by one or to endpoints; availability reflects resulting page.

split: open-access


broken_source:
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(ancestors, current, max_items, include_root):
    chain = [current] + list(ancestors)
    if not include_root and len(chain) > 1: chain = chain[1:]
    if len(chain) > max_items:
        chain = [chain[0], '…'] + chain[-(max_items-2):] if max_items > 2 else chain[-max_items:]
    return [(x, i != len(chain)-1) for i, x in enumerate(chain)]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('normal', solve(['root','parent'], 'current', 5, True), [('root', True), ('parent', True), ('current', False)])
check('only current', solve([], 'current', 5, False), [('current', False)])
check('hide root', solve(['root','parent'], 'current', 5, False), [('parent', True), ('current', False)])
check('collapsed', solve(['root','a','b','c'], 'current', 4, True), [('root', True), ('…', True), ('c', True), ('current', False)])
check('small budget', solve(['root','a','b'], 'current', 2, True), [('b', True), ('current', False)])
check('parameterized ancestor depth', solve(list(range(N)),N,N+2,True), [(i,i!=N) for i in range(N+1)])
for repetition in range(N):
    check('repeat small budget', solve(['root','a','b'], 'current', 2, True), [('b', True), ('current', False)])
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)

evaluation_group: xi-breadcrumb

source:
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(ancestors, current, max_items, include_root):
    chain = list(ancestors)
    if not include_root and len(chain) > 1: chain = chain[1:]
    if len(chain) > max_items:
        chain = [chain[0], '…'] + chain[-(max_items-2):] if max_items > 2 else chain[-max_items:]
    return [(x, i != len(chain)-1) for i, x in enumerate(chain)]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('normal', solve(['root','parent'], 'current', 5, True), [('root', True), ('parent', True), ('current', False)])
check('only current', solve([], 'current', 5, False), [('current', False)])
check('hide root', solve(['root','parent'], 'current', 5, False), [('parent', True), ('current', False)])
check('collapsed', solve(['root','a','b','c'], 'current', 4, True), [('root', True), ('…', True), ('c', True), ('current', False)])
check('small budget', solve(['root','a','b'], 'current', 2, True), [('b', True), ('current', False)])
check('parameterized ancestor depth', solve(list(range(N)),N,N+2,True), [(i,i!=N) for i in range(N+1)])
for repetition in range(N):
    check('repeat small budget', solve(['root','a','b'], 'current', 2, True), [('b', True), ('current', False)])
print(json.dumps({"observations": observations, "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:
Current location appears before its ancestors.

Append current after ancestors; optionally hide a distinct root; collapse long paths preserving root and recent tail within budget; only ancestors are links. Budget is at least two.

split: open-access


broken_source:
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(ancestors, current, max_items, include_root):
    chain = list(ancestors) + [current]
    if not include_root: chain = chain[1:]
    if len(chain) > max_items:
        chain = [chain[0], '…'] + chain[-(max_items-2):] if max_items > 2 else chain[-max_items:]
    return [(x, i != len(chain)-1) for i, x in enumerate(chain)]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('normal', solve(['root','parent'], 'current', 5, True), [('root', True), ('parent', True), ('current', False)])
check('only current', solve([], 'current', 5, False), [('current', False)])
check('hide root', solve(['root','parent'], 'current', 5, False), [('parent', True), ('current', False)])
check('collapsed', solve(['root','a','b','c'], 'current', 4, True), [('root', True), ('…', True), ('c', True), ('current', False)])
check('small budget', solve(['root','a','b'], 'current', 2, True), [('b', True), ('current', False)])
check('parameterized ancestor depth', solve(list(range(N)),N,N+2,True), [(i,i!=N) for i in range(N+1)])
for repetition in range(N):
    check('repeat small budget', solve(['root','a','b'], 'current', 2, True), [('b', True), ('current', False)])
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)

evaluation_group: xi-breadcrumb

source:
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(ancestors, current, max_items, include_root):
    chain = list(ancestors) + [current]
    if include_root and len(chain) > 1: chain = chain[1:]
    if len(chain) > max_items:
        chain = [chain[0], '…'] + chain[-(max_items-2):] if max_items > 2 else chain[-max_items:]
    return [(x, i != len(chain)-1) for i, x in enumerate(chain)]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('normal', solve(['root','parent'], 'current', 5, True), [('root', True), ('parent', True), ('current', False)])
check('only current', solve([], 'current', 5, False), [('current', False)])
check('hide root', solve(['root','parent'], 'current', 5, False), [('parent', True), ('current', False)])
check('collapsed', solve(['root','a','b','c'], 'current', 4, True), [('root', True), ('…', True), ('c', True), ('current', False)])
check('small budget', solve(['root','a','b'], 'current', 2, True), [('b', True), ('current', False)])
check('parameterized ancestor depth', solve(list(range(N)),N,N+2,True), [(i,i!=N) for i in range(N+1)])
for repetition in range(N):
    check('repeat small budget', solve(['root','a','b'], 'current', 2, True), [('b', True), ('current', False)])
print(json.dumps({"observations": observations, "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:
Hiding root removes the only current breadcrumb.

Append current after ancestors; optionally hide a distinct root; collapse long paths preserving root and recent tail within budget; only ancestors are links. Budget is at least two.

split: open-access


broken_source:
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(ancestors, current, max_items, include_root):
    chain = list(ancestors) + [current]
    if not include_root and len(chain) > 1: chain = chain[1:]
    if len(chain) > max_items:
        chain = ['…'] + chain[-(max_items-2):] if max_items > 2 else chain[-max_items:]
    return [(x, i != len(chain)-1) for i, x in enumerate(chain)]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('normal', solve(['root','parent'], 'current', 5, True), [('root', True), ('parent', True), ('current', False)])
check('only current', solve([], 'current', 5, False), [('current', False)])
check('hide root', solve(['root','parent'], 'current', 5, False), [('parent', True), ('current', False)])
check('collapsed', solve(['root','a','b','c'], 'current', 4, True), [('root', True), ('…', True), ('c', True), ('current', False)])
check('small budget', solve(['root','a','b'], 'current', 2, True), [('b', True), ('current', False)])
check('parameterized ancestor depth', solve(list(range(N)),N,N+2,True), [(i,i!=N) for i in range(N+1)])
for repetition in range(N):
    check('repeat small budget', solve(['root','a','b'], 'current', 2, True), [('b', True), ('current', False)])
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)

evaluation_group: xi-breadcrumb

source:
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(ancestors, current, max_items, include_root):
    chain = list(ancestors) + [current]
    if not include_root and len(chain) > 1: chain = chain[1:]
    if len(chain) > max_items:
        chain = [chain[-1], '…'] + chain[-(max_items-2):] if max_items > 2 else chain[-max_items:]
    return [(x, i != len(chain)-1) for i, x in enumerate(chain)]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('normal', solve(['root','parent'], 'current', 5, True), [('root', True), ('parent', True), ('current', False)])
check('only current', solve([], 'current', 5, False), [('current', False)])
check('hide root', solve(['root','parent'], 'current', 5, False), [('parent', True), ('current', False)])
check('collapsed', solve(['root','a','b','c'], 'current', 4, True), [('root', True), ('…', True), ('c', True), ('current', False)])
check('small budget', solve(['root','a','b'], 'current', 2, True), [('b', True), ('current', False)])
check('parameterized ancestor depth', solve(list(range(N)),N,N+2,True), [(i,i!=N) for i in range(N+1)])
for repetition in range(N):
    check('repeat small budget', solve(['root','a','b'], 'current', 2, True), [('b', True), ('current', False)])
print(json.dumps({"observations": observations, "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:
Collapsed breadcrumbs omit the root context.

Append current after ancestors; optionally hide a distinct root; collapse long paths preserving root and recent tail within budget; only ancestors are links. Budget is at least two.

split: open-access


broken_source:
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(ancestors, current, max_items, include_root):
    chain = list(ancestors) + [current]
    if not include_root and len(chain) > 1: chain = chain[1:]
    if len(chain) > max_items:
        chain = [chain[0], '…'] + chain[:max_items-2] if max_items > 2 else chain[-max_items:]
    return [(x, i != len(chain)-1) for i, x in enumerate(chain)]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('normal', solve(['root','parent'], 'current', 5, True), [('root', True), ('parent', True), ('current', False)])
check('only current', solve([], 'current', 5, False), [('current', False)])
check('hide root', solve(['root','parent'], 'current', 5, False), [('parent', True), ('current', False)])
check('collapsed', solve(['root','a','b','c'], 'current', 4, True), [('root', True), ('…', True), ('c', True), ('current', False)])
check('small budget', solve(['root','a','b'], 'current', 2, True), [('b', True), ('current', False)])
check('parameterized ancestor depth', solve(list(range(N)),N,N+2,True), [(i,i!=N) for i in range(N+1)])
for repetition in range(N):
    check('repeat small budget', solve(['root','a','b'], 'current', 2, True), [('b', True), ('current', False)])
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)

evaluation_group: xi-breadcrumb

source:
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(ancestors, current, max_items, include_root):
    chain = list(ancestors) + [current]
    if not include_root and len(chain) > 1: chain = chain[1:]
    if len(chain) > max_items:
        chain = [chain[0], '…'] + chain[-(max_items-1):] if max_items > 2 else chain[-max_items:]
    return [(x, i != len(chain)-1) for i, x in enumerate(chain)]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('normal', solve(['root','parent'], 'current', 5, True), [('root', True), ('parent', True), ('current', False)])
check('only current', solve([], 'current', 5, False), [('current', False)])
check('hide root', solve(['root','parent'], 'current', 5, False), [('parent', True), ('current', False)])
check('collapsed', solve(['root','a','b','c'], 'current', 4, True), [('root', True), ('…', True), ('c', True), ('current', False)])
check('small budget', solve(['root','a','b'], 'current', 2, True), [('b', True), ('current', False)])
check('parameterized ancestor depth', solve(list(range(N)),N,N+2,True), [(i,i!=N) for i in range(N+1)])
for repetition in range(N):
    check('repeat small budget', solve(['root','a','b'], 'current', 2, True), [('b', True), ('current', False)])
print(json.dumps({"observations": observations, "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:
Collapsed breadcrumbs retain old ancestors instead of recent ones.

Append current after ancestors; optionally hide a distinct root; collapse long paths preserving root and recent tail within budget; only ancestors are links. Budget is at least two.

split: open-access


broken_source:
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(ancestors, current, max_items, include_root):
    chain = list(ancestors) + [current]
    if not include_root and len(chain) > 1: chain = chain[1:]
    if len(chain) > max_items:
        chain = [chain[0], '…'] + chain[-(max_items-2):] if max_items > 2 else chain[-max_items:]
    return [(x, True) for i, x in enumerate(chain)]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('normal', solve(['root','parent'], 'current', 5, True), [('root', True), ('parent', True), ('current', False)])
check('only current', solve([], 'current', 5, False), [('current', False)])
check('hide root', solve(['root','parent'], 'current', 5, False), [('parent', True), ('current', False)])
check('collapsed', solve(['root','a','b','c'], 'current', 4, True), [('root', True), ('…', True), ('c', True), ('current', False)])
check('small budget', solve(['root','a','b'], 'current', 2, True), [('b', True), ('current', False)])
check('parameterized ancestor depth', solve(list(range(N)),N,N+2,True), [(i,i!=N) for i in range(N+1)])
for repetition in range(N):
    check('repeat small budget', solve(['root','a','b'], 'current', 2, True), [('b', True), ('current', False)])
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)

evaluation_group: xi-breadcrumb

source:
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(ancestors, current, max_items, include_root):
    chain = list(ancestors) + [current]
    if not include_root and len(chain) > 1: chain = chain[1:]
    if len(chain) > max_items:
        chain = [chain[0], '…'] + chain[-(max_items-2):] if max_items > 2 else chain[-max_items:]
    return [(x, False) for i, x in enumerate(chain)]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('normal', solve(['root','parent'], 'current', 5, True), [('root', True), ('parent', True), ('current', False)])
check('only current', solve([], 'current', 5, False), [('current', False)])
check('hide root', solve(['root','parent'], 'current', 5, False), [('parent', True), ('current', False)])
check('collapsed', solve(['root','a','b','c'], 'current', 4, True), [('root', True), ('…', True), ('c', True), ('current', False)])
check('small budget', solve(['root','a','b'], 'current', 2, True), [('b', True), ('current', False)])
check('parameterized ancestor depth', solve(list(range(N)),N,N+2,True), [(i,i!=N) for i in range(N+1)])
for repetition in range(N):
    check('repeat small budget', solve(['root','a','b'], 'current', 2, True), [('b', True), ('current', False)])
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)

prompt:
The current breadcrumb is exposed as a navigation link.

Append current after ancestors; optionally hide a distinct root; collapse long paths preserving root and recent tail within budget; only ancestors are links. Budget is at least two.

split: open-access


broken_source:
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(path, link, exact, case_sensitive):
    path = path
    link = link.rstrip('/') or '/'
    path = path.rstrip('/') or '/'
    if not case_sensitive: path, link = path.casefold(), link.casefold()
    if exact or link == '/': return path == link
    return path == link or path.startswith(link + '/')
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('query', solve('/docs?x=1', '/docs', True, True), True)
check('fragment', solve('/docs#intro', '/docs', True, True), True)
check('slash', solve('/docs', '/docs/', True, True), True)
check('root', solve('/docs', '/', False, True), False)
check('root itself', solve('/', '/', True, True), True)
check('fold', solve("/DOCS", "/docs", True, False), True)
check('sensitive', solve("/DOCS", "/docs", True, True), False)
check('child', solve('/docs/a', '/docs', False, True), True)
check('prefix sibling', solve('/docstring', '/docs', False, True), False)
check('parameterized route segment', solve('/section'+str(N)+'/child','/section'+str(N),False,True), True)
for repetition in range(N):
    check('repeat prefix sibling', solve('/docstring', '/docs', False, True), False)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)

evaluation_group: xi-route-active

source:
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(path, link, exact, case_sensitive):
    path = path.split('?', 1)[0]
    link = link.rstrip('/') or '/'
    path = path.rstrip('/') or '/'
    if not case_sensitive: path, link = path.casefold(), link.casefold()
    if exact or link == '/': return path == link
    return path == link or path.startswith(link + '/')
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('query', solve('/docs?x=1', '/docs', True, True), True)
check('fragment', solve('/docs#intro', '/docs', True, True), True)
check('slash', solve('/docs', '/docs/', True, True), True)
check('root', solve('/docs', '/', False, True), False)
check('root itself', solve('/', '/', True, True), True)
check('fold', solve("/DOCS", "/docs", True, False), True)
check('sensitive', solve("/DOCS", "/docs", True, True), False)
check('child', solve('/docs/a', '/docs', False, True), True)
check('prefix sibling', solve('/docstring', '/docs', False, True), False)
check('parameterized route segment', solve('/section'+str(N)+'/child','/section'+str(N),False,True), True)
for repetition in range(N):
    check('repeat prefix sibling', solve('/docstring', '/docs', False, True), False)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)

prompt:
Query and fragment state changes deactivate the current link.

Ignore URL query and fragment; normalize trailing slashes with root preserved; honor case policy; section matches require a slash boundary and root matches exactly.

split: open-access


broken_source:
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(path, link, exact, case_sensitive):
    path = path.split('?', 1)[0].split('#', 1)[0]
    link = link
    path = path.rstrip('/') or '/'
    if not case_sensitive: path, link = path.casefold(), link.casefold()
    if exact or link == '/': return path == link
    return path == link or path.startswith(link + '/')
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('query', solve('/docs?x=1', '/docs', True, True), True)
check('fragment', solve('/docs#intro', '/docs', True, True), True)
check('slash', solve('/docs', '/docs/', True, True), True)
check('root', solve('/docs', '/', False, True), False)
check('root itself', solve('/', '/', True, True), True)
check('fold', solve("/DOCS", "/docs", True, False), True)
check('sensitive', solve("/DOCS", "/docs", True, True), False)
check('child', solve('/docs/a', '/docs', False, True), True)
check('prefix sibling', solve('/docstring', '/docs', False, True), False)
check('parameterized route segment', solve('/section'+str(N)+'/child','/section'+str(N),False,True), True)
for repetition in range(N):
    check('repeat prefix sibling', solve('/docstring', '/docs', False, True), False)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)

evaluation_group: xi-route-active

source:
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(path, link, exact, case_sensitive):
    path = path.split('?', 1)[0].split('#', 1)[0]
    link = link.rstrip('/')
    path = path.rstrip('/') or '/'
    if not case_sensitive: path, link = path.casefold(), link.casefold()
    if exact or link == '/': return path == link
    return path == link or path.startswith(link + '/')
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('query', solve('/docs?x=1', '/docs', True, True), True)
check('fragment', solve('/docs#intro', '/docs', True, True), True)
check('slash', solve('/docs', '/docs/', True, True), True)
check('root', solve('/docs', '/', False, True), False)
check('root itself', solve('/', '/', True, True), True)
check('fold', solve("/DOCS", "/docs", True, False), True)
check('sensitive', solve("/DOCS", "/docs", True, True), False)
check('child', solve('/docs/a', '/docs', False, True), True)
check('prefix sibling', solve('/docstring', '/docs', False, True), False)
check('parameterized route segment', solve('/section'+str(N)+'/child','/section'+str(N),False,True), True)
for repetition in range(N):
    check('repeat prefix sibling', solve('/docstring', '/docs', False, True), False)
print(json.dumps({"observations": observations, "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:
A link ending in slash fails to match the same route.

Ignore URL query and fragment; normalize trailing slashes with root preserved; honor case policy; section matches require a slash boundary and root matches exactly.

split: open-access


broken_source:
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(path, link, exact, case_sensitive):
    path = path.split('?', 1)[0].split('#', 1)[0]
    link = link.rstrip('/') or '/'
    path = path.rstrip('/') or '/'
    if False: path, link = path.casefold(), link.casefold()
    if exact or link == '/': return path == link
    return path == link or path.startswith(link + '/')
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('query', solve('/docs?x=1', '/docs', True, True), True)
check('fragment', solve('/docs#intro', '/docs', True, True), True)
check('slash', solve('/docs', '/docs/', True, True), True)
check('root', solve('/docs', '/', False, True), False)
check('root itself', solve('/', '/', True, True), True)
check('fold', solve("/DOCS", "/docs", True, False), True)
check('sensitive', solve("/DOCS", "/docs", True, True), False)
check('child', solve('/docs/a', '/docs', False, True), True)
check('prefix sibling', solve('/docstring', '/docs', False, True), False)
check('parameterized route segment', solve('/section'+str(N)+'/child','/section'+str(N),False,True), True)
for repetition in range(N):
    check('repeat prefix sibling', solve('/docstring', '/docs', False, True), False)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)

evaluation_group: xi-route-active

source:
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(path, link, exact, case_sensitive):
    path = path.split('?', 1)[0].split('#', 1)[0]
    link = link.rstrip('/') or '/'
    path = path.rstrip('/') or '/'
    if True: path, link = path.casefold(), link.casefold()
    if exact or link == '/': return path == link
    return path == link or path.startswith(link + '/')
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('query', solve('/docs?x=1', '/docs', True, True), True)
check('fragment', solve('/docs#intro', '/docs', True, True), True)
check('slash', solve('/docs', '/docs/', True, True), True)
check('root', solve('/docs', '/', False, True), False)
check('root itself', solve('/', '/', True, True), True)
check('fold', solve("/DOCS", "/docs", True, False), True)
check('sensitive', solve("/DOCS", "/docs", True, True), False)
check('child', solve('/docs/a', '/docs', False, True), True)
check('prefix sibling', solve('/docstring', '/docs', False, True), False)
check('parameterized route segment', solve('/section'+str(N)+'/child','/section'+str(N),False,True), True)
for repetition in range(N):
    check('repeat prefix sibling', solve('/docstring', '/docs', False, True), False)
print(json.dumps({"observations": observations, "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:
Case-insensitive navigation still compares raw case.

Ignore URL query and fragment; normalize trailing slashes with root preserved; honor case policy; section matches require a slash boundary and root matches exactly.

split: open-access


broken_source:
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(path, link, exact, case_sensitive):
    path = path.split('?', 1)[0].split('#', 1)[0]
    link = link.rstrip('/') or '/'
    path = path.rstrip('/') or '/'
    if not case_sensitive: path, link = path.casefold(), link.casefold()
    if exact or link == '/': return path.startswith(link)
    return path == link or path.startswith(link + '/')
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('query', solve('/docs?x=1', '/docs', True, True), True)
check('fragment', solve('/docs#intro', '/docs', True, True), True)
check('slash', solve('/docs', '/docs/', True, True), True)
check('root', solve('/docs', '/', False, True), False)
check('root itself', solve('/', '/', True, True), True)
check('fold', solve("/DOCS", "/docs", True, False), True)
check('sensitive', solve("/DOCS", "/docs", True, True), False)
check('child', solve('/docs/a', '/docs', False, True), True)
check('prefix sibling', solve('/docstring', '/docs', False, True), False)
check('parameterized route segment', solve('/section'+str(N)+'/child','/section'+str(N),False,True), True)
for repetition in range(N):
    check('repeat prefix sibling', solve('/docstring', '/docs', False, True), False)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)

evaluation_group: xi-route-active

source:
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(path, link, exact, case_sensitive):
    path = path.split('?', 1)[0].split('#', 1)[0]
    link = link.rstrip('/') or '/'
    path = path.rstrip('/') or '/'
    if not case_sensitive: path, link = path.casefold(), link.casefold()
    if True: return path == link
    return path == link or path.startswith(link + '/')
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('query', solve('/docs?x=1', '/docs', True, True), True)
check('fragment', solve('/docs#intro', '/docs', True, True), True)
check('slash', solve('/docs', '/docs/', True, True), True)
check('root', solve('/docs', '/', False, True), False)
check('root itself', solve('/', '/', True, True), True)
check('fold', solve("/DOCS", "/docs", True, False), True)
check('sensitive', solve("/DOCS", "/docs", True, True), False)
check('child', solve('/docs/a', '/docs', False, True), True)
check('prefix sibling', solve('/docstring', '/docs', False, True), False)
check('parameterized route segment', solve('/section'+str(N)+'/child','/section'+str(N),False,True), True)
for repetition in range(N):
    check('repeat prefix sibling', solve('/docstring', '/docs', False, True), False)
print(json.dumps({"observations": observations, "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:
Root links become active on every descendant route.

Ignore URL query and fragment; normalize trailing slashes with root preserved; honor case policy; section matches require a slash boundary and root matches exactly.

split: open-access