FAILURE MAP
← Case archive

FA-38731 / Tree accessibility / Open access

Tree drop accessibility descriptor: Drop level fails to reflect nesting mode · case 01

Drop level fails to reflect nesting mode produces the wrong hierarchical widget state in a regression fixture.

Verified by executionVariant 1 · 10 checks per implementationDownload source bundle ↓JSON ↗

ROOT CAUSE

The drag-descriptor contract is violated at `d['target_level']+1 if inside else d['target_level']` by replacing it with `d['target_level']`.

VERIFIED REPAIR

Restore `d['target_level']+1 if inside else d['target_level']` at this fault site while retaining the other tree state decisions.

Unsuccessful approach: The partial repair `d['target_level']+1` still violates a boundary or preservation case.

Case contract

A drag advertises one legal drop location at a time. Inside requires a writable branch; before/after require a parent and same sibling partition. Self and descendant targets are forbidden. Copy needs copy permission. Descriptor includes announced hierarchy level and one-based insertion position.

Why this case matters

Offline executable model of a hierarchical accessibility interaction; inputs are bounded and valid as stipulated. No browser, assistive technology, or normative ARIA conformance is claimed.

1 / The failure

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(d):
    selfdrop=d['target'] in d['closure']
    inside=d['placement']=='inside'
    parent=d['target'] if inside else d['parent']
    structural=(d['branch'] if inside else parent is not None)
    partition=inside or d['source_partition']==d['target_partition']
    permission=d['writable'] and (d['copy_allowed'] if d['effect']=='copy' else d['move_allowed'])
    allowed=not selfdrop and structural and partition and permission
    position=d['child_count']+1 if inside else d['target_index']+1+(d['placement']=='after')
    level=d['target_level']
    effect=d['effect'] if allowed else 'none'
    return [allowed,parent,position,level,effect]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
cases = {1: [('copy inside', {'target': 't', 'source': 's', 'closure': ['s', 'c'], 'placement': 'inside', 'parent': 'p', 'branch': True, 'source_partition': 'A', 'target_partition': 'B', 'writable': True, 'copy_allowed': True, 'move_allowed': False, 'effect': 'copy', 'child_count': 4, 'target_index': 1, 'target_level': 2}, [True, 't', 5, 3, 'copy']), ('after sibling', {'target': 't', 'source': 's', 'closure': ['s', 'c'], 'placement': 'after', 'parent': 'p', 'branch': True, 'source_partition': 'A', 'target_partition': 'A', 'writable': True, 'copy_allowed': True, 'move_allowed': False, 'effect': 'copy', 'child_count': 4, 'target_index': 1, 'target_level': 2}, [True, 'p', 3, 2, 'copy']), ('before sibling', {'target': 't', 'source': 's', 'closure': ['s', 'c'], 'placement': 'before', 'parent': 'p', 'branch': True, 'source_partition': 'A', 'target_partition': 'A', 'writable': True, 'copy_allowed': True, 'move_allowed': False, 'effect': 'copy', 'child_count': 4, 'target_index': 1, 'target_level': 2}, [True, 'p', 2, 2, 'copy']), ('descendant', {'target': 'c', 'source': 's', 'closure': ['s', 'c'], 'placement': 'inside', 'parent': 'p', 'branch': True, 'source_partition': 'A', 'target_partition': 'B', 'writable': True, 'copy_allowed': True, 'move_allowed': False, 'effect': 'copy', 'child_count': 4, 'target_index': 1, 'target_level': 2}, [False, 'c', 5, 3, 'none']), ('leaf inside', {'target': 't', 'source': 's', 'closure': ['s', 'c'], 'placement': 'inside', 'parent': 'p', 'branch': False, 'source_partition': 'A', 'target_partition': 'B', 'writable': True, 'copy_allowed': True, 'move_allowed': False, 'effect': 'copy', 'child_count': 4, 'target_index': 1, 'target_level': 2}, [False, 't', 5, 3, 'none']), ('leaf sibling', {'target': 't', 'source': 's', 'closure': ['s', 'c'], 'placement': 'after', 'parent': 'p', 'branch': False, 'source_partition': 'A', 'target_partition': 'A', 'writable': True, 'copy_allowed': True, 'move_allowed': False, 'effect': 'copy', 'child_count': 4, 'target_index': 1, 'target_level': 2}, [True, 'p', 3, 2, 'copy']), ('root sibling', {'target': 't', 'source': 's', 'closure': ['s', 'c'], 'placement': 'before', 'parent': None, 'branch': True, 'source_partition': 'A', 'target_partition': 'B', 'writable': True, 'copy_allowed': True, 'move_allowed': False, 'effect': 'copy', 'child_count': 4, 'target_index': 1, 'target_level': 2}, [False, None, 2, 2, 'none']), ('forbidden copy', {'target': 't', 'source': 's', 'closure': ['s', 'c'], 'placement': 'inside', 'parent': 'p', 'branch': True, 'source_partition': 'A', 'target_partition': 'B', 'writable': True, 'copy_allowed': False, 'move_allowed': True, 'effect': 'copy', 'child_count': 4, 'target_index': 1, 'target_level': 2}, [False, 't', 5, 3, 'none']), ('move denied', {'target': 't', 'source': 's', 'closure': ['s', 'c'], 'placement': 'inside', 'parent': 'p', 'branch': True, 'source_partition': 'A', 'target_partition': 'B', 'writable': True, 'copy_allowed': True, 'move_allowed': False, 'effect': 'move', 'child_count': 4, 'target_index': 1, 'target_level': 2}, [False, 't', 5, 3, 'none']), ('partition mismatch', {'target': 't', 'source': 's', 'closure': ['s', 'c'], 'placement': 'after', 'parent': 'p', 'branch': True, 'source_partition': 'A', 'target_partition': 'B', 'writable': True, 'copy_allowed': True, 'move_allowed': False, 'effect': 'copy', 'child_count': 4, 'target_index': 1, 'target_level': 2}, [False, 'p', 3, 2, 'none'])], 2: [('copy inside', {'target': 't', 'source': 's', 'closure': ['s', 'c'], 'placement': 'inside', 'parent': 'p', 'branch': True, 'source_partition': 'A', 'target_partition': 'B', 'writable': True, 'copy_allowed': True, 'move_allowed': False, 'effect': 'copy', 'child_count': 5, 'target_index': 2, 'target_level': 3}, [True, 't', 6, 4, 'copy']), ('after sibling', {'target': 't', 'source': 's', 'closure': ['s', 'c'], 'placement': 'after', 'parent': 'p', 'branch': True, 'source_partition': 'A', 'target_partition': 'A', 'writable': True, 'copy_allowed': True, 'move_allowed': False, 'effect': 'copy', 'child_count': 5, 'target_index': 2, 'target_level': 3}, [True, 'p', 4, 3, 'copy']), ('before sibling', {'target': 't', 'source': 's', 'closure': ['s', 'c'], 'placement': 'before', 'parent': 'p', 'branch': True, 'source_partition': 'A', 'target_partition': 'A', 'writable': True, 'copy_allowed': True, 'move_allowed': False, 'effect': 'copy', 'child_count': 5, 'target_index': 2, 'target_level': 3}, [True, 'p', 3, 3, 'copy']), ('descendant', {'target': 'c', 'source': 's', 'closure': ['s', 'c'], 'placement': 'inside', 'parent': 'p', 'branch': True, 'source_partition': 'A', 'target_partition': 'B', 'writable': True, 'copy_allowed': True, 'move_allowed': False, 'effect': 'copy', 'child_count': 5, 'target_index': 2, 'target_level': 3}, [False, 'c', 6, 4, 'none']), ('leaf inside', {'target': 't', 'source': 's', 'closure': ['s', 'c'], 'placement': 'inside', 'parent': 'p', 'branch': False, 'source_partition': 'A', 'target_partition': 'B', 'writable': True, 'copy_allowed': True, 'move_allowed': False, 'effect': 'copy', 'child_count': 5, 'target_index': 2, 'target_level': 3}, [False, 't', 6, 4, 'none']), ('leaf sibling', {'target': 't', 'source': 's', 'closure': ['s', 'c'], 'placement': 'after', 'parent': 'p', 'branch': False, 'source_partition': 'A', 'target_partition': 'A', 'writable': True, 'copy_allowed': True, 'move_allowed': False, 'effect': 'copy', 'child_count': 5, 'target_index': 2, 'target_level': 3}, [True, 'p', 4, 3, 'copy']), ('root sibling', {'target': 't', 'source': 's', 'closure': ['s', 'c'], 'placement': 'before', 'parent': None, 'branch': True, 'source_partition': 'A', 'target_partition': 'B', 'writable': True, 'copy_allowed': True, 'move_allowed': False, 'effect': 'copy', 'child_count': 5, 'target_index': 2, 'target_level': 3}, [False, None, 3, 3, 'none']), ('forbidden copy', {'target': 't', 'source': 's', 'closure': ['s', 'c'], 'placement': 'inside', 'parent': 'p', 'branch': True, 'source_partition': 'A', 'target_partition': 'B', 'writable': True, 'copy_allowed': False, 'move_allowed': True, 'effect': 'copy', 'child_count': 5, 'target_index': 2, 'target_level': 3}, [False, 't', 6, 4, 'none']), ('move denied', {'target': 't', 'source': 's', 'closure': ['s', 'c'], 'placement': 'inside', 'parent': 'p', 'branch': True, 'source_partition': 'A', 'target_partition': 'B', 'writable': True, 'copy_allowed': True, 'move_allowed': False, 'effect': 'move', 'child_count': 5, 'target_index': 2, 'target_level': 3}, [False, 't', 6, 4, 'none']), ('partition mismatch', {'target': 't', 'source': 's', 'closure': ['s', 'c'], 'placement': 'after', 'parent': 'p', 'branch': True, 'source_partition': 'A', 'target_partition': 'B', 'writable': True, 'copy_allowed': True, 'move_allowed': False, 'effect': 'copy', 'child_count': 5, 'target_index': 2, 'target_level': 3}, [False, 'p', 4, 3, 'none'])], 3: [('copy inside', {'target': 't', 'source': 's', 'closure': ['s', 'c'], 'placement': 'inside', 'parent': 'p', 'branch': True, 'source_partition': 'A', 'target_partition': 'B', 'writable': True, 'copy_allowed': True, 'move_allowed': False, 'effect': 'copy', 'child_count': 6, 'target_index': 3, 'target_level': 4}, [True, 't', 7, 5, 'copy']), ('after sibling', {'target': 't', 'source': 's', 'closure': ['s', 'c'], 'placement': 'after', 'parent': 'p', 'branch': True, 'source_partition': 'A', 'target_partition': 'A', 'writable': True, 'copy_allowed': True, 'move_allowed': False, 'effect': 'copy', 'child_count': 6, 'target_index': 3, 'target_level': 4}, [True, 'p', 5, 4, 'copy']), ('before sibling', {'target': 't', 'source': 's', 'closure': ['s', 'c'], 'placement': 'before', 'parent': 'p', 'branch': True, 'source_partition': 'A', 'target_partition': 'A', 'writable': True, 'copy_allowed': True, 'move_allowed': False, 'effect': 'copy', 'child_count': 6, 'target_index': 3, 'target_level': 4}, [True, 'p', 4, 4, 'copy']), ('descendant', {'target': 'c', 'source': 's', 'closure': ['s', 'c'], 'placement': 'inside', 'parent': 'p', 'branch': True, 'source_partition': 'A', 'target_partition': 'B', 'writable': True, 'copy_allowed': True, 'move_allowed': False, 'effect': 'copy', 'child_count': 6, 'target_index': 3, 'target_level': 4}, [False, 'c', 7, 5, 'none']), ('leaf inside', {'target': 't', 'source': 's', 'closure': ['s', 'c'], 'placement': 'inside', 'parent': 'p', 'branch': False, 'source_partition': 'A', 'target_partition': 'B', 'writable': True, 'copy_allowed': True, 'move_allowed': False, 'effect': 'copy', 'child_count': 6, 'target_index': 3, 'target_level': 4}, [False, 't', 7, 5, 'none']), ('leaf sibling', {'target': 't', 'source': 's', 'closure': ['s', 'c'], 'placement': 'after', 'parent': 'p', 'branch': False, 'source_partition': 'A', 'target_partition': 'A', 'writable': True, 'copy_allowed': True, 'move_allowed': False, 'effect': 'copy', 'child_count': 6, 'target_index': 3, 'target_level': 4}, [True, 'p', 5, 4, 'copy']), ('root sibling', {'target': 't', 'source': 's', 'closure': ['s', 'c'], 'placement': 'before', 'parent': None, 'branch': True, 'source_partition': 'A', 'target_partition': 'B', 'writable': True, 'copy_allowed': True, 'move_allowed': False, 'effect': 'copy', 'child_count': 6, 'target_index': 3, 'target_level': 4}, [False, None, 4, 4, 'none']), ('forbidden copy', {'target': 't', 'source': 's', 'closure': ['s', 'c'], 'placement': 'inside', 'parent': 'p', 'branch': True, 'source_partition': 'A', 'target_partition': 'B', 'writable': True, 'copy_allowed': False, 'move_allowed': True, 'effect': 'copy', 'child_count': 6, 'target_index': 3, 'target_level': 4}, [False, 't', 7, 5, 'none']), ('move denied', {'target': 't', 'source': 's', 'closure': ['s', 'c'], 'placement': 'inside', 'parent': 'p', 'branch': True, 'source_partition': 'A', 'target_partition': 'B', 'writable': True, 'copy_allowed': True, 'move_allowed': False, 'effect': 'move', 'child_count': 6, 'target_index': 3, 'target_level': 4}, [False, 't', 7, 5, 'none']), ('partition mismatch', {'target': 't', 'source': 's', 'closure': ['s', 'c'], 'placement': 'after', 'parent': 'p', 'branch': True, 'source_partition': 'A', 'target_partition': 'B', 'writable': True, 'copy_allowed': True, 'move_allowed': False, 'effect': 'copy', 'child_count': 6, 'target_index': 3, 'target_level': 4}, [False, 'p', 5, 4, 'none'])], 4: [('copy inside', {'target': 't', 'source': 's', 'closure': ['s', 'c'], 'placement': 'inside', 'parent': 'p', 'branch': True, 'source_partition': 'A', 'target_partition': 'B', 'writable': True, 'copy_allowed': True, 'move_allowed': False, 'effect': 'copy', 'child_count': 7, 'target_index': 4, 'target_level': 5}, [True, 't', 8, 6, 'copy']), ('after sibling', {'target': 't', 'source': 's', 'closure': ['s', 'c'], 'placement': 'after', 'parent': 'p', 'branch': True, 'source_partition': 'A', 'target_partition': 'A', 'writable': True, 'copy_allowed': True, 'move_allowed': False, 'effect': 'copy', 'child_count': 7, 'target_index': 4, 'target_level': 5}, [True, 'p', 6, 5, 'copy']), ('before sibling', {'target': 't', 'source': 's', 'closure': ['s', 'c'], 'placement': 'before', 'parent': 'p', 'branch': True, 'source_partition': 'A', 'target_partition': 'A', 'writable': True, 'copy_allowed': True, 'move_allowed': False, 'effect': 'copy', 'child_count': 7, 'target_index': 4, 'target_level': 5}, [True, 'p', 5, 5, 'copy']), ('descendant', {'target': 'c', 'source': 's', 'closure': ['s', 'c'], 'placement': 'inside', 'parent': 'p', 'branch': True, 'source_partition': 'A', 'target_partition': 'B', 'writable': True, 'copy_allowed': True, 'move_allowed': False, 'effect': 'copy', 'child_count': 7, 'target_index': 4, 'target_level': 5}, [False, 'c', 8, 6, 'none']), ('leaf inside', {'target': 't', 'source': 's', 'closure': ['s', 'c'], 'placement': 'inside', 'parent': 'p', 'branch': False, 'source_partition': 'A', 'target_partition': 'B', 'writable': True, 'copy_allowed': True, 'move_allowed': False, 'effect': 'copy', 'child_count': 7, 'target_index': 4, 'target_level': 5}, [False, 't', 8, 6, 'none']), ('leaf sibling', {'target': 't', 'source': 's', 'closure': ['s', 'c'], 'placement': 'after', 'parent': 'p', 'branch': False, 'source_partition': 'A', 'target_partition': 'A', 'writable': True, 'copy_allowed': True, 'move_allowed': False, 'effect': 'copy', 'child_count': 7, 'target_index': 4, 'target_level': 5}, [True, 'p', 6, 5, 'copy']), ('root sibling', {'target': 't', 'source': 's', 'closure': ['s', 'c'], 'placement': 'before', 'parent': None, 'branch': True, 'source_partition': 'A', 'target_partition': 'B', 'writable': True, 'copy_allowed': True, 'move_allowed': False, 'effect': 'copy', 'child_count': 7, 'target_index': 4, 'target_level': 5}, [False, None, 5, 5, 'none']), ('forbidden copy', {'target': 't', 'source': 's', 'closure': ['s', 'c'], 'placement': 'inside', 'parent': 'p', 'branch': True, 'source_partition': 'A', 'target_partition': 'B', 'writable': True, 'copy_allowed': False, 'move_allowed': True, 'effect': 'copy', 'child_count': 7, 'target_index': 4, 'target_level': 5}, [False, 't', 8, 6, 'none']), ('move denied', {'target': 't', 'source': 's', 'closure': ['s', 'c'], 'placement': 'inside', 'parent': 'p', 'branch': True, 'source_partition': 'A', 'target_partition': 'B', 'writable': True, 'copy_allowed': True, 'move_allowed': False, 'effect': 'move', 'child_count': 7, 'target_index': 4, 'target_level': 5}, [False, 't', 8, 6, 'none']), ('partition mismatch', {'target': 't', 'source': 's', 'closure': ['s', 'c'], 'placement': 'after', 'parent': 'p', 'branch': True, 'source_partition': 'A', 'target_partition': 'B', 'writable': True, 'copy_allowed': True, 'move_allowed': False, 'effect': 'copy', 'child_count': 7, 'target_index': 4, 'target_level': 5}, [False, 'p', 6, 5, 'none'])], 5: [('copy inside', {'target': 't', 'source': 's', 'closure': ['s', 'c'], 'placement': 'inside', 'parent': 'p', 'branch': True, 'source_partition': 'A', 'target_partition': 'B', 'writable': True, 'copy_allowed': True, 'move_allowed': False, 'effect': 'copy', 'child_count': 8, 'target_index': 5, 'target_level': 6}, [True, 't', 9, 7, 'copy']), ('after sibling', {'target': 't', 'source': 's', 'closure': ['s', 'c'], 'placement': 'after', 'parent': 'p', 'branch': True, 'source_partition': 'A', 'target_partition': 'A', 'writable': True, 'copy_allowed': True, 'move_allowed': False, 'effect': 'copy', 'child_count': 8, 'target_index': 5, 'target_level': 6}, [True, 'p', 7, 6, 'copy']), ('before sibling', {'target': 't', 'source': 's', 'closure': ['s', 'c'], 'placement': 'before', 'parent': 'p', 'branch': True, 'source_partition': 'A', 'target_partition': 'A', 'writable': True, 'copy_allowed': True, 'move_allowed': False, 'effect': 'copy', 'child_count': 8, 'target_index': 5, 'target_level': 6}, [True, 'p', 6, 6, 'copy']), ('descendant', {'target': 'c', 'source': 's', 'closure': ['s', 'c'], 'placement': 'inside', 'parent': 'p', 'branch': True, 'source_partition': 'A', 'target_partition': 'B', 'writable': True, 'copy_allowed': True, 'move_allowed': False, 'effect': 'copy', 'child_count': 8, 'target_index': 5, 'target_level': 6}, [False, 'c', 9, 7, 'none']), ('leaf inside', {'target': 't', 'source': 's', 'closure': ['s', 'c'], 'placement': 'inside', 'parent': 'p', 'branch': False, 'source_partition': 'A', 'target_partition': 'B', 'writable': True, 'copy_allowed': True, 'move_allowed': False, 'effect': 'copy', 'child_count': 8, 'target_index': 5, 'target_level': 6}, [False, 't', 9, 7, 'none']), ('leaf sibling', {'target': 't', 'source': 's', 'closure': ['s', 'c'], 'placement': 'after', 'parent': 'p', 'branch': False, 'source_partition': 'A', 'target_partition': 'A', 'writable': True, 'copy_allowed': True, 'move_allowed': False, 'effect': 'copy', 'child_count': 8, 'target_index': 5, 'target_level': 6}, [True, 'p', 7, 6, 'copy']), ('root sibling', {'target': 't', 'source': 's', 'closure': ['s', 'c'], 'placement': 'before', 'parent': None, 'branch': True, 'source_partition': 'A', 'target_partition': 'B', 'writable': True, 'copy_allowed': True, 'move_allowed': False, 'effect': 'copy', 'child_count': 8, 'target_index': 5, 'target_level': 6}, [False, None, 6, 6, 'none']), ('forbidden copy', {'target': 't', 'source': 's', 'closure': ['s', 'c'], 'placement': 'inside', 'parent': 'p', 'branch': True, 'source_partition': 'A', 'target_partition': 'B', 'writable': True, 'copy_allowed': False, 'move_allowed': True, 'effect': 'copy', 'child_count': 8, 'target_index': 5, 'target_level': 6}, [False, 't', 9, 7, 'none']), ('move denied', {'target': 't', 'source': 's', 'closure': ['s', 'c'], 'placement': 'inside', 'parent': 'p', 'branch': True, 'source_partition': 'A', 'target_partition': 'B', 'writable': True, 'copy_allowed': True, 'move_allowed': False, 'effect': 'move', 'child_count': 8, 'target_index': 5, 'target_level': 6}, [False, 't', 9, 7, 'none']), ('partition mismatch', {'target': 't', 'source': 's', 'closure': ['s', 'c'], 'placement': 'after', 'parent': 'p', 'branch': True, 'source_partition': 'A', 'target_partition': 'B', 'writable': True, 'copy_allowed': True, 'move_allowed': False, 'effect': 'copy', 'child_count': 8, 'target_index': 5, 'target_level': 6}, [False, 'p', 7, 6, 'none'])]}
for label, data, expected in cases[N]:
    check(label, solve(data), expected)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
Boundary fixtureActualExpectedOutcome
copy inside[True, 't', 5, 2, 'copy'][True, 't', 5, 3, 'copy']Failed
after sibling[True, 'p', 3, 2, 'copy'][True, 'p', 3, 2, 'copy']Passed
before sibling[True, 'p', 2, 2, 'copy'][True, 'p', 2, 2, 'copy']Passed
descendant[False, 'c', 5, 2, 'none'][False, 'c', 5, 3, 'none']Failed
leaf inside[False, 't', 5, 2, 'none'][False, 't', 5, 3, 'none']Failed
leaf sibling[True, 'p', 3, 2, 'copy'][True, 'p', 3, 2, 'copy']Passed
root sibling[False, None, 2, 2, 'none'][False, None, 2, 2, 'none']Passed
forbidden copy[False, 't', 5, 2, 'none'][False, 't', 5, 3, 'none']Failed
move denied[False, 't', 5, 2, 'none'][False, 't', 5, 3, 'none']Failed
partition mismatch[False, 'p', 3, 2, 'none'][False, 'p', 3, 2, 'none']Passed

SHA-256 / c97eb6ff24c656f37eebbe624092ab717347b195adf1b86f25ad783d6e0e4729

2 / The unsuccessful fix

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(d):
    selfdrop=d['target'] in d['closure']
    inside=d['placement']=='inside'
    parent=d['target'] if inside else d['parent']
    structural=(d['branch'] if inside else parent is not None)
    partition=inside or d['source_partition']==d['target_partition']
    permission=d['writable'] and (d['copy_allowed'] if d['effect']=='copy' else d['move_allowed'])
    allowed=not selfdrop and structural and partition and permission
    position=d['child_count']+1 if inside else d['target_index']+1+(d['placement']=='after')
    level=d['target_level']+1
    effect=d['effect'] if allowed else 'none'
    return [allowed,parent,position,level,effect]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
cases = {1: [('copy inside', {'target': 't', 'source': 's', 'closure': ['s', 'c'], 'placement': 'inside', 'parent': 'p', 'branch': True, 'source_partition': 'A', 'target_partition': 'B', 'writable': True, 'copy_allowed': True, 'move_allowed': False, 'effect': 'copy', 'child_count': 4, 'target_index': 1, 'target_level': 2}, [True, 't', 5, 3, 'copy']), ('after sibling', {'target': 't', 'source': 's', 'closure': ['s', 'c'], 'placement': 'after', 'parent': 'p', 'branch': True, 'source_partition': 'A', 'target_partition': 'A', 'writable': True, 'copy_allowed': True, 'move_allowed': False, 'effect': 'copy', 'child_count': 4, 'target_index': 1, 'target_level': 2}, [True, 'p', 3, 2, 'copy']), ('before sibling', {'target': 't', 'source': 's', 'closure': ['s', 'c'], 'placement': 'before', 'parent': 'p', 'branch': True, 'source_partition': 'A', 'target_partition': 'A', 'writable': True, 'copy_allowed': True, 'move_allowed': False, 'effect': 'copy', 'child_count': 4, 'target_index': 1, 'target_level': 2}, [True, 'p', 2, 2, 'copy']), ('descendant', {'target': 'c', 'source': 's', 'closure': ['s', 'c'], 'placement': 'inside', 'parent': 'p', 'branch': True, 'source_partition': 'A', 'target_partition': 'B', 'writable': True, 'copy_allowed': True, 'move_allowed': False, 'effect': 'copy', 'child_count': 4, 'target_index': 1, 'target_level': 2}, [False, 'c', 5, 3, 'none']), ('leaf inside', {'target': 't', 'source': 's', 'closure': ['s', 'c'], 'placement': 'inside', 'parent': 'p', 'branch': False, 'source_partition': 'A', 'target_partition': 'B', 'writable': True, 'copy_allowed': True, 'move_allowed': False, 'effect': 'copy', 'child_count': 4, 'target_index': 1, 'target_level': 2}, [False, 't', 5, 3, 'none']), ('leaf sibling', {'target': 't', 'source': 's', 'closure': ['s', 'c'], 'placement': 'after', 'parent': 'p', 'branch': False, 'source_partition': 'A', 'target_partition': 'A', 'writable': True, 'copy_allowed': True, 'move_allowed': False, 'effect': 'copy', 'child_count': 4, 'target_index': 1, 'target_level': 2}, [True, 'p', 3, 2, 'copy']), ('root sibling', {'target': 't', 'source': 's', 'closure': ['s', 'c'], 'placement': 'before', 'parent': None, 'branch': True, 'source_partition': 'A', 'target_partition': 'B', 'writable': True, 'copy_allowed': True, 'move_allowed': False, 'effect': 'copy', 'child_count': 4, 'target_index': 1, 'target_level': 2}, [False, None, 2, 2, 'none']), ('forbidden copy', {'target': 't', 'source': 's', 'closure': ['s', 'c'], 'placement': 'inside', 'parent': 'p', 'branch': True, 'source_partition': 'A', 'target_partition': 'B', 'writable': True, 'copy_allowed': False, 'move_allowed': True, 'effect': 'copy', 'child_count': 4, 'target_index': 1, 'target_level': 2}, [False, 't', 5, 3, 'none']), ('move denied', {'target': 't', 'source': 's', 'closure': ['s', 'c'], 'placement': 'inside', 'parent': 'p', 'branch': True, 'source_partition': 'A', 'target_partition': 'B', 'writable': True, 'copy_allowed': True, 'move_allowed': False, 'effect': 'move', 'child_count': 4, 'target_index': 1, 'target_level': 2}, [False, 't', 5, 3, 'none']), ('partition mismatch', {'target': 't', 'source': 's', 'closure': ['s', 'c'], 'placement': 'after', 'parent': 'p', 'branch': True, 'source_partition': 'A', 'target_partition': 'B', 'writable': True, 'copy_allowed': True, 'move_allowed': False, 'effect': 'copy', 'child_count': 4, 'target_index': 1, 'target_level': 2}, [False, 'p', 3, 2, 'none'])], 2: [('copy inside', {'target': 't', 'source': 's', 'closure': ['s', 'c'], 'placement': 'inside', 'parent': 'p', 'branch': True, 'source_partition': 'A', 'target_partition': 'B', 'writable': True, 'copy_allowed': True, 'move_allowed': False, 'effect': 'copy', 'child_count': 5, 'target_index': 2, 'target_level': 3}, [True, 't', 6, 4, 'copy']), ('after sibling', {'target': 't', 'source': 's', 'closure': ['s', 'c'], 'placement': 'after', 'parent': 'p', 'branch': True, 'source_partition': 'A', 'target_partition': 'A', 'writable': True, 'copy_allowed': True, 'move_allowed': False, 'effect': 'copy', 'child_count': 5, 'target_index': 2, 'target_level': 3}, [True, 'p', 4, 3, 'copy']), ('before sibling', {'target': 't', 'source': 's', 'closure': ['s', 'c'], 'placement': 'before', 'parent': 'p', 'branch': True, 'source_partition': 'A', 'target_partition': 'A', 'writable': True, 'copy_allowed': True, 'move_allowed': False, 'effect': 'copy', 'child_count': 5, 'target_index': 2, 'target_level': 3}, [True, 'p', 3, 3, 'copy']), ('descendant', {'target': 'c', 'source': 's', 'closure': ['s', 'c'], 'placement': 'inside', 'parent': 'p', 'branch': True, 'source_partition': 'A', 'target_partition': 'B', 'writable': True, 'copy_allowed': True, 'move_allowed': False, 'effect': 'copy', 'child_count': 5, 'target_index': 2, 'target_level': 3}, [False, 'c', 6, 4, 'none']), ('leaf inside', {'target': 't', 'source': 's', 'closure': ['s', 'c'], 'placement': 'inside', 'parent': 'p', 'branch': False, 'source_partition': 'A', 'target_partition': 'B', 'writable': True, 'copy_allowed': True, 'move_allowed': False, 'effect': 'copy', 'child_count': 5, 'target_index': 2, 'target_level': 3}, [False, 't', 6, 4, 'none']), ('leaf sibling', {'target': 't', 'source': 's', 'closure': ['s', 'c'], 'placement': 'after', 'parent': 'p', 'branch': False, 'source_partition': 'A', 'target_partition': 'A', 'writable': True, 'copy_allowed': True, 'move_allowed': False, 'effect': 'copy', 'child_count': 5, 'target_index': 2, 'target_level': 3}, [True, 'p', 4, 3, 'copy']), ('root sibling', {'target': 't', 'source': 's', 'closure': ['s', 'c'], 'placement': 'before', 'parent': None, 'branch': True, 'source_partition': 'A', 'target_partition': 'B', 'writable': True, 'copy_allowed': True, 'move_allowed': False, 'effect': 'copy', 'child_count': 5, 'target_index': 2, 'target_level': 3}, [False, None, 3, 3, 'none']), ('forbidden copy', {'target': 't', 'source': 's', 'closure': ['s', 'c'], 'placement': 'inside', 'parent': 'p', 'branch': True, 'source_partition': 'A', 'target_partition': 'B', 'writable': True, 'copy_allowed': False, 'move_allowed': True, 'effect': 'copy', 'child_count': 5, 'target_index': 2, 'target_level': 3}, [False, 't', 6, 4, 'none']), ('move denied', {'target': 't', 'source': 's', 'closure': ['s', 'c'], 'placement': 'inside', 'parent': 'p', 'branch': True, 'source_partition': 'A', 'target_partition': 'B', 'writable': True, 'copy_allowed': True, 'move_allowed': False, 'effect': 'move', 'child_count': 5, 'target_index': 2, 'target_level': 3}, [False, 't', 6, 4, 'none']), ('partition mismatch', {'target': 't', 'source': 's', 'closure': ['s', 'c'], 'placement': 'after', 'parent': 'p', 'branch': True, 'source_partition': 'A', 'target_partition': 'B', 'writable': True, 'copy_allowed': True, 'move_allowed': False, 'effect': 'copy', 'child_count': 5, 'target_index': 2, 'target_level': 3}, [False, 'p', 4, 3, 'none'])], 3: [('copy inside', {'target': 't', 'source': 's', 'closure': ['s', 'c'], 'placement': 'inside', 'parent': 'p', 'branch': True, 'source_partition': 'A', 'target_partition': 'B', 'writable': True, 'copy_allowed': True, 'move_allowed': False, 'effect': 'copy', 'child_count': 6, 'target_index': 3, 'target_level': 4}, [True, 't', 7, 5, 'copy']), ('after sibling', {'target': 't', 'source': 's', 'closure': ['s', 'c'], 'placement': 'after', 'parent': 'p', 'branch': True, 'source_partition': 'A', 'target_partition': 'A', 'writable': True, 'copy_allowed': True, 'move_allowed': False, 'effect': 'copy', 'child_count': 6, 'target_index': 3, 'target_level': 4}, [True, 'p', 5, 4, 'copy']), ('before sibling', {'target': 't', 'source': 's', 'closure': ['s', 'c'], 'placement': 'before', 'parent': 'p', 'branch': True, 'source_partition': 'A', 'target_partition': 'A', 'writable': True, 'copy_allowed': True, 'move_allowed': False, 'effect': 'copy', 'child_count': 6, 'target_index': 3, 'target_level': 4}, [True, 'p', 4, 4, 'copy']), ('descendant', {'target': 'c', 'source': 's', 'closure': ['s', 'c'], 'placement': 'inside', 'parent': 'p', 'branch': True, 'source_partition': 'A', 'target_partition': 'B', 'writable': True, 'copy_allowed': True, 'move_allowed': False, 'effect': 'copy', 'child_count': 6, 'target_index': 3, 'target_level': 4}, [False, 'c', 7, 5, 'none']), ('leaf inside', {'target': 't', 'source': 's', 'closure': ['s', 'c'], 'placement': 'inside', 'parent': 'p', 'branch': False, 'source_partition': 'A', 'target_partition': 'B', 'writable': True, 'copy_allowed': True, 'move_allowed': False, 'effect': 'copy', 'child_count': 6, 'target_index': 3, 'target_level': 4}, [False, 't', 7, 5, 'none']), ('leaf sibling', {'target': 't', 'source': 's', 'closure': ['s', 'c'], 'placement': 'after', 'parent': 'p', 'branch': False, 'source_partition': 'A', 'target_partition': 'A', 'writable': True, 'copy_allowed': True, 'move_allowed': False, 'effect': 'copy', 'child_count': 6, 'target_index': 3, 'target_level': 4}, [True, 'p', 5, 4, 'copy']), ('root sibling', {'target': 't', 'source': 's', 'closure': ['s', 'c'], 'placement': 'before', 'parent': None, 'branch': True, 'source_partition': 'A', 'target_partition': 'B', 'writable': True, 'copy_allowed': True, 'move_allowed': False, 'effect': 'copy', 'child_count': 6, 'target_index': 3, 'target_level': 4}, [False, None, 4, 4, 'none']), ('forbidden copy', {'target': 't', 'source': 's', 'closure': ['s', 'c'], 'placement': 'inside', 'parent': 'p', 'branch': True, 'source_partition': 'A', 'target_partition': 'B', 'writable': True, 'copy_allowed': False, 'move_allowed': True, 'effect': 'copy', 'child_count': 6, 'target_index': 3, 'target_level': 4}, [False, 't', 7, 5, 'none']), ('move denied', {'target': 't', 'source': 's', 'closure': ['s', 'c'], 'placement': 'inside', 'parent': 'p', 'branch': True, 'source_partition': 'A', 'target_partition': 'B', 'writable': True, 'copy_allowed': True, 'move_allowed': False, 'effect': 'move', 'child_count': 6, 'target_index': 3, 'target_level': 4}, [False, 't', 7, 5, 'none']), ('partition mismatch', {'target': 't', 'source': 's', 'closure': ['s', 'c'], 'placement': 'after', 'parent': 'p', 'branch': True, 'source_partition': 'A', 'target_partition': 'B', 'writable': True, 'copy_allowed': True, 'move_allowed': False, 'effect': 'copy', 'child_count': 6, 'target_index': 3, 'target_level': 4}, [False, 'p', 5, 4, 'none'])], 4: [('copy inside', {'target': 't', 'source': 's', 'closure': ['s', 'c'], 'placement': 'inside', 'parent': 'p', 'branch': True, 'source_partition': 'A', 'target_partition': 'B', 'writable': True, 'copy_allowed': True, 'move_allowed': False, 'effect': 'copy', 'child_count': 7, 'target_index': 4, 'target_level': 5}, [True, 't', 8, 6, 'copy']), ('after sibling', {'target': 't', 'source': 's', 'closure': ['s', 'c'], 'placement': 'after', 'parent': 'p', 'branch': True, 'source_partition': 'A', 'target_partition': 'A', 'writable': True, 'copy_allowed': True, 'move_allowed': False, 'effect': 'copy', 'child_count': 7, 'target_index': 4, 'target_level': 5}, [True, 'p', 6, 5, 'copy']), ('before sibling', {'target': 't', 'source': 's', 'closure': ['s', 'c'], 'placement': 'before', 'parent': 'p', 'branch': True, 'source_partition': 'A', 'target_partition': 'A', 'writable': True, 'copy_allowed': True, 'move_allowed': False, 'effect': 'copy', 'child_count': 7, 'target_index': 4, 'target_level': 5}, [True, 'p', 5, 5, 'copy']), ('descendant', {'target': 'c', 'source': 's', 'closure': ['s', 'c'], 'placement': 'inside', 'parent': 'p', 'branch': True, 'source_partition': 'A', 'target_partition': 'B', 'writable': True, 'copy_allowed': True, 'move_allowed': False, 'effect': 'copy', 'child_count': 7, 'target_index': 4, 'target_level': 5}, [False, 'c', 8, 6, 'none']), ('leaf inside', {'target': 't', 'source': 's', 'closure': ['s', 'c'], 'placement': 'inside', 'parent': 'p', 'branch': False, 'source_partition': 'A', 'target_partition': 'B', 'writable': True, 'copy_allowed': True, 'move_allowed': False, 'effect': 'copy', 'child_count': 7, 'target_index': 4, 'target_level': 5}, [False, 't', 8, 6, 'none']), ('leaf sibling', {'target': 't', 'source': 's', 'closure': ['s', 'c'], 'placement': 'after', 'parent': 'p', 'branch': False, 'source_partition': 'A', 'target_partition': 'A', 'writable': True, 'copy_allowed': True, 'move_allowed': False, 'effect': 'copy', 'child_count': 7, 'target_index': 4, 'target_level': 5}, [True, 'p', 6, 5, 'copy']), ('root sibling', {'target': 't', 'source': 's', 'closure': ['s', 'c'], 'placement': 'before', 'parent': None, 'branch': True, 'source_partition': 'A', 'target_partition': 'B', 'writable': True, 'copy_allowed': True, 'move_allowed': False, 'effect': 'copy', 'child_count': 7, 'target_index': 4, 'target_level': 5}, [False, None, 5, 5, 'none']), ('forbidden copy', {'target': 't', 'source': 's', 'closure': ['s', 'c'], 'placement': 'inside', 'parent': 'p', 'branch': True, 'source_partition': 'A', 'target_partition': 'B', 'writable': True, 'copy_allowed': False, 'move_allowed': True, 'effect': 'copy', 'child_count': 7, 'target_index': 4, 'target_level': 5}, [False, 't', 8, 6, 'none']), ('move denied', {'target': 't', 'source': 's', 'closure': ['s', 'c'], 'placement': 'inside', 'parent': 'p', 'branch': True, 'source_partition': 'A', 'target_partition': 'B', 'writable': True, 'copy_allowed': True, 'move_allowed': False, 'effect': 'move', 'child_count': 7, 'target_index': 4, 'target_level': 5}, [False, 't', 8, 6, 'none']), ('partition mismatch', {'target': 't', 'source': 's', 'closure': ['s', 'c'], 'placement': 'after', 'parent': 'p', 'branch': True, 'source_partition': 'A', 'target_partition': 'B', 'writable': True, 'copy_allowed': True, 'move_allowed': False, 'effect': 'copy', 'child_count': 7, 'target_index': 4, 'target_level': 5}, [False, 'p', 6, 5, 'none'])], 5: [('copy inside', {'target': 't', 'source': 's', 'closure': ['s', 'c'], 'placement': 'inside', 'parent': 'p', 'branch': True, 'source_partition': 'A', 'target_partition': 'B', 'writable': True, 'copy_allowed': True, 'move_allowed': False, 'effect': 'copy', 'child_count': 8, 'target_index': 5, 'target_level': 6}, [True, 't', 9, 7, 'copy']), ('after sibling', {'target': 't', 'source': 's', 'closure': ['s', 'c'], 'placement': 'after', 'parent': 'p', 'branch': True, 'source_partition': 'A', 'target_partition': 'A', 'writable': True, 'copy_allowed': True, 'move_allowed': False, 'effect': 'copy', 'child_count': 8, 'target_index': 5, 'target_level': 6}, [True, 'p', 7, 6, 'copy']), ('before sibling', {'target': 't', 'source': 's', 'closure': ['s', 'c'], 'placement': 'before', 'parent': 'p', 'branch': True, 'source_partition': 'A', 'target_partition': 'A', 'writable': True, 'copy_allowed': True, 'move_allowed': False, 'effect': 'copy', 'child_count': 8, 'target_index': 5, 'target_level': 6}, [True, 'p', 6, 6, 'copy']), ('descendant', {'target': 'c', 'source': 's', 'closure': ['s', 'c'], 'placement': 'inside', 'parent': 'p', 'branch': True, 'source_partition': 'A', 'target_partition': 'B', 'writable': True, 'copy_allowed': True, 'move_allowed': False, 'effect': 'copy', 'child_count': 8, 'target_index': 5, 'target_level': 6}, [False, 'c', 9, 7, 'none']), ('leaf inside', {'target': 't', 'source': 's', 'closure': ['s', 'c'], 'placement': 'inside', 'parent': 'p', 'branch': False, 'source_partition': 'A', 'target_partition': 'B', 'writable': True, 'copy_allowed': True, 'move_allowed': False, 'effect': 'copy', 'child_count': 8, 'target_index': 5, 'target_level': 6}, [False, 't', 9, 7, 'none']), ('leaf sibling', {'target': 't', 'source': 's', 'closure': ['s', 'c'], 'placement': 'after', 'parent': 'p', 'branch': False, 'source_partition': 'A', 'target_partition': 'A', 'writable': True, 'copy_allowed': True, 'move_allowed': False, 'effect': 'copy', 'child_count': 8, 'target_index': 5, 'target_level': 6}, [True, 'p', 7, 6, 'copy']), ('root sibling', {'target': 't', 'source': 's', 'closure': ['s', 'c'], 'placement': 'before', 'parent': None, 'branch': True, 'source_partition': 'A', 'target_partition': 'B', 'writable': True, 'copy_allowed': True, 'move_allowed': False, 'effect': 'copy', 'child_count': 8, 'target_index': 5, 'target_level': 6}, [False, None, 6, 6, 'none']), ('forbidden copy', {'target': 't', 'source': 's', 'closure': ['s', 'c'], 'placement': 'inside', 'parent': 'p', 'branch': True, 'source_partition': 'A', 'target_partition': 'B', 'writable': True, 'copy_allowed': False, 'move_allowed': True, 'effect': 'copy', 'child_count': 8, 'target_index': 5, 'target_level': 6}, [False, 't', 9, 7, 'none']), ('move denied', {'target': 't', 'source': 's', 'closure': ['s', 'c'], 'placement': 'inside', 'parent': 'p', 'branch': True, 'source_partition': 'A', 'target_partition': 'B', 'writable': True, 'copy_allowed': True, 'move_allowed': False, 'effect': 'move', 'child_count': 8, 'target_index': 5, 'target_level': 6}, [False, 't', 9, 7, 'none']), ('partition mismatch', {'target': 't', 'source': 's', 'closure': ['s', 'c'], 'placement': 'after', 'parent': 'p', 'branch': True, 'source_partition': 'A', 'target_partition': 'B', 'writable': True, 'copy_allowed': True, 'move_allowed': False, 'effect': 'copy', 'child_count': 8, 'target_index': 5, 'target_level': 6}, [False, 'p', 7, 6, 'none'])]}
for label, data, expected in cases[N]:
    check(label, solve(data), expected)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
Boundary fixtureActualExpectedOutcome
copy inside[True, 't', 5, 3, 'copy'][True, 't', 5, 3, 'copy']Passed
after sibling[True, 'p', 3, 3, 'copy'][True, 'p', 3, 2, 'copy']Failed
before sibling[True, 'p', 2, 3, 'copy'][True, 'p', 2, 2, 'copy']Failed
descendant[False, 'c', 5, 3, 'none'][False, 'c', 5, 3, 'none']Passed
leaf inside[False, 't', 5, 3, 'none'][False, 't', 5, 3, 'none']Passed
leaf sibling[True, 'p', 3, 3, 'copy'][True, 'p', 3, 2, 'copy']Failed
root sibling[False, None, 2, 3, 'none'][False, None, 2, 2, 'none']Failed
forbidden copy[False, 't', 5, 3, 'none'][False, 't', 5, 3, 'none']Passed
move denied[False, 't', 5, 3, 'none'][False, 't', 5, 3, 'none']Passed
partition mismatch[False, 'p', 3, 3, 'none'][False, 'p', 3, 2, 'none']Failed

SHA-256 / eda09b8af4ae7a1c34cd104fa6cba611752fdebc3f3a3b0fc3e358044f95a276

3 / The verified repair

Exit 0
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(d):
    selfdrop=d['target'] in d['closure']
    inside=d['placement']=='inside'
    parent=d['target'] if inside else d['parent']
    structural=(d['branch'] if inside else parent is not None)
    partition=inside or d['source_partition']==d['target_partition']
    permission=d['writable'] and (d['copy_allowed'] if d['effect']=='copy' else d['move_allowed'])
    allowed=not selfdrop and structural and partition and permission
    position=d['child_count']+1 if inside else d['target_index']+1+(d['placement']=='after')
    level=d['target_level']+1 if inside else d['target_level']
    effect=d['effect'] if allowed else 'none'
    return [allowed,parent,position,level,effect]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
cases = {1: [('copy inside', {'target': 't', 'source': 's', 'closure': ['s', 'c'], 'placement': 'inside', 'parent': 'p', 'branch': True, 'source_partition': 'A', 'target_partition': 'B', 'writable': True, 'copy_allowed': True, 'move_allowed': False, 'effect': 'copy', 'child_count': 4, 'target_index': 1, 'target_level': 2}, [True, 't', 5, 3, 'copy']), ('after sibling', {'target': 't', 'source': 's', 'closure': ['s', 'c'], 'placement': 'after', 'parent': 'p', 'branch': True, 'source_partition': 'A', 'target_partition': 'A', 'writable': True, 'copy_allowed': True, 'move_allowed': False, 'effect': 'copy', 'child_count': 4, 'target_index': 1, 'target_level': 2}, [True, 'p', 3, 2, 'copy']), ('before sibling', {'target': 't', 'source': 's', 'closure': ['s', 'c'], 'placement': 'before', 'parent': 'p', 'branch': True, 'source_partition': 'A', 'target_partition': 'A', 'writable': True, 'copy_allowed': True, 'move_allowed': False, 'effect': 'copy', 'child_count': 4, 'target_index': 1, 'target_level': 2}, [True, 'p', 2, 2, 'copy']), ('descendant', {'target': 'c', 'source': 's', 'closure': ['s', 'c'], 'placement': 'inside', 'parent': 'p', 'branch': True, 'source_partition': 'A', 'target_partition': 'B', 'writable': True, 'copy_allowed': True, 'move_allowed': False, 'effect': 'copy', 'child_count': 4, 'target_index': 1, 'target_level': 2}, [False, 'c', 5, 3, 'none']), ('leaf inside', {'target': 't', 'source': 's', 'closure': ['s', 'c'], 'placement': 'inside', 'parent': 'p', 'branch': False, 'source_partition': 'A', 'target_partition': 'B', 'writable': True, 'copy_allowed': True, 'move_allowed': False, 'effect': 'copy', 'child_count': 4, 'target_index': 1, 'target_level': 2}, [False, 't', 5, 3, 'none']), ('leaf sibling', {'target': 't', 'source': 's', 'closure': ['s', 'c'], 'placement': 'after', 'parent': 'p', 'branch': False, 'source_partition': 'A', 'target_partition': 'A', 'writable': True, 'copy_allowed': True, 'move_allowed': False, 'effect': 'copy', 'child_count': 4, 'target_index': 1, 'target_level': 2}, [True, 'p', 3, 2, 'copy']), ('root sibling', {'target': 't', 'source': 's', 'closure': ['s', 'c'], 'placement': 'before', 'parent': None, 'branch': True, 'source_partition': 'A', 'target_partition': 'B', 'writable': True, 'copy_allowed': True, 'move_allowed': False, 'effect': 'copy', 'child_count': 4, 'target_index': 1, 'target_level': 2}, [False, None, 2, 2, 'none']), ('forbidden copy', {'target': 't', 'source': 's', 'closure': ['s', 'c'], 'placement': 'inside', 'parent': 'p', 'branch': True, 'source_partition': 'A', 'target_partition': 'B', 'writable': True, 'copy_allowed': False, 'move_allowed': True, 'effect': 'copy', 'child_count': 4, 'target_index': 1, 'target_level': 2}, [False, 't', 5, 3, 'none']), ('move denied', {'target': 't', 'source': 's', 'closure': ['s', 'c'], 'placement': 'inside', 'parent': 'p', 'branch': True, 'source_partition': 'A', 'target_partition': 'B', 'writable': True, 'copy_allowed': True, 'move_allowed': False, 'effect': 'move', 'child_count': 4, 'target_index': 1, 'target_level': 2}, [False, 't', 5, 3, 'none']), ('partition mismatch', {'target': 't', 'source': 's', 'closure': ['s', 'c'], 'placement': 'after', 'parent': 'p', 'branch': True, 'source_partition': 'A', 'target_partition': 'B', 'writable': True, 'copy_allowed': True, 'move_allowed': False, 'effect': 'copy', 'child_count': 4, 'target_index': 1, 'target_level': 2}, [False, 'p', 3, 2, 'none'])], 2: [('copy inside', {'target': 't', 'source': 's', 'closure': ['s', 'c'], 'placement': 'inside', 'parent': 'p', 'branch': True, 'source_partition': 'A', 'target_partition': 'B', 'writable': True, 'copy_allowed': True, 'move_allowed': False, 'effect': 'copy', 'child_count': 5, 'target_index': 2, 'target_level': 3}, [True, 't', 6, 4, 'copy']), ('after sibling', {'target': 't', 'source': 's', 'closure': ['s', 'c'], 'placement': 'after', 'parent': 'p', 'branch': True, 'source_partition': 'A', 'target_partition': 'A', 'writable': True, 'copy_allowed': True, 'move_allowed': False, 'effect': 'copy', 'child_count': 5, 'target_index': 2, 'target_level': 3}, [True, 'p', 4, 3, 'copy']), ('before sibling', {'target': 't', 'source': 's', 'closure': ['s', 'c'], 'placement': 'before', 'parent': 'p', 'branch': True, 'source_partition': 'A', 'target_partition': 'A', 'writable': True, 'copy_allowed': True, 'move_allowed': False, 'effect': 'copy', 'child_count': 5, 'target_index': 2, 'target_level': 3}, [True, 'p', 3, 3, 'copy']), ('descendant', {'target': 'c', 'source': 's', 'closure': ['s', 'c'], 'placement': 'inside', 'parent': 'p', 'branch': True, 'source_partition': 'A', 'target_partition': 'B', 'writable': True, 'copy_allowed': True, 'move_allowed': False, 'effect': 'copy', 'child_count': 5, 'target_index': 2, 'target_level': 3}, [False, 'c', 6, 4, 'none']), ('leaf inside', {'target': 't', 'source': 's', 'closure': ['s', 'c'], 'placement': 'inside', 'parent': 'p', 'branch': False, 'source_partition': 'A', 'target_partition': 'B', 'writable': True, 'copy_allowed': True, 'move_allowed': False, 'effect': 'copy', 'child_count': 5, 'target_index': 2, 'target_level': 3}, [False, 't', 6, 4, 'none']), ('leaf sibling', {'target': 't', 'source': 's', 'closure': ['s', 'c'], 'placement': 'after', 'parent': 'p', 'branch': False, 'source_partition': 'A', 'target_partition': 'A', 'writable': True, 'copy_allowed': True, 'move_allowed': False, 'effect': 'copy', 'child_count': 5, 'target_index': 2, 'target_level': 3}, [True, 'p', 4, 3, 'copy']), ('root sibling', {'target': 't', 'source': 's', 'closure': ['s', 'c'], 'placement': 'before', 'parent': None, 'branch': True, 'source_partition': 'A', 'target_partition': 'B', 'writable': True, 'copy_allowed': True, 'move_allowed': False, 'effect': 'copy', 'child_count': 5, 'target_index': 2, 'target_level': 3}, [False, None, 3, 3, 'none']), ('forbidden copy', {'target': 't', 'source': 's', 'closure': ['s', 'c'], 'placement': 'inside', 'parent': 'p', 'branch': True, 'source_partition': 'A', 'target_partition': 'B', 'writable': True, 'copy_allowed': False, 'move_allowed': True, 'effect': 'copy', 'child_count': 5, 'target_index': 2, 'target_level': 3}, [False, 't', 6, 4, 'none']), ('move denied', {'target': 't', 'source': 's', 'closure': ['s', 'c'], 'placement': 'inside', 'parent': 'p', 'branch': True, 'source_partition': 'A', 'target_partition': 'B', 'writable': True, 'copy_allowed': True, 'move_allowed': False, 'effect': 'move', 'child_count': 5, 'target_index': 2, 'target_level': 3}, [False, 't', 6, 4, 'none']), ('partition mismatch', {'target': 't', 'source': 's', 'closure': ['s', 'c'], 'placement': 'after', 'parent': 'p', 'branch': True, 'source_partition': 'A', 'target_partition': 'B', 'writable': True, 'copy_allowed': True, 'move_allowed': False, 'effect': 'copy', 'child_count': 5, 'target_index': 2, 'target_level': 3}, [False, 'p', 4, 3, 'none'])], 3: [('copy inside', {'target': 't', 'source': 's', 'closure': ['s', 'c'], 'placement': 'inside', 'parent': 'p', 'branch': True, 'source_partition': 'A', 'target_partition': 'B', 'writable': True, 'copy_allowed': True, 'move_allowed': False, 'effect': 'copy', 'child_count': 6, 'target_index': 3, 'target_level': 4}, [True, 't', 7, 5, 'copy']), ('after sibling', {'target': 't', 'source': 's', 'closure': ['s', 'c'], 'placement': 'after', 'parent': 'p', 'branch': True, 'source_partition': 'A', 'target_partition': 'A', 'writable': True, 'copy_allowed': True, 'move_allowed': False, 'effect': 'copy', 'child_count': 6, 'target_index': 3, 'target_level': 4}, [True, 'p', 5, 4, 'copy']), ('before sibling', {'target': 't', 'source': 's', 'closure': ['s', 'c'], 'placement': 'before', 'parent': 'p', 'branch': True, 'source_partition': 'A', 'target_partition': 'A', 'writable': True, 'copy_allowed': True, 'move_allowed': False, 'effect': 'copy', 'child_count': 6, 'target_index': 3, 'target_level': 4}, [True, 'p', 4, 4, 'copy']), ('descendant', {'target': 'c', 'source': 's', 'closure': ['s', 'c'], 'placement': 'inside', 'parent': 'p', 'branch': True, 'source_partition': 'A', 'target_partition': 'B', 'writable': True, 'copy_allowed': True, 'move_allowed': False, 'effect': 'copy', 'child_count': 6, 'target_index': 3, 'target_level': 4}, [False, 'c', 7, 5, 'none']), ('leaf inside', {'target': 't', 'source': 's', 'closure': ['s', 'c'], 'placement': 'inside', 'parent': 'p', 'branch': False, 'source_partition': 'A', 'target_partition': 'B', 'writable': True, 'copy_allowed': True, 'move_allowed': False, 'effect': 'copy', 'child_count': 6, 'target_index': 3, 'target_level': 4}, [False, 't', 7, 5, 'none']), ('leaf sibling', {'target': 't', 'source': 's', 'closure': ['s', 'c'], 'placement': 'after', 'parent': 'p', 'branch': False, 'source_partition': 'A', 'target_partition': 'A', 'writable': True, 'copy_allowed': True, 'move_allowed': False, 'effect': 'copy', 'child_count': 6, 'target_index': 3, 'target_level': 4}, [True, 'p', 5, 4, 'copy']), ('root sibling', {'target': 't', 'source': 's', 'closure': ['s', 'c'], 'placement': 'before', 'parent': None, 'branch': True, 'source_partition': 'A', 'target_partition': 'B', 'writable': True, 'copy_allowed': True, 'move_allowed': False, 'effect': 'copy', 'child_count': 6, 'target_index': 3, 'target_level': 4}, [False, None, 4, 4, 'none']), ('forbidden copy', {'target': 't', 'source': 's', 'closure': ['s', 'c'], 'placement': 'inside', 'parent': 'p', 'branch': True, 'source_partition': 'A', 'target_partition': 'B', 'writable': True, 'copy_allowed': False, 'move_allowed': True, 'effect': 'copy', 'child_count': 6, 'target_index': 3, 'target_level': 4}, [False, 't', 7, 5, 'none']), ('move denied', {'target': 't', 'source': 's', 'closure': ['s', 'c'], 'placement': 'inside', 'parent': 'p', 'branch': True, 'source_partition': 'A', 'target_partition': 'B', 'writable': True, 'copy_allowed': True, 'move_allowed': False, 'effect': 'move', 'child_count': 6, 'target_index': 3, 'target_level': 4}, [False, 't', 7, 5, 'none']), ('partition mismatch', {'target': 't', 'source': 's', 'closure': ['s', 'c'], 'placement': 'after', 'parent': 'p', 'branch': True, 'source_partition': 'A', 'target_partition': 'B', 'writable': True, 'copy_allowed': True, 'move_allowed': False, 'effect': 'copy', 'child_count': 6, 'target_index': 3, 'target_level': 4}, [False, 'p', 5, 4, 'none'])], 4: [('copy inside', {'target': 't', 'source': 's', 'closure': ['s', 'c'], 'placement': 'inside', 'parent': 'p', 'branch': True, 'source_partition': 'A', 'target_partition': 'B', 'writable': True, 'copy_allowed': True, 'move_allowed': False, 'effect': 'copy', 'child_count': 7, 'target_index': 4, 'target_level': 5}, [True, 't', 8, 6, 'copy']), ('after sibling', {'target': 't', 'source': 's', 'closure': ['s', 'c'], 'placement': 'after', 'parent': 'p', 'branch': True, 'source_partition': 'A', 'target_partition': 'A', 'writable': True, 'copy_allowed': True, 'move_allowed': False, 'effect': 'copy', 'child_count': 7, 'target_index': 4, 'target_level': 5}, [True, 'p', 6, 5, 'copy']), ('before sibling', {'target': 't', 'source': 's', 'closure': ['s', 'c'], 'placement': 'before', 'parent': 'p', 'branch': True, 'source_partition': 'A', 'target_partition': 'A', 'writable': True, 'copy_allowed': True, 'move_allowed': False, 'effect': 'copy', 'child_count': 7, 'target_index': 4, 'target_level': 5}, [True, 'p', 5, 5, 'copy']), ('descendant', {'target': 'c', 'source': 's', 'closure': ['s', 'c'], 'placement': 'inside', 'parent': 'p', 'branch': True, 'source_partition': 'A', 'target_partition': 'B', 'writable': True, 'copy_allowed': True, 'move_allowed': False, 'effect': 'copy', 'child_count': 7, 'target_index': 4, 'target_level': 5}, [False, 'c', 8, 6, 'none']), ('leaf inside', {'target': 't', 'source': 's', 'closure': ['s', 'c'], 'placement': 'inside', 'parent': 'p', 'branch': False, 'source_partition': 'A', 'target_partition': 'B', 'writable': True, 'copy_allowed': True, 'move_allowed': False, 'effect': 'copy', 'child_count': 7, 'target_index': 4, 'target_level': 5}, [False, 't', 8, 6, 'none']), ('leaf sibling', {'target': 't', 'source': 's', 'closure': ['s', 'c'], 'placement': 'after', 'parent': 'p', 'branch': False, 'source_partition': 'A', 'target_partition': 'A', 'writable': True, 'copy_allowed': True, 'move_allowed': False, 'effect': 'copy', 'child_count': 7, 'target_index': 4, 'target_level': 5}, [True, 'p', 6, 5, 'copy']), ('root sibling', {'target': 't', 'source': 's', 'closure': ['s', 'c'], 'placement': 'before', 'parent': None, 'branch': True, 'source_partition': 'A', 'target_partition': 'B', 'writable': True, 'copy_allowed': True, 'move_allowed': False, 'effect': 'copy', 'child_count': 7, 'target_index': 4, 'target_level': 5}, [False, None, 5, 5, 'none']), ('forbidden copy', {'target': 't', 'source': 's', 'closure': ['s', 'c'], 'placement': 'inside', 'parent': 'p', 'branch': True, 'source_partition': 'A', 'target_partition': 'B', 'writable': True, 'copy_allowed': False, 'move_allowed': True, 'effect': 'copy', 'child_count': 7, 'target_index': 4, 'target_level': 5}, [False, 't', 8, 6, 'none']), ('move denied', {'target': 't', 'source': 's', 'closure': ['s', 'c'], 'placement': 'inside', 'parent': 'p', 'branch': True, 'source_partition': 'A', 'target_partition': 'B', 'writable': True, 'copy_allowed': True, 'move_allowed': False, 'effect': 'move', 'child_count': 7, 'target_index': 4, 'target_level': 5}, [False, 't', 8, 6, 'none']), ('partition mismatch', {'target': 't', 'source': 's', 'closure': ['s', 'c'], 'placement': 'after', 'parent': 'p', 'branch': True, 'source_partition': 'A', 'target_partition': 'B', 'writable': True, 'copy_allowed': True, 'move_allowed': False, 'effect': 'copy', 'child_count': 7, 'target_index': 4, 'target_level': 5}, [False, 'p', 6, 5, 'none'])], 5: [('copy inside', {'target': 't', 'source': 's', 'closure': ['s', 'c'], 'placement': 'inside', 'parent': 'p', 'branch': True, 'source_partition': 'A', 'target_partition': 'B', 'writable': True, 'copy_allowed': True, 'move_allowed': False, 'effect': 'copy', 'child_count': 8, 'target_index': 5, 'target_level': 6}, [True, 't', 9, 7, 'copy']), ('after sibling', {'target': 't', 'source': 's', 'closure': ['s', 'c'], 'placement': 'after', 'parent': 'p', 'branch': True, 'source_partition': 'A', 'target_partition': 'A', 'writable': True, 'copy_allowed': True, 'move_allowed': False, 'effect': 'copy', 'child_count': 8, 'target_index': 5, 'target_level': 6}, [True, 'p', 7, 6, 'copy']), ('before sibling', {'target': 't', 'source': 's', 'closure': ['s', 'c'], 'placement': 'before', 'parent': 'p', 'branch': True, 'source_partition': 'A', 'target_partition': 'A', 'writable': True, 'copy_allowed': True, 'move_allowed': False, 'effect': 'copy', 'child_count': 8, 'target_index': 5, 'target_level': 6}, [True, 'p', 6, 6, 'copy']), ('descendant', {'target': 'c', 'source': 's', 'closure': ['s', 'c'], 'placement': 'inside', 'parent': 'p', 'branch': True, 'source_partition': 'A', 'target_partition': 'B', 'writable': True, 'copy_allowed': True, 'move_allowed': False, 'effect': 'copy', 'child_count': 8, 'target_index': 5, 'target_level': 6}, [False, 'c', 9, 7, 'none']), ('leaf inside', {'target': 't', 'source': 's', 'closure': ['s', 'c'], 'placement': 'inside', 'parent': 'p', 'branch': False, 'source_partition': 'A', 'target_partition': 'B', 'writable': True, 'copy_allowed': True, 'move_allowed': False, 'effect': 'copy', 'child_count': 8, 'target_index': 5, 'target_level': 6}, [False, 't', 9, 7, 'none']), ('leaf sibling', {'target': 't', 'source': 's', 'closure': ['s', 'c'], 'placement': 'after', 'parent': 'p', 'branch': False, 'source_partition': 'A', 'target_partition': 'A', 'writable': True, 'copy_allowed': True, 'move_allowed': False, 'effect': 'copy', 'child_count': 8, 'target_index': 5, 'target_level': 6}, [True, 'p', 7, 6, 'copy']), ('root sibling', {'target': 't', 'source': 's', 'closure': ['s', 'c'], 'placement': 'before', 'parent': None, 'branch': True, 'source_partition': 'A', 'target_partition': 'B', 'writable': True, 'copy_allowed': True, 'move_allowed': False, 'effect': 'copy', 'child_count': 8, 'target_index': 5, 'target_level': 6}, [False, None, 6, 6, 'none']), ('forbidden copy', {'target': 't', 'source': 's', 'closure': ['s', 'c'], 'placement': 'inside', 'parent': 'p', 'branch': True, 'source_partition': 'A', 'target_partition': 'B', 'writable': True, 'copy_allowed': False, 'move_allowed': True, 'effect': 'copy', 'child_count': 8, 'target_index': 5, 'target_level': 6}, [False, 't', 9, 7, 'none']), ('move denied', {'target': 't', 'source': 's', 'closure': ['s', 'c'], 'placement': 'inside', 'parent': 'p', 'branch': True, 'source_partition': 'A', 'target_partition': 'B', 'writable': True, 'copy_allowed': True, 'move_allowed': False, 'effect': 'move', 'child_count': 8, 'target_index': 5, 'target_level': 6}, [False, 't', 9, 7, 'none']), ('partition mismatch', {'target': 't', 'source': 's', 'closure': ['s', 'c'], 'placement': 'after', 'parent': 'p', 'branch': True, 'source_partition': 'A', 'target_partition': 'B', 'writable': True, 'copy_allowed': True, 'move_allowed': False, 'effect': 'copy', 'child_count': 8, 'target_index': 5, 'target_level': 6}, [False, 'p', 7, 6, 'none'])]}
for label, data, expected in cases[N]:
    check(label, solve(data), expected)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
Boundary fixtureActualExpectedOutcome
copy inside[True, 't', 5, 3, 'copy'][True, 't', 5, 3, 'copy']Passed
after sibling[True, 'p', 3, 2, 'copy'][True, 'p', 3, 2, 'copy']Passed
before sibling[True, 'p', 2, 2, 'copy'][True, 'p', 2, 2, 'copy']Passed
descendant[False, 'c', 5, 3, 'none'][False, 'c', 5, 3, 'none']Passed
leaf inside[False, 't', 5, 3, 'none'][False, 't', 5, 3, 'none']Passed
leaf sibling[True, 'p', 3, 2, 'copy'][True, 'p', 3, 2, 'copy']Passed
root sibling[False, None, 2, 2, 'none'][False, None, 2, 2, 'none']Passed
forbidden copy[False, 't', 5, 3, 'none'][False, 't', 5, 3, 'none']Passed
move denied[False, 't', 5, 3, 'none'][False, 't', 5, 3, 'none']Passed
partition mismatch[False, 'p', 3, 2, 'none'][False, 'p', 3, 2, 'none']Passed

SHA-256 / b07a02a62b71a2ac266ff21b9609ded74e36bf98711829ce4be61f1150192353

Verification & scope

Synthetic deterministic hierarchical-widget data contract; not an implementation of a browser accessibility tree. This reproducer isolates one failure mechanism. Results cover the supplied fixtures. Variants within a family share a test contract and should remain grouped when constructing evaluation splits. Related mechanisms with a shared evaluation_group must also remain together; these controlled models are not independent production incidents.

Observations recorded using Python 3.12.14 at 2026-09-29T14:43:14.159227+00:00.

Case digest / b3f6d4a0cd0a39c55e20094c6bad3a42936ab4e479e2b5f85da6a56b8aa95629