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

N = 1
observations = []
def solve(operation, s):
    ancestors, failed, reset_keys, previous_keys, handled, event_kind = s
    if operation == 'nearest-eligible-boundary':
        return next((k for k,enabled in reversed(ancestors) if enabled and k!=failed),None)
    if operation == 'boundary-cannot-catch-itself':
        return [k for k,enabled in ancestors if enabled and k!=failed]
    if operation == 'reset-key-type-and-length':
        return len(reset_keys)!=len(previous_keys) or any(type(a)!=type(b) or a!=b for a,b in zip(reset_keys,previous_keys))
    if operation == 'render-only-catch':
        return True
    if operation == 'unhandled-root-escalation':
        return not any(enabled and k!=failed for k,enabled in ancestors)
    if operation == 'capture-path-inside-out':
        return [k for k,enabled in reversed(ancestors) if enabled and k!=failed]
    if operation == 'reported-error-dedup':
        return not handled
    if operation == 'boundary-disabled-fallback':
        return [k for k,enabled in ancestors if not enabled]
    if operation == 'reset-clears-handled-marker':
        return handled and reset_keys==previous_keys
    if operation == 'event-error-propagation':
        return 'caller' if event_kind!='render' else 'boundary'
    raise ValueError('unknown modeled operation')
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('nearest-eligible-boundary scenario 1', solve('nearest-eligible-boundary', ([('outer',True),('inner',True)],'inner',[N],[N-1],False,'render')), 'outer')
check('nearest-eligible-boundary scenario 2', solve('nearest-eligible-boundary', ([('outer',True),('inner',False)],'leaf',[],[],False,'render')), 'outer')
check('nearest-eligible-boundary scenario 3', solve('nearest-eligible-boundary', ([], 'root',[1],[1],False,'render')), None)
check('nearest-eligible-boundary scenario 4', solve('nearest-eligible-boundary', ([('outer',True)],'leaf',[0],[False],True,'event')), 'outer')
check('nearest-eligible-boundary scenario 5', solve('nearest-eligible-boundary', ([('outer',True),('inner',True)],'leaf',[1,2],[1],True,'render')), 'inner')
check('nearest-eligible-boundary scenario 6', solve('nearest-eligible-boundary', ([('outer',False),('inner',True)],'leaf',[],[],False,'async')), 'inner')
check('boundary-cannot-catch-itself scenario 1', solve('boundary-cannot-catch-itself', ([('outer',True),('inner',True)],'inner',[N],[N-1],False,'render')), ['outer'])
check('boundary-cannot-catch-itself scenario 2', solve('boundary-cannot-catch-itself', ([('outer',True),('inner',False)],'leaf',[],[],False,'render')), ['outer'])
check('boundary-cannot-catch-itself scenario 3', solve('boundary-cannot-catch-itself', ([], 'root',[1],[1],False,'render')), [])
check('boundary-cannot-catch-itself scenario 4', solve('boundary-cannot-catch-itself', ([('outer',True)],'leaf',[0],[False],True,'event')), ['outer'])
check('boundary-cannot-catch-itself scenario 5', solve('boundary-cannot-catch-itself', ([('outer',True),('inner',True)],'leaf',[1,2],[1],True,'render')), ['outer','inner'])
check('boundary-cannot-catch-itself scenario 6', solve('boundary-cannot-catch-itself', ([('outer',False),('inner',True)],'leaf',[],[],False,'async')), ['inner'])
check('reset-key-type-and-length scenario 1', solve('reset-key-type-and-length', ([('outer',True),('inner',True)],'inner',[N],[N-1],False,'render')), True)
check('reset-key-type-and-length scenario 2', solve('reset-key-type-and-length', ([('outer',True),('inner',False)],'leaf',[],[],False,'render')), False)
check('reset-key-type-and-length scenario 3', solve('reset-key-type-and-length', ([], 'root',[1],[1],False,'render')), False)
check('reset-key-type-and-length scenario 4', solve('reset-key-type-and-length', ([('outer',True)],'leaf',[0],[False],True,'event')), True)
check('reset-key-type-and-length scenario 5', solve('reset-key-type-and-length', ([('outer',True),('inner',True)],'leaf',[1,2],[1],True,'render')), True)
check('reset-key-type-and-length scenario 6', solve('reset-key-type-and-length', ([('outer',False),('inner',True)],'leaf',[],[],False,'async')), False)
check('render-only-catch scenario 1', solve('render-only-catch', ([('outer',True),('inner',True)],'inner',[N],[N-1],False,'render')), True)
check('render-only-catch scenario 2', solve('render-only-catch', ([('outer',True),('inner',False)],'leaf',[],[],False,'render')), True)
check('render-only-catch scenario 3', solve('render-only-catch', ([], 'root',[1],[1],False,'render')), True)
check('render-only-catch scenario 4', solve('render-only-catch', ([('outer',True)],'leaf',[0],[False],True,'event')), False)
check('render-only-catch scenario 5', solve('render-only-catch', ([('outer',True),('inner',True)],'leaf',[1,2],[1],True,'render')), True)
check('render-only-catch scenario 6', solve('render-only-catch', ([('outer',False),('inner',True)],'leaf',[],[],False,'async')), False)
check('unhandled-root-escalation scenario 1', solve('unhandled-root-escalation', ([('outer',True),('inner',True)],'inner',[N],[N-1],False,'render')), False)
check('unhandled-root-escalation scenario 2', solve('unhandled-root-escalation', ([('outer',True),('inner',False)],'leaf',[],[],False,'render')), False)
check('unhandled-root-escalation scenario 3', solve('unhandled-root-escalation', ([], 'root',[1],[1],False,'render')), True)
check('unhandled-root-escalation scenario 4', solve('unhandled-root-escalation', ([('outer',True)],'leaf',[0],[False],True,'event')), False)
check('unhandled-root-escalation scenario 5', solve('unhandled-root-escalation', ([('outer',True),('inner',True)],'leaf',[1,2],[1],True,'render')), False)
check('unhandled-root-escalation scenario 6', solve('unhandled-root-escalation', ([('outer',False),('inner',True)],'leaf',[],[],False,'async')), False)
check('capture-path-inside-out scenario 1', solve('capture-path-inside-out', ([('outer',True),('inner',True)],'inner',[N],[N-1],False,'render')), ['outer'])
check('capture-path-inside-out scenario 2', solve('capture-path-inside-out', ([('outer',True),('inner',False)],'leaf',[],[],False,'render')), ['outer'])
check('capture-path-inside-out scenario 3', solve('capture-path-inside-out', ([], 'root',[1],[1],False,'render')), [])
check('capture-path-inside-out scenario 4', solve('capture-path-inside-out', ([('outer',True)],'leaf',[0],[False],True,'event')), ['outer'])
check('capture-path-inside-out scenario 5', solve('capture-path-inside-out', ([('outer',True),('inner',True)],'leaf',[1,2],[1],True,'render')), ['inner','outer'])
check('capture-path-inside-out scenario 6', solve('capture-path-inside-out', ([('outer',False),('inner',True)],'leaf',[],[],False,'async')), ['inner'])
check('reported-error-dedup scenario 1', solve('reported-error-dedup', ([('outer',True),('inner',True)],'inner',[N],[N-1],False,'render')), True)
check('reported-error-dedup scenario 2', solve('reported-error-dedup', ([('outer',True),('inner',False)],'leaf',[],[],False,'render')), True)
check('reported-error-dedup scenario 3', solve('reported-error-dedup', ([], 'root',[1],[1],False,'render')), True)
check('reported-error-dedup scenario 4', solve('reported-error-dedup', ([('outer',True)],'leaf',[0],[False],True,'event')), False)
check('reported-error-dedup scenario 5', solve('reported-error-dedup', ([('outer',True),('inner',True)],'leaf',[1,2],[1],True,'render')), False)
check('reported-error-dedup scenario 6', solve('reported-error-dedup', ([('outer',False),('inner',True)],'leaf',[],[],False,'async')), True)
check('boundary-disabled-fallback scenario 1', solve('boundary-disabled-fallback', ([('outer',True),('inner',True)],'inner',[N],[N-1],False,'render')), [])
check('boundary-disabled-fallback scenario 2', solve('boundary-disabled-fallback', ([('outer',True),('inner',False)],'leaf',[],[],False,'render')), ['inner'])
check('boundary-disabled-fallback scenario 3', solve('boundary-disabled-fallback', ([], 'root',[1],[1],False,'render')), [])
check('boundary-disabled-fallback scenario 4', solve('boundary-disabled-fallback', ([('outer',True)],'leaf',[0],[False],True,'event')), [])
check('boundary-disabled-fallback scenario 5', solve('boundary-disabled-fallback', ([('outer',True),('inner',True)],'leaf',[1,2],[1],True,'render')), [])
check('boundary-disabled-fallback scenario 6', solve('boundary-disabled-fallback', ([('outer',False),('inner',True)],'leaf',[],[],False,'async')), ['outer'])
check('reset-clears-handled-marker scenario 1', solve('reset-clears-handled-marker', ([('outer',True),('inner',True)],'inner',[N],[N-1],False,'render')), False)
check('reset-clears-handled-marker scenario 2', solve('reset-clears-handled-marker', ([('outer',True),('inner',False)],'leaf',[],[],False,'render')), False)
check('reset-clears-handled-marker scenario 3', solve('reset-clears-handled-marker', ([], 'root',[1],[1],False,'render')), False)
check('reset-clears-handled-marker scenario 4', solve('reset-clears-handled-marker', ([('outer',True)],'leaf',[0],[False],True,'event')), True)
check('reset-clears-handled-marker scenario 5', solve('reset-clears-handled-marker', ([('outer',True),('inner',True)],'leaf',[1,2],[1],True,'render')), False)
check('reset-clears-handled-marker scenario 6', solve('reset-clears-handled-marker', ([('outer',False),('inner',True)],'leaf',[],[],False,'async')), False)
check('event-error-propagation scenario 1', solve('event-error-propagation', ([('outer',True),('inner',True)],'inner',[N],[N-1],False,'render')), 'boundary')
check('event-error-propagation scenario 2', solve('event-error-propagation', ([('outer',True),('inner',False)],'leaf',[],[],False,'render')), 'boundary')
check('event-error-propagation scenario 3', solve('event-error-propagation', ([], 'root',[1],[1],False,'render')), 'boundary')
check('event-error-propagation scenario 4', solve('event-error-propagation', ([('outer',True)],'leaf',[0],[False],True,'event')), 'caller')
check('event-error-propagation scenario 5', solve('event-error-propagation', ([('outer',True),('inner',True)],'leaf',[1,2],[1],True,'render')), 'boundary')
check('event-error-propagation scenario 6', solve('event-error-propagation', ([('outer',False),('inner',True)],'leaf',[],[],False,'async')), 'caller')
check('only disabled ancestor cannot intercept failure: nearest-eligible-boundary', solve('nearest-eligible-boundary', ([('outer',False)],'leaf',[],[],False,'render')), None)
check('only disabled ancestor cannot intercept failure: boundary-cannot-catch-itself', solve('boundary-cannot-catch-itself', ([('outer',False)],'leaf',[],[],False,'render')), [])
check('only disabled ancestor cannot intercept failure: reset-key-type-and-length', solve('reset-key-type-and-length', ([('outer',False)],'leaf',[],[],False,'render')), False)
check('only disabled ancestor cannot intercept failure: render-only-catch', solve('render-only-catch', ([('outer',False)],'leaf',[],[],False,'render')), True)
check('only disabled ancestor cannot intercept failure: unhandled-root-escalation', solve('unhandled-root-escalation', ([('outer',False)],'leaf',[],[],False,'render')), True)
check('only disabled ancestor cannot intercept failure: capture-path-inside-out', solve('capture-path-inside-out', ([('outer',False)],'leaf',[],[],False,'render')), [])
check('only disabled ancestor cannot intercept failure: reported-error-dedup', solve('reported-error-dedup', ([('outer',False)],'leaf',[],[],False,'render')), True)
check('only disabled ancestor cannot intercept failure: boundary-disabled-fallback', solve('boundary-disabled-fallback', ([('outer',False)],'leaf',[],[],False,'render')), ['outer'])
check('only disabled ancestor cannot intercept failure: reset-clears-handled-marker', solve('reset-clears-handled-marker', ([('outer',False)],'leaf',[],[],False,'render')), False)
check('only disabled ancestor cannot intercept failure: event-error-propagation', solve('event-error-propagation', ([('outer',False)],'leaf',[],[],False,'render')), 'boundary')
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)

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

N = 1
observations = []
def solve(operation, s):
    ancestors, failed, reset_keys, previous_keys, handled, event_kind = s
    if operation == 'nearest-eligible-boundary':
        return next((k for k,enabled in reversed(ancestors) if enabled and k!=failed),None)
    if operation == 'boundary-cannot-catch-itself':
        return [k for k,enabled in ancestors if enabled and k!=failed]
    if operation == 'reset-key-type-and-length':
        return len(reset_keys)!=len(previous_keys) or any(type(a)!=type(b) or a!=b for a,b in zip(reset_keys,previous_keys))
    if operation == 'render-only-catch':
        return event_kind!='async'
    if operation == 'unhandled-root-escalation':
        return not any(enabled and k!=failed for k,enabled in ancestors)
    if operation == 'capture-path-inside-out':
        return [k for k,enabled in reversed(ancestors) if enabled and k!=failed]
    if operation == 'reported-error-dedup':
        return not handled
    if operation == 'boundary-disabled-fallback':
        return [k for k,enabled in ancestors if not enabled]
    if operation == 'reset-clears-handled-marker':
        return handled and reset_keys==previous_keys
    if operation == 'event-error-propagation':
        return 'caller' if event_kind!='render' else 'boundary'
    raise ValueError('unknown modeled operation')
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('nearest-eligible-boundary scenario 1', solve('nearest-eligible-boundary', ([('outer',True),('inner',True)],'inner',[N],[N-1],False,'render')), 'outer')
check('nearest-eligible-boundary scenario 2', solve('nearest-eligible-boundary', ([('outer',True),('inner',False)],'leaf',[],[],False,'render')), 'outer')
check('nearest-eligible-boundary scenario 3', solve('nearest-eligible-boundary', ([], 'root',[1],[1],False,'render')), None)
check('nearest-eligible-boundary scenario 4', solve('nearest-eligible-boundary', ([('outer',True)],'leaf',[0],[False],True,'event')), 'outer')
check('nearest-eligible-boundary scenario 5', solve('nearest-eligible-boundary', ([('outer',True),('inner',True)],'leaf',[1,2],[1],True,'render')), 'inner')
check('nearest-eligible-boundary scenario 6', solve('nearest-eligible-boundary', ([('outer',False),('inner',True)],'leaf',[],[],False,'async')), 'inner')
check('boundary-cannot-catch-itself scenario 1', solve('boundary-cannot-catch-itself', ([('outer',True),('inner',True)],'inner',[N],[N-1],False,'render')), ['outer'])
check('boundary-cannot-catch-itself scenario 2', solve('boundary-cannot-catch-itself', ([('outer',True),('inner',False)],'leaf',[],[],False,'render')), ['outer'])
check('boundary-cannot-catch-itself scenario 3', solve('boundary-cannot-catch-itself', ([], 'root',[1],[1],False,'render')), [])
check('boundary-cannot-catch-itself scenario 4', solve('boundary-cannot-catch-itself', ([('outer',True)],'leaf',[0],[False],True,'event')), ['outer'])
check('boundary-cannot-catch-itself scenario 5', solve('boundary-cannot-catch-itself', ([('outer',True),('inner',True)],'leaf',[1,2],[1],True,'render')), ['outer','inner'])
check('boundary-cannot-catch-itself scenario 6', solve('boundary-cannot-catch-itself', ([('outer',False),('inner',True)],'leaf',[],[],False,'async')), ['inner'])
check('reset-key-type-and-length scenario 1', solve('reset-key-type-and-length', ([('outer',True),('inner',True)],'inner',[N],[N-1],False,'render')), True)
check('reset-key-type-and-length scenario 2', solve('reset-key-type-and-length', ([('outer',True),('inner',False)],'leaf',[],[],False,'render')), False)
check('reset-key-type-and-length scenario 3', solve('reset-key-type-and-length', ([], 'root',[1],[1],False,'render')), False)
check('reset-key-type-and-length scenario 4', solve('reset-key-type-and-length', ([('outer',True)],'leaf',[0],[False],True,'event')), True)
check('reset-key-type-and-length scenario 5', solve('reset-key-type-and-length', ([('outer',True),('inner',True)],'leaf',[1,2],[1],True,'render')), True)
check('reset-key-type-and-length scenario 6', solve('reset-key-type-and-length', ([('outer',False),('inner',True)],'leaf',[],[],False,'async')), False)
check('render-only-catch scenario 1', solve('render-only-catch', ([('outer',True),('inner',True)],'inner',[N],[N-1],False,'render')), True)
check('render-only-catch scenario 2', solve('render-only-catch', ([('outer',True),('inner',False)],'leaf',[],[],False,'render')), True)
check('render-only-catch scenario 3', solve('render-only-catch', ([], 'root',[1],[1],False,'render')), True)
check('render-only-catch scenario 4', solve('render-only-catch', ([('outer',True)],'leaf',[0],[False],True,'event')), False)
check('render-only-catch scenario 5', solve('render-only-catch', ([('outer',True),('inner',True)],'leaf',[1,2],[1],True,'render')), True)
check('render-only-catch scenario 6', solve('render-only-catch', ([('outer',False),('inner',True)],'leaf',[],[],False,'async')), False)
check('unhandled-root-escalation scenario 1', solve('unhandled-root-escalation', ([('outer',True),('inner',True)],'inner',[N],[N-1],False,'render')), False)
check('unhandled-root-escalation scenario 2', solve('unhandled-root-escalation', ([('outer',True),('inner',False)],'leaf',[],[],False,'render')), False)
check('unhandled-root-escalation scenario 3', solve('unhandled-root-escalation', ([], 'root',[1],[1],False,'render')), True)
check('unhandled-root-escalation scenario 4', solve('unhandled-root-escalation', ([('outer',True)],'leaf',[0],[False],True,'event')), False)
check('unhandled-root-escalation scenario 5', solve('unhandled-root-escalation', ([('outer',True),('inner',True)],'leaf',[1,2],[1],True,'render')), False)
check('unhandled-root-escalation scenario 6', solve('unhandled-root-escalation', ([('outer',False),('inner',True)],'leaf',[],[],False,'async')), False)
check('capture-path-inside-out scenario 1', solve('capture-path-inside-out', ([('outer',True),('inner',True)],'inner',[N],[N-1],False,'render')), ['outer'])
check('capture-path-inside-out scenario 2', solve('capture-path-inside-out', ([('outer',True),('inner',False)],'leaf',[],[],False,'render')), ['outer'])
check('capture-path-inside-out scenario 3', solve('capture-path-inside-out', ([], 'root',[1],[1],False,'render')), [])
check('capture-path-inside-out scenario 4', solve('capture-path-inside-out', ([('outer',True)],'leaf',[0],[False],True,'event')), ['outer'])
check('capture-path-inside-out scenario 5', solve('capture-path-inside-out', ([('outer',True),('inner',True)],'leaf',[1,2],[1],True,'render')), ['inner','outer'])
check('capture-path-inside-out scenario 6', solve('capture-path-inside-out', ([('outer',False),('inner',True)],'leaf',[],[],False,'async')), ['inner'])
check('reported-error-dedup scenario 1', solve('reported-error-dedup', ([('outer',True),('inner',True)],'inner',[N],[N-1],False,'render')), True)
check('reported-error-dedup scenario 2', solve('reported-error-dedup', ([('outer',True),('inner',False)],'leaf',[],[],False,'render')), True)
check('reported-error-dedup scenario 3', solve('reported-error-dedup', ([], 'root',[1],[1],False,'render')), True)
check('reported-error-dedup scenario 4', solve('reported-error-dedup', ([('outer',True)],'leaf',[0],[False],True,'event')), False)
check('reported-error-dedup scenario 5', solve('reported-error-dedup', ([('outer',True),('inner',True)],'leaf',[1,2],[1],True,'render')), False)
check('reported-error-dedup scenario 6', solve('reported-error-dedup', ([('outer',False),('inner',True)],'leaf',[],[],False,'async')), True)
check('boundary-disabled-fallback scenario 1', solve('boundary-disabled-fallback', ([('outer',True),('inner',True)],'inner',[N],[N-1],False,'render')), [])
check('boundary-disabled-fallback scenario 2', solve('boundary-disabled-fallback', ([('outer',True),('inner',False)],'leaf',[],[],False,'render')), ['inner'])
check('boundary-disabled-fallback scenario 3', solve('boundary-disabled-fallback', ([], 'root',[1],[1],False,'render')), [])
check('boundary-disabled-fallback scenario 4', solve('boundary-disabled-fallback', ([('outer',True)],'leaf',[0],[False],True,'event')), [])
check('boundary-disabled-fallback scenario 5', solve('boundary-disabled-fallback', ([('outer',True),('inner',True)],'leaf',[1,2],[1],True,'render')), [])
check('boundary-disabled-fallback scenario 6', solve('boundary-disabled-fallback', ([('outer',False),('inner',True)],'leaf',[],[],False,'async')), ['outer'])
check('reset-clears-handled-marker scenario 1', solve('reset-clears-handled-marker', ([('outer',True),('inner',True)],'inner',[N],[N-1],False,'render')), False)
check('reset-clears-handled-marker scenario 2', solve('reset-clears-handled-marker', ([('outer',True),('inner',False)],'leaf',[],[],False,'render')), False)
check('reset-clears-handled-marker scenario 3', solve('reset-clears-handled-marker', ([], 'root',[1],[1],False,'render')), False)
check('reset-clears-handled-marker scenario 4', solve('reset-clears-handled-marker', ([('outer',True)],'leaf',[0],[False],True,'event')), True)
check('reset-clears-handled-marker scenario 5', solve('reset-clears-handled-marker', ([('outer',True),('inner',True)],'leaf',[1,2],[1],True,'render')), False)
check('reset-clears-handled-marker scenario 6', solve('reset-clears-handled-marker', ([('outer',False),('inner',True)],'leaf',[],[],False,'async')), False)
check('event-error-propagation scenario 1', solve('event-error-propagation', ([('outer',True),('inner',True)],'inner',[N],[N-1],False,'render')), 'boundary')
check('event-error-propagation scenario 2', solve('event-error-propagation', ([('outer',True),('inner',False)],'leaf',[],[],False,'render')), 'boundary')
check('event-error-propagation scenario 3', solve('event-error-propagation', ([], 'root',[1],[1],False,'render')), 'boundary')
check('event-error-propagation scenario 4', solve('event-error-propagation', ([('outer',True)],'leaf',[0],[False],True,'event')), 'caller')
check('event-error-propagation scenario 5', solve('event-error-propagation', ([('outer',True),('inner',True)],'leaf',[1,2],[1],True,'render')), 'boundary')
check('event-error-propagation scenario 6', solve('event-error-propagation', ([('outer',False),('inner',True)],'leaf',[],[],False,'async')), 'caller')
check('only disabled ancestor cannot intercept failure: nearest-eligible-boundary', solve('nearest-eligible-boundary', ([('outer',False)],'leaf',[],[],False,'render')), None)
check('only disabled ancestor cannot intercept failure: boundary-cannot-catch-itself', solve('boundary-cannot-catch-itself', ([('outer',False)],'leaf',[],[],False,'render')), [])
check('only disabled ancestor cannot intercept failure: reset-key-type-and-length', solve('reset-key-type-and-length', ([('outer',False)],'leaf',[],[],False,'render')), False)
check('only disabled ancestor cannot intercept failure: render-only-catch', solve('render-only-catch', ([('outer',False)],'leaf',[],[],False,'render')), True)
check('only disabled ancestor cannot intercept failure: unhandled-root-escalation', solve('unhandled-root-escalation', ([('outer',False)],'leaf',[],[],False,'render')), True)
check('only disabled ancestor cannot intercept failure: capture-path-inside-out', solve('capture-path-inside-out', ([('outer',False)],'leaf',[],[],False,'render')), [])
check('only disabled ancestor cannot intercept failure: reported-error-dedup', solve('reported-error-dedup', ([('outer',False)],'leaf',[],[],False,'render')), True)
check('only disabled ancestor cannot intercept failure: boundary-disabled-fallback', solve('boundary-disabled-fallback', ([('outer',False)],'leaf',[],[],False,'render')), ['outer'])
check('only disabled ancestor cannot intercept failure: reset-clears-handled-marker', solve('reset-clears-handled-marker', ([('outer',False)],'leaf',[],[],False,'render')), False)
check('only disabled ancestor cannot intercept failure: event-error-propagation', solve('event-error-propagation', ([('outer',False)],'leaf',[],[],False,'render')), 'boundary')
print(json.dumps({"observations": observations, "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:
Render only catch.

This bounded render boundary model walks ancestors inside-out, excludes a failing boundary from catching itself, and catches render failures only. Reset keys compare shape and scalar types; event and asynchronous failures propagate to their callers. Operation render-only-catch has the six explicit input/output oracles below.

split: open-access


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

N = 1
observations = []
def solve(operation, s):
    ancestors, failed, reset_keys, previous_keys, handled, event_kind = s
    if operation == 'nearest-eligible-boundary':
        return next((k for k,enabled in reversed(ancestors) if enabled and k!=failed),None)
    if operation == 'boundary-cannot-catch-itself':
        return [k for k,enabled in ancestors if enabled and k!=failed]
    if operation == 'reset-key-type-and-length':
        return len(reset_keys)!=len(previous_keys) or any(type(a)!=type(b) or a!=b for a,b in zip(reset_keys,previous_keys))
    if operation == 'render-only-catch':
        return event_kind=='render'
    if operation == 'unhandled-root-escalation':
        return not ancestors
    if operation == 'capture-path-inside-out':
        return [k for k,enabled in reversed(ancestors) if enabled and k!=failed]
    if operation == 'reported-error-dedup':
        return not handled
    if operation == 'boundary-disabled-fallback':
        return [k for k,enabled in ancestors if not enabled]
    if operation == 'reset-clears-handled-marker':
        return handled and reset_keys==previous_keys
    if operation == 'event-error-propagation':
        return 'caller' if event_kind!='render' else 'boundary'
    raise ValueError('unknown modeled operation')
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('nearest-eligible-boundary scenario 1', solve('nearest-eligible-boundary', ([('outer',True),('inner',True)],'inner',[N],[N-1],False,'render')), 'outer')
check('nearest-eligible-boundary scenario 2', solve('nearest-eligible-boundary', ([('outer',True),('inner',False)],'leaf',[],[],False,'render')), 'outer')
check('nearest-eligible-boundary scenario 3', solve('nearest-eligible-boundary', ([], 'root',[1],[1],False,'render')), None)
check('nearest-eligible-boundary scenario 4', solve('nearest-eligible-boundary', ([('outer',True)],'leaf',[0],[False],True,'event')), 'outer')
check('nearest-eligible-boundary scenario 5', solve('nearest-eligible-boundary', ([('outer',True),('inner',True)],'leaf',[1,2],[1],True,'render')), 'inner')
check('nearest-eligible-boundary scenario 6', solve('nearest-eligible-boundary', ([('outer',False),('inner',True)],'leaf',[],[],False,'async')), 'inner')
check('boundary-cannot-catch-itself scenario 1', solve('boundary-cannot-catch-itself', ([('outer',True),('inner',True)],'inner',[N],[N-1],False,'render')), ['outer'])
check('boundary-cannot-catch-itself scenario 2', solve('boundary-cannot-catch-itself', ([('outer',True),('inner',False)],'leaf',[],[],False,'render')), ['outer'])
check('boundary-cannot-catch-itself scenario 3', solve('boundary-cannot-catch-itself', ([], 'root',[1],[1],False,'render')), [])
check('boundary-cannot-catch-itself scenario 4', solve('boundary-cannot-catch-itself', ([('outer',True)],'leaf',[0],[False],True,'event')), ['outer'])
check('boundary-cannot-catch-itself scenario 5', solve('boundary-cannot-catch-itself', ([('outer',True),('inner',True)],'leaf',[1,2],[1],True,'render')), ['outer','inner'])
check('boundary-cannot-catch-itself scenario 6', solve('boundary-cannot-catch-itself', ([('outer',False),('inner',True)],'leaf',[],[],False,'async')), ['inner'])
check('reset-key-type-and-length scenario 1', solve('reset-key-type-and-length', ([('outer',True),('inner',True)],'inner',[N],[N-1],False,'render')), True)
check('reset-key-type-and-length scenario 2', solve('reset-key-type-and-length', ([('outer',True),('inner',False)],'leaf',[],[],False,'render')), False)
check('reset-key-type-and-length scenario 3', solve('reset-key-type-and-length', ([], 'root',[1],[1],False,'render')), False)
check('reset-key-type-and-length scenario 4', solve('reset-key-type-and-length', ([('outer',True)],'leaf',[0],[False],True,'event')), True)
check('reset-key-type-and-length scenario 5', solve('reset-key-type-and-length', ([('outer',True),('inner',True)],'leaf',[1,2],[1],True,'render')), True)
check('reset-key-type-and-length scenario 6', solve('reset-key-type-and-length', ([('outer',False),('inner',True)],'leaf',[],[],False,'async')), False)
check('render-only-catch scenario 1', solve('render-only-catch', ([('outer',True),('inner',True)],'inner',[N],[N-1],False,'render')), True)
check('render-only-catch scenario 2', solve('render-only-catch', ([('outer',True),('inner',False)],'leaf',[],[],False,'render')), True)
check('render-only-catch scenario 3', solve('render-only-catch', ([], 'root',[1],[1],False,'render')), True)
check('render-only-catch scenario 4', solve('render-only-catch', ([('outer',True)],'leaf',[0],[False],True,'event')), False)
check('render-only-catch scenario 5', solve('render-only-catch', ([('outer',True),('inner',True)],'leaf',[1,2],[1],True,'render')), True)
check('render-only-catch scenario 6', solve('render-only-catch', ([('outer',False),('inner',True)],'leaf',[],[],False,'async')), False)
check('unhandled-root-escalation scenario 1', solve('unhandled-root-escalation', ([('outer',True),('inner',True)],'inner',[N],[N-1],False,'render')), False)
check('unhandled-root-escalation scenario 2', solve('unhandled-root-escalation', ([('outer',True),('inner',False)],'leaf',[],[],False,'render')), False)
check('unhandled-root-escalation scenario 3', solve('unhandled-root-escalation', ([], 'root',[1],[1],False,'render')), True)
check('unhandled-root-escalation scenario 4', solve('unhandled-root-escalation', ([('outer',True)],'leaf',[0],[False],True,'event')), False)
check('unhandled-root-escalation scenario 5', solve('unhandled-root-escalation', ([('outer',True),('inner',True)],'leaf',[1,2],[1],True,'render')), False)
check('unhandled-root-escalation scenario 6', solve('unhandled-root-escalation', ([('outer',False),('inner',True)],'leaf',[],[],False,'async')), False)
check('capture-path-inside-out scenario 1', solve('capture-path-inside-out', ([('outer',True),('inner',True)],'inner',[N],[N-1],False,'render')), ['outer'])
check('capture-path-inside-out scenario 2', solve('capture-path-inside-out', ([('outer',True),('inner',False)],'leaf',[],[],False,'render')), ['outer'])
check('capture-path-inside-out scenario 3', solve('capture-path-inside-out', ([], 'root',[1],[1],False,'render')), [])
check('capture-path-inside-out scenario 4', solve('capture-path-inside-out', ([('outer',True)],'leaf',[0],[False],True,'event')), ['outer'])
check('capture-path-inside-out scenario 5', solve('capture-path-inside-out', ([('outer',True),('inner',True)],'leaf',[1,2],[1],True,'render')), ['inner','outer'])
check('capture-path-inside-out scenario 6', solve('capture-path-inside-out', ([('outer',False),('inner',True)],'leaf',[],[],False,'async')), ['inner'])
check('reported-error-dedup scenario 1', solve('reported-error-dedup', ([('outer',True),('inner',True)],'inner',[N],[N-1],False,'render')), True)
check('reported-error-dedup scenario 2', solve('reported-error-dedup', ([('outer',True),('inner',False)],'leaf',[],[],False,'render')), True)
check('reported-error-dedup scenario 3', solve('reported-error-dedup', ([], 'root',[1],[1],False,'render')), True)
check('reported-error-dedup scenario 4', solve('reported-error-dedup', ([('outer',True)],'leaf',[0],[False],True,'event')), False)
check('reported-error-dedup scenario 5', solve('reported-error-dedup', ([('outer',True),('inner',True)],'leaf',[1,2],[1],True,'render')), False)
check('reported-error-dedup scenario 6', solve('reported-error-dedup', ([('outer',False),('inner',True)],'leaf',[],[],False,'async')), True)
check('boundary-disabled-fallback scenario 1', solve('boundary-disabled-fallback', ([('outer',True),('inner',True)],'inner',[N],[N-1],False,'render')), [])
check('boundary-disabled-fallback scenario 2', solve('boundary-disabled-fallback', ([('outer',True),('inner',False)],'leaf',[],[],False,'render')), ['inner'])
check('boundary-disabled-fallback scenario 3', solve('boundary-disabled-fallback', ([], 'root',[1],[1],False,'render')), [])
check('boundary-disabled-fallback scenario 4', solve('boundary-disabled-fallback', ([('outer',True)],'leaf',[0],[False],True,'event')), [])
check('boundary-disabled-fallback scenario 5', solve('boundary-disabled-fallback', ([('outer',True),('inner',True)],'leaf',[1,2],[1],True,'render')), [])
check('boundary-disabled-fallback scenario 6', solve('boundary-disabled-fallback', ([('outer',False),('inner',True)],'leaf',[],[],False,'async')), ['outer'])
check('reset-clears-handled-marker scenario 1', solve('reset-clears-handled-marker', ([('outer',True),('inner',True)],'inner',[N],[N-1],False,'render')), False)
check('reset-clears-handled-marker scenario 2', solve('reset-clears-handled-marker', ([('outer',True),('inner',False)],'leaf',[],[],False,'render')), False)
check('reset-clears-handled-marker scenario 3', solve('reset-clears-handled-marker', ([], 'root',[1],[1],False,'render')), False)
check('reset-clears-handled-marker scenario 4', solve('reset-clears-handled-marker', ([('outer',True)],'leaf',[0],[False],True,'event')), True)
check('reset-clears-handled-marker scenario 5', solve('reset-clears-handled-marker', ([('outer',True),('inner',True)],'leaf',[1,2],[1],True,'render')), False)
check('reset-clears-handled-marker scenario 6', solve('reset-clears-handled-marker', ([('outer',False),('inner',True)],'leaf',[],[],False,'async')), False)
check('event-error-propagation scenario 1', solve('event-error-propagation', ([('outer',True),('inner',True)],'inner',[N],[N-1],False,'render')), 'boundary')
check('event-error-propagation scenario 2', solve('event-error-propagation', ([('outer',True),('inner',False)],'leaf',[],[],False,'render')), 'boundary')
check('event-error-propagation scenario 3', solve('event-error-propagation', ([], 'root',[1],[1],False,'render')), 'boundary')
check('event-error-propagation scenario 4', solve('event-error-propagation', ([('outer',True)],'leaf',[0],[False],True,'event')), 'caller')
check('event-error-propagation scenario 5', solve('event-error-propagation', ([('outer',True),('inner',True)],'leaf',[1,2],[1],True,'render')), 'boundary')
check('event-error-propagation scenario 6', solve('event-error-propagation', ([('outer',False),('inner',True)],'leaf',[],[],False,'async')), 'caller')
check('only disabled ancestor cannot intercept failure: nearest-eligible-boundary', solve('nearest-eligible-boundary', ([('outer',False)],'leaf',[],[],False,'render')), None)
check('only disabled ancestor cannot intercept failure: boundary-cannot-catch-itself', solve('boundary-cannot-catch-itself', ([('outer',False)],'leaf',[],[],False,'render')), [])
check('only disabled ancestor cannot intercept failure: reset-key-type-and-length', solve('reset-key-type-and-length', ([('outer',False)],'leaf',[],[],False,'render')), False)
check('only disabled ancestor cannot intercept failure: render-only-catch', solve('render-only-catch', ([('outer',False)],'leaf',[],[],False,'render')), True)
check('only disabled ancestor cannot intercept failure: unhandled-root-escalation', solve('unhandled-root-escalation', ([('outer',False)],'leaf',[],[],False,'render')), True)
check('only disabled ancestor cannot intercept failure: capture-path-inside-out', solve('capture-path-inside-out', ([('outer',False)],'leaf',[],[],False,'render')), [])
check('only disabled ancestor cannot intercept failure: reported-error-dedup', solve('reported-error-dedup', ([('outer',False)],'leaf',[],[],False,'render')), True)
check('only disabled ancestor cannot intercept failure: boundary-disabled-fallback', solve('boundary-disabled-fallback', ([('outer',False)],'leaf',[],[],False,'render')), ['outer'])
check('only disabled ancestor cannot intercept failure: reset-clears-handled-marker', solve('reset-clears-handled-marker', ([('outer',False)],'leaf',[],[],False,'render')), False)
check('only disabled ancestor cannot intercept failure: event-error-propagation', solve('event-error-propagation', ([('outer',False)],'leaf',[],[],False,'render')), 'boundary')
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)

meaning: Fixture-count band, not measured model difficulty

deps: stdlib

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

N = 1
observations = []
def solve(operation, s):
    ancestors, failed, reset_keys, previous_keys, handled, event_kind = s
    if operation == 'nearest-eligible-boundary':
        return next((k for k,enabled in reversed(ancestors) if enabled and k!=failed),None)
    if operation == 'boundary-cannot-catch-itself':
        return [k for k,enabled in ancestors if enabled and k!=failed]
    if operation == 'reset-key-type-and-length':
        return len(reset_keys)!=len(previous_keys) or any(type(a)!=type(b) or a!=b for a,b in zip(reset_keys,previous_keys))
    if operation == 'render-only-catch':
        return event_kind=='render'
    if operation == 'unhandled-root-escalation':
        return False
    if operation == 'capture-path-inside-out':
        return [k for k,enabled in reversed(ancestors) if enabled and k!=failed]
    if operation == 'reported-error-dedup':
        return not handled
    if operation == 'boundary-disabled-fallback':
        return [k for k,enabled in ancestors if not enabled]
    if operation == 'reset-clears-handled-marker':
        return handled and reset_keys==previous_keys
    if operation == 'event-error-propagation':
        return 'caller' if event_kind!='render' else 'boundary'
    raise ValueError('unknown modeled operation')
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('nearest-eligible-boundary scenario 1', solve('nearest-eligible-boundary', ([('outer',True),('inner',True)],'inner',[N],[N-1],False,'render')), 'outer')
check('nearest-eligible-boundary scenario 2', solve('nearest-eligible-boundary', ([('outer',True),('inner',False)],'leaf',[],[],False,'render')), 'outer')
check('nearest-eligible-boundary scenario 3', solve('nearest-eligible-boundary', ([], 'root',[1],[1],False,'render')), None)
check('nearest-eligible-boundary scenario 4', solve('nearest-eligible-boundary', ([('outer',True)],'leaf',[0],[False],True,'event')), 'outer')
check('nearest-eligible-boundary scenario 5', solve('nearest-eligible-boundary', ([('outer',True),('inner',True)],'leaf',[1,2],[1],True,'render')), 'inner')
check('nearest-eligible-boundary scenario 6', solve('nearest-eligible-boundary', ([('outer',False),('inner',True)],'leaf',[],[],False,'async')), 'inner')
check('boundary-cannot-catch-itself scenario 1', solve('boundary-cannot-catch-itself', ([('outer',True),('inner',True)],'inner',[N],[N-1],False,'render')), ['outer'])
check('boundary-cannot-catch-itself scenario 2', solve('boundary-cannot-catch-itself', ([('outer',True),('inner',False)],'leaf',[],[],False,'render')), ['outer'])
check('boundary-cannot-catch-itself scenario 3', solve('boundary-cannot-catch-itself', ([], 'root',[1],[1],False,'render')), [])
check('boundary-cannot-catch-itself scenario 4', solve('boundary-cannot-catch-itself', ([('outer',True)],'leaf',[0],[False],True,'event')), ['outer'])
check('boundary-cannot-catch-itself scenario 5', solve('boundary-cannot-catch-itself', ([('outer',True),('inner',True)],'leaf',[1,2],[1],True,'render')), ['outer','inner'])
check('boundary-cannot-catch-itself scenario 6', solve('boundary-cannot-catch-itself', ([('outer',False),('inner',True)],'leaf',[],[],False,'async')), ['inner'])
check('reset-key-type-and-length scenario 1', solve('reset-key-type-and-length', ([('outer',True),('inner',True)],'inner',[N],[N-1],False,'render')), True)
check('reset-key-type-and-length scenario 2', solve('reset-key-type-and-length', ([('outer',True),('inner',False)],'leaf',[],[],False,'render')), False)
check('reset-key-type-and-length scenario 3', solve('reset-key-type-and-length', ([], 'root',[1],[1],False,'render')), False)
check('reset-key-type-and-length scenario 4', solve('reset-key-type-and-length', ([('outer',True)],'leaf',[0],[False],True,'event')), True)
check('reset-key-type-and-length scenario 5', solve('reset-key-type-and-length', ([('outer',True),('inner',True)],'leaf',[1,2],[1],True,'render')), True)
check('reset-key-type-and-length scenario 6', solve('reset-key-type-and-length', ([('outer',False),('inner',True)],'leaf',[],[],False,'async')), False)
check('render-only-catch scenario 1', solve('render-only-catch', ([('outer',True),('inner',True)],'inner',[N],[N-1],False,'render')), True)
check('render-only-catch scenario 2', solve('render-only-catch', ([('outer',True),('inner',False)],'leaf',[],[],False,'render')), True)
check('render-only-catch scenario 3', solve('render-only-catch', ([], 'root',[1],[1],False,'render')), True)
check('render-only-catch scenario 4', solve('render-only-catch', ([('outer',True)],'leaf',[0],[False],True,'event')), False)
check('render-only-catch scenario 5', solve('render-only-catch', ([('outer',True),('inner',True)],'leaf',[1,2],[1],True,'render')), True)
check('render-only-catch scenario 6', solve('render-only-catch', ([('outer',False),('inner',True)],'leaf',[],[],False,'async')), False)
check('unhandled-root-escalation scenario 1', solve('unhandled-root-escalation', ([('outer',True),('inner',True)],'inner',[N],[N-1],False,'render')), False)
check('unhandled-root-escalation scenario 2', solve('unhandled-root-escalation', ([('outer',True),('inner',False)],'leaf',[],[],False,'render')), False)
check('unhandled-root-escalation scenario 3', solve('unhandled-root-escalation', ([], 'root',[1],[1],False,'render')), True)
check('unhandled-root-escalation scenario 4', solve('unhandled-root-escalation', ([('outer',True)],'leaf',[0],[False],True,'event')), False)
check('unhandled-root-escalation scenario 5', solve('unhandled-root-escalation', ([('outer',True),('inner',True)],'leaf',[1,2],[1],True,'render')), False)
check('unhandled-root-escalation scenario 6', solve('unhandled-root-escalation', ([('outer',False),('inner',True)],'leaf',[],[],False,'async')), False)
check('capture-path-inside-out scenario 1', solve('capture-path-inside-out', ([('outer',True),('inner',True)],'inner',[N],[N-1],False,'render')), ['outer'])
check('capture-path-inside-out scenario 2', solve('capture-path-inside-out', ([('outer',True),('inner',False)],'leaf',[],[],False,'render')), ['outer'])
check('capture-path-inside-out scenario 3', solve('capture-path-inside-out', ([], 'root',[1],[1],False,'render')), [])
check('capture-path-inside-out scenario 4', solve('capture-path-inside-out', ([('outer',True)],'leaf',[0],[False],True,'event')), ['outer'])
check('capture-path-inside-out scenario 5', solve('capture-path-inside-out', ([('outer',True),('inner',True)],'leaf',[1,2],[1],True,'render')), ['inner','outer'])
check('capture-path-inside-out scenario 6', solve('capture-path-inside-out', ([('outer',False),('inner',True)],'leaf',[],[],False,'async')), ['inner'])
check('reported-error-dedup scenario 1', solve('reported-error-dedup', ([('outer',True),('inner',True)],'inner',[N],[N-1],False,'render')), True)
check('reported-error-dedup scenario 2', solve('reported-error-dedup', ([('outer',True),('inner',False)],'leaf',[],[],False,'render')), True)
check('reported-error-dedup scenario 3', solve('reported-error-dedup', ([], 'root',[1],[1],False,'render')), True)
check('reported-error-dedup scenario 4', solve('reported-error-dedup', ([('outer',True)],'leaf',[0],[False],True,'event')), False)
check('reported-error-dedup scenario 5', solve('reported-error-dedup', ([('outer',True),('inner',True)],'leaf',[1,2],[1],True,'render')), False)
check('reported-error-dedup scenario 6', solve('reported-error-dedup', ([('outer',False),('inner',True)],'leaf',[],[],False,'async')), True)
check('boundary-disabled-fallback scenario 1', solve('boundary-disabled-fallback', ([('outer',True),('inner',True)],'inner',[N],[N-1],False,'render')), [])
check('boundary-disabled-fallback scenario 2', solve('boundary-disabled-fallback', ([('outer',True),('inner',False)],'leaf',[],[],False,'render')), ['inner'])
check('boundary-disabled-fallback scenario 3', solve('boundary-disabled-fallback', ([], 'root',[1],[1],False,'render')), [])
check('boundary-disabled-fallback scenario 4', solve('boundary-disabled-fallback', ([('outer',True)],'leaf',[0],[False],True,'event')), [])
check('boundary-disabled-fallback scenario 5', solve('boundary-disabled-fallback', ([('outer',True),('inner',True)],'leaf',[1,2],[1],True,'render')), [])
check('boundary-disabled-fallback scenario 6', solve('boundary-disabled-fallback', ([('outer',False),('inner',True)],'leaf',[],[],False,'async')), ['outer'])
check('reset-clears-handled-marker scenario 1', solve('reset-clears-handled-marker', ([('outer',True),('inner',True)],'inner',[N],[N-1],False,'render')), False)
check('reset-clears-handled-marker scenario 2', solve('reset-clears-handled-marker', ([('outer',True),('inner',False)],'leaf',[],[],False,'render')), False)
check('reset-clears-handled-marker scenario 3', solve('reset-clears-handled-marker', ([], 'root',[1],[1],False,'render')), False)
check('reset-clears-handled-marker scenario 4', solve('reset-clears-handled-marker', ([('outer',True)],'leaf',[0],[False],True,'event')), True)
check('reset-clears-handled-marker scenario 5', solve('reset-clears-handled-marker', ([('outer',True),('inner',True)],'leaf',[1,2],[1],True,'render')), False)
check('reset-clears-handled-marker scenario 6', solve('reset-clears-handled-marker', ([('outer',False),('inner',True)],'leaf',[],[],False,'async')), False)
check('event-error-propagation scenario 1', solve('event-error-propagation', ([('outer',True),('inner',True)],'inner',[N],[N-1],False,'render')), 'boundary')
check('event-error-propagation scenario 2', solve('event-error-propagation', ([('outer',True),('inner',False)],'leaf',[],[],False,'render')), 'boundary')
check('event-error-propagation scenario 3', solve('event-error-propagation', ([], 'root',[1],[1],False,'render')), 'boundary')
check('event-error-propagation scenario 4', solve('event-error-propagation', ([('outer',True)],'leaf',[0],[False],True,'event')), 'caller')
check('event-error-propagation scenario 5', solve('event-error-propagation', ([('outer',True),('inner',True)],'leaf',[1,2],[1],True,'render')), 'boundary')
check('event-error-propagation scenario 6', solve('event-error-propagation', ([('outer',False),('inner',True)],'leaf',[],[],False,'async')), 'caller')
check('only disabled ancestor cannot intercept failure: nearest-eligible-boundary', solve('nearest-eligible-boundary', ([('outer',False)],'leaf',[],[],False,'render')), None)
check('only disabled ancestor cannot intercept failure: boundary-cannot-catch-itself', solve('boundary-cannot-catch-itself', ([('outer',False)],'leaf',[],[],False,'render')), [])
check('only disabled ancestor cannot intercept failure: reset-key-type-and-length', solve('reset-key-type-and-length', ([('outer',False)],'leaf',[],[],False,'render')), False)
check('only disabled ancestor cannot intercept failure: render-only-catch', solve('render-only-catch', ([('outer',False)],'leaf',[],[],False,'render')), True)
check('only disabled ancestor cannot intercept failure: unhandled-root-escalation', solve('unhandled-root-escalation', ([('outer',False)],'leaf',[],[],False,'render')), True)
check('only disabled ancestor cannot intercept failure: capture-path-inside-out', solve('capture-path-inside-out', ([('outer',False)],'leaf',[],[],False,'render')), [])
check('only disabled ancestor cannot intercept failure: reported-error-dedup', solve('reported-error-dedup', ([('outer',False)],'leaf',[],[],False,'render')), True)
check('only disabled ancestor cannot intercept failure: boundary-disabled-fallback', solve('boundary-disabled-fallback', ([('outer',False)],'leaf',[],[],False,'render')), ['outer'])
check('only disabled ancestor cannot intercept failure: reset-clears-handled-marker', solve('reset-clears-handled-marker', ([('outer',False)],'leaf',[],[],False,'render')), False)
check('only disabled ancestor cannot intercept failure: event-error-propagation', solve('event-error-propagation', ([('outer',False)],'leaf',[],[],False,'render')), 'boundary')
print(json.dumps({"observations": observations, "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:
Unhandled root escalation.

This bounded render boundary model walks ancestors inside-out, excludes a failing boundary from catching itself, and catches render failures only. Reset keys compare shape and scalar types; event and asynchronous failures propagate to their callers. Operation unhandled-root-escalation has the six explicit input/output oracles below.

split: open-access


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

N = 1
observations = []
def solve(operation, s):
    ancestors, failed, reset_keys, previous_keys, handled, event_kind = s
    if operation == 'nearest-eligible-boundary':
        return next((k for k,enabled in reversed(ancestors) if enabled and k!=failed),None)
    if operation == 'boundary-cannot-catch-itself':
        return [k for k,enabled in ancestors if enabled and k!=failed]
    if operation == 'reset-key-type-and-length':
        return len(reset_keys)!=len(previous_keys) or any(type(a)!=type(b) or a!=b for a,b in zip(reset_keys,previous_keys))
    if operation == 'render-only-catch':
        return event_kind=='render'
    if operation == 'unhandled-root-escalation':
        return not any(enabled and k!=failed for k,enabled in ancestors)
    if operation == 'capture-path-inside-out':
        return [k for k,enabled in ancestors if enabled and k!=failed]
    if operation == 'reported-error-dedup':
        return not handled
    if operation == 'boundary-disabled-fallback':
        return [k for k,enabled in ancestors if not enabled]
    if operation == 'reset-clears-handled-marker':
        return handled and reset_keys==previous_keys
    if operation == 'event-error-propagation':
        return 'caller' if event_kind!='render' else 'boundary'
    raise ValueError('unknown modeled operation')
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('nearest-eligible-boundary scenario 1', solve('nearest-eligible-boundary', ([('outer',True),('inner',True)],'inner',[N],[N-1],False,'render')), 'outer')
check('nearest-eligible-boundary scenario 2', solve('nearest-eligible-boundary', ([('outer',True),('inner',False)],'leaf',[],[],False,'render')), 'outer')
check('nearest-eligible-boundary scenario 3', solve('nearest-eligible-boundary', ([], 'root',[1],[1],False,'render')), None)
check('nearest-eligible-boundary scenario 4', solve('nearest-eligible-boundary', ([('outer',True)],'leaf',[0],[False],True,'event')), 'outer')
check('nearest-eligible-boundary scenario 5', solve('nearest-eligible-boundary', ([('outer',True),('inner',True)],'leaf',[1,2],[1],True,'render')), 'inner')
check('nearest-eligible-boundary scenario 6', solve('nearest-eligible-boundary', ([('outer',False),('inner',True)],'leaf',[],[],False,'async')), 'inner')
check('boundary-cannot-catch-itself scenario 1', solve('boundary-cannot-catch-itself', ([('outer',True),('inner',True)],'inner',[N],[N-1],False,'render')), ['outer'])
check('boundary-cannot-catch-itself scenario 2', solve('boundary-cannot-catch-itself', ([('outer',True),('inner',False)],'leaf',[],[],False,'render')), ['outer'])
check('boundary-cannot-catch-itself scenario 3', solve('boundary-cannot-catch-itself', ([], 'root',[1],[1],False,'render')), [])
check('boundary-cannot-catch-itself scenario 4', solve('boundary-cannot-catch-itself', ([('outer',True)],'leaf',[0],[False],True,'event')), ['outer'])
check('boundary-cannot-catch-itself scenario 5', solve('boundary-cannot-catch-itself', ([('outer',True),('inner',True)],'leaf',[1,2],[1],True,'render')), ['outer','inner'])
check('boundary-cannot-catch-itself scenario 6', solve('boundary-cannot-catch-itself', ([('outer',False),('inner',True)],'leaf',[],[],False,'async')), ['inner'])
check('reset-key-type-and-length scenario 1', solve('reset-key-type-and-length', ([('outer',True),('inner',True)],'inner',[N],[N-1],False,'render')), True)
check('reset-key-type-and-length scenario 2', solve('reset-key-type-and-length', ([('outer',True),('inner',False)],'leaf',[],[],False,'render')), False)
check('reset-key-type-and-length scenario 3', solve('reset-key-type-and-length', ([], 'root',[1],[1],False,'render')), False)
check('reset-key-type-and-length scenario 4', solve('reset-key-type-and-length', ([('outer',True)],'leaf',[0],[False],True,'event')), True)
check('reset-key-type-and-length scenario 5', solve('reset-key-type-and-length', ([('outer',True),('inner',True)],'leaf',[1,2],[1],True,'render')), True)
check('reset-key-type-and-length scenario 6', solve('reset-key-type-and-length', ([('outer',False),('inner',True)],'leaf',[],[],False,'async')), False)
check('render-only-catch scenario 1', solve('render-only-catch', ([('outer',True),('inner',True)],'inner',[N],[N-1],False,'render')), True)
check('render-only-catch scenario 2', solve('render-only-catch', ([('outer',True),('inner',False)],'leaf',[],[],False,'render')), True)
check('render-only-catch scenario 3', solve('render-only-catch', ([], 'root',[1],[1],False,'render')), True)
check('render-only-catch scenario 4', solve('render-only-catch', ([('outer',True)],'leaf',[0],[False],True,'event')), False)
check('render-only-catch scenario 5', solve('render-only-catch', ([('outer',True),('inner',True)],'leaf',[1,2],[1],True,'render')), True)
check('render-only-catch scenario 6', solve('render-only-catch', ([('outer',False),('inner',True)],'leaf',[],[],False,'async')), False)
check('unhandled-root-escalation scenario 1', solve('unhandled-root-escalation', ([('outer',True),('inner',True)],'inner',[N],[N-1],False,'render')), False)
check('unhandled-root-escalation scenario 2', solve('unhandled-root-escalation', ([('outer',True),('inner',False)],'leaf',[],[],False,'render')), False)
check('unhandled-root-escalation scenario 3', solve('unhandled-root-escalation', ([], 'root',[1],[1],False,'render')), True)
check('unhandled-root-escalation scenario 4', solve('unhandled-root-escalation', ([('outer',True)],'leaf',[0],[False],True,'event')), False)
check('unhandled-root-escalation scenario 5', solve('unhandled-root-escalation', ([('outer',True),('inner',True)],'leaf',[1,2],[1],True,'render')), False)
check('unhandled-root-escalation scenario 6', solve('unhandled-root-escalation', ([('outer',False),('inner',True)],'leaf',[],[],False,'async')), False)
check('capture-path-inside-out scenario 1', solve('capture-path-inside-out', ([('outer',True),('inner',True)],'inner',[N],[N-1],False,'render')), ['outer'])
check('capture-path-inside-out scenario 2', solve('capture-path-inside-out', ([('outer',True),('inner',False)],'leaf',[],[],False,'render')), ['outer'])
check('capture-path-inside-out scenario 3', solve('capture-path-inside-out', ([], 'root',[1],[1],False,'render')), [])
check('capture-path-inside-out scenario 4', solve('capture-path-inside-out', ([('outer',True)],'leaf',[0],[False],True,'event')), ['outer'])
check('capture-path-inside-out scenario 5', solve('capture-path-inside-out', ([('outer',True),('inner',True)],'leaf',[1,2],[1],True,'render')), ['inner','outer'])
check('capture-path-inside-out scenario 6', solve('capture-path-inside-out', ([('outer',False),('inner',True)],'leaf',[],[],False,'async')), ['inner'])
check('reported-error-dedup scenario 1', solve('reported-error-dedup', ([('outer',True),('inner',True)],'inner',[N],[N-1],False,'render')), True)
check('reported-error-dedup scenario 2', solve('reported-error-dedup', ([('outer',True),('inner',False)],'leaf',[],[],False,'render')), True)
check('reported-error-dedup scenario 3', solve('reported-error-dedup', ([], 'root',[1],[1],False,'render')), True)
check('reported-error-dedup scenario 4', solve('reported-error-dedup', ([('outer',True)],'leaf',[0],[False],True,'event')), False)
check('reported-error-dedup scenario 5', solve('reported-error-dedup', ([('outer',True),('inner',True)],'leaf',[1,2],[1],True,'render')), False)
check('reported-error-dedup scenario 6', solve('reported-error-dedup', ([('outer',False),('inner',True)],'leaf',[],[],False,'async')), True)
check('boundary-disabled-fallback scenario 1', solve('boundary-disabled-fallback', ([('outer',True),('inner',True)],'inner',[N],[N-1],False,'render')), [])
check('boundary-disabled-fallback scenario 2', solve('boundary-disabled-fallback', ([('outer',True),('inner',False)],'leaf',[],[],False,'render')), ['inner'])
check('boundary-disabled-fallback scenario 3', solve('boundary-disabled-fallback', ([], 'root',[1],[1],False,'render')), [])
check('boundary-disabled-fallback scenario 4', solve('boundary-disabled-fallback', ([('outer',True)],'leaf',[0],[False],True,'event')), [])
check('boundary-disabled-fallback scenario 5', solve('boundary-disabled-fallback', ([('outer',True),('inner',True)],'leaf',[1,2],[1],True,'render')), [])
check('boundary-disabled-fallback scenario 6', solve('boundary-disabled-fallback', ([('outer',False),('inner',True)],'leaf',[],[],False,'async')), ['outer'])
check('reset-clears-handled-marker scenario 1', solve('reset-clears-handled-marker', ([('outer',True),('inner',True)],'inner',[N],[N-1],False,'render')), False)
check('reset-clears-handled-marker scenario 2', solve('reset-clears-handled-marker', ([('outer',True),('inner',False)],'leaf',[],[],False,'render')), False)
check('reset-clears-handled-marker scenario 3', solve('reset-clears-handled-marker', ([], 'root',[1],[1],False,'render')), False)
check('reset-clears-handled-marker scenario 4', solve('reset-clears-handled-marker', ([('outer',True)],'leaf',[0],[False],True,'event')), True)
check('reset-clears-handled-marker scenario 5', solve('reset-clears-handled-marker', ([('outer',True),('inner',True)],'leaf',[1,2],[1],True,'render')), False)
check('reset-clears-handled-marker scenario 6', solve('reset-clears-handled-marker', ([('outer',False),('inner',True)],'leaf',[],[],False,'async')), False)
check('event-error-propagation scenario 1', solve('event-error-propagation', ([('outer',True),('inner',True)],'inner',[N],[N-1],False,'render')), 'boundary')
check('event-error-propagation scenario 2', solve('event-error-propagation', ([('outer',True),('inner',False)],'leaf',[],[],False,'render')), 'boundary')
check('event-error-propagation scenario 3', solve('event-error-propagation', ([], 'root',[1],[1],False,'render')), 'boundary')
check('event-error-propagation scenario 4', solve('event-error-propagation', ([('outer',True)],'leaf',[0],[False],True,'event')), 'caller')
check('event-error-propagation scenario 5', solve('event-error-propagation', ([('outer',True),('inner',True)],'leaf',[1,2],[1],True,'render')), 'boundary')
check('event-error-propagation scenario 6', solve('event-error-propagation', ([('outer',False),('inner',True)],'leaf',[],[],False,'async')), 'caller')
check('only disabled ancestor cannot intercept failure: nearest-eligible-boundary', solve('nearest-eligible-boundary', ([('outer',False)],'leaf',[],[],False,'render')), None)
check('only disabled ancestor cannot intercept failure: boundary-cannot-catch-itself', solve('boundary-cannot-catch-itself', ([('outer',False)],'leaf',[],[],False,'render')), [])
check('only disabled ancestor cannot intercept failure: reset-key-type-and-length', solve('reset-key-type-and-length', ([('outer',False)],'leaf',[],[],False,'render')), False)
check('only disabled ancestor cannot intercept failure: render-only-catch', solve('render-only-catch', ([('outer',False)],'leaf',[],[],False,'render')), True)
check('only disabled ancestor cannot intercept failure: unhandled-root-escalation', solve('unhandled-root-escalation', ([('outer',False)],'leaf',[],[],False,'render')), True)
check('only disabled ancestor cannot intercept failure: capture-path-inside-out', solve('capture-path-inside-out', ([('outer',False)],'leaf',[],[],False,'render')), [])
check('only disabled ancestor cannot intercept failure: reported-error-dedup', solve('reported-error-dedup', ([('outer',False)],'leaf',[],[],False,'render')), True)
check('only disabled ancestor cannot intercept failure: boundary-disabled-fallback', solve('boundary-disabled-fallback', ([('outer',False)],'leaf',[],[],False,'render')), ['outer'])
check('only disabled ancestor cannot intercept failure: reset-clears-handled-marker', solve('reset-clears-handled-marker', ([('outer',False)],'leaf',[],[],False,'render')), False)
check('only disabled ancestor cannot intercept failure: event-error-propagation', solve('event-error-propagation', ([('outer',False)],'leaf',[],[],False,'render')), 'boundary')
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)

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

N = 1
observations = []
def solve(operation, s):
    ancestors, failed, reset_keys, previous_keys, handled, event_kind = s
    if operation == 'nearest-eligible-boundary':
        return next((k for k,enabled in reversed(ancestors) if enabled and k!=failed),None)
    if operation == 'boundary-cannot-catch-itself':
        return [k for k,enabled in ancestors if enabled and k!=failed]
    if operation == 'reset-key-type-and-length':
        return len(reset_keys)!=len(previous_keys) or any(type(a)!=type(b) or a!=b for a,b in zip(reset_keys,previous_keys))
    if operation == 'render-only-catch':
        return event_kind=='render'
    if operation == 'unhandled-root-escalation':
        return not any(enabled and k!=failed for k,enabled in ancestors)
    if operation == 'capture-path-inside-out':
        return [k for k,enabled in reversed(ancestors)]
    if operation == 'reported-error-dedup':
        return not handled
    if operation == 'boundary-disabled-fallback':
        return [k for k,enabled in ancestors if not enabled]
    if operation == 'reset-clears-handled-marker':
        return handled and reset_keys==previous_keys
    if operation == 'event-error-propagation':
        return 'caller' if event_kind!='render' else 'boundary'
    raise ValueError('unknown modeled operation')
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('nearest-eligible-boundary scenario 1', solve('nearest-eligible-boundary', ([('outer',True),('inner',True)],'inner',[N],[N-1],False,'render')), 'outer')
check('nearest-eligible-boundary scenario 2', solve('nearest-eligible-boundary', ([('outer',True),('inner',False)],'leaf',[],[],False,'render')), 'outer')
check('nearest-eligible-boundary scenario 3', solve('nearest-eligible-boundary', ([], 'root',[1],[1],False,'render')), None)
check('nearest-eligible-boundary scenario 4', solve('nearest-eligible-boundary', ([('outer',True)],'leaf',[0],[False],True,'event')), 'outer')
check('nearest-eligible-boundary scenario 5', solve('nearest-eligible-boundary', ([('outer',True),('inner',True)],'leaf',[1,2],[1],True,'render')), 'inner')
check('nearest-eligible-boundary scenario 6', solve('nearest-eligible-boundary', ([('outer',False),('inner',True)],'leaf',[],[],False,'async')), 'inner')
check('boundary-cannot-catch-itself scenario 1', solve('boundary-cannot-catch-itself', ([('outer',True),('inner',True)],'inner',[N],[N-1],False,'render')), ['outer'])
check('boundary-cannot-catch-itself scenario 2', solve('boundary-cannot-catch-itself', ([('outer',True),('inner',False)],'leaf',[],[],False,'render')), ['outer'])
check('boundary-cannot-catch-itself scenario 3', solve('boundary-cannot-catch-itself', ([], 'root',[1],[1],False,'render')), [])
check('boundary-cannot-catch-itself scenario 4', solve('boundary-cannot-catch-itself', ([('outer',True)],'leaf',[0],[False],True,'event')), ['outer'])
check('boundary-cannot-catch-itself scenario 5', solve('boundary-cannot-catch-itself', ([('outer',True),('inner',True)],'leaf',[1,2],[1],True,'render')), ['outer','inner'])
check('boundary-cannot-catch-itself scenario 6', solve('boundary-cannot-catch-itself', ([('outer',False),('inner',True)],'leaf',[],[],False,'async')), ['inner'])
check('reset-key-type-and-length scenario 1', solve('reset-key-type-and-length', ([('outer',True),('inner',True)],'inner',[N],[N-1],False,'render')), True)
check('reset-key-type-and-length scenario 2', solve('reset-key-type-and-length', ([('outer',True),('inner',False)],'leaf',[],[],False,'render')), False)
check('reset-key-type-and-length scenario 3', solve('reset-key-type-and-length', ([], 'root',[1],[1],False,'render')), False)
check('reset-key-type-and-length scenario 4', solve('reset-key-type-and-length', ([('outer',True)],'leaf',[0],[False],True,'event')), True)
check('reset-key-type-and-length scenario 5', solve('reset-key-type-and-length', ([('outer',True),('inner',True)],'leaf',[1,2],[1],True,'render')), True)
check('reset-key-type-and-length scenario 6', solve('reset-key-type-and-length', ([('outer',False),('inner',True)],'leaf',[],[],False,'async')), False)
check('render-only-catch scenario 1', solve('render-only-catch', ([('outer',True),('inner',True)],'inner',[N],[N-1],False,'render')), True)
check('render-only-catch scenario 2', solve('render-only-catch', ([('outer',True),('inner',False)],'leaf',[],[],False,'render')), True)
check('render-only-catch scenario 3', solve('render-only-catch', ([], 'root',[1],[1],False,'render')), True)
check('render-only-catch scenario 4', solve('render-only-catch', ([('outer',True)],'leaf',[0],[False],True,'event')), False)
check('render-only-catch scenario 5', solve('render-only-catch', ([('outer',True),('inner',True)],'leaf',[1,2],[1],True,'render')), True)
check('render-only-catch scenario 6', solve('render-only-catch', ([('outer',False),('inner',True)],'leaf',[],[],False,'async')), False)
check('unhandled-root-escalation scenario 1', solve('unhandled-root-escalation', ([('outer',True),('inner',True)],'inner',[N],[N-1],False,'render')), False)
check('unhandled-root-escalation scenario 2', solve('unhandled-root-escalation', ([('outer',True),('inner',False)],'leaf',[],[],False,'render')), False)
check('unhandled-root-escalation scenario 3', solve('unhandled-root-escalation', ([], 'root',[1],[1],False,'render')), True)
check('unhandled-root-escalation scenario 4', solve('unhandled-root-escalation', ([('outer',True)],'leaf',[0],[False],True,'event')), False)
check('unhandled-root-escalation scenario 5', solve('unhandled-root-escalation', ([('outer',True),('inner',True)],'leaf',[1,2],[1],True,'render')), False)
check('unhandled-root-escalation scenario 6', solve('unhandled-root-escalation', ([('outer',False),('inner',True)],'leaf',[],[],False,'async')), False)
check('capture-path-inside-out scenario 1', solve('capture-path-inside-out', ([('outer',True),('inner',True)],'inner',[N],[N-1],False,'render')), ['outer'])
check('capture-path-inside-out scenario 2', solve('capture-path-inside-out', ([('outer',True),('inner',False)],'leaf',[],[],False,'render')), ['outer'])
check('capture-path-inside-out scenario 3', solve('capture-path-inside-out', ([], 'root',[1],[1],False,'render')), [])
check('capture-path-inside-out scenario 4', solve('capture-path-inside-out', ([('outer',True)],'leaf',[0],[False],True,'event')), ['outer'])
check('capture-path-inside-out scenario 5', solve('capture-path-inside-out', ([('outer',True),('inner',True)],'leaf',[1,2],[1],True,'render')), ['inner','outer'])
check('capture-path-inside-out scenario 6', solve('capture-path-inside-out', ([('outer',False),('inner',True)],'leaf',[],[],False,'async')), ['inner'])
check('reported-error-dedup scenario 1', solve('reported-error-dedup', ([('outer',True),('inner',True)],'inner',[N],[N-1],False,'render')), True)
check('reported-error-dedup scenario 2', solve('reported-error-dedup', ([('outer',True),('inner',False)],'leaf',[],[],False,'render')), True)
check('reported-error-dedup scenario 3', solve('reported-error-dedup', ([], 'root',[1],[1],False,'render')), True)
check('reported-error-dedup scenario 4', solve('reported-error-dedup', ([('outer',True)],'leaf',[0],[False],True,'event')), False)
check('reported-error-dedup scenario 5', solve('reported-error-dedup', ([('outer',True),('inner',True)],'leaf',[1,2],[1],True,'render')), False)
check('reported-error-dedup scenario 6', solve('reported-error-dedup', ([('outer',False),('inner',True)],'leaf',[],[],False,'async')), True)
check('boundary-disabled-fallback scenario 1', solve('boundary-disabled-fallback', ([('outer',True),('inner',True)],'inner',[N],[N-1],False,'render')), [])
check('boundary-disabled-fallback scenario 2', solve('boundary-disabled-fallback', ([('outer',True),('inner',False)],'leaf',[],[],False,'render')), ['inner'])
check('boundary-disabled-fallback scenario 3', solve('boundary-disabled-fallback', ([], 'root',[1],[1],False,'render')), [])
check('boundary-disabled-fallback scenario 4', solve('boundary-disabled-fallback', ([('outer',True)],'leaf',[0],[False],True,'event')), [])
check('boundary-disabled-fallback scenario 5', solve('boundary-disabled-fallback', ([('outer',True),('inner',True)],'leaf',[1,2],[1],True,'render')), [])
check('boundary-disabled-fallback scenario 6', solve('boundary-disabled-fallback', ([('outer',False),('inner',True)],'leaf',[],[],False,'async')), ['outer'])
check('reset-clears-handled-marker scenario 1', solve('reset-clears-handled-marker', ([('outer',True),('inner',True)],'inner',[N],[N-1],False,'render')), False)
check('reset-clears-handled-marker scenario 2', solve('reset-clears-handled-marker', ([('outer',True),('inner',False)],'leaf',[],[],False,'render')), False)
check('reset-clears-handled-marker scenario 3', solve('reset-clears-handled-marker', ([], 'root',[1],[1],False,'render')), False)
check('reset-clears-handled-marker scenario 4', solve('reset-clears-handled-marker', ([('outer',True)],'leaf',[0],[False],True,'event')), True)
check('reset-clears-handled-marker scenario 5', solve('reset-clears-handled-marker', ([('outer',True),('inner',True)],'leaf',[1,2],[1],True,'render')), False)
check('reset-clears-handled-marker scenario 6', solve('reset-clears-handled-marker', ([('outer',False),('inner',True)],'leaf',[],[],False,'async')), False)
check('event-error-propagation scenario 1', solve('event-error-propagation', ([('outer',True),('inner',True)],'inner',[N],[N-1],False,'render')), 'boundary')
check('event-error-propagation scenario 2', solve('event-error-propagation', ([('outer',True),('inner',False)],'leaf',[],[],False,'render')), 'boundary')
check('event-error-propagation scenario 3', solve('event-error-propagation', ([], 'root',[1],[1],False,'render')), 'boundary')
check('event-error-propagation scenario 4', solve('event-error-propagation', ([('outer',True)],'leaf',[0],[False],True,'event')), 'caller')
check('event-error-propagation scenario 5', solve('event-error-propagation', ([('outer',True),('inner',True)],'leaf',[1,2],[1],True,'render')), 'boundary')
check('event-error-propagation scenario 6', solve('event-error-propagation', ([('outer',False),('inner',True)],'leaf',[],[],False,'async')), 'caller')
check('only disabled ancestor cannot intercept failure: nearest-eligible-boundary', solve('nearest-eligible-boundary', ([('outer',False)],'leaf',[],[],False,'render')), None)
check('only disabled ancestor cannot intercept failure: boundary-cannot-catch-itself', solve('boundary-cannot-catch-itself', ([('outer',False)],'leaf',[],[],False,'render')), [])
check('only disabled ancestor cannot intercept failure: reset-key-type-and-length', solve('reset-key-type-and-length', ([('outer',False)],'leaf',[],[],False,'render')), False)
check('only disabled ancestor cannot intercept failure: render-only-catch', solve('render-only-catch', ([('outer',False)],'leaf',[],[],False,'render')), True)
check('only disabled ancestor cannot intercept failure: unhandled-root-escalation', solve('unhandled-root-escalation', ([('outer',False)],'leaf',[],[],False,'render')), True)
check('only disabled ancestor cannot intercept failure: capture-path-inside-out', solve('capture-path-inside-out', ([('outer',False)],'leaf',[],[],False,'render')), [])
check('only disabled ancestor cannot intercept failure: reported-error-dedup', solve('reported-error-dedup', ([('outer',False)],'leaf',[],[],False,'render')), True)
check('only disabled ancestor cannot intercept failure: boundary-disabled-fallback', solve('boundary-disabled-fallback', ([('outer',False)],'leaf',[],[],False,'render')), ['outer'])
check('only disabled ancestor cannot intercept failure: reset-clears-handled-marker', solve('reset-clears-handled-marker', ([('outer',False)],'leaf',[],[],False,'render')), False)
check('only disabled ancestor cannot intercept failure: event-error-propagation', solve('event-error-propagation', ([('outer',False)],'leaf',[],[],False,'render')), 'boundary')
print(json.dumps({"observations": observations, "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:
Capture path inside out.

This bounded render boundary model walks ancestors inside-out, excludes a failing boundary from catching itself, and catches render failures only. Reset keys compare shape and scalar types; event and asynchronous failures propagate to their callers. Operation capture-path-inside-out has the six explicit input/output oracles below.

split: open-access


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

N = 1
observations = []
def solve(operation, s):
    ancestors, failed, reset_keys, previous_keys, handled, event_kind = s
    if operation == 'nearest-eligible-boundary':
        return next((k for k,enabled in reversed(ancestors) if enabled and k!=failed),None)
    if operation == 'boundary-cannot-catch-itself':
        return [k for k,enabled in ancestors if enabled and k!=failed]
    if operation == 'reset-key-type-and-length':
        return len(reset_keys)!=len(previous_keys) or any(type(a)!=type(b) or a!=b for a,b in zip(reset_keys,previous_keys))
    if operation == 'render-only-catch':
        return event_kind=='render'
    if operation == 'unhandled-root-escalation':
        return not any(enabled and k!=failed for k,enabled in ancestors)
    if operation == 'capture-path-inside-out':
        return [k for k,enabled in reversed(ancestors) if enabled and k!=failed]
    if operation == 'reported-error-dedup':
        return True
    if operation == 'boundary-disabled-fallback':
        return [k for k,enabled in ancestors if not enabled]
    if operation == 'reset-clears-handled-marker':
        return handled and reset_keys==previous_keys
    if operation == 'event-error-propagation':
        return 'caller' if event_kind!='render' else 'boundary'
    raise ValueError('unknown modeled operation')
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('nearest-eligible-boundary scenario 1', solve('nearest-eligible-boundary', ([('outer',True),('inner',True)],'inner',[N],[N-1],False,'render')), 'outer')
check('nearest-eligible-boundary scenario 2', solve('nearest-eligible-boundary', ([('outer',True),('inner',False)],'leaf',[],[],False,'render')), 'outer')
check('nearest-eligible-boundary scenario 3', solve('nearest-eligible-boundary', ([], 'root',[1],[1],False,'render')), None)
check('nearest-eligible-boundary scenario 4', solve('nearest-eligible-boundary', ([('outer',True)],'leaf',[0],[False],True,'event')), 'outer')
check('nearest-eligible-boundary scenario 5', solve('nearest-eligible-boundary', ([('outer',True),('inner',True)],'leaf',[1,2],[1],True,'render')), 'inner')
check('nearest-eligible-boundary scenario 6', solve('nearest-eligible-boundary', ([('outer',False),('inner',True)],'leaf',[],[],False,'async')), 'inner')
check('boundary-cannot-catch-itself scenario 1', solve('boundary-cannot-catch-itself', ([('outer',True),('inner',True)],'inner',[N],[N-1],False,'render')), ['outer'])
check('boundary-cannot-catch-itself scenario 2', solve('boundary-cannot-catch-itself', ([('outer',True),('inner',False)],'leaf',[],[],False,'render')), ['outer'])
check('boundary-cannot-catch-itself scenario 3', solve('boundary-cannot-catch-itself', ([], 'root',[1],[1],False,'render')), [])
check('boundary-cannot-catch-itself scenario 4', solve('boundary-cannot-catch-itself', ([('outer',True)],'leaf',[0],[False],True,'event')), ['outer'])
check('boundary-cannot-catch-itself scenario 5', solve('boundary-cannot-catch-itself', ([('outer',True),('inner',True)],'leaf',[1,2],[1],True,'render')), ['outer','inner'])
check('boundary-cannot-catch-itself scenario 6', solve('boundary-cannot-catch-itself', ([('outer',False),('inner',True)],'leaf',[],[],False,'async')), ['inner'])
check('reset-key-type-and-length scenario 1', solve('reset-key-type-and-length', ([('outer',True),('inner',True)],'inner',[N],[N-1],False,'render')), True)
check('reset-key-type-and-length scenario 2', solve('reset-key-type-and-length', ([('outer',True),('inner',False)],'leaf',[],[],False,'render')), False)
check('reset-key-type-and-length scenario 3', solve('reset-key-type-and-length', ([], 'root',[1],[1],False,'render')), False)
check('reset-key-type-and-length scenario 4', solve('reset-key-type-and-length', ([('outer',True)],'leaf',[0],[False],True,'event')), True)
check('reset-key-type-and-length scenario 5', solve('reset-key-type-and-length', ([('outer',True),('inner',True)],'leaf',[1,2],[1],True,'render')), True)
check('reset-key-type-and-length scenario 6', solve('reset-key-type-and-length', ([('outer',False),('inner',True)],'leaf',[],[],False,'async')), False)
check('render-only-catch scenario 1', solve('render-only-catch', ([('outer',True),('inner',True)],'inner',[N],[N-1],False,'render')), True)
check('render-only-catch scenario 2', solve('render-only-catch', ([('outer',True),('inner',False)],'leaf',[],[],False,'render')), True)
check('render-only-catch scenario 3', solve('render-only-catch', ([], 'root',[1],[1],False,'render')), True)
check('render-only-catch scenario 4', solve('render-only-catch', ([('outer',True)],'leaf',[0],[False],True,'event')), False)
check('render-only-catch scenario 5', solve('render-only-catch', ([('outer',True),('inner',True)],'leaf',[1,2],[1],True,'render')), True)
check('render-only-catch scenario 6', solve('render-only-catch', ([('outer',False),('inner',True)],'leaf',[],[],False,'async')), False)
check('unhandled-root-escalation scenario 1', solve('unhandled-root-escalation', ([('outer',True),('inner',True)],'inner',[N],[N-1],False,'render')), False)
check('unhandled-root-escalation scenario 2', solve('unhandled-root-escalation', ([('outer',True),('inner',False)],'leaf',[],[],False,'render')), False)
check('unhandled-root-escalation scenario 3', solve('unhandled-root-escalation', ([], 'root',[1],[1],False,'render')), True)
check('unhandled-root-escalation scenario 4', solve('unhandled-root-escalation', ([('outer',True)],'leaf',[0],[False],True,'event')), False)
check('unhandled-root-escalation scenario 5', solve('unhandled-root-escalation', ([('outer',True),('inner',True)],'leaf',[1,2],[1],True,'render')), False)
check('unhandled-root-escalation scenario 6', solve('unhandled-root-escalation', ([('outer',False),('inner',True)],'leaf',[],[],False,'async')), False)
check('capture-path-inside-out scenario 1', solve('capture-path-inside-out', ([('outer',True),('inner',True)],'inner',[N],[N-1],False,'render')), ['outer'])
check('capture-path-inside-out scenario 2', solve('capture-path-inside-out', ([('outer',True),('inner',False)],'leaf',[],[],False,'render')), ['outer'])
check('capture-path-inside-out scenario 3', solve('capture-path-inside-out', ([], 'root',[1],[1],False,'render')), [])
check('capture-path-inside-out scenario 4', solve('capture-path-inside-out', ([('outer',True)],'leaf',[0],[False],True,'event')), ['outer'])
check('capture-path-inside-out scenario 5', solve('capture-path-inside-out', ([('outer',True),('inner',True)],'leaf',[1,2],[1],True,'render')), ['inner','outer'])
check('capture-path-inside-out scenario 6', solve('capture-path-inside-out', ([('outer',False),('inner',True)],'leaf',[],[],False,'async')), ['inner'])
check('reported-error-dedup scenario 1', solve('reported-error-dedup', ([('outer',True),('inner',True)],'inner',[N],[N-1],False,'render')), True)
check('reported-error-dedup scenario 2', solve('reported-error-dedup', ([('outer',True),('inner',False)],'leaf',[],[],False,'render')), True)
check('reported-error-dedup scenario 3', solve('reported-error-dedup', ([], 'root',[1],[1],False,'render')), True)
check('reported-error-dedup scenario 4', solve('reported-error-dedup', ([('outer',True)],'leaf',[0],[False],True,'event')), False)
check('reported-error-dedup scenario 5', solve('reported-error-dedup', ([('outer',True),('inner',True)],'leaf',[1,2],[1],True,'render')), False)
check('reported-error-dedup scenario 6', solve('reported-error-dedup', ([('outer',False),('inner',True)],'leaf',[],[],False,'async')), True)
check('boundary-disabled-fallback scenario 1', solve('boundary-disabled-fallback', ([('outer',True),('inner',True)],'inner',[N],[N-1],False,'render')), [])
check('boundary-disabled-fallback scenario 2', solve('boundary-disabled-fallback', ([('outer',True),('inner',False)],'leaf',[],[],False,'render')), ['inner'])
check('boundary-disabled-fallback scenario 3', solve('boundary-disabled-fallback', ([], 'root',[1],[1],False,'render')), [])
check('boundary-disabled-fallback scenario 4', solve('boundary-disabled-fallback', ([('outer',True)],'leaf',[0],[False],True,'event')), [])
check('boundary-disabled-fallback scenario 5', solve('boundary-disabled-fallback', ([('outer',True),('inner',True)],'leaf',[1,2],[1],True,'render')), [])
check('boundary-disabled-fallback scenario 6', solve('boundary-disabled-fallback', ([('outer',False),('inner',True)],'leaf',[],[],False,'async')), ['outer'])
check('reset-clears-handled-marker scenario 1', solve('reset-clears-handled-marker', ([('outer',True),('inner',True)],'inner',[N],[N-1],False,'render')), False)
check('reset-clears-handled-marker scenario 2', solve('reset-clears-handled-marker', ([('outer',True),('inner',False)],'leaf',[],[],False,'render')), False)
check('reset-clears-handled-marker scenario 3', solve('reset-clears-handled-marker', ([], 'root',[1],[1],False,'render')), False)
check('reset-clears-handled-marker scenario 4', solve('reset-clears-handled-marker', ([('outer',True)],'leaf',[0],[False],True,'event')), True)
check('reset-clears-handled-marker scenario 5', solve('reset-clears-handled-marker', ([('outer',True),('inner',True)],'leaf',[1,2],[1],True,'render')), False)
check('reset-clears-handled-marker scenario 6', solve('reset-clears-handled-marker', ([('outer',False),('inner',True)],'leaf',[],[],False,'async')), False)
check('event-error-propagation scenario 1', solve('event-error-propagation', ([('outer',True),('inner',True)],'inner',[N],[N-1],False,'render')), 'boundary')
check('event-error-propagation scenario 2', solve('event-error-propagation', ([('outer',True),('inner',False)],'leaf',[],[],False,'render')), 'boundary')
check('event-error-propagation scenario 3', solve('event-error-propagation', ([], 'root',[1],[1],False,'render')), 'boundary')
check('event-error-propagation scenario 4', solve('event-error-propagation', ([('outer',True)],'leaf',[0],[False],True,'event')), 'caller')
check('event-error-propagation scenario 5', solve('event-error-propagation', ([('outer',True),('inner',True)],'leaf',[1,2],[1],True,'render')), 'boundary')
check('event-error-propagation scenario 6', solve('event-error-propagation', ([('outer',False),('inner',True)],'leaf',[],[],False,'async')), 'caller')
check('only disabled ancestor cannot intercept failure: nearest-eligible-boundary', solve('nearest-eligible-boundary', ([('outer',False)],'leaf',[],[],False,'render')), None)
check('only disabled ancestor cannot intercept failure: boundary-cannot-catch-itself', solve('boundary-cannot-catch-itself', ([('outer',False)],'leaf',[],[],False,'render')), [])
check('only disabled ancestor cannot intercept failure: reset-key-type-and-length', solve('reset-key-type-and-length', ([('outer',False)],'leaf',[],[],False,'render')), False)
check('only disabled ancestor cannot intercept failure: render-only-catch', solve('render-only-catch', ([('outer',False)],'leaf',[],[],False,'render')), True)
check('only disabled ancestor cannot intercept failure: unhandled-root-escalation', solve('unhandled-root-escalation', ([('outer',False)],'leaf',[],[],False,'render')), True)
check('only disabled ancestor cannot intercept failure: capture-path-inside-out', solve('capture-path-inside-out', ([('outer',False)],'leaf',[],[],False,'render')), [])
check('only disabled ancestor cannot intercept failure: reported-error-dedup', solve('reported-error-dedup', ([('outer',False)],'leaf',[],[],False,'render')), True)
check('only disabled ancestor cannot intercept failure: boundary-disabled-fallback', solve('boundary-disabled-fallback', ([('outer',False)],'leaf',[],[],False,'render')), ['outer'])
check('only disabled ancestor cannot intercept failure: reset-clears-handled-marker', solve('reset-clears-handled-marker', ([('outer',False)],'leaf',[],[],False,'render')), False)
check('only disabled ancestor cannot intercept failure: event-error-propagation', solve('event-error-propagation', ([('outer',False)],'leaf',[],[],False,'render')), 'boundary')
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)

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

N = 1
observations = []
def solve(operation, s):
    ancestors, failed, reset_keys, previous_keys, handled, event_kind = s
    if operation == 'nearest-eligible-boundary':
        return next((k for k,enabled in reversed(ancestors) if enabled and k!=failed),None)
    if operation == 'boundary-cannot-catch-itself':
        return [k for k,enabled in ancestors if enabled and k!=failed]
    if operation == 'reset-key-type-and-length':
        return len(reset_keys)!=len(previous_keys) or any(type(a)!=type(b) or a!=b for a,b in zip(reset_keys,previous_keys))
    if operation == 'render-only-catch':
        return event_kind=='render'
    if operation == 'unhandled-root-escalation':
        return not any(enabled and k!=failed for k,enabled in ancestors)
    if operation == 'capture-path-inside-out':
        return [k for k,enabled in reversed(ancestors) if enabled and k!=failed]
    if operation == 'reported-error-dedup':
        return not handled and bool(ancestors)
    if operation == 'boundary-disabled-fallback':
        return [k for k,enabled in ancestors if not enabled]
    if operation == 'reset-clears-handled-marker':
        return handled and reset_keys==previous_keys
    if operation == 'event-error-propagation':
        return 'caller' if event_kind!='render' else 'boundary'
    raise ValueError('unknown modeled operation')
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('nearest-eligible-boundary scenario 1', solve('nearest-eligible-boundary', ([('outer',True),('inner',True)],'inner',[N],[N-1],False,'render')), 'outer')
check('nearest-eligible-boundary scenario 2', solve('nearest-eligible-boundary', ([('outer',True),('inner',False)],'leaf',[],[],False,'render')), 'outer')
check('nearest-eligible-boundary scenario 3', solve('nearest-eligible-boundary', ([], 'root',[1],[1],False,'render')), None)
check('nearest-eligible-boundary scenario 4', solve('nearest-eligible-boundary', ([('outer',True)],'leaf',[0],[False],True,'event')), 'outer')
check('nearest-eligible-boundary scenario 5', solve('nearest-eligible-boundary', ([('outer',True),('inner',True)],'leaf',[1,2],[1],True,'render')), 'inner')
check('nearest-eligible-boundary scenario 6', solve('nearest-eligible-boundary', ([('outer',False),('inner',True)],'leaf',[],[],False,'async')), 'inner')
check('boundary-cannot-catch-itself scenario 1', solve('boundary-cannot-catch-itself', ([('outer',True),('inner',True)],'inner',[N],[N-1],False,'render')), ['outer'])
check('boundary-cannot-catch-itself scenario 2', solve('boundary-cannot-catch-itself', ([('outer',True),('inner',False)],'leaf',[],[],False,'render')), ['outer'])
check('boundary-cannot-catch-itself scenario 3', solve('boundary-cannot-catch-itself', ([], 'root',[1],[1],False,'render')), [])
check('boundary-cannot-catch-itself scenario 4', solve('boundary-cannot-catch-itself', ([('outer',True)],'leaf',[0],[False],True,'event')), ['outer'])
check('boundary-cannot-catch-itself scenario 5', solve('boundary-cannot-catch-itself', ([('outer',True),('inner',True)],'leaf',[1,2],[1],True,'render')), ['outer','inner'])
check('boundary-cannot-catch-itself scenario 6', solve('boundary-cannot-catch-itself', ([('outer',False),('inner',True)],'leaf',[],[],False,'async')), ['inner'])
check('reset-key-type-and-length scenario 1', solve('reset-key-type-and-length', ([('outer',True),('inner',True)],'inner',[N],[N-1],False,'render')), True)
check('reset-key-type-and-length scenario 2', solve('reset-key-type-and-length', ([('outer',True),('inner',False)],'leaf',[],[],False,'render')), False)
check('reset-key-type-and-length scenario 3', solve('reset-key-type-and-length', ([], 'root',[1],[1],False,'render')), False)
check('reset-key-type-and-length scenario 4', solve('reset-key-type-and-length', ([('outer',True)],'leaf',[0],[False],True,'event')), True)
check('reset-key-type-and-length scenario 5', solve('reset-key-type-and-length', ([('outer',True),('inner',True)],'leaf',[1,2],[1],True,'render')), True)
check('reset-key-type-and-length scenario 6', solve('reset-key-type-and-length', ([('outer',False),('inner',True)],'leaf',[],[],False,'async')), False)
check('render-only-catch scenario 1', solve('render-only-catch', ([('outer',True),('inner',True)],'inner',[N],[N-1],False,'render')), True)
check('render-only-catch scenario 2', solve('render-only-catch', ([('outer',True),('inner',False)],'leaf',[],[],False,'render')), True)
check('render-only-catch scenario 3', solve('render-only-catch', ([], 'root',[1],[1],False,'render')), True)
check('render-only-catch scenario 4', solve('render-only-catch', ([('outer',True)],'leaf',[0],[False],True,'event')), False)
check('render-only-catch scenario 5', solve('render-only-catch', ([('outer',True),('inner',True)],'leaf',[1,2],[1],True,'render')), True)
check('render-only-catch scenario 6', solve('render-only-catch', ([('outer',False),('inner',True)],'leaf',[],[],False,'async')), False)
check('unhandled-root-escalation scenario 1', solve('unhandled-root-escalation', ([('outer',True),('inner',True)],'inner',[N],[N-1],False,'render')), False)
check('unhandled-root-escalation scenario 2', solve('unhandled-root-escalation', ([('outer',True),('inner',False)],'leaf',[],[],False,'render')), False)
check('unhandled-root-escalation scenario 3', solve('unhandled-root-escalation', ([], 'root',[1],[1],False,'render')), True)
check('unhandled-root-escalation scenario 4', solve('unhandled-root-escalation', ([('outer',True)],'leaf',[0],[False],True,'event')), False)
check('unhandled-root-escalation scenario 5', solve('unhandled-root-escalation', ([('outer',True),('inner',True)],'leaf',[1,2],[1],True,'render')), False)
check('unhandled-root-escalation scenario 6', solve('unhandled-root-escalation', ([('outer',False),('inner',True)],'leaf',[],[],False,'async')), False)
check('capture-path-inside-out scenario 1', solve('capture-path-inside-out', ([('outer',True),('inner',True)],'inner',[N],[N-1],False,'render')), ['outer'])
check('capture-path-inside-out scenario 2', solve('capture-path-inside-out', ([('outer',True),('inner',False)],'leaf',[],[],False,'render')), ['outer'])
check('capture-path-inside-out scenario 3', solve('capture-path-inside-out', ([], 'root',[1],[1],False,'render')), [])
check('capture-path-inside-out scenario 4', solve('capture-path-inside-out', ([('outer',True)],'leaf',[0],[False],True,'event')), ['outer'])
check('capture-path-inside-out scenario 5', solve('capture-path-inside-out', ([('outer',True),('inner',True)],'leaf',[1,2],[1],True,'render')), ['inner','outer'])
check('capture-path-inside-out scenario 6', solve('capture-path-inside-out', ([('outer',False),('inner',True)],'leaf',[],[],False,'async')), ['inner'])
check('reported-error-dedup scenario 1', solve('reported-error-dedup', ([('outer',True),('inner',True)],'inner',[N],[N-1],False,'render')), True)
check('reported-error-dedup scenario 2', solve('reported-error-dedup', ([('outer',True),('inner',False)],'leaf',[],[],False,'render')), True)
check('reported-error-dedup scenario 3', solve('reported-error-dedup', ([], 'root',[1],[1],False,'render')), True)
check('reported-error-dedup scenario 4', solve('reported-error-dedup', ([('outer',True)],'leaf',[0],[False],True,'event')), False)
check('reported-error-dedup scenario 5', solve('reported-error-dedup', ([('outer',True),('inner',True)],'leaf',[1,2],[1],True,'render')), False)
check('reported-error-dedup scenario 6', solve('reported-error-dedup', ([('outer',False),('inner',True)],'leaf',[],[],False,'async')), True)
check('boundary-disabled-fallback scenario 1', solve('boundary-disabled-fallback', ([('outer',True),('inner',True)],'inner',[N],[N-1],False,'render')), [])
check('boundary-disabled-fallback scenario 2', solve('boundary-disabled-fallback', ([('outer',True),('inner',False)],'leaf',[],[],False,'render')), ['inner'])
check('boundary-disabled-fallback scenario 3', solve('boundary-disabled-fallback', ([], 'root',[1],[1],False,'render')), [])
check('boundary-disabled-fallback scenario 4', solve('boundary-disabled-fallback', ([('outer',True)],'leaf',[0],[False],True,'event')), [])
check('boundary-disabled-fallback scenario 5', solve('boundary-disabled-fallback', ([('outer',True),('inner',True)],'leaf',[1,2],[1],True,'render')), [])
check('boundary-disabled-fallback scenario 6', solve('boundary-disabled-fallback', ([('outer',False),('inner',True)],'leaf',[],[],False,'async')), ['outer'])
check('reset-clears-handled-marker scenario 1', solve('reset-clears-handled-marker', ([('outer',True),('inner',True)],'inner',[N],[N-1],False,'render')), False)
check('reset-clears-handled-marker scenario 2', solve('reset-clears-handled-marker', ([('outer',True),('inner',False)],'leaf',[],[],False,'render')), False)
check('reset-clears-handled-marker scenario 3', solve('reset-clears-handled-marker', ([], 'root',[1],[1],False,'render')), False)
check('reset-clears-handled-marker scenario 4', solve('reset-clears-handled-marker', ([('outer',True)],'leaf',[0],[False],True,'event')), True)
check('reset-clears-handled-marker scenario 5', solve('reset-clears-handled-marker', ([('outer',True),('inner',True)],'leaf',[1,2],[1],True,'render')), False)
check('reset-clears-handled-marker scenario 6', solve('reset-clears-handled-marker', ([('outer',False),('inner',True)],'leaf',[],[],False,'async')), False)
check('event-error-propagation scenario 1', solve('event-error-propagation', ([('outer',True),('inner',True)],'inner',[N],[N-1],False,'render')), 'boundary')
check('event-error-propagation scenario 2', solve('event-error-propagation', ([('outer',True),('inner',False)],'leaf',[],[],False,'render')), 'boundary')
check('event-error-propagation scenario 3', solve('event-error-propagation', ([], 'root',[1],[1],False,'render')), 'boundary')
check('event-error-propagation scenario 4', solve('event-error-propagation', ([('outer',True)],'leaf',[0],[False],True,'event')), 'caller')
check('event-error-propagation scenario 5', solve('event-error-propagation', ([('outer',True),('inner',True)],'leaf',[1,2],[1],True,'render')), 'boundary')
check('event-error-propagation scenario 6', solve('event-error-propagation', ([('outer',False),('inner',True)],'leaf',[],[],False,'async')), 'caller')
check('only disabled ancestor cannot intercept failure: nearest-eligible-boundary', solve('nearest-eligible-boundary', ([('outer',False)],'leaf',[],[],False,'render')), None)
check('only disabled ancestor cannot intercept failure: boundary-cannot-catch-itself', solve('boundary-cannot-catch-itself', ([('outer',False)],'leaf',[],[],False,'render')), [])
check('only disabled ancestor cannot intercept failure: reset-key-type-and-length', solve('reset-key-type-and-length', ([('outer',False)],'leaf',[],[],False,'render')), False)
check('only disabled ancestor cannot intercept failure: render-only-catch', solve('render-only-catch', ([('outer',False)],'leaf',[],[],False,'render')), True)
check('only disabled ancestor cannot intercept failure: unhandled-root-escalation', solve('unhandled-root-escalation', ([('outer',False)],'leaf',[],[],False,'render')), True)
check('only disabled ancestor cannot intercept failure: capture-path-inside-out', solve('capture-path-inside-out', ([('outer',False)],'leaf',[],[],False,'render')), [])
check('only disabled ancestor cannot intercept failure: reported-error-dedup', solve('reported-error-dedup', ([('outer',False)],'leaf',[],[],False,'render')), True)
check('only disabled ancestor cannot intercept failure: boundary-disabled-fallback', solve('boundary-disabled-fallback', ([('outer',False)],'leaf',[],[],False,'render')), ['outer'])
check('only disabled ancestor cannot intercept failure: reset-clears-handled-marker', solve('reset-clears-handled-marker', ([('outer',False)],'leaf',[],[],False,'render')), False)
check('only disabled ancestor cannot intercept failure: event-error-propagation', solve('event-error-propagation', ([('outer',False)],'leaf',[],[],False,'render')), 'boundary')
print(json.dumps({"observations": observations, "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:
Reported error dedup.

This bounded render boundary model walks ancestors inside-out, excludes a failing boundary from catching itself, and catches render failures only. Reset keys compare shape and scalar types; event and asynchronous failures propagate to their callers. Operation reported-error-dedup has the six explicit input/output oracles below.

split: open-access