FAILURE MAP
← Case archive

FA-25211 / Filter interfaces / Open access

Sibling scope requires equal parents and a different leaf · case 01

Sibling scope requires equal parents and a different leaf is violated by the widget projection.

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

ROOT CAUSE

The sibling decision uses `d['path'][:-1]==d['candidate'][:-1]` instead of the stipulated hierarchical-facet projection.

VERIFIED REPAIR

Implement the declared sibling projection: `len(d['path'])==len(d['candidate']) and d['path'][:-1]==d['candidate'][:-1] and d['path']!=d['candidate']`.

Unsuccessful approach: The attempted correction `len(d['path'])==len(d['candidate'])` still violates the explicit contract fixtures.

Case contract

Hierarchical facet identities are path tuples. Breadcrumb display, sibling scoping and subtree indicators operate on path segments rather than string prefixes. This example checks: Sibling scope requires equal parents and a different leaf.

Why this case matters

Filter-widget state and serialization must preserve user constraints while the view changes.

1 / The failure

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

N = 1
observations = []
def solve(d):
    return {'breadcrumb':(' / '.join(d['path'])), 'ancestor':(len(d['candidate'])<len(d['path']) and d['path'][:len(d['candidate'])]==d['candidate']), 'sibling':(d['path'][:-1]==d['candidate'][:-1]), 'leaf-label':(d['path'][-1] if d['path'] else '(root)'), 'up-navigation':(d['path'][:-1]), 'same-leaf':(d['path']==d['candidate'])}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = {1: [({'path': [], 'candidate': []}, {'breadcrumb': '', 'ancestor': False, 'sibling': False, 'leaf-label': '(root)', 'up-navigation': [], 'same-leaf': True}), ({'path': ['a', 'b'], 'candidate': ['b', 'a']}, {'breadcrumb': 'a / b', 'ancestor': False, 'sibling': False, 'leaf-label': 'b', 'up-navigation': ['a'], 'same-leaf': False}), ({'path': ['a'], 'candidate': ['a', 'b']}, {'breadcrumb': 'a', 'ancestor': False, 'sibling': False, 'leaf-label': 'a', 'up-navigation': [], 'same-leaf': False}), ({'path': ['a'], 'candidate': ['ab']}, {'breadcrumb': 'a', 'ancestor': False, 'sibling': True, 'leaf-label': 'a', 'up-navigation': [], 'same-leaf': False}), ({'path': ['a', 'b'], 'candidate': ['a']}, {'breadcrumb': 'a / b', 'ancestor': True, 'sibling': False, 'leaf-label': 'b', 'up-navigation': ['a'], 'same-leaf': False}), ({'path': ['b', 'a'], 'candidate': []}, {'breadcrumb': 'b / a', 'ancestor': True, 'sibling': False, 'leaf-label': 'a', 'up-navigation': ['b'], 'same-leaf': False}), ({'path': ['b', 'a'], 'candidate': ['a', 'b']}, {'breadcrumb': 'b / a', 'ancestor': False, 'sibling': False, 'leaf-label': 'a', 'up-navigation': ['b'], 'same-leaf': False}), ({'path': ['b', 'a'], 'candidate': ['ab']}, {'breadcrumb': 'b / a', 'ancestor': False, 'sibling': False, 'leaf-label': 'a', 'up-navigation': ['b'], 'same-leaf': False}), ({'path': ['ab'], 'candidate': ['a']}, {'breadcrumb': 'ab', 'ancestor': False, 'sibling': True, 'leaf-label': 'ab', 'up-navigation': [], 'same-leaf': False}), ({'path': ['ab'], 'candidate': ['b', 'a']}, {'breadcrumb': 'ab', 'ancestor': False, 'sibling': False, 'leaf-label': 'ab', 'up-navigation': [], 'same-leaf': False})], 2: [({'path': [], 'candidate': ['a']}, {'breadcrumb': '', 'ancestor': False, 'sibling': False, 'leaf-label': '(root)', 'up-navigation': [], 'same-leaf': False}), ({'path': ['ab'], 'candidate': ['ab']}, {'breadcrumb': 'ab', 'ancestor': False, 'sibling': False, 'leaf-label': 'ab', 'up-navigation': [], 'same-leaf': True}), ({'path': ['a', 'b'], 'candidate': ['ab']}, {'breadcrumb': 'a / b', 'ancestor': False, 'sibling': False, 'leaf-label': 'b', 'up-navigation': ['a'], 'same-leaf': False}), ({'path': ['b', 'a'], 'candidate': ['a']}, {'breadcrumb': 'b / a', 'ancestor': False, 'sibling': False, 'leaf-label': 'a', 'up-navigation': ['b'], 'same-leaf': False}), ({'path': ['b', 'a'], 'candidate': ['b', 'a']}, {'breadcrumb': 'b / a', 'ancestor': False, 'sibling': False, 'leaf-label': 'a', 'up-navigation': ['b'], 'same-leaf': True}), ({'path': ['ab'], 'candidate': []}, {'breadcrumb': 'ab', 'ancestor': True, 'sibling': False, 'leaf-label': 'ab', 'up-navigation': [], 'same-leaf': False}), ({'path': ['ab'], 'candidate': ['a', 'b']}, {'breadcrumb': 'ab', 'ancestor': False, 'sibling': False, 'leaf-label': 'ab', 'up-navigation': [], 'same-leaf': False}), ({'path': [], 'candidate': ['b', 'a']}, {'breadcrumb': '', 'ancestor': False, 'sibling': False, 'leaf-label': '(root)', 'up-navigation': [], 'same-leaf': False}), ({'path': ['a'], 'candidate': []}, {'breadcrumb': 'a', 'ancestor': True, 'sibling': False, 'leaf-label': 'a', 'up-navigation': [], 'same-leaf': False}), ({'path': ['a'], 'candidate': ['a', 'b']}, {'breadcrumb': 'a', 'ancestor': False, 'sibling': False, 'leaf-label': 'a', 'up-navigation': [], 'same-leaf': False})], 3: [({'path': [], 'candidate': ['ab']}, {'breadcrumb': '', 'ancestor': False, 'sibling': False, 'leaf-label': '(root)', 'up-navigation': [], 'same-leaf': False}), ({'path': ['a', 'b'], 'candidate': ['a', 'b']}, {'breadcrumb': 'a / b', 'ancestor': False, 'sibling': False, 'leaf-label': 'b', 'up-navigation': ['a'], 'same-leaf': True}), ({'path': ['ab'], 'candidate': ['a']}, {'breadcrumb': 'ab', 'ancestor': False, 'sibling': True, 'leaf-label': 'ab', 'up-navigation': [], 'same-leaf': False}), ({'path': ['ab'], 'candidate': ['b', 'a']}, {'breadcrumb': 'ab', 'ancestor': False, 'sibling': False, 'leaf-label': 'ab', 'up-navigation': [], 'same-leaf': False}), ({'path': [], 'candidate': []}, {'breadcrumb': '', 'ancestor': False, 'sibling': False, 'leaf-label': '(root)', 'up-navigation': [], 'same-leaf': True}), ({'path': [], 'candidate': ['a', 'b']}, {'breadcrumb': '', 'ancestor': False, 'sibling': False, 'leaf-label': '(root)', 'up-navigation': [], 'same-leaf': False}), ({'path': ['a'], 'candidate': ['a']}, {'breadcrumb': 'a', 'ancestor': False, 'sibling': False, 'leaf-label': 'a', 'up-navigation': [], 'same-leaf': True}), ({'path': ['a'], 'candidate': ['b', 'a']}, {'breadcrumb': 'a', 'ancestor': False, 'sibling': False, 'leaf-label': 'a', 'up-navigation': [], 'same-leaf': False}), ({'path': ['a', 'b'], 'candidate': []}, {'breadcrumb': 'a / b', 'ancestor': True, 'sibling': False, 'leaf-label': 'b', 'up-navigation': ['a'], 'same-leaf': False}), ({'path': ['a', 'b'], 'candidate': ['ab']}, {'breadcrumb': 'a / b', 'ancestor': False, 'sibling': False, 'leaf-label': 'b', 'up-navigation': ['a'], 'same-leaf': False})], 4: [({'path': ['a'], 'candidate': []}, {'breadcrumb': 'a', 'ancestor': True, 'sibling': False, 'leaf-label': 'a', 'up-navigation': [], 'same-leaf': False}), ({'path': ['b', 'a'], 'candidate': ['b', 'a']}, {'breadcrumb': 'b / a', 'ancestor': False, 'sibling': False, 'leaf-label': 'a', 'up-navigation': ['b'], 'same-leaf': True}), ({'path': [], 'candidate': ['b', 'a']}, {'breadcrumb': '', 'ancestor': False, 'sibling': False, 'leaf-label': '(root)', 'up-navigation': [], 'same-leaf': False}), ({'path': ['a'], 'candidate': ['a', 'b']}, {'breadcrumb': 'a', 'ancestor': False, 'sibling': False, 'leaf-label': 'a', 'up-navigation': [], 'same-leaf': False}), ({'path': ['a'], 'candidate': ['ab']}, {'breadcrumb': 'a', 'ancestor': False, 'sibling': True, 'leaf-label': 'a', 'up-navigation': [], 'same-leaf': False}), ({'path': ['a', 'b'], 'candidate': ['a']}, {'breadcrumb': 'a / b', 'ancestor': True, 'sibling': False, 'leaf-label': 'b', 'up-navigation': ['a'], 'same-leaf': False}), ({'path': ['a', 'b'], 'candidate': ['b', 'a']}, {'breadcrumb': 'a / b', 'ancestor': False, 'sibling': False, 'leaf-label': 'b', 'up-navigation': ['a'], 'same-leaf': False}), ({'path': ['b', 'a'], 'candidate': []}, {'breadcrumb': 'b / a', 'ancestor': True, 'sibling': False, 'leaf-label': 'a', 'up-navigation': ['b'], 'same-leaf': False}), ({'path': ['b', 'a'], 'candidate': ['a', 'b']}, {'breadcrumb': 'b / a', 'ancestor': False, 'sibling': False, 'leaf-label': 'a', 'up-navigation': ['b'], 'same-leaf': False}), ({'path': ['b', 'a'], 'candidate': ['ab']}, {'breadcrumb': 'b / a', 'ancestor': False, 'sibling': False, 'leaf-label': 'a', 'up-navigation': ['b'], 'same-leaf': False})], 5: [({'path': ['a'], 'candidate': ['a']}, {'breadcrumb': 'a', 'ancestor': False, 'sibling': False, 'leaf-label': 'a', 'up-navigation': [], 'same-leaf': True}), ({'path': ['a', 'b'], 'candidate': []}, {'breadcrumb': 'a / b', 'ancestor': True, 'sibling': False, 'leaf-label': 'b', 'up-navigation': ['a'], 'same-leaf': False}), ({'path': ['a', 'b'], 'candidate': ['a', 'b']}, {'breadcrumb': 'a / b', 'ancestor': False, 'sibling': False, 'leaf-label': 'b', 'up-navigation': ['a'], 'same-leaf': True}), ({'path': ['a', 'b'], 'candidate': ['ab']}, {'breadcrumb': 'a / b', 'ancestor': False, 'sibling': False, 'leaf-label': 'b', 'up-navigation': ['a'], 'same-leaf': False}), ({'path': ['b', 'a'], 'candidate': ['a']}, {'breadcrumb': 'b / a', 'ancestor': False, 'sibling': False, 'leaf-label': 'a', 'up-navigation': ['b'], 'same-leaf': False}), ({'path': ['b', 'a'], 'candidate': ['b', 'a']}, {'breadcrumb': 'b / a', 'ancestor': False, 'sibling': False, 'leaf-label': 'a', 'up-navigation': ['b'], 'same-leaf': True}), ({'path': ['ab'], 'candidate': []}, {'breadcrumb': 'ab', 'ancestor': True, 'sibling': False, 'leaf-label': 'ab', 'up-navigation': [], 'same-leaf': False}), ({'path': ['ab'], 'candidate': ['a', 'b']}, {'breadcrumb': 'ab', 'ancestor': False, 'sibling': False, 'leaf-label': 'ab', 'up-navigation': [], 'same-leaf': False}), ({'path': ['ab'], 'candidate': ['ab']}, {'breadcrumb': 'ab', 'ancestor': False, 'sibling': False, 'leaf-label': 'ab', 'up-navigation': [], 'same-leaf': True}), ({'path': [], 'candidate': ['a']}, {'breadcrumb': '', 'ancestor': False, 'sibling': False, 'leaf-label': '(root)', 'up-navigation': [], 'same-leaf': False})]}
for index, (data, expected) in enumerate(fixtures[N]):
    check("contract fixture " + str(index), 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
contract fixture 0{'ancestor': False, 'breadcrumb': '', 'leaf-label': '(root)', 'same-leaf': True, 'sibling': True, 'up-navigation': []}{'ancestor': False, 'breadcrumb': '', 'leaf-label': '(root)', 'same-leaf': True, 'sibling': False, 'up-navigation': []}Failed
contract fixture 1{'ancestor': False, 'breadcrumb': 'a / b', 'leaf-label': 'b', 'same-leaf': False, 'sibling': False, 'up-navigation': ['a']}{'ancestor': False, 'breadcrumb': 'a / b', 'leaf-label': 'b', 'same-leaf': False, 'sibling': False, 'up-navigation': ['a']}Passed
contract fixture 2{'ancestor': False, 'breadcrumb': 'a', 'leaf-label': 'a', 'same-leaf': False, 'sibling': False, 'up-navigation': []}{'ancestor': False, 'breadcrumb': 'a', 'leaf-label': 'a', 'same-leaf': False, 'sibling': False, 'up-navigation': []}Passed
contract fixture 3{'ancestor': False, 'breadcrumb': 'a', 'leaf-label': 'a', 'same-leaf': False, 'sibling': True, 'up-navigation': []}{'ancestor': False, 'breadcrumb': 'a', 'leaf-label': 'a', 'same-leaf': False, 'sibling': True, 'up-navigation': []}Passed
contract fixture 4{'ancestor': True, 'breadcrumb': 'a / b', 'leaf-label': 'b', 'same-leaf': False, 'sibling': False, 'up-navigation': ['a']}{'ancestor': True, 'breadcrumb': 'a / b', 'leaf-label': 'b', 'same-leaf': False, 'sibling': False, 'up-navigation': ['a']}Passed
contract fixture 5{'ancestor': True, 'breadcrumb': 'b / a', 'leaf-label': 'a', 'same-leaf': False, 'sibling': False, 'up-navigation': ['b']}{'ancestor': True, 'breadcrumb': 'b / a', 'leaf-label': 'a', 'same-leaf': False, 'sibling': False, 'up-navigation': ['b']}Passed
contract fixture 6{'ancestor': False, 'breadcrumb': 'b / a', 'leaf-label': 'a', 'same-leaf': False, 'sibling': False, 'up-navigation': ['b']}{'ancestor': False, 'breadcrumb': 'b / a', 'leaf-label': 'a', 'same-leaf': False, 'sibling': False, 'up-navigation': ['b']}Passed
contract fixture 7{'ancestor': False, 'breadcrumb': 'b / a', 'leaf-label': 'a', 'same-leaf': False, 'sibling': False, 'up-navigation': ['b']}{'ancestor': False, 'breadcrumb': 'b / a', 'leaf-label': 'a', 'same-leaf': False, 'sibling': False, 'up-navigation': ['b']}Passed
contract fixture 8{'ancestor': False, 'breadcrumb': 'ab', 'leaf-label': 'ab', 'same-leaf': False, 'sibling': True, 'up-navigation': []}{'ancestor': False, 'breadcrumb': 'ab', 'leaf-label': 'ab', 'same-leaf': False, 'sibling': True, 'up-navigation': []}Passed
contract fixture 9{'ancestor': False, 'breadcrumb': 'ab', 'leaf-label': 'ab', 'same-leaf': False, 'sibling': False, 'up-navigation': []}{'ancestor': False, 'breadcrumb': 'ab', 'leaf-label': 'ab', 'same-leaf': False, 'sibling': False, 'up-navigation': []}Passed

SHA-256 / e41110ae25ec849e543f47cf32e367de5c346a602b6b15ed92fea16a127841f4

2 / The unsuccessful fix

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

N = 1
observations = []
def solve(d):
    return {'breadcrumb':(' / '.join(d['path'])), 'ancestor':(len(d['candidate'])<len(d['path']) and d['path'][:len(d['candidate'])]==d['candidate']), 'sibling':(len(d['path'])==len(d['candidate'])), 'leaf-label':(d['path'][-1] if d['path'] else '(root)'), 'up-navigation':(d['path'][:-1]), 'same-leaf':(d['path']==d['candidate'])}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = {1: [({'path': [], 'candidate': []}, {'breadcrumb': '', 'ancestor': False, 'sibling': False, 'leaf-label': '(root)', 'up-navigation': [], 'same-leaf': True}), ({'path': ['a', 'b'], 'candidate': ['b', 'a']}, {'breadcrumb': 'a / b', 'ancestor': False, 'sibling': False, 'leaf-label': 'b', 'up-navigation': ['a'], 'same-leaf': False}), ({'path': ['a'], 'candidate': ['a', 'b']}, {'breadcrumb': 'a', 'ancestor': False, 'sibling': False, 'leaf-label': 'a', 'up-navigation': [], 'same-leaf': False}), ({'path': ['a'], 'candidate': ['ab']}, {'breadcrumb': 'a', 'ancestor': False, 'sibling': True, 'leaf-label': 'a', 'up-navigation': [], 'same-leaf': False}), ({'path': ['a', 'b'], 'candidate': ['a']}, {'breadcrumb': 'a / b', 'ancestor': True, 'sibling': False, 'leaf-label': 'b', 'up-navigation': ['a'], 'same-leaf': False}), ({'path': ['b', 'a'], 'candidate': []}, {'breadcrumb': 'b / a', 'ancestor': True, 'sibling': False, 'leaf-label': 'a', 'up-navigation': ['b'], 'same-leaf': False}), ({'path': ['b', 'a'], 'candidate': ['a', 'b']}, {'breadcrumb': 'b / a', 'ancestor': False, 'sibling': False, 'leaf-label': 'a', 'up-navigation': ['b'], 'same-leaf': False}), ({'path': ['b', 'a'], 'candidate': ['ab']}, {'breadcrumb': 'b / a', 'ancestor': False, 'sibling': False, 'leaf-label': 'a', 'up-navigation': ['b'], 'same-leaf': False}), ({'path': ['ab'], 'candidate': ['a']}, {'breadcrumb': 'ab', 'ancestor': False, 'sibling': True, 'leaf-label': 'ab', 'up-navigation': [], 'same-leaf': False}), ({'path': ['ab'], 'candidate': ['b', 'a']}, {'breadcrumb': 'ab', 'ancestor': False, 'sibling': False, 'leaf-label': 'ab', 'up-navigation': [], 'same-leaf': False})], 2: [({'path': [], 'candidate': ['a']}, {'breadcrumb': '', 'ancestor': False, 'sibling': False, 'leaf-label': '(root)', 'up-navigation': [], 'same-leaf': False}), ({'path': ['ab'], 'candidate': ['ab']}, {'breadcrumb': 'ab', 'ancestor': False, 'sibling': False, 'leaf-label': 'ab', 'up-navigation': [], 'same-leaf': True}), ({'path': ['a', 'b'], 'candidate': ['ab']}, {'breadcrumb': 'a / b', 'ancestor': False, 'sibling': False, 'leaf-label': 'b', 'up-navigation': ['a'], 'same-leaf': False}), ({'path': ['b', 'a'], 'candidate': ['a']}, {'breadcrumb': 'b / a', 'ancestor': False, 'sibling': False, 'leaf-label': 'a', 'up-navigation': ['b'], 'same-leaf': False}), ({'path': ['b', 'a'], 'candidate': ['b', 'a']}, {'breadcrumb': 'b / a', 'ancestor': False, 'sibling': False, 'leaf-label': 'a', 'up-navigation': ['b'], 'same-leaf': True}), ({'path': ['ab'], 'candidate': []}, {'breadcrumb': 'ab', 'ancestor': True, 'sibling': False, 'leaf-label': 'ab', 'up-navigation': [], 'same-leaf': False}), ({'path': ['ab'], 'candidate': ['a', 'b']}, {'breadcrumb': 'ab', 'ancestor': False, 'sibling': False, 'leaf-label': 'ab', 'up-navigation': [], 'same-leaf': False}), ({'path': [], 'candidate': ['b', 'a']}, {'breadcrumb': '', 'ancestor': False, 'sibling': False, 'leaf-label': '(root)', 'up-navigation': [], 'same-leaf': False}), ({'path': ['a'], 'candidate': []}, {'breadcrumb': 'a', 'ancestor': True, 'sibling': False, 'leaf-label': 'a', 'up-navigation': [], 'same-leaf': False}), ({'path': ['a'], 'candidate': ['a', 'b']}, {'breadcrumb': 'a', 'ancestor': False, 'sibling': False, 'leaf-label': 'a', 'up-navigation': [], 'same-leaf': False})], 3: [({'path': [], 'candidate': ['ab']}, {'breadcrumb': '', 'ancestor': False, 'sibling': False, 'leaf-label': '(root)', 'up-navigation': [], 'same-leaf': False}), ({'path': ['a', 'b'], 'candidate': ['a', 'b']}, {'breadcrumb': 'a / b', 'ancestor': False, 'sibling': False, 'leaf-label': 'b', 'up-navigation': ['a'], 'same-leaf': True}), ({'path': ['ab'], 'candidate': ['a']}, {'breadcrumb': 'ab', 'ancestor': False, 'sibling': True, 'leaf-label': 'ab', 'up-navigation': [], 'same-leaf': False}), ({'path': ['ab'], 'candidate': ['b', 'a']}, {'breadcrumb': 'ab', 'ancestor': False, 'sibling': False, 'leaf-label': 'ab', 'up-navigation': [], 'same-leaf': False}), ({'path': [], 'candidate': []}, {'breadcrumb': '', 'ancestor': False, 'sibling': False, 'leaf-label': '(root)', 'up-navigation': [], 'same-leaf': True}), ({'path': [], 'candidate': ['a', 'b']}, {'breadcrumb': '', 'ancestor': False, 'sibling': False, 'leaf-label': '(root)', 'up-navigation': [], 'same-leaf': False}), ({'path': ['a'], 'candidate': ['a']}, {'breadcrumb': 'a', 'ancestor': False, 'sibling': False, 'leaf-label': 'a', 'up-navigation': [], 'same-leaf': True}), ({'path': ['a'], 'candidate': ['b', 'a']}, {'breadcrumb': 'a', 'ancestor': False, 'sibling': False, 'leaf-label': 'a', 'up-navigation': [], 'same-leaf': False}), ({'path': ['a', 'b'], 'candidate': []}, {'breadcrumb': 'a / b', 'ancestor': True, 'sibling': False, 'leaf-label': 'b', 'up-navigation': ['a'], 'same-leaf': False}), ({'path': ['a', 'b'], 'candidate': ['ab']}, {'breadcrumb': 'a / b', 'ancestor': False, 'sibling': False, 'leaf-label': 'b', 'up-navigation': ['a'], 'same-leaf': False})], 4: [({'path': ['a'], 'candidate': []}, {'breadcrumb': 'a', 'ancestor': True, 'sibling': False, 'leaf-label': 'a', 'up-navigation': [], 'same-leaf': False}), ({'path': ['b', 'a'], 'candidate': ['b', 'a']}, {'breadcrumb': 'b / a', 'ancestor': False, 'sibling': False, 'leaf-label': 'a', 'up-navigation': ['b'], 'same-leaf': True}), ({'path': [], 'candidate': ['b', 'a']}, {'breadcrumb': '', 'ancestor': False, 'sibling': False, 'leaf-label': '(root)', 'up-navigation': [], 'same-leaf': False}), ({'path': ['a'], 'candidate': ['a', 'b']}, {'breadcrumb': 'a', 'ancestor': False, 'sibling': False, 'leaf-label': 'a', 'up-navigation': [], 'same-leaf': False}), ({'path': ['a'], 'candidate': ['ab']}, {'breadcrumb': 'a', 'ancestor': False, 'sibling': True, 'leaf-label': 'a', 'up-navigation': [], 'same-leaf': False}), ({'path': ['a', 'b'], 'candidate': ['a']}, {'breadcrumb': 'a / b', 'ancestor': True, 'sibling': False, 'leaf-label': 'b', 'up-navigation': ['a'], 'same-leaf': False}), ({'path': ['a', 'b'], 'candidate': ['b', 'a']}, {'breadcrumb': 'a / b', 'ancestor': False, 'sibling': False, 'leaf-label': 'b', 'up-navigation': ['a'], 'same-leaf': False}), ({'path': ['b', 'a'], 'candidate': []}, {'breadcrumb': 'b / a', 'ancestor': True, 'sibling': False, 'leaf-label': 'a', 'up-navigation': ['b'], 'same-leaf': False}), ({'path': ['b', 'a'], 'candidate': ['a', 'b']}, {'breadcrumb': 'b / a', 'ancestor': False, 'sibling': False, 'leaf-label': 'a', 'up-navigation': ['b'], 'same-leaf': False}), ({'path': ['b', 'a'], 'candidate': ['ab']}, {'breadcrumb': 'b / a', 'ancestor': False, 'sibling': False, 'leaf-label': 'a', 'up-navigation': ['b'], 'same-leaf': False})], 5: [({'path': ['a'], 'candidate': ['a']}, {'breadcrumb': 'a', 'ancestor': False, 'sibling': False, 'leaf-label': 'a', 'up-navigation': [], 'same-leaf': True}), ({'path': ['a', 'b'], 'candidate': []}, {'breadcrumb': 'a / b', 'ancestor': True, 'sibling': False, 'leaf-label': 'b', 'up-navigation': ['a'], 'same-leaf': False}), ({'path': ['a', 'b'], 'candidate': ['a', 'b']}, {'breadcrumb': 'a / b', 'ancestor': False, 'sibling': False, 'leaf-label': 'b', 'up-navigation': ['a'], 'same-leaf': True}), ({'path': ['a', 'b'], 'candidate': ['ab']}, {'breadcrumb': 'a / b', 'ancestor': False, 'sibling': False, 'leaf-label': 'b', 'up-navigation': ['a'], 'same-leaf': False}), ({'path': ['b', 'a'], 'candidate': ['a']}, {'breadcrumb': 'b / a', 'ancestor': False, 'sibling': False, 'leaf-label': 'a', 'up-navigation': ['b'], 'same-leaf': False}), ({'path': ['b', 'a'], 'candidate': ['b', 'a']}, {'breadcrumb': 'b / a', 'ancestor': False, 'sibling': False, 'leaf-label': 'a', 'up-navigation': ['b'], 'same-leaf': True}), ({'path': ['ab'], 'candidate': []}, {'breadcrumb': 'ab', 'ancestor': True, 'sibling': False, 'leaf-label': 'ab', 'up-navigation': [], 'same-leaf': False}), ({'path': ['ab'], 'candidate': ['a', 'b']}, {'breadcrumb': 'ab', 'ancestor': False, 'sibling': False, 'leaf-label': 'ab', 'up-navigation': [], 'same-leaf': False}), ({'path': ['ab'], 'candidate': ['ab']}, {'breadcrumb': 'ab', 'ancestor': False, 'sibling': False, 'leaf-label': 'ab', 'up-navigation': [], 'same-leaf': True}), ({'path': [], 'candidate': ['a']}, {'breadcrumb': '', 'ancestor': False, 'sibling': False, 'leaf-label': '(root)', 'up-navigation': [], 'same-leaf': False})]}
for index, (data, expected) in enumerate(fixtures[N]):
    check("contract fixture " + str(index), 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
contract fixture 0{'ancestor': False, 'breadcrumb': '', 'leaf-label': '(root)', 'same-leaf': True, 'sibling': True, 'up-navigation': []}{'ancestor': False, 'breadcrumb': '', 'leaf-label': '(root)', 'same-leaf': True, 'sibling': False, 'up-navigation': []}Failed
contract fixture 1{'ancestor': False, 'breadcrumb': 'a / b', 'leaf-label': 'b', 'same-leaf': False, 'sibling': True, 'up-navigation': ['a']}{'ancestor': False, 'breadcrumb': 'a / b', 'leaf-label': 'b', 'same-leaf': False, 'sibling': False, 'up-navigation': ['a']}Failed
contract fixture 2{'ancestor': False, 'breadcrumb': 'a', 'leaf-label': 'a', 'same-leaf': False, 'sibling': False, 'up-navigation': []}{'ancestor': False, 'breadcrumb': 'a', 'leaf-label': 'a', 'same-leaf': False, 'sibling': False, 'up-navigation': []}Passed
contract fixture 3{'ancestor': False, 'breadcrumb': 'a', 'leaf-label': 'a', 'same-leaf': False, 'sibling': True, 'up-navigation': []}{'ancestor': False, 'breadcrumb': 'a', 'leaf-label': 'a', 'same-leaf': False, 'sibling': True, 'up-navigation': []}Passed
contract fixture 4{'ancestor': True, 'breadcrumb': 'a / b', 'leaf-label': 'b', 'same-leaf': False, 'sibling': False, 'up-navigation': ['a']}{'ancestor': True, 'breadcrumb': 'a / b', 'leaf-label': 'b', 'same-leaf': False, 'sibling': False, 'up-navigation': ['a']}Passed
contract fixture 5{'ancestor': True, 'breadcrumb': 'b / a', 'leaf-label': 'a', 'same-leaf': False, 'sibling': False, 'up-navigation': ['b']}{'ancestor': True, 'breadcrumb': 'b / a', 'leaf-label': 'a', 'same-leaf': False, 'sibling': False, 'up-navigation': ['b']}Passed
contract fixture 6{'ancestor': False, 'breadcrumb': 'b / a', 'leaf-label': 'a', 'same-leaf': False, 'sibling': True, 'up-navigation': ['b']}{'ancestor': False, 'breadcrumb': 'b / a', 'leaf-label': 'a', 'same-leaf': False, 'sibling': False, 'up-navigation': ['b']}Failed
contract fixture 7{'ancestor': False, 'breadcrumb': 'b / a', 'leaf-label': 'a', 'same-leaf': False, 'sibling': False, 'up-navigation': ['b']}{'ancestor': False, 'breadcrumb': 'b / a', 'leaf-label': 'a', 'same-leaf': False, 'sibling': False, 'up-navigation': ['b']}Passed
contract fixture 8{'ancestor': False, 'breadcrumb': 'ab', 'leaf-label': 'ab', 'same-leaf': False, 'sibling': True, 'up-navigation': []}{'ancestor': False, 'breadcrumb': 'ab', 'leaf-label': 'ab', 'same-leaf': False, 'sibling': True, 'up-navigation': []}Passed
contract fixture 9{'ancestor': False, 'breadcrumb': 'ab', 'leaf-label': 'ab', 'same-leaf': False, 'sibling': False, 'up-navigation': []}{'ancestor': False, 'breadcrumb': 'ab', 'leaf-label': 'ab', 'same-leaf': False, 'sibling': False, 'up-navigation': []}Passed

SHA-256 / d0fb3f617ec9a6a422e0de306027b8c3057ca13d65a92b1873e127d30f278c10

3 / The verified repair

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

N = 1
observations = []
def solve(d):
    return {'breadcrumb':(' / '.join(d['path'])), 'ancestor':(len(d['candidate'])<len(d['path']) and d['path'][:len(d['candidate'])]==d['candidate']), 'sibling':(len(d['path'])==len(d['candidate']) and d['path'][:-1]==d['candidate'][:-1] and d['path']!=d['candidate']), 'leaf-label':(d['path'][-1] if d['path'] else '(root)'), 'up-navigation':(d['path'][:-1]), 'same-leaf':(d['path']==d['candidate'])}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = {1: [({'path': [], 'candidate': []}, {'breadcrumb': '', 'ancestor': False, 'sibling': False, 'leaf-label': '(root)', 'up-navigation': [], 'same-leaf': True}), ({'path': ['a', 'b'], 'candidate': ['b', 'a']}, {'breadcrumb': 'a / b', 'ancestor': False, 'sibling': False, 'leaf-label': 'b', 'up-navigation': ['a'], 'same-leaf': False}), ({'path': ['a'], 'candidate': ['a', 'b']}, {'breadcrumb': 'a', 'ancestor': False, 'sibling': False, 'leaf-label': 'a', 'up-navigation': [], 'same-leaf': False}), ({'path': ['a'], 'candidate': ['ab']}, {'breadcrumb': 'a', 'ancestor': False, 'sibling': True, 'leaf-label': 'a', 'up-navigation': [], 'same-leaf': False}), ({'path': ['a', 'b'], 'candidate': ['a']}, {'breadcrumb': 'a / b', 'ancestor': True, 'sibling': False, 'leaf-label': 'b', 'up-navigation': ['a'], 'same-leaf': False}), ({'path': ['b', 'a'], 'candidate': []}, {'breadcrumb': 'b / a', 'ancestor': True, 'sibling': False, 'leaf-label': 'a', 'up-navigation': ['b'], 'same-leaf': False}), ({'path': ['b', 'a'], 'candidate': ['a', 'b']}, {'breadcrumb': 'b / a', 'ancestor': False, 'sibling': False, 'leaf-label': 'a', 'up-navigation': ['b'], 'same-leaf': False}), ({'path': ['b', 'a'], 'candidate': ['ab']}, {'breadcrumb': 'b / a', 'ancestor': False, 'sibling': False, 'leaf-label': 'a', 'up-navigation': ['b'], 'same-leaf': False}), ({'path': ['ab'], 'candidate': ['a']}, {'breadcrumb': 'ab', 'ancestor': False, 'sibling': True, 'leaf-label': 'ab', 'up-navigation': [], 'same-leaf': False}), ({'path': ['ab'], 'candidate': ['b', 'a']}, {'breadcrumb': 'ab', 'ancestor': False, 'sibling': False, 'leaf-label': 'ab', 'up-navigation': [], 'same-leaf': False})], 2: [({'path': [], 'candidate': ['a']}, {'breadcrumb': '', 'ancestor': False, 'sibling': False, 'leaf-label': '(root)', 'up-navigation': [], 'same-leaf': False}), ({'path': ['ab'], 'candidate': ['ab']}, {'breadcrumb': 'ab', 'ancestor': False, 'sibling': False, 'leaf-label': 'ab', 'up-navigation': [], 'same-leaf': True}), ({'path': ['a', 'b'], 'candidate': ['ab']}, {'breadcrumb': 'a / b', 'ancestor': False, 'sibling': False, 'leaf-label': 'b', 'up-navigation': ['a'], 'same-leaf': False}), ({'path': ['b', 'a'], 'candidate': ['a']}, {'breadcrumb': 'b / a', 'ancestor': False, 'sibling': False, 'leaf-label': 'a', 'up-navigation': ['b'], 'same-leaf': False}), ({'path': ['b', 'a'], 'candidate': ['b', 'a']}, {'breadcrumb': 'b / a', 'ancestor': False, 'sibling': False, 'leaf-label': 'a', 'up-navigation': ['b'], 'same-leaf': True}), ({'path': ['ab'], 'candidate': []}, {'breadcrumb': 'ab', 'ancestor': True, 'sibling': False, 'leaf-label': 'ab', 'up-navigation': [], 'same-leaf': False}), ({'path': ['ab'], 'candidate': ['a', 'b']}, {'breadcrumb': 'ab', 'ancestor': False, 'sibling': False, 'leaf-label': 'ab', 'up-navigation': [], 'same-leaf': False}), ({'path': [], 'candidate': ['b', 'a']}, {'breadcrumb': '', 'ancestor': False, 'sibling': False, 'leaf-label': '(root)', 'up-navigation': [], 'same-leaf': False}), ({'path': ['a'], 'candidate': []}, {'breadcrumb': 'a', 'ancestor': True, 'sibling': False, 'leaf-label': 'a', 'up-navigation': [], 'same-leaf': False}), ({'path': ['a'], 'candidate': ['a', 'b']}, {'breadcrumb': 'a', 'ancestor': False, 'sibling': False, 'leaf-label': 'a', 'up-navigation': [], 'same-leaf': False})], 3: [({'path': [], 'candidate': ['ab']}, {'breadcrumb': '', 'ancestor': False, 'sibling': False, 'leaf-label': '(root)', 'up-navigation': [], 'same-leaf': False}), ({'path': ['a', 'b'], 'candidate': ['a', 'b']}, {'breadcrumb': 'a / b', 'ancestor': False, 'sibling': False, 'leaf-label': 'b', 'up-navigation': ['a'], 'same-leaf': True}), ({'path': ['ab'], 'candidate': ['a']}, {'breadcrumb': 'ab', 'ancestor': False, 'sibling': True, 'leaf-label': 'ab', 'up-navigation': [], 'same-leaf': False}), ({'path': ['ab'], 'candidate': ['b', 'a']}, {'breadcrumb': 'ab', 'ancestor': False, 'sibling': False, 'leaf-label': 'ab', 'up-navigation': [], 'same-leaf': False}), ({'path': [], 'candidate': []}, {'breadcrumb': '', 'ancestor': False, 'sibling': False, 'leaf-label': '(root)', 'up-navigation': [], 'same-leaf': True}), ({'path': [], 'candidate': ['a', 'b']}, {'breadcrumb': '', 'ancestor': False, 'sibling': False, 'leaf-label': '(root)', 'up-navigation': [], 'same-leaf': False}), ({'path': ['a'], 'candidate': ['a']}, {'breadcrumb': 'a', 'ancestor': False, 'sibling': False, 'leaf-label': 'a', 'up-navigation': [], 'same-leaf': True}), ({'path': ['a'], 'candidate': ['b', 'a']}, {'breadcrumb': 'a', 'ancestor': False, 'sibling': False, 'leaf-label': 'a', 'up-navigation': [], 'same-leaf': False}), ({'path': ['a', 'b'], 'candidate': []}, {'breadcrumb': 'a / b', 'ancestor': True, 'sibling': False, 'leaf-label': 'b', 'up-navigation': ['a'], 'same-leaf': False}), ({'path': ['a', 'b'], 'candidate': ['ab']}, {'breadcrumb': 'a / b', 'ancestor': False, 'sibling': False, 'leaf-label': 'b', 'up-navigation': ['a'], 'same-leaf': False})], 4: [({'path': ['a'], 'candidate': []}, {'breadcrumb': 'a', 'ancestor': True, 'sibling': False, 'leaf-label': 'a', 'up-navigation': [], 'same-leaf': False}), ({'path': ['b', 'a'], 'candidate': ['b', 'a']}, {'breadcrumb': 'b / a', 'ancestor': False, 'sibling': False, 'leaf-label': 'a', 'up-navigation': ['b'], 'same-leaf': True}), ({'path': [], 'candidate': ['b', 'a']}, {'breadcrumb': '', 'ancestor': False, 'sibling': False, 'leaf-label': '(root)', 'up-navigation': [], 'same-leaf': False}), ({'path': ['a'], 'candidate': ['a', 'b']}, {'breadcrumb': 'a', 'ancestor': False, 'sibling': False, 'leaf-label': 'a', 'up-navigation': [], 'same-leaf': False}), ({'path': ['a'], 'candidate': ['ab']}, {'breadcrumb': 'a', 'ancestor': False, 'sibling': True, 'leaf-label': 'a', 'up-navigation': [], 'same-leaf': False}), ({'path': ['a', 'b'], 'candidate': ['a']}, {'breadcrumb': 'a / b', 'ancestor': True, 'sibling': False, 'leaf-label': 'b', 'up-navigation': ['a'], 'same-leaf': False}), ({'path': ['a', 'b'], 'candidate': ['b', 'a']}, {'breadcrumb': 'a / b', 'ancestor': False, 'sibling': False, 'leaf-label': 'b', 'up-navigation': ['a'], 'same-leaf': False}), ({'path': ['b', 'a'], 'candidate': []}, {'breadcrumb': 'b / a', 'ancestor': True, 'sibling': False, 'leaf-label': 'a', 'up-navigation': ['b'], 'same-leaf': False}), ({'path': ['b', 'a'], 'candidate': ['a', 'b']}, {'breadcrumb': 'b / a', 'ancestor': False, 'sibling': False, 'leaf-label': 'a', 'up-navigation': ['b'], 'same-leaf': False}), ({'path': ['b', 'a'], 'candidate': ['ab']}, {'breadcrumb': 'b / a', 'ancestor': False, 'sibling': False, 'leaf-label': 'a', 'up-navigation': ['b'], 'same-leaf': False})], 5: [({'path': ['a'], 'candidate': ['a']}, {'breadcrumb': 'a', 'ancestor': False, 'sibling': False, 'leaf-label': 'a', 'up-navigation': [], 'same-leaf': True}), ({'path': ['a', 'b'], 'candidate': []}, {'breadcrumb': 'a / b', 'ancestor': True, 'sibling': False, 'leaf-label': 'b', 'up-navigation': ['a'], 'same-leaf': False}), ({'path': ['a', 'b'], 'candidate': ['a', 'b']}, {'breadcrumb': 'a / b', 'ancestor': False, 'sibling': False, 'leaf-label': 'b', 'up-navigation': ['a'], 'same-leaf': True}), ({'path': ['a', 'b'], 'candidate': ['ab']}, {'breadcrumb': 'a / b', 'ancestor': False, 'sibling': False, 'leaf-label': 'b', 'up-navigation': ['a'], 'same-leaf': False}), ({'path': ['b', 'a'], 'candidate': ['a']}, {'breadcrumb': 'b / a', 'ancestor': False, 'sibling': False, 'leaf-label': 'a', 'up-navigation': ['b'], 'same-leaf': False}), ({'path': ['b', 'a'], 'candidate': ['b', 'a']}, {'breadcrumb': 'b / a', 'ancestor': False, 'sibling': False, 'leaf-label': 'a', 'up-navigation': ['b'], 'same-leaf': True}), ({'path': ['ab'], 'candidate': []}, {'breadcrumb': 'ab', 'ancestor': True, 'sibling': False, 'leaf-label': 'ab', 'up-navigation': [], 'same-leaf': False}), ({'path': ['ab'], 'candidate': ['a', 'b']}, {'breadcrumb': 'ab', 'ancestor': False, 'sibling': False, 'leaf-label': 'ab', 'up-navigation': [], 'same-leaf': False}), ({'path': ['ab'], 'candidate': ['ab']}, {'breadcrumb': 'ab', 'ancestor': False, 'sibling': False, 'leaf-label': 'ab', 'up-navigation': [], 'same-leaf': True}), ({'path': [], 'candidate': ['a']}, {'breadcrumb': '', 'ancestor': False, 'sibling': False, 'leaf-label': '(root)', 'up-navigation': [], 'same-leaf': False})]}
for index, (data, expected) in enumerate(fixtures[N]):
    check("contract fixture " + str(index), 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
contract fixture 0{'ancestor': False, 'breadcrumb': '', 'leaf-label': '(root)', 'same-leaf': True, 'sibling': False, 'up-navigation': []}{'ancestor': False, 'breadcrumb': '', 'leaf-label': '(root)', 'same-leaf': True, 'sibling': False, 'up-navigation': []}Passed
contract fixture 1{'ancestor': False, 'breadcrumb': 'a / b', 'leaf-label': 'b', 'same-leaf': False, 'sibling': False, 'up-navigation': ['a']}{'ancestor': False, 'breadcrumb': 'a / b', 'leaf-label': 'b', 'same-leaf': False, 'sibling': False, 'up-navigation': ['a']}Passed
contract fixture 2{'ancestor': False, 'breadcrumb': 'a', 'leaf-label': 'a', 'same-leaf': False, 'sibling': False, 'up-navigation': []}{'ancestor': False, 'breadcrumb': 'a', 'leaf-label': 'a', 'same-leaf': False, 'sibling': False, 'up-navigation': []}Passed
contract fixture 3{'ancestor': False, 'breadcrumb': 'a', 'leaf-label': 'a', 'same-leaf': False, 'sibling': True, 'up-navigation': []}{'ancestor': False, 'breadcrumb': 'a', 'leaf-label': 'a', 'same-leaf': False, 'sibling': True, 'up-navigation': []}Passed
contract fixture 4{'ancestor': True, 'breadcrumb': 'a / b', 'leaf-label': 'b', 'same-leaf': False, 'sibling': False, 'up-navigation': ['a']}{'ancestor': True, 'breadcrumb': 'a / b', 'leaf-label': 'b', 'same-leaf': False, 'sibling': False, 'up-navigation': ['a']}Passed
contract fixture 5{'ancestor': True, 'breadcrumb': 'b / a', 'leaf-label': 'a', 'same-leaf': False, 'sibling': False, 'up-navigation': ['b']}{'ancestor': True, 'breadcrumb': 'b / a', 'leaf-label': 'a', 'same-leaf': False, 'sibling': False, 'up-navigation': ['b']}Passed
contract fixture 6{'ancestor': False, 'breadcrumb': 'b / a', 'leaf-label': 'a', 'same-leaf': False, 'sibling': False, 'up-navigation': ['b']}{'ancestor': False, 'breadcrumb': 'b / a', 'leaf-label': 'a', 'same-leaf': False, 'sibling': False, 'up-navigation': ['b']}Passed
contract fixture 7{'ancestor': False, 'breadcrumb': 'b / a', 'leaf-label': 'a', 'same-leaf': False, 'sibling': False, 'up-navigation': ['b']}{'ancestor': False, 'breadcrumb': 'b / a', 'leaf-label': 'a', 'same-leaf': False, 'sibling': False, 'up-navigation': ['b']}Passed
contract fixture 8{'ancestor': False, 'breadcrumb': 'ab', 'leaf-label': 'ab', 'same-leaf': False, 'sibling': True, 'up-navigation': []}{'ancestor': False, 'breadcrumb': 'ab', 'leaf-label': 'ab', 'same-leaf': False, 'sibling': True, 'up-navigation': []}Passed
contract fixture 9{'ancestor': False, 'breadcrumb': 'ab', 'leaf-label': 'ab', 'same-leaf': False, 'sibling': False, 'up-navigation': []}{'ancestor': False, 'breadcrumb': 'ab', 'leaf-label': 'ab', 'same-leaf': False, 'sibling': False, 'up-navigation': []}Passed

SHA-256 / ae7ab25f11b500d8006289c53bb6db20506c8f980ada331e75eab339f5a7bdf6

Verification & scope

Deterministic bounded UI-state model only; no browser, query engine, network, or production-standard conformance is claimed. 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:41:04.561776+00:00.

Case digest / e1583a67d93898b1540d93754c1597a550cf537b4fafdd56fb670b8fdf813663