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

N = 1
observations = []
def solve(d):
    return {'breadcrumb-cut':(d['trail'][:d['index']+1]), 'root-reset':(d['global_filters']), 'effective-constraints':(d['trail']), 'branch-after-back':(d['trail'][:d['index']+1]+[d['new']]), 'active-crumb':(len(d['trail'])-1 if d['trail'] else None), 'drilldown-depth':(len(d['trail']))}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = {1: [({'trail': [], 'index': 0, 'global_filters': ['scope'], 'new': 'x'}, {'breadcrumb-cut': [], 'root-reset': ['scope'], 'effective-constraints': ['scope'], 'branch-after-back': ['x'], 'active-crumb': None, 'drilldown-depth': 0}), ({'trail': ['a', 'b', 'a'], 'index': 0, 'global_filters': ['scope'], 'new': 'y'}, {'breadcrumb-cut': ['a'], 'root-reset': ['scope'], 'effective-constraints': ['scope', 'a', 'b', 'a'], 'branch-after-back': ['a', 'y'], 'active-crumb': 2, 'drilldown-depth': 3}), ({'trail': [], 'index': 1, 'global_filters': ['scope'], 'new': 'y'}, {'breadcrumb-cut': [], 'root-reset': ['scope'], 'effective-constraints': ['scope'], 'branch-after-back': ['y'], 'active-crumb': None, 'drilldown-depth': 0}), ({'trail': ['a'], 'index': 0, 'global_filters': [], 'new': 'y'}, {'breadcrumb-cut': ['a'], 'root-reset': [], 'effective-constraints': ['a'], 'branch-after-back': ['a', 'y'], 'active-crumb': 0, 'drilldown-depth': 1}), ({'trail': ['a'], 'index': 0, 'global_filters': ['scope'], 'new': 'y'}, {'breadcrumb-cut': ['a'], 'root-reset': ['scope'], 'effective-constraints': ['scope', 'a'], 'branch-after-back': ['a', 'y'], 'active-crumb': 0, 'drilldown-depth': 1}), ({'trail': ['a'], 'index': 1, 'global_filters': [], 'new': 'y'}, {'breadcrumb-cut': ['a'], 'root-reset': [], 'effective-constraints': ['a'], 'branch-after-back': ['a', 'y'], 'active-crumb': 0, 'drilldown-depth': 1}), ({'trail': ['a'], 'index': 1, 'global_filters': ['scope'], 'new': 'y'}, {'breadcrumb-cut': ['a'], 'root-reset': ['scope'], 'effective-constraints': ['scope', 'a'], 'branch-after-back': ['a', 'y'], 'active-crumb': 0, 'drilldown-depth': 1}), ({'trail': ['a', 'b', 'a'], 'index': 0, 'global_filters': [], 'new': 'y'}, {'breadcrumb-cut': ['a'], 'root-reset': [], 'effective-constraints': ['a', 'b', 'a'], 'branch-after-back': ['a', 'y'], 'active-crumb': 2, 'drilldown-depth': 3}), ({'trail': ['a', 'b', 'a'], 'index': 1, 'global_filters': [], 'new': 'y'}, {'breadcrumb-cut': ['a', 'b'], 'root-reset': [], 'effective-constraints': ['a', 'b', 'a'], 'branch-after-back': ['a', 'b', 'y'], 'active-crumb': 2, 'drilldown-depth': 3}), ({'trail': ['a', 'b', 'a'], 'index': 1, 'global_filters': ['scope'], 'new': 'y'}, {'breadcrumb-cut': ['a', 'b'], 'root-reset': ['scope'], 'effective-constraints': ['scope', 'a', 'b', 'a'], 'branch-after-back': ['a', 'b', 'y'], 'active-crumb': 2, 'drilldown-depth': 3})], 2: [({'trail': [], 'index': 0, 'global_filters': ['scope'], 'new': 'y'}, {'breadcrumb-cut': [], 'root-reset': ['scope'], 'effective-constraints': ['scope'], 'branch-after-back': ['y'], 'active-crumb': None, 'drilldown-depth': 0}), ({'trail': ['a', 'b', 'a'], 'index': 1, 'global_filters': ['scope'], 'new': 'x'}, {'breadcrumb-cut': ['a', 'b'], 'root-reset': ['scope'], 'effective-constraints': ['scope', 'a', 'b', 'a'], 'branch-after-back': ['a', 'b', 'x'], 'active-crumb': 2, 'drilldown-depth': 3}), ({'trail': ['a'], 'index': 1, 'global_filters': ['scope'], 'new': 'x'}, {'breadcrumb-cut': ['a'], 'root-reset': ['scope'], 'effective-constraints': ['scope', 'a'], 'branch-after-back': ['a', 'x'], 'active-crumb': 0, 'drilldown-depth': 1}), ({'trail': ['a', 'b', 'a'], 'index': 0, 'global_filters': [], 'new': 'x'}, {'breadcrumb-cut': ['a'], 'root-reset': [], 'effective-constraints': ['a', 'b', 'a'], 'branch-after-back': ['a', 'x'], 'active-crumb': 2, 'drilldown-depth': 3}), ({'trail': ['a', 'b', 'a'], 'index': 0, 'global_filters': ['scope'], 'new': 'x'}, {'breadcrumb-cut': ['a'], 'root-reset': ['scope'], 'effective-constraints': ['scope', 'a', 'b', 'a'], 'branch-after-back': ['a', 'x'], 'active-crumb': 2, 'drilldown-depth': 3}), ({'trail': ['a', 'b', 'a'], 'index': 1, 'global_filters': [], 'new': 'x'}, {'breadcrumb-cut': ['a', 'b'], 'root-reset': [], 'effective-constraints': ['a', 'b', 'a'], 'branch-after-back': ['a', 'b', 'x'], 'active-crumb': 2, 'drilldown-depth': 3}), ({'trail': [], 'index': 0, 'global_filters': [], 'new': 'x'}, {'breadcrumb-cut': [], 'root-reset': [], 'effective-constraints': [], 'branch-after-back': ['x'], 'active-crumb': None, 'drilldown-depth': 0}), ({'trail': [], 'index': 0, 'global_filters': ['scope'], 'new': 'x'}, {'breadcrumb-cut': [], 'root-reset': ['scope'], 'effective-constraints': ['scope'], 'branch-after-back': ['x'], 'active-crumb': None, 'drilldown-depth': 0}), ({'trail': [], 'index': 1, 'global_filters': [], 'new': 'x'}, {'breadcrumb-cut': [], 'root-reset': [], 'effective-constraints': [], 'branch-after-back': ['x'], 'active-crumb': None, 'drilldown-depth': 0}), ({'trail': [], 'index': 1, 'global_filters': ['scope'], 'new': 'x'}, {'breadcrumb-cut': [], 'root-reset': ['scope'], 'effective-constraints': ['scope'], 'branch-after-back': ['x'], 'active-crumb': None, 'drilldown-depth': 0})], 3: [({'trail': [], 'index': 1, 'global_filters': ['scope'], 'new': 'x'}, {'breadcrumb-cut': [], 'root-reset': ['scope'], 'effective-constraints': ['scope'], 'branch-after-back': ['x'], 'active-crumb': None, 'drilldown-depth': 0}), ({'trail': ['a', 'b', 'a'], 'index': 0, 'global_filters': [], 'new': 'y'}, {'breadcrumb-cut': ['a'], 'root-reset': [], 'effective-constraints': ['a', 'b', 'a'], 'branch-after-back': ['a', 'y'], 'active-crumb': 2, 'drilldown-depth': 3}), ({'trail': ['a', 'b', 'a'], 'index': 1, 'global_filters': [], 'new': 'y'}, {'breadcrumb-cut': ['a', 'b'], 'root-reset': [], 'effective-constraints': ['a', 'b', 'a'], 'branch-after-back': ['a', 'b', 'y'], 'active-crumb': 2, 'drilldown-depth': 3}), ({'trail': ['a', 'b', 'a'], 'index': 1, 'global_filters': ['scope'], 'new': 'y'}, {'breadcrumb-cut': ['a', 'b'], 'root-reset': ['scope'], 'effective-constraints': ['scope', 'a', 'b', 'a'], 'branch-after-back': ['a', 'b', 'y'], 'active-crumb': 2, 'drilldown-depth': 3}), ({'trail': [], 'index': 0, 'global_filters': [], 'new': 'y'}, {'breadcrumb-cut': [], 'root-reset': [], 'effective-constraints': [], 'branch-after-back': ['y'], 'active-crumb': None, 'drilldown-depth': 0}), ({'trail': [], 'index': 0, 'global_filters': ['scope'], 'new': 'y'}, {'breadcrumb-cut': [], 'root-reset': ['scope'], 'effective-constraints': ['scope'], 'branch-after-back': ['y'], 'active-crumb': None, 'drilldown-depth': 0}), ({'trail': [], 'index': 1, 'global_filters': [], 'new': 'y'}, {'breadcrumb-cut': [], 'root-reset': [], 'effective-constraints': [], 'branch-after-back': ['y'], 'active-crumb': None, 'drilldown-depth': 0}), ({'trail': [], 'index': 1, 'global_filters': ['scope'], 'new': 'y'}, {'breadcrumb-cut': [], 'root-reset': ['scope'], 'effective-constraints': ['scope'], 'branch-after-back': ['y'], 'active-crumb': None, 'drilldown-depth': 0}), ({'trail': ['a'], 'index': 0, 'global_filters': [], 'new': 'y'}, {'breadcrumb-cut': ['a'], 'root-reset': [], 'effective-constraints': ['a'], 'branch-after-back': ['a', 'y'], 'active-crumb': 0, 'drilldown-depth': 1}), ({'trail': ['a'], 'index': 0, 'global_filters': ['scope'], 'new': 'y'}, {'breadcrumb-cut': ['a'], 'root-reset': ['scope'], 'effective-constraints': ['scope', 'a'], 'branch-after-back': ['a', 'y'], 'active-crumb': 0, 'drilldown-depth': 1})], 4: [({'trail': [], 'index': 1, 'global_filters': ['scope'], 'new': 'y'}, {'breadcrumb-cut': [], 'root-reset': ['scope'], 'effective-constraints': ['scope'], 'branch-after-back': ['y'], 'active-crumb': None, 'drilldown-depth': 0}), ({'trail': ['a', 'b', 'a'], 'index': 1, 'global_filters': [], 'new': 'x'}, {'breadcrumb-cut': ['a', 'b'], 'root-reset': [], 'effective-constraints': ['a', 'b', 'a'], 'branch-after-back': ['a', 'b', 'x'], 'active-crumb': 2, 'drilldown-depth': 3}), ({'trail': [], 'index': 1, 'global_filters': [], 'new': 'x'}, {'breadcrumb-cut': [], 'root-reset': [], 'effective-constraints': [], 'branch-after-back': ['x'], 'active-crumb': None, 'drilldown-depth': 0}), ({'trail': [], 'index': 1, 'global_filters': ['scope'], 'new': 'x'}, {'breadcrumb-cut': [], 'root-reset': ['scope'], 'effective-constraints': ['scope'], 'branch-after-back': ['x'], 'active-crumb': None, 'drilldown-depth': 0}), ({'trail': ['a'], 'index': 0, 'global_filters': [], 'new': 'x'}, {'breadcrumb-cut': ['a'], 'root-reset': [], 'effective-constraints': ['a'], 'branch-after-back': ['a', 'x'], 'active-crumb': 0, 'drilldown-depth': 1}), ({'trail': ['a'], 'index': 0, 'global_filters': ['scope'], 'new': 'x'}, {'breadcrumb-cut': ['a'], 'root-reset': ['scope'], 'effective-constraints': ['scope', 'a'], 'branch-after-back': ['a', 'x'], 'active-crumb': 0, 'drilldown-depth': 1}), ({'trail': ['a'], 'index': 1, 'global_filters': [], 'new': 'x'}, {'breadcrumb-cut': ['a'], 'root-reset': [], 'effective-constraints': ['a'], 'branch-after-back': ['a', 'x'], 'active-crumb': 0, 'drilldown-depth': 1}), ({'trail': ['a'], 'index': 1, 'global_filters': ['scope'], 'new': 'x'}, {'breadcrumb-cut': ['a'], 'root-reset': ['scope'], 'effective-constraints': ['scope', 'a'], 'branch-after-back': ['a', 'x'], 'active-crumb': 0, 'drilldown-depth': 1}), ({'trail': ['a', 'b', 'a'], 'index': 0, 'global_filters': [], 'new': 'x'}, {'breadcrumb-cut': ['a'], 'root-reset': [], 'effective-constraints': ['a', 'b', 'a'], 'branch-after-back': ['a', 'x'], 'active-crumb': 2, 'drilldown-depth': 3}), ({'trail': ['a', 'b', 'a'], 'index': 0, 'global_filters': ['scope'], 'new': 'x'}, {'breadcrumb-cut': ['a'], 'root-reset': ['scope'], 'effective-constraints': ['scope', 'a', 'b', 'a'], 'branch-after-back': ['a', 'x'], 'active-crumb': 2, 'drilldown-depth': 3})], 5: [({'trail': ['a'], 'index': 0, 'global_filters': ['scope'], 'new': 'x'}, {'breadcrumb-cut': ['a'], 'root-reset': ['scope'], 'effective-constraints': ['scope', 'a'], 'branch-after-back': ['a', 'x'], 'active-crumb': 0, 'drilldown-depth': 1}), ({'trail': ['a', 'b', 'a'], 'index': 1, 'global_filters': ['scope'], 'new': 'y'}, {'breadcrumb-cut': ['a', 'b'], 'root-reset': ['scope'], 'effective-constraints': ['scope', 'a', 'b', 'a'], 'branch-after-back': ['a', 'b', 'y'], 'active-crumb': 2, 'drilldown-depth': 3}), ({'trail': ['a'], 'index': 0, 'global_filters': ['scope'], 'new': 'y'}, {'breadcrumb-cut': ['a'], 'root-reset': ['scope'], 'effective-constraints': ['scope', 'a'], 'branch-after-back': ['a', 'y'], 'active-crumb': 0, 'drilldown-depth': 1}), ({'trail': ['a'], 'index': 1, 'global_filters': [], 'new': 'y'}, {'breadcrumb-cut': ['a'], 'root-reset': [], 'effective-constraints': ['a'], 'branch-after-back': ['a', 'y'], 'active-crumb': 0, 'drilldown-depth': 1}), ({'trail': ['a'], 'index': 1, 'global_filters': ['scope'], 'new': 'y'}, {'breadcrumb-cut': ['a'], 'root-reset': ['scope'], 'effective-constraints': ['scope', 'a'], 'branch-after-back': ['a', 'y'], 'active-crumb': 0, 'drilldown-depth': 1}), ({'trail': ['a', 'b', 'a'], 'index': 0, 'global_filters': [], 'new': 'y'}, {'breadcrumb-cut': ['a'], 'root-reset': [], 'effective-constraints': ['a', 'b', 'a'], 'branch-after-back': ['a', 'y'], 'active-crumb': 2, 'drilldown-depth': 3}), ({'trail': ['a', 'b', 'a'], 'index': 0, 'global_filters': ['scope'], 'new': 'y'}, {'breadcrumb-cut': ['a'], 'root-reset': ['scope'], 'effective-constraints': ['scope', 'a', 'b', 'a'], 'branch-after-back': ['a', 'y'], 'active-crumb': 2, 'drilldown-depth': 3}), ({'trail': ['a', 'b', 'a'], 'index': 1, 'global_filters': [], 'new': 'y'}, {'breadcrumb-cut': ['a', 'b'], 'root-reset': [], 'effective-constraints': ['a', 'b', 'a'], 'branch-after-back': ['a', 'b', 'y'], 'active-crumb': 2, 'drilldown-depth': 3}), ({'trail': [], 'index': 0, 'global_filters': [], 'new': 'y'}, {'breadcrumb-cut': [], 'root-reset': [], 'effective-constraints': [], 'branch-after-back': ['y'], 'active-crumb': None, 'drilldown-depth': 0}), ({'trail': [], 'index': 0, 'global_filters': ['scope'], 'new': 'y'}, {'breadcrumb-cut': [], 'root-reset': ['scope'], 'effective-constraints': ['scope'], 'branch-after-back': ['y'], 'active-crumb': None, 'drilldown-depth': 0})]}
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)

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

N = 1
observations = []
def solve(d):
    return {'breadcrumb-cut':(d['trail'][:d['index']+1]), 'root-reset':(d['global_filters']), 'effective-constraints':(d['global_filters']+d['trail'][-1:]), 'branch-after-back':(d['trail'][:d['index']+1]+[d['new']]), 'active-crumb':(len(d['trail'])-1 if d['trail'] else None), 'drilldown-depth':(len(d['trail']))}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = {1: [({'trail': [], 'index': 0, 'global_filters': ['scope'], 'new': 'x'}, {'breadcrumb-cut': [], 'root-reset': ['scope'], 'effective-constraints': ['scope'], 'branch-after-back': ['x'], 'active-crumb': None, 'drilldown-depth': 0}), ({'trail': ['a', 'b', 'a'], 'index': 0, 'global_filters': ['scope'], 'new': 'y'}, {'breadcrumb-cut': ['a'], 'root-reset': ['scope'], 'effective-constraints': ['scope', 'a', 'b', 'a'], 'branch-after-back': ['a', 'y'], 'active-crumb': 2, 'drilldown-depth': 3}), ({'trail': [], 'index': 1, 'global_filters': ['scope'], 'new': 'y'}, {'breadcrumb-cut': [], 'root-reset': ['scope'], 'effective-constraints': ['scope'], 'branch-after-back': ['y'], 'active-crumb': None, 'drilldown-depth': 0}), ({'trail': ['a'], 'index': 0, 'global_filters': [], 'new': 'y'}, {'breadcrumb-cut': ['a'], 'root-reset': [], 'effective-constraints': ['a'], 'branch-after-back': ['a', 'y'], 'active-crumb': 0, 'drilldown-depth': 1}), ({'trail': ['a'], 'index': 0, 'global_filters': ['scope'], 'new': 'y'}, {'breadcrumb-cut': ['a'], 'root-reset': ['scope'], 'effective-constraints': ['scope', 'a'], 'branch-after-back': ['a', 'y'], 'active-crumb': 0, 'drilldown-depth': 1}), ({'trail': ['a'], 'index': 1, 'global_filters': [], 'new': 'y'}, {'breadcrumb-cut': ['a'], 'root-reset': [], 'effective-constraints': ['a'], 'branch-after-back': ['a', 'y'], 'active-crumb': 0, 'drilldown-depth': 1}), ({'trail': ['a'], 'index': 1, 'global_filters': ['scope'], 'new': 'y'}, {'breadcrumb-cut': ['a'], 'root-reset': ['scope'], 'effective-constraints': ['scope', 'a'], 'branch-after-back': ['a', 'y'], 'active-crumb': 0, 'drilldown-depth': 1}), ({'trail': ['a', 'b', 'a'], 'index': 0, 'global_filters': [], 'new': 'y'}, {'breadcrumb-cut': ['a'], 'root-reset': [], 'effective-constraints': ['a', 'b', 'a'], 'branch-after-back': ['a', 'y'], 'active-crumb': 2, 'drilldown-depth': 3}), ({'trail': ['a', 'b', 'a'], 'index': 1, 'global_filters': [], 'new': 'y'}, {'breadcrumb-cut': ['a', 'b'], 'root-reset': [], 'effective-constraints': ['a', 'b', 'a'], 'branch-after-back': ['a', 'b', 'y'], 'active-crumb': 2, 'drilldown-depth': 3}), ({'trail': ['a', 'b', 'a'], 'index': 1, 'global_filters': ['scope'], 'new': 'y'}, {'breadcrumb-cut': ['a', 'b'], 'root-reset': ['scope'], 'effective-constraints': ['scope', 'a', 'b', 'a'], 'branch-after-back': ['a', 'b', 'y'], 'active-crumb': 2, 'drilldown-depth': 3})], 2: [({'trail': [], 'index': 0, 'global_filters': ['scope'], 'new': 'y'}, {'breadcrumb-cut': [], 'root-reset': ['scope'], 'effective-constraints': ['scope'], 'branch-after-back': ['y'], 'active-crumb': None, 'drilldown-depth': 0}), ({'trail': ['a', 'b', 'a'], 'index': 1, 'global_filters': ['scope'], 'new': 'x'}, {'breadcrumb-cut': ['a', 'b'], 'root-reset': ['scope'], 'effective-constraints': ['scope', 'a', 'b', 'a'], 'branch-after-back': ['a', 'b', 'x'], 'active-crumb': 2, 'drilldown-depth': 3}), ({'trail': ['a'], 'index': 1, 'global_filters': ['scope'], 'new': 'x'}, {'breadcrumb-cut': ['a'], 'root-reset': ['scope'], 'effective-constraints': ['scope', 'a'], 'branch-after-back': ['a', 'x'], 'active-crumb': 0, 'drilldown-depth': 1}), ({'trail': ['a', 'b', 'a'], 'index': 0, 'global_filters': [], 'new': 'x'}, {'breadcrumb-cut': ['a'], 'root-reset': [], 'effective-constraints': ['a', 'b', 'a'], 'branch-after-back': ['a', 'x'], 'active-crumb': 2, 'drilldown-depth': 3}), ({'trail': ['a', 'b', 'a'], 'index': 0, 'global_filters': ['scope'], 'new': 'x'}, {'breadcrumb-cut': ['a'], 'root-reset': ['scope'], 'effective-constraints': ['scope', 'a', 'b', 'a'], 'branch-after-back': ['a', 'x'], 'active-crumb': 2, 'drilldown-depth': 3}), ({'trail': ['a', 'b', 'a'], 'index': 1, 'global_filters': [], 'new': 'x'}, {'breadcrumb-cut': ['a', 'b'], 'root-reset': [], 'effective-constraints': ['a', 'b', 'a'], 'branch-after-back': ['a', 'b', 'x'], 'active-crumb': 2, 'drilldown-depth': 3}), ({'trail': [], 'index': 0, 'global_filters': [], 'new': 'x'}, {'breadcrumb-cut': [], 'root-reset': [], 'effective-constraints': [], 'branch-after-back': ['x'], 'active-crumb': None, 'drilldown-depth': 0}), ({'trail': [], 'index': 0, 'global_filters': ['scope'], 'new': 'x'}, {'breadcrumb-cut': [], 'root-reset': ['scope'], 'effective-constraints': ['scope'], 'branch-after-back': ['x'], 'active-crumb': None, 'drilldown-depth': 0}), ({'trail': [], 'index': 1, 'global_filters': [], 'new': 'x'}, {'breadcrumb-cut': [], 'root-reset': [], 'effective-constraints': [], 'branch-after-back': ['x'], 'active-crumb': None, 'drilldown-depth': 0}), ({'trail': [], 'index': 1, 'global_filters': ['scope'], 'new': 'x'}, {'breadcrumb-cut': [], 'root-reset': ['scope'], 'effective-constraints': ['scope'], 'branch-after-back': ['x'], 'active-crumb': None, 'drilldown-depth': 0})], 3: [({'trail': [], 'index': 1, 'global_filters': ['scope'], 'new': 'x'}, {'breadcrumb-cut': [], 'root-reset': ['scope'], 'effective-constraints': ['scope'], 'branch-after-back': ['x'], 'active-crumb': None, 'drilldown-depth': 0}), ({'trail': ['a', 'b', 'a'], 'index': 0, 'global_filters': [], 'new': 'y'}, {'breadcrumb-cut': ['a'], 'root-reset': [], 'effective-constraints': ['a', 'b', 'a'], 'branch-after-back': ['a', 'y'], 'active-crumb': 2, 'drilldown-depth': 3}), ({'trail': ['a', 'b', 'a'], 'index': 1, 'global_filters': [], 'new': 'y'}, {'breadcrumb-cut': ['a', 'b'], 'root-reset': [], 'effective-constraints': ['a', 'b', 'a'], 'branch-after-back': ['a', 'b', 'y'], 'active-crumb': 2, 'drilldown-depth': 3}), ({'trail': ['a', 'b', 'a'], 'index': 1, 'global_filters': ['scope'], 'new': 'y'}, {'breadcrumb-cut': ['a', 'b'], 'root-reset': ['scope'], 'effective-constraints': ['scope', 'a', 'b', 'a'], 'branch-after-back': ['a', 'b', 'y'], 'active-crumb': 2, 'drilldown-depth': 3}), ({'trail': [], 'index': 0, 'global_filters': [], 'new': 'y'}, {'breadcrumb-cut': [], 'root-reset': [], 'effective-constraints': [], 'branch-after-back': ['y'], 'active-crumb': None, 'drilldown-depth': 0}), ({'trail': [], 'index': 0, 'global_filters': ['scope'], 'new': 'y'}, {'breadcrumb-cut': [], 'root-reset': ['scope'], 'effective-constraints': ['scope'], 'branch-after-back': ['y'], 'active-crumb': None, 'drilldown-depth': 0}), ({'trail': [], 'index': 1, 'global_filters': [], 'new': 'y'}, {'breadcrumb-cut': [], 'root-reset': [], 'effective-constraints': [], 'branch-after-back': ['y'], 'active-crumb': None, 'drilldown-depth': 0}), ({'trail': [], 'index': 1, 'global_filters': ['scope'], 'new': 'y'}, {'breadcrumb-cut': [], 'root-reset': ['scope'], 'effective-constraints': ['scope'], 'branch-after-back': ['y'], 'active-crumb': None, 'drilldown-depth': 0}), ({'trail': ['a'], 'index': 0, 'global_filters': [], 'new': 'y'}, {'breadcrumb-cut': ['a'], 'root-reset': [], 'effective-constraints': ['a'], 'branch-after-back': ['a', 'y'], 'active-crumb': 0, 'drilldown-depth': 1}), ({'trail': ['a'], 'index': 0, 'global_filters': ['scope'], 'new': 'y'}, {'breadcrumb-cut': ['a'], 'root-reset': ['scope'], 'effective-constraints': ['scope', 'a'], 'branch-after-back': ['a', 'y'], 'active-crumb': 0, 'drilldown-depth': 1})], 4: [({'trail': [], 'index': 1, 'global_filters': ['scope'], 'new': 'y'}, {'breadcrumb-cut': [], 'root-reset': ['scope'], 'effective-constraints': ['scope'], 'branch-after-back': ['y'], 'active-crumb': None, 'drilldown-depth': 0}), ({'trail': ['a', 'b', 'a'], 'index': 1, 'global_filters': [], 'new': 'x'}, {'breadcrumb-cut': ['a', 'b'], 'root-reset': [], 'effective-constraints': ['a', 'b', 'a'], 'branch-after-back': ['a', 'b', 'x'], 'active-crumb': 2, 'drilldown-depth': 3}), ({'trail': [], 'index': 1, 'global_filters': [], 'new': 'x'}, {'breadcrumb-cut': [], 'root-reset': [], 'effective-constraints': [], 'branch-after-back': ['x'], 'active-crumb': None, 'drilldown-depth': 0}), ({'trail': [], 'index': 1, 'global_filters': ['scope'], 'new': 'x'}, {'breadcrumb-cut': [], 'root-reset': ['scope'], 'effective-constraints': ['scope'], 'branch-after-back': ['x'], 'active-crumb': None, 'drilldown-depth': 0}), ({'trail': ['a'], 'index': 0, 'global_filters': [], 'new': 'x'}, {'breadcrumb-cut': ['a'], 'root-reset': [], 'effective-constraints': ['a'], 'branch-after-back': ['a', 'x'], 'active-crumb': 0, 'drilldown-depth': 1}), ({'trail': ['a'], 'index': 0, 'global_filters': ['scope'], 'new': 'x'}, {'breadcrumb-cut': ['a'], 'root-reset': ['scope'], 'effective-constraints': ['scope', 'a'], 'branch-after-back': ['a', 'x'], 'active-crumb': 0, 'drilldown-depth': 1}), ({'trail': ['a'], 'index': 1, 'global_filters': [], 'new': 'x'}, {'breadcrumb-cut': ['a'], 'root-reset': [], 'effective-constraints': ['a'], 'branch-after-back': ['a', 'x'], 'active-crumb': 0, 'drilldown-depth': 1}), ({'trail': ['a'], 'index': 1, 'global_filters': ['scope'], 'new': 'x'}, {'breadcrumb-cut': ['a'], 'root-reset': ['scope'], 'effective-constraints': ['scope', 'a'], 'branch-after-back': ['a', 'x'], 'active-crumb': 0, 'drilldown-depth': 1}), ({'trail': ['a', 'b', 'a'], 'index': 0, 'global_filters': [], 'new': 'x'}, {'breadcrumb-cut': ['a'], 'root-reset': [], 'effective-constraints': ['a', 'b', 'a'], 'branch-after-back': ['a', 'x'], 'active-crumb': 2, 'drilldown-depth': 3}), ({'trail': ['a', 'b', 'a'], 'index': 0, 'global_filters': ['scope'], 'new': 'x'}, {'breadcrumb-cut': ['a'], 'root-reset': ['scope'], 'effective-constraints': ['scope', 'a', 'b', 'a'], 'branch-after-back': ['a', 'x'], 'active-crumb': 2, 'drilldown-depth': 3})], 5: [({'trail': ['a'], 'index': 0, 'global_filters': ['scope'], 'new': 'x'}, {'breadcrumb-cut': ['a'], 'root-reset': ['scope'], 'effective-constraints': ['scope', 'a'], 'branch-after-back': ['a', 'x'], 'active-crumb': 0, 'drilldown-depth': 1}), ({'trail': ['a', 'b', 'a'], 'index': 1, 'global_filters': ['scope'], 'new': 'y'}, {'breadcrumb-cut': ['a', 'b'], 'root-reset': ['scope'], 'effective-constraints': ['scope', 'a', 'b', 'a'], 'branch-after-back': ['a', 'b', 'y'], 'active-crumb': 2, 'drilldown-depth': 3}), ({'trail': ['a'], 'index': 0, 'global_filters': ['scope'], 'new': 'y'}, {'breadcrumb-cut': ['a'], 'root-reset': ['scope'], 'effective-constraints': ['scope', 'a'], 'branch-after-back': ['a', 'y'], 'active-crumb': 0, 'drilldown-depth': 1}), ({'trail': ['a'], 'index': 1, 'global_filters': [], 'new': 'y'}, {'breadcrumb-cut': ['a'], 'root-reset': [], 'effective-constraints': ['a'], 'branch-after-back': ['a', 'y'], 'active-crumb': 0, 'drilldown-depth': 1}), ({'trail': ['a'], 'index': 1, 'global_filters': ['scope'], 'new': 'y'}, {'breadcrumb-cut': ['a'], 'root-reset': ['scope'], 'effective-constraints': ['scope', 'a'], 'branch-after-back': ['a', 'y'], 'active-crumb': 0, 'drilldown-depth': 1}), ({'trail': ['a', 'b', 'a'], 'index': 0, 'global_filters': [], 'new': 'y'}, {'breadcrumb-cut': ['a'], 'root-reset': [], 'effective-constraints': ['a', 'b', 'a'], 'branch-after-back': ['a', 'y'], 'active-crumb': 2, 'drilldown-depth': 3}), ({'trail': ['a', 'b', 'a'], 'index': 0, 'global_filters': ['scope'], 'new': 'y'}, {'breadcrumb-cut': ['a'], 'root-reset': ['scope'], 'effective-constraints': ['scope', 'a', 'b', 'a'], 'branch-after-back': ['a', 'y'], 'active-crumb': 2, 'drilldown-depth': 3}), ({'trail': ['a', 'b', 'a'], 'index': 1, 'global_filters': [], 'new': 'y'}, {'breadcrumb-cut': ['a', 'b'], 'root-reset': [], 'effective-constraints': ['a', 'b', 'a'], 'branch-after-back': ['a', 'b', 'y'], 'active-crumb': 2, 'drilldown-depth': 3}), ({'trail': [], 'index': 0, 'global_filters': [], 'new': 'y'}, {'breadcrumb-cut': [], 'root-reset': [], 'effective-constraints': [], 'branch-after-back': ['y'], 'active-crumb': None, 'drilldown-depth': 0}), ({'trail': [], 'index': 0, 'global_filters': ['scope'], 'new': 'y'}, {'breadcrumb-cut': [], 'root-reset': ['scope'], 'effective-constraints': ['scope'], 'branch-after-back': ['y'], 'active-crumb': None, 'drilldown-depth': 0})]}
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)

prompt:
Effective filtering retains all drilldown ancestor constraints is violated by the widget projection.

A facet drilldown trail records a sequence of scoped constraints; returning to a breadcrumb truncates later drilldowns while preserving independent global filters. This example checks: Effective filtering retains all drilldown ancestor constraints.

split: open-access


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

N = 1
observations = []
def solve(d):
    return {'breadcrumb-cut':(d['trail'][:d['index']+1]), 'root-reset':(d['global_filters']), 'effective-constraints':(d['global_filters']+d['trail']), 'branch-after-back':(d['trail']+[d['new']]), 'active-crumb':(len(d['trail'])-1 if d['trail'] else None), 'drilldown-depth':(len(d['trail']))}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = {1: [({'trail': ['a', 'b', 'a'], 'index': 0, 'global_filters': [], 'new': 'x'}, {'breadcrumb-cut': ['a'], 'root-reset': [], 'effective-constraints': ['a', 'b', 'a'], 'branch-after-back': ['a', 'x'], 'active-crumb': 2, 'drilldown-depth': 3}), ({'trail': ['a'], 'index': 0, 'global_filters': ['scope'], 'new': 'y'}, {'breadcrumb-cut': ['a'], 'root-reset': ['scope'], 'effective-constraints': ['scope', 'a'], 'branch-after-back': ['a', 'y'], 'active-crumb': 0, 'drilldown-depth': 1}), ({'trail': [], 'index': 1, 'global_filters': ['scope'], 'new': 'y'}, {'breadcrumb-cut': [], 'root-reset': ['scope'], 'effective-constraints': ['scope'], 'branch-after-back': ['y'], 'active-crumb': None, 'drilldown-depth': 0}), ({'trail': ['a'], 'index': 0, 'global_filters': [], 'new': 'y'}, {'breadcrumb-cut': ['a'], 'root-reset': [], 'effective-constraints': ['a'], 'branch-after-back': ['a', 'y'], 'active-crumb': 0, 'drilldown-depth': 1}), ({'trail': ['a'], 'index': 1, 'global_filters': [], 'new': 'y'}, {'breadcrumb-cut': ['a'], 'root-reset': [], 'effective-constraints': ['a'], 'branch-after-back': ['a', 'y'], 'active-crumb': 0, 'drilldown-depth': 1}), ({'trail': ['a'], 'index': 1, 'global_filters': ['scope'], 'new': 'y'}, {'breadcrumb-cut': ['a'], 'root-reset': ['scope'], 'effective-constraints': ['scope', 'a'], 'branch-after-back': ['a', 'y'], 'active-crumb': 0, 'drilldown-depth': 1}), ({'trail': ['a', 'b', 'a'], 'index': 0, 'global_filters': [], 'new': 'y'}, {'breadcrumb-cut': ['a'], 'root-reset': [], 'effective-constraints': ['a', 'b', 'a'], 'branch-after-back': ['a', 'y'], 'active-crumb': 2, 'drilldown-depth': 3}), ({'trail': ['a', 'b', 'a'], 'index': 0, 'global_filters': ['scope'], 'new': 'y'}, {'breadcrumb-cut': ['a'], 'root-reset': ['scope'], 'effective-constraints': ['scope', 'a', 'b', 'a'], 'branch-after-back': ['a', 'y'], 'active-crumb': 2, 'drilldown-depth': 3}), ({'trail': ['a', 'b', 'a'], 'index': 1, 'global_filters': [], 'new': 'y'}, {'breadcrumb-cut': ['a', 'b'], 'root-reset': [], 'effective-constraints': ['a', 'b', 'a'], 'branch-after-back': ['a', 'b', 'y'], 'active-crumb': 2, 'drilldown-depth': 3}), ({'trail': ['a', 'b', 'a'], 'index': 1, 'global_filters': ['scope'], 'new': 'y'}, {'breadcrumb-cut': ['a', 'b'], 'root-reset': ['scope'], 'effective-constraints': ['scope', 'a', 'b', 'a'], 'branch-after-back': ['a', 'b', 'y'], 'active-crumb': 2, 'drilldown-depth': 3})], 2: [({'trail': ['a', 'b', 'a'], 'index': 0, 'global_filters': [], 'new': 'y'}, {'breadcrumb-cut': ['a'], 'root-reset': [], 'effective-constraints': ['a', 'b', 'a'], 'branch-after-back': ['a', 'y'], 'active-crumb': 2, 'drilldown-depth': 3}), ({'trail': ['a'], 'index': 1, 'global_filters': ['scope'], 'new': 'x'}, {'breadcrumb-cut': ['a'], 'root-reset': ['scope'], 'effective-constraints': ['scope', 'a'], 'branch-after-back': ['a', 'x'], 'active-crumb': 0, 'drilldown-depth': 1}), ({'trail': ['a', 'b', 'a'], 'index': 0, 'global_filters': [], 'new': 'x'}, {'breadcrumb-cut': ['a'], 'root-reset': [], 'effective-constraints': ['a', 'b', 'a'], 'branch-after-back': ['a', 'x'], 'active-crumb': 2, 'drilldown-depth': 3}), ({'trail': ['a', 'b', 'a'], 'index': 0, 'global_filters': ['scope'], 'new': 'x'}, {'breadcrumb-cut': ['a'], 'root-reset': ['scope'], 'effective-constraints': ['scope', 'a', 'b', 'a'], 'branch-after-back': ['a', 'x'], 'active-crumb': 2, 'drilldown-depth': 3}), ({'trail': ['a', 'b', 'a'], 'index': 1, 'global_filters': [], 'new': 'x'}, {'breadcrumb-cut': ['a', 'b'], 'root-reset': [], 'effective-constraints': ['a', 'b', 'a'], 'branch-after-back': ['a', 'b', 'x'], 'active-crumb': 2, 'drilldown-depth': 3}), ({'trail': ['a', 'b', 'a'], 'index': 1, 'global_filters': ['scope'], 'new': 'x'}, {'breadcrumb-cut': ['a', 'b'], 'root-reset': ['scope'], 'effective-constraints': ['scope', 'a', 'b', 'a'], 'branch-after-back': ['a', 'b', 'x'], 'active-crumb': 2, 'drilldown-depth': 3}), ({'trail': [], 'index': 0, 'global_filters': [], 'new': 'x'}, {'breadcrumb-cut': [], 'root-reset': [], 'effective-constraints': [], 'branch-after-back': ['x'], 'active-crumb': None, 'drilldown-depth': 0}), ({'trail': [], 'index': 0, 'global_filters': ['scope'], 'new': 'x'}, {'breadcrumb-cut': [], 'root-reset': ['scope'], 'effective-constraints': ['scope'], 'branch-after-back': ['x'], 'active-crumb': None, 'drilldown-depth': 0}), ({'trail': [], 'index': 1, 'global_filters': [], 'new': 'x'}, {'breadcrumb-cut': [], 'root-reset': [], 'effective-constraints': [], 'branch-after-back': ['x'], 'active-crumb': None, 'drilldown-depth': 0}), ({'trail': [], 'index': 1, 'global_filters': ['scope'], 'new': 'x'}, {'breadcrumb-cut': [], 'root-reset': ['scope'], 'effective-constraints': ['scope'], 'branch-after-back': ['x'], 'active-crumb': None, 'drilldown-depth': 0})], 3: [({'trail': ['a', 'b', 'a'], 'index': 0, 'global_filters': ['scope'], 'new': 'x'}, {'breadcrumb-cut': ['a'], 'root-reset': ['scope'], 'effective-constraints': ['scope', 'a', 'b', 'a'], 'branch-after-back': ['a', 'x'], 'active-crumb': 2, 'drilldown-depth': 3}), ({'trail': ['a', 'b', 'a'], 'index': 0, 'global_filters': [], 'new': 'y'}, {'breadcrumb-cut': ['a'], 'root-reset': [], 'effective-constraints': ['a', 'b', 'a'], 'branch-after-back': ['a', 'y'], 'active-crumb': 2, 'drilldown-depth': 3}), ({'trail': ['a', 'b', 'a'], 'index': 1, 'global_filters': [], 'new': 'y'}, {'breadcrumb-cut': ['a', 'b'], 'root-reset': [], 'effective-constraints': ['a', 'b', 'a'], 'branch-after-back': ['a', 'b', 'y'], 'active-crumb': 2, 'drilldown-depth': 3}), ({'trail': ['a', 'b', 'a'], 'index': 1, 'global_filters': ['scope'], 'new': 'y'}, {'breadcrumb-cut': ['a', 'b'], 'root-reset': ['scope'], 'effective-constraints': ['scope', 'a', 'b', 'a'], 'branch-after-back': ['a', 'b', 'y'], 'active-crumb': 2, 'drilldown-depth': 3}), ({'trail': [], 'index': 0, 'global_filters': [], 'new': 'y'}, {'breadcrumb-cut': [], 'root-reset': [], 'effective-constraints': [], 'branch-after-back': ['y'], 'active-crumb': None, 'drilldown-depth': 0}), ({'trail': [], 'index': 0, 'global_filters': ['scope'], 'new': 'y'}, {'breadcrumb-cut': [], 'root-reset': ['scope'], 'effective-constraints': ['scope'], 'branch-after-back': ['y'], 'active-crumb': None, 'drilldown-depth': 0}), ({'trail': [], 'index': 1, 'global_filters': [], 'new': 'y'}, {'breadcrumb-cut': [], 'root-reset': [], 'effective-constraints': [], 'branch-after-back': ['y'], 'active-crumb': None, 'drilldown-depth': 0}), ({'trail': [], 'index': 1, 'global_filters': ['scope'], 'new': 'y'}, {'breadcrumb-cut': [], 'root-reset': ['scope'], 'effective-constraints': ['scope'], 'branch-after-back': ['y'], 'active-crumb': None, 'drilldown-depth': 0}), ({'trail': ['a'], 'index': 0, 'global_filters': [], 'new': 'y'}, {'breadcrumb-cut': ['a'], 'root-reset': [], 'effective-constraints': ['a'], 'branch-after-back': ['a', 'y'], 'active-crumb': 0, 'drilldown-depth': 1}), ({'trail': ['a'], 'index': 0, 'global_filters': ['scope'], 'new': 'y'}, {'breadcrumb-cut': ['a'], 'root-reset': ['scope'], 'effective-constraints': ['scope', 'a'], 'branch-after-back': ['a', 'y'], 'active-crumb': 0, 'drilldown-depth': 1})], 4: [({'trail': ['a', 'b', 'a'], 'index': 0, 'global_filters': ['scope'], 'new': 'y'}, {'breadcrumb-cut': ['a'], 'root-reset': ['scope'], 'effective-constraints': ['scope', 'a', 'b', 'a'], 'branch-after-back': ['a', 'y'], 'active-crumb': 2, 'drilldown-depth': 3}), ({'trail': ['a', 'b', 'a'], 'index': 1, 'global_filters': [], 'new': 'x'}, {'breadcrumb-cut': ['a', 'b'], 'root-reset': [], 'effective-constraints': ['a', 'b', 'a'], 'branch-after-back': ['a', 'b', 'x'], 'active-crumb': 2, 'drilldown-depth': 3}), ({'trail': [], 'index': 1, 'global_filters': [], 'new': 'x'}, {'breadcrumb-cut': [], 'root-reset': [], 'effective-constraints': [], 'branch-after-back': ['x'], 'active-crumb': None, 'drilldown-depth': 0}), ({'trail': [], 'index': 1, 'global_filters': ['scope'], 'new': 'x'}, {'breadcrumb-cut': [], 'root-reset': ['scope'], 'effective-constraints': ['scope'], 'branch-after-back': ['x'], 'active-crumb': None, 'drilldown-depth': 0}), ({'trail': ['a'], 'index': 0, 'global_filters': [], 'new': 'x'}, {'breadcrumb-cut': ['a'], 'root-reset': [], 'effective-constraints': ['a'], 'branch-after-back': ['a', 'x'], 'active-crumb': 0, 'drilldown-depth': 1}), ({'trail': ['a'], 'index': 0, 'global_filters': ['scope'], 'new': 'x'}, {'breadcrumb-cut': ['a'], 'root-reset': ['scope'], 'effective-constraints': ['scope', 'a'], 'branch-after-back': ['a', 'x'], 'active-crumb': 0, 'drilldown-depth': 1}), ({'trail': ['a'], 'index': 1, 'global_filters': [], 'new': 'x'}, {'breadcrumb-cut': ['a'], 'root-reset': [], 'effective-constraints': ['a'], 'branch-after-back': ['a', 'x'], 'active-crumb': 0, 'drilldown-depth': 1}), ({'trail': ['a'], 'index': 1, 'global_filters': ['scope'], 'new': 'x'}, {'breadcrumb-cut': ['a'], 'root-reset': ['scope'], 'effective-constraints': ['scope', 'a'], 'branch-after-back': ['a', 'x'], 'active-crumb': 0, 'drilldown-depth': 1}), ({'trail': ['a', 'b', 'a'], 'index': 0, 'global_filters': [], 'new': 'x'}, {'breadcrumb-cut': ['a'], 'root-reset': [], 'effective-constraints': ['a', 'b', 'a'], 'branch-after-back': ['a', 'x'], 'active-crumb': 2, 'drilldown-depth': 3}), ({'trail': ['a', 'b', 'a'], 'index': 0, 'global_filters': ['scope'], 'new': 'x'}, {'breadcrumb-cut': ['a'], 'root-reset': ['scope'], 'effective-constraints': ['scope', 'a', 'b', 'a'], 'branch-after-back': ['a', 'x'], 'active-crumb': 2, 'drilldown-depth': 3})], 5: [({'trail': ['a', 'b', 'a'], 'index': 1, 'global_filters': [], 'new': 'x'}, {'breadcrumb-cut': ['a', 'b'], 'root-reset': [], 'effective-constraints': ['a', 'b', 'a'], 'branch-after-back': ['a', 'b', 'x'], 'active-crumb': 2, 'drilldown-depth': 3}), ({'trail': ['a', 'b', 'a'], 'index': 1, 'global_filters': ['scope'], 'new': 'y'}, {'breadcrumb-cut': ['a', 'b'], 'root-reset': ['scope'], 'effective-constraints': ['scope', 'a', 'b', 'a'], 'branch-after-back': ['a', 'b', 'y'], 'active-crumb': 2, 'drilldown-depth': 3}), ({'trail': ['a'], 'index': 0, 'global_filters': ['scope'], 'new': 'y'}, {'breadcrumb-cut': ['a'], 'root-reset': ['scope'], 'effective-constraints': ['scope', 'a'], 'branch-after-back': ['a', 'y'], 'active-crumb': 0, 'drilldown-depth': 1}), ({'trail': ['a'], 'index': 1, 'global_filters': [], 'new': 'y'}, {'breadcrumb-cut': ['a'], 'root-reset': [], 'effective-constraints': ['a'], 'branch-after-back': ['a', 'y'], 'active-crumb': 0, 'drilldown-depth': 1}), ({'trail': ['a'], 'index': 1, 'global_filters': ['scope'], 'new': 'y'}, {'breadcrumb-cut': ['a'], 'root-reset': ['scope'], 'effective-constraints': ['scope', 'a'], 'branch-after-back': ['a', 'y'], 'active-crumb': 0, 'drilldown-depth': 1}), ({'trail': ['a', 'b', 'a'], 'index': 0, 'global_filters': [], 'new': 'y'}, {'breadcrumb-cut': ['a'], 'root-reset': [], 'effective-constraints': ['a', 'b', 'a'], 'branch-after-back': ['a', 'y'], 'active-crumb': 2, 'drilldown-depth': 3}), ({'trail': ['a', 'b', 'a'], 'index': 0, 'global_filters': ['scope'], 'new': 'y'}, {'breadcrumb-cut': ['a'], 'root-reset': ['scope'], 'effective-constraints': ['scope', 'a', 'b', 'a'], 'branch-after-back': ['a', 'y'], 'active-crumb': 2, 'drilldown-depth': 3}), ({'trail': ['a', 'b', 'a'], 'index': 1, 'global_filters': [], 'new': 'y'}, {'breadcrumb-cut': ['a', 'b'], 'root-reset': [], 'effective-constraints': ['a', 'b', 'a'], 'branch-after-back': ['a', 'b', 'y'], 'active-crumb': 2, 'drilldown-depth': 3}), ({'trail': [], 'index': 0, 'global_filters': [], 'new': 'y'}, {'breadcrumb-cut': [], 'root-reset': [], 'effective-constraints': [], 'branch-after-back': ['y'], 'active-crumb': None, 'drilldown-depth': 0}), ({'trail': [], 'index': 0, 'global_filters': ['scope'], 'new': 'y'}, {'breadcrumb-cut': [], 'root-reset': ['scope'], 'effective-constraints': ['scope'], 'branch-after-back': ['y'], 'active-crumb': None, 'drilldown-depth': 0})]}
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)

meaning: Fixture-count band, not measured model difficulty

deps: stdlib

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

N = 1
observations = []
def solve(d):
    return {'breadcrumb-cut':(d['trail'][:d['index']+1]), 'root-reset':(d['global_filters']), 'effective-constraints':(d['global_filters']+d['trail']), 'branch-after-back':([d['new']]), 'active-crumb':(len(d['trail'])-1 if d['trail'] else None), 'drilldown-depth':(len(d['trail']))}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = {1: [({'trail': ['a', 'b', 'a'], 'index': 0, 'global_filters': [], 'new': 'x'}, {'breadcrumb-cut': ['a'], 'root-reset': [], 'effective-constraints': ['a', 'b', 'a'], 'branch-after-back': ['a', 'x'], 'active-crumb': 2, 'drilldown-depth': 3}), ({'trail': ['a'], 'index': 0, 'global_filters': ['scope'], 'new': 'y'}, {'breadcrumb-cut': ['a'], 'root-reset': ['scope'], 'effective-constraints': ['scope', 'a'], 'branch-after-back': ['a', 'y'], 'active-crumb': 0, 'drilldown-depth': 1}), ({'trail': [], 'index': 1, 'global_filters': ['scope'], 'new': 'y'}, {'breadcrumb-cut': [], 'root-reset': ['scope'], 'effective-constraints': ['scope'], 'branch-after-back': ['y'], 'active-crumb': None, 'drilldown-depth': 0}), ({'trail': ['a'], 'index': 0, 'global_filters': [], 'new': 'y'}, {'breadcrumb-cut': ['a'], 'root-reset': [], 'effective-constraints': ['a'], 'branch-after-back': ['a', 'y'], 'active-crumb': 0, 'drilldown-depth': 1}), ({'trail': ['a'], 'index': 1, 'global_filters': [], 'new': 'y'}, {'breadcrumb-cut': ['a'], 'root-reset': [], 'effective-constraints': ['a'], 'branch-after-back': ['a', 'y'], 'active-crumb': 0, 'drilldown-depth': 1}), ({'trail': ['a'], 'index': 1, 'global_filters': ['scope'], 'new': 'y'}, {'breadcrumb-cut': ['a'], 'root-reset': ['scope'], 'effective-constraints': ['scope', 'a'], 'branch-after-back': ['a', 'y'], 'active-crumb': 0, 'drilldown-depth': 1}), ({'trail': ['a', 'b', 'a'], 'index': 0, 'global_filters': [], 'new': 'y'}, {'breadcrumb-cut': ['a'], 'root-reset': [], 'effective-constraints': ['a', 'b', 'a'], 'branch-after-back': ['a', 'y'], 'active-crumb': 2, 'drilldown-depth': 3}), ({'trail': ['a', 'b', 'a'], 'index': 0, 'global_filters': ['scope'], 'new': 'y'}, {'breadcrumb-cut': ['a'], 'root-reset': ['scope'], 'effective-constraints': ['scope', 'a', 'b', 'a'], 'branch-after-back': ['a', 'y'], 'active-crumb': 2, 'drilldown-depth': 3}), ({'trail': ['a', 'b', 'a'], 'index': 1, 'global_filters': [], 'new': 'y'}, {'breadcrumb-cut': ['a', 'b'], 'root-reset': [], 'effective-constraints': ['a', 'b', 'a'], 'branch-after-back': ['a', 'b', 'y'], 'active-crumb': 2, 'drilldown-depth': 3}), ({'trail': ['a', 'b', 'a'], 'index': 1, 'global_filters': ['scope'], 'new': 'y'}, {'breadcrumb-cut': ['a', 'b'], 'root-reset': ['scope'], 'effective-constraints': ['scope', 'a', 'b', 'a'], 'branch-after-back': ['a', 'b', 'y'], 'active-crumb': 2, 'drilldown-depth': 3})], 2: [({'trail': ['a', 'b', 'a'], 'index': 0, 'global_filters': [], 'new': 'y'}, {'breadcrumb-cut': ['a'], 'root-reset': [], 'effective-constraints': ['a', 'b', 'a'], 'branch-after-back': ['a', 'y'], 'active-crumb': 2, 'drilldown-depth': 3}), ({'trail': ['a'], 'index': 1, 'global_filters': ['scope'], 'new': 'x'}, {'breadcrumb-cut': ['a'], 'root-reset': ['scope'], 'effective-constraints': ['scope', 'a'], 'branch-after-back': ['a', 'x'], 'active-crumb': 0, 'drilldown-depth': 1}), ({'trail': ['a', 'b', 'a'], 'index': 0, 'global_filters': [], 'new': 'x'}, {'breadcrumb-cut': ['a'], 'root-reset': [], 'effective-constraints': ['a', 'b', 'a'], 'branch-after-back': ['a', 'x'], 'active-crumb': 2, 'drilldown-depth': 3}), ({'trail': ['a', 'b', 'a'], 'index': 0, 'global_filters': ['scope'], 'new': 'x'}, {'breadcrumb-cut': ['a'], 'root-reset': ['scope'], 'effective-constraints': ['scope', 'a', 'b', 'a'], 'branch-after-back': ['a', 'x'], 'active-crumb': 2, 'drilldown-depth': 3}), ({'trail': ['a', 'b', 'a'], 'index': 1, 'global_filters': [], 'new': 'x'}, {'breadcrumb-cut': ['a', 'b'], 'root-reset': [], 'effective-constraints': ['a', 'b', 'a'], 'branch-after-back': ['a', 'b', 'x'], 'active-crumb': 2, 'drilldown-depth': 3}), ({'trail': ['a', 'b', 'a'], 'index': 1, 'global_filters': ['scope'], 'new': 'x'}, {'breadcrumb-cut': ['a', 'b'], 'root-reset': ['scope'], 'effective-constraints': ['scope', 'a', 'b', 'a'], 'branch-after-back': ['a', 'b', 'x'], 'active-crumb': 2, 'drilldown-depth': 3}), ({'trail': [], 'index': 0, 'global_filters': [], 'new': 'x'}, {'breadcrumb-cut': [], 'root-reset': [], 'effective-constraints': [], 'branch-after-back': ['x'], 'active-crumb': None, 'drilldown-depth': 0}), ({'trail': [], 'index': 0, 'global_filters': ['scope'], 'new': 'x'}, {'breadcrumb-cut': [], 'root-reset': ['scope'], 'effective-constraints': ['scope'], 'branch-after-back': ['x'], 'active-crumb': None, 'drilldown-depth': 0}), ({'trail': [], 'index': 1, 'global_filters': [], 'new': 'x'}, {'breadcrumb-cut': [], 'root-reset': [], 'effective-constraints': [], 'branch-after-back': ['x'], 'active-crumb': None, 'drilldown-depth': 0}), ({'trail': [], 'index': 1, 'global_filters': ['scope'], 'new': 'x'}, {'breadcrumb-cut': [], 'root-reset': ['scope'], 'effective-constraints': ['scope'], 'branch-after-back': ['x'], 'active-crumb': None, 'drilldown-depth': 0})], 3: [({'trail': ['a', 'b', 'a'], 'index': 0, 'global_filters': ['scope'], 'new': 'x'}, {'breadcrumb-cut': ['a'], 'root-reset': ['scope'], 'effective-constraints': ['scope', 'a', 'b', 'a'], 'branch-after-back': ['a', 'x'], 'active-crumb': 2, 'drilldown-depth': 3}), ({'trail': ['a', 'b', 'a'], 'index': 0, 'global_filters': [], 'new': 'y'}, {'breadcrumb-cut': ['a'], 'root-reset': [], 'effective-constraints': ['a', 'b', 'a'], 'branch-after-back': ['a', 'y'], 'active-crumb': 2, 'drilldown-depth': 3}), ({'trail': ['a', 'b', 'a'], 'index': 1, 'global_filters': [], 'new': 'y'}, {'breadcrumb-cut': ['a', 'b'], 'root-reset': [], 'effective-constraints': ['a', 'b', 'a'], 'branch-after-back': ['a', 'b', 'y'], 'active-crumb': 2, 'drilldown-depth': 3}), ({'trail': ['a', 'b', 'a'], 'index': 1, 'global_filters': ['scope'], 'new': 'y'}, {'breadcrumb-cut': ['a', 'b'], 'root-reset': ['scope'], 'effective-constraints': ['scope', 'a', 'b', 'a'], 'branch-after-back': ['a', 'b', 'y'], 'active-crumb': 2, 'drilldown-depth': 3}), ({'trail': [], 'index': 0, 'global_filters': [], 'new': 'y'}, {'breadcrumb-cut': [], 'root-reset': [], 'effective-constraints': [], 'branch-after-back': ['y'], 'active-crumb': None, 'drilldown-depth': 0}), ({'trail': [], 'index': 0, 'global_filters': ['scope'], 'new': 'y'}, {'breadcrumb-cut': [], 'root-reset': ['scope'], 'effective-constraints': ['scope'], 'branch-after-back': ['y'], 'active-crumb': None, 'drilldown-depth': 0}), ({'trail': [], 'index': 1, 'global_filters': [], 'new': 'y'}, {'breadcrumb-cut': [], 'root-reset': [], 'effective-constraints': [], 'branch-after-back': ['y'], 'active-crumb': None, 'drilldown-depth': 0}), ({'trail': [], 'index': 1, 'global_filters': ['scope'], 'new': 'y'}, {'breadcrumb-cut': [], 'root-reset': ['scope'], 'effective-constraints': ['scope'], 'branch-after-back': ['y'], 'active-crumb': None, 'drilldown-depth': 0}), ({'trail': ['a'], 'index': 0, 'global_filters': [], 'new': 'y'}, {'breadcrumb-cut': ['a'], 'root-reset': [], 'effective-constraints': ['a'], 'branch-after-back': ['a', 'y'], 'active-crumb': 0, 'drilldown-depth': 1}), ({'trail': ['a'], 'index': 0, 'global_filters': ['scope'], 'new': 'y'}, {'breadcrumb-cut': ['a'], 'root-reset': ['scope'], 'effective-constraints': ['scope', 'a'], 'branch-after-back': ['a', 'y'], 'active-crumb': 0, 'drilldown-depth': 1})], 4: [({'trail': ['a', 'b', 'a'], 'index': 0, 'global_filters': ['scope'], 'new': 'y'}, {'breadcrumb-cut': ['a'], 'root-reset': ['scope'], 'effective-constraints': ['scope', 'a', 'b', 'a'], 'branch-after-back': ['a', 'y'], 'active-crumb': 2, 'drilldown-depth': 3}), ({'trail': ['a', 'b', 'a'], 'index': 1, 'global_filters': [], 'new': 'x'}, {'breadcrumb-cut': ['a', 'b'], 'root-reset': [], 'effective-constraints': ['a', 'b', 'a'], 'branch-after-back': ['a', 'b', 'x'], 'active-crumb': 2, 'drilldown-depth': 3}), ({'trail': [], 'index': 1, 'global_filters': [], 'new': 'x'}, {'breadcrumb-cut': [], 'root-reset': [], 'effective-constraints': [], 'branch-after-back': ['x'], 'active-crumb': None, 'drilldown-depth': 0}), ({'trail': [], 'index': 1, 'global_filters': ['scope'], 'new': 'x'}, {'breadcrumb-cut': [], 'root-reset': ['scope'], 'effective-constraints': ['scope'], 'branch-after-back': ['x'], 'active-crumb': None, 'drilldown-depth': 0}), ({'trail': ['a'], 'index': 0, 'global_filters': [], 'new': 'x'}, {'breadcrumb-cut': ['a'], 'root-reset': [], 'effective-constraints': ['a'], 'branch-after-back': ['a', 'x'], 'active-crumb': 0, 'drilldown-depth': 1}), ({'trail': ['a'], 'index': 0, 'global_filters': ['scope'], 'new': 'x'}, {'breadcrumb-cut': ['a'], 'root-reset': ['scope'], 'effective-constraints': ['scope', 'a'], 'branch-after-back': ['a', 'x'], 'active-crumb': 0, 'drilldown-depth': 1}), ({'trail': ['a'], 'index': 1, 'global_filters': [], 'new': 'x'}, {'breadcrumb-cut': ['a'], 'root-reset': [], 'effective-constraints': ['a'], 'branch-after-back': ['a', 'x'], 'active-crumb': 0, 'drilldown-depth': 1}), ({'trail': ['a'], 'index': 1, 'global_filters': ['scope'], 'new': 'x'}, {'breadcrumb-cut': ['a'], 'root-reset': ['scope'], 'effective-constraints': ['scope', 'a'], 'branch-after-back': ['a', 'x'], 'active-crumb': 0, 'drilldown-depth': 1}), ({'trail': ['a', 'b', 'a'], 'index': 0, 'global_filters': [], 'new': 'x'}, {'breadcrumb-cut': ['a'], 'root-reset': [], 'effective-constraints': ['a', 'b', 'a'], 'branch-after-back': ['a', 'x'], 'active-crumb': 2, 'drilldown-depth': 3}), ({'trail': ['a', 'b', 'a'], 'index': 0, 'global_filters': ['scope'], 'new': 'x'}, {'breadcrumb-cut': ['a'], 'root-reset': ['scope'], 'effective-constraints': ['scope', 'a', 'b', 'a'], 'branch-after-back': ['a', 'x'], 'active-crumb': 2, 'drilldown-depth': 3})], 5: [({'trail': ['a', 'b', 'a'], 'index': 1, 'global_filters': [], 'new': 'x'}, {'breadcrumb-cut': ['a', 'b'], 'root-reset': [], 'effective-constraints': ['a', 'b', 'a'], 'branch-after-back': ['a', 'b', 'x'], 'active-crumb': 2, 'drilldown-depth': 3}), ({'trail': ['a', 'b', 'a'], 'index': 1, 'global_filters': ['scope'], 'new': 'y'}, {'breadcrumb-cut': ['a', 'b'], 'root-reset': ['scope'], 'effective-constraints': ['scope', 'a', 'b', 'a'], 'branch-after-back': ['a', 'b', 'y'], 'active-crumb': 2, 'drilldown-depth': 3}), ({'trail': ['a'], 'index': 0, 'global_filters': ['scope'], 'new': 'y'}, {'breadcrumb-cut': ['a'], 'root-reset': ['scope'], 'effective-constraints': ['scope', 'a'], 'branch-after-back': ['a', 'y'], 'active-crumb': 0, 'drilldown-depth': 1}), ({'trail': ['a'], 'index': 1, 'global_filters': [], 'new': 'y'}, {'breadcrumb-cut': ['a'], 'root-reset': [], 'effective-constraints': ['a'], 'branch-after-back': ['a', 'y'], 'active-crumb': 0, 'drilldown-depth': 1}), ({'trail': ['a'], 'index': 1, 'global_filters': ['scope'], 'new': 'y'}, {'breadcrumb-cut': ['a'], 'root-reset': ['scope'], 'effective-constraints': ['scope', 'a'], 'branch-after-back': ['a', 'y'], 'active-crumb': 0, 'drilldown-depth': 1}), ({'trail': ['a', 'b', 'a'], 'index': 0, 'global_filters': [], 'new': 'y'}, {'breadcrumb-cut': ['a'], 'root-reset': [], 'effective-constraints': ['a', 'b', 'a'], 'branch-after-back': ['a', 'y'], 'active-crumb': 2, 'drilldown-depth': 3}), ({'trail': ['a', 'b', 'a'], 'index': 0, 'global_filters': ['scope'], 'new': 'y'}, {'breadcrumb-cut': ['a'], 'root-reset': ['scope'], 'effective-constraints': ['scope', 'a', 'b', 'a'], 'branch-after-back': ['a', 'y'], 'active-crumb': 2, 'drilldown-depth': 3}), ({'trail': ['a', 'b', 'a'], 'index': 1, 'global_filters': [], 'new': 'y'}, {'breadcrumb-cut': ['a', 'b'], 'root-reset': [], 'effective-constraints': ['a', 'b', 'a'], 'branch-after-back': ['a', 'b', 'y'], 'active-crumb': 2, 'drilldown-depth': 3}), ({'trail': [], 'index': 0, 'global_filters': [], 'new': 'y'}, {'breadcrumb-cut': [], 'root-reset': [], 'effective-constraints': [], 'branch-after-back': ['y'], 'active-crumb': None, 'drilldown-depth': 0}), ({'trail': [], 'index': 0, 'global_filters': ['scope'], 'new': 'y'}, {'breadcrumb-cut': [], 'root-reset': ['scope'], 'effective-constraints': ['scope'], 'branch-after-back': ['y'], 'active-crumb': None, 'drilldown-depth': 0})]}
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)

prompt:
A new drilldown after backing up replaces the abandoned trail suffix is violated by the widget projection.

A facet drilldown trail records a sequence of scoped constraints; returning to a breadcrumb truncates later drilldowns while preserving independent global filters. This example checks: A new drilldown after backing up replaces the abandoned trail suffix.

split: open-access


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

N = 1
observations = []
def solve(d):
    return {'breadcrumb-cut':(d['trail'][:d['index']+1]), 'root-reset':(d['global_filters']), 'effective-constraints':(d['global_filters']+d['trail']), 'branch-after-back':(d['trail'][:d['index']+1]+[d['new']]), 'active-crumb':(len(d['trail'])), 'drilldown-depth':(len(d['trail']))}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = {1: [({'trail': [], 'index': 0, 'global_filters': [], 'new': 'x'}, {'breadcrumb-cut': [], 'root-reset': [], 'effective-constraints': [], 'branch-after-back': ['x'], 'active-crumb': None, 'drilldown-depth': 0}), ({'trail': ['a', 'b', 'a'], 'index': 0, 'global_filters': ['scope'], 'new': 'y'}, {'breadcrumb-cut': ['a'], 'root-reset': ['scope'], 'effective-constraints': ['scope', 'a', 'b', 'a'], 'branch-after-back': ['a', 'y'], 'active-crumb': 2, 'drilldown-depth': 3}), ({'trail': [], 'index': 1, 'global_filters': ['scope'], 'new': 'y'}, {'breadcrumb-cut': [], 'root-reset': ['scope'], 'effective-constraints': ['scope'], 'branch-after-back': ['y'], 'active-crumb': None, 'drilldown-depth': 0}), ({'trail': ['a'], 'index': 0, 'global_filters': [], 'new': 'y'}, {'breadcrumb-cut': ['a'], 'root-reset': [], 'effective-constraints': ['a'], 'branch-after-back': ['a', 'y'], 'active-crumb': 0, 'drilldown-depth': 1}), ({'trail': ['a'], 'index': 0, 'global_filters': ['scope'], 'new': 'y'}, {'breadcrumb-cut': ['a'], 'root-reset': ['scope'], 'effective-constraints': ['scope', 'a'], 'branch-after-back': ['a', 'y'], 'active-crumb': 0, 'drilldown-depth': 1}), ({'trail': ['a'], 'index': 1, 'global_filters': [], 'new': 'y'}, {'breadcrumb-cut': ['a'], 'root-reset': [], 'effective-constraints': ['a'], 'branch-after-back': ['a', 'y'], 'active-crumb': 0, 'drilldown-depth': 1}), ({'trail': ['a'], 'index': 1, 'global_filters': ['scope'], 'new': 'y'}, {'breadcrumb-cut': ['a'], 'root-reset': ['scope'], 'effective-constraints': ['scope', 'a'], 'branch-after-back': ['a', 'y'], 'active-crumb': 0, 'drilldown-depth': 1}), ({'trail': ['a', 'b', 'a'], 'index': 0, 'global_filters': [], 'new': 'y'}, {'breadcrumb-cut': ['a'], 'root-reset': [], 'effective-constraints': ['a', 'b', 'a'], 'branch-after-back': ['a', 'y'], 'active-crumb': 2, 'drilldown-depth': 3}), ({'trail': ['a', 'b', 'a'], 'index': 1, 'global_filters': [], 'new': 'y'}, {'breadcrumb-cut': ['a', 'b'], 'root-reset': [], 'effective-constraints': ['a', 'b', 'a'], 'branch-after-back': ['a', 'b', 'y'], 'active-crumb': 2, 'drilldown-depth': 3}), ({'trail': ['a', 'b', 'a'], 'index': 1, 'global_filters': ['scope'], 'new': 'y'}, {'breadcrumb-cut': ['a', 'b'], 'root-reset': ['scope'], 'effective-constraints': ['scope', 'a', 'b', 'a'], 'branch-after-back': ['a', 'b', 'y'], 'active-crumb': 2, 'drilldown-depth': 3})], 2: [({'trail': [], 'index': 0, 'global_filters': [], 'new': 'y'}, {'breadcrumb-cut': [], 'root-reset': [], 'effective-constraints': [], 'branch-after-back': ['y'], 'active-crumb': None, 'drilldown-depth': 0}), ({'trail': ['a', 'b', 'a'], 'index': 1, 'global_filters': ['scope'], 'new': 'x'}, {'breadcrumb-cut': ['a', 'b'], 'root-reset': ['scope'], 'effective-constraints': ['scope', 'a', 'b', 'a'], 'branch-after-back': ['a', 'b', 'x'], 'active-crumb': 2, 'drilldown-depth': 3}), ({'trail': ['a'], 'index': 1, 'global_filters': ['scope'], 'new': 'x'}, {'breadcrumb-cut': ['a'], 'root-reset': ['scope'], 'effective-constraints': ['scope', 'a'], 'branch-after-back': ['a', 'x'], 'active-crumb': 0, 'drilldown-depth': 1}), ({'trail': ['a', 'b', 'a'], 'index': 0, 'global_filters': [], 'new': 'x'}, {'breadcrumb-cut': ['a'], 'root-reset': [], 'effective-constraints': ['a', 'b', 'a'], 'branch-after-back': ['a', 'x'], 'active-crumb': 2, 'drilldown-depth': 3}), ({'trail': ['a', 'b', 'a'], 'index': 0, 'global_filters': ['scope'], 'new': 'x'}, {'breadcrumb-cut': ['a'], 'root-reset': ['scope'], 'effective-constraints': ['scope', 'a', 'b', 'a'], 'branch-after-back': ['a', 'x'], 'active-crumb': 2, 'drilldown-depth': 3}), ({'trail': ['a', 'b', 'a'], 'index': 1, 'global_filters': [], 'new': 'x'}, {'breadcrumb-cut': ['a', 'b'], 'root-reset': [], 'effective-constraints': ['a', 'b', 'a'], 'branch-after-back': ['a', 'b', 'x'], 'active-crumb': 2, 'drilldown-depth': 3}), ({'trail': [], 'index': 0, 'global_filters': [], 'new': 'x'}, {'breadcrumb-cut': [], 'root-reset': [], 'effective-constraints': [], 'branch-after-back': ['x'], 'active-crumb': None, 'drilldown-depth': 0}), ({'trail': [], 'index': 0, 'global_filters': ['scope'], 'new': 'x'}, {'breadcrumb-cut': [], 'root-reset': ['scope'], 'effective-constraints': ['scope'], 'branch-after-back': ['x'], 'active-crumb': None, 'drilldown-depth': 0}), ({'trail': [], 'index': 1, 'global_filters': [], 'new': 'x'}, {'breadcrumb-cut': [], 'root-reset': [], 'effective-constraints': [], 'branch-after-back': ['x'], 'active-crumb': None, 'drilldown-depth': 0}), ({'trail': [], 'index': 1, 'global_filters': ['scope'], 'new': 'x'}, {'breadcrumb-cut': [], 'root-reset': ['scope'], 'effective-constraints': ['scope'], 'branch-after-back': ['x'], 'active-crumb': None, 'drilldown-depth': 0})], 3: [({'trail': [], 'index': 0, 'global_filters': ['scope'], 'new': 'x'}, {'breadcrumb-cut': [], 'root-reset': ['scope'], 'effective-constraints': ['scope'], 'branch-after-back': ['x'], 'active-crumb': None, 'drilldown-depth': 0}), ({'trail': ['a', 'b', 'a'], 'index': 0, 'global_filters': [], 'new': 'y'}, {'breadcrumb-cut': ['a'], 'root-reset': [], 'effective-constraints': ['a', 'b', 'a'], 'branch-after-back': ['a', 'y'], 'active-crumb': 2, 'drilldown-depth': 3}), ({'trail': ['a', 'b', 'a'], 'index': 1, 'global_filters': [], 'new': 'y'}, {'breadcrumb-cut': ['a', 'b'], 'root-reset': [], 'effective-constraints': ['a', 'b', 'a'], 'branch-after-back': ['a', 'b', 'y'], 'active-crumb': 2, 'drilldown-depth': 3}), ({'trail': ['a', 'b', 'a'], 'index': 1, 'global_filters': ['scope'], 'new': 'y'}, {'breadcrumb-cut': ['a', 'b'], 'root-reset': ['scope'], 'effective-constraints': ['scope', 'a', 'b', 'a'], 'branch-after-back': ['a', 'b', 'y'], 'active-crumb': 2, 'drilldown-depth': 3}), ({'trail': [], 'index': 0, 'global_filters': [], 'new': 'y'}, {'breadcrumb-cut': [], 'root-reset': [], 'effective-constraints': [], 'branch-after-back': ['y'], 'active-crumb': None, 'drilldown-depth': 0}), ({'trail': [], 'index': 0, 'global_filters': ['scope'], 'new': 'y'}, {'breadcrumb-cut': [], 'root-reset': ['scope'], 'effective-constraints': ['scope'], 'branch-after-back': ['y'], 'active-crumb': None, 'drilldown-depth': 0}), ({'trail': [], 'index': 1, 'global_filters': [], 'new': 'y'}, {'breadcrumb-cut': [], 'root-reset': [], 'effective-constraints': [], 'branch-after-back': ['y'], 'active-crumb': None, 'drilldown-depth': 0}), ({'trail': [], 'index': 1, 'global_filters': ['scope'], 'new': 'y'}, {'breadcrumb-cut': [], 'root-reset': ['scope'], 'effective-constraints': ['scope'], 'branch-after-back': ['y'], 'active-crumb': None, 'drilldown-depth': 0}), ({'trail': ['a'], 'index': 0, 'global_filters': [], 'new': 'y'}, {'breadcrumb-cut': ['a'], 'root-reset': [], 'effective-constraints': ['a'], 'branch-after-back': ['a', 'y'], 'active-crumb': 0, 'drilldown-depth': 1}), ({'trail': ['a'], 'index': 0, 'global_filters': ['scope'], 'new': 'y'}, {'breadcrumb-cut': ['a'], 'root-reset': ['scope'], 'effective-constraints': ['scope', 'a'], 'branch-after-back': ['a', 'y'], 'active-crumb': 0, 'drilldown-depth': 1})], 4: [({'trail': [], 'index': 0, 'global_filters': ['scope'], 'new': 'y'}, {'breadcrumb-cut': [], 'root-reset': ['scope'], 'effective-constraints': ['scope'], 'branch-after-back': ['y'], 'active-crumb': None, 'drilldown-depth': 0}), ({'trail': ['a', 'b', 'a'], 'index': 1, 'global_filters': [], 'new': 'x'}, {'breadcrumb-cut': ['a', 'b'], 'root-reset': [], 'effective-constraints': ['a', 'b', 'a'], 'branch-after-back': ['a', 'b', 'x'], 'active-crumb': 2, 'drilldown-depth': 3}), ({'trail': [], 'index': 1, 'global_filters': [], 'new': 'x'}, {'breadcrumb-cut': [], 'root-reset': [], 'effective-constraints': [], 'branch-after-back': ['x'], 'active-crumb': None, 'drilldown-depth': 0}), ({'trail': [], 'index': 1, 'global_filters': ['scope'], 'new': 'x'}, {'breadcrumb-cut': [], 'root-reset': ['scope'], 'effective-constraints': ['scope'], 'branch-after-back': ['x'], 'active-crumb': None, 'drilldown-depth': 0}), ({'trail': ['a'], 'index': 0, 'global_filters': [], 'new': 'x'}, {'breadcrumb-cut': ['a'], 'root-reset': [], 'effective-constraints': ['a'], 'branch-after-back': ['a', 'x'], 'active-crumb': 0, 'drilldown-depth': 1}), ({'trail': ['a'], 'index': 0, 'global_filters': ['scope'], 'new': 'x'}, {'breadcrumb-cut': ['a'], 'root-reset': ['scope'], 'effective-constraints': ['scope', 'a'], 'branch-after-back': ['a', 'x'], 'active-crumb': 0, 'drilldown-depth': 1}), ({'trail': ['a'], 'index': 1, 'global_filters': [], 'new': 'x'}, {'breadcrumb-cut': ['a'], 'root-reset': [], 'effective-constraints': ['a'], 'branch-after-back': ['a', 'x'], 'active-crumb': 0, 'drilldown-depth': 1}), ({'trail': ['a'], 'index': 1, 'global_filters': ['scope'], 'new': 'x'}, {'breadcrumb-cut': ['a'], 'root-reset': ['scope'], 'effective-constraints': ['scope', 'a'], 'branch-after-back': ['a', 'x'], 'active-crumb': 0, 'drilldown-depth': 1}), ({'trail': ['a', 'b', 'a'], 'index': 0, 'global_filters': [], 'new': 'x'}, {'breadcrumb-cut': ['a'], 'root-reset': [], 'effective-constraints': ['a', 'b', 'a'], 'branch-after-back': ['a', 'x'], 'active-crumb': 2, 'drilldown-depth': 3}), ({'trail': ['a', 'b', 'a'], 'index': 0, 'global_filters': ['scope'], 'new': 'x'}, {'breadcrumb-cut': ['a'], 'root-reset': ['scope'], 'effective-constraints': ['scope', 'a', 'b', 'a'], 'branch-after-back': ['a', 'x'], 'active-crumb': 2, 'drilldown-depth': 3})], 5: [({'trail': [], 'index': 1, 'global_filters': [], 'new': 'x'}, {'breadcrumb-cut': [], 'root-reset': [], 'effective-constraints': [], 'branch-after-back': ['x'], 'active-crumb': None, 'drilldown-depth': 0}), ({'trail': ['a', 'b', 'a'], 'index': 1, 'global_filters': ['scope'], 'new': 'y'}, {'breadcrumb-cut': ['a', 'b'], 'root-reset': ['scope'], 'effective-constraints': ['scope', 'a', 'b', 'a'], 'branch-after-back': ['a', 'b', 'y'], 'active-crumb': 2, 'drilldown-depth': 3}), ({'trail': ['a'], 'index': 0, 'global_filters': ['scope'], 'new': 'y'}, {'breadcrumb-cut': ['a'], 'root-reset': ['scope'], 'effective-constraints': ['scope', 'a'], 'branch-after-back': ['a', 'y'], 'active-crumb': 0, 'drilldown-depth': 1}), ({'trail': ['a'], 'index': 1, 'global_filters': [], 'new': 'y'}, {'breadcrumb-cut': ['a'], 'root-reset': [], 'effective-constraints': ['a'], 'branch-after-back': ['a', 'y'], 'active-crumb': 0, 'drilldown-depth': 1}), ({'trail': ['a'], 'index': 1, 'global_filters': ['scope'], 'new': 'y'}, {'breadcrumb-cut': ['a'], 'root-reset': ['scope'], 'effective-constraints': ['scope', 'a'], 'branch-after-back': ['a', 'y'], 'active-crumb': 0, 'drilldown-depth': 1}), ({'trail': ['a', 'b', 'a'], 'index': 0, 'global_filters': [], 'new': 'y'}, {'breadcrumb-cut': ['a'], 'root-reset': [], 'effective-constraints': ['a', 'b', 'a'], 'branch-after-back': ['a', 'y'], 'active-crumb': 2, 'drilldown-depth': 3}), ({'trail': ['a', 'b', 'a'], 'index': 0, 'global_filters': ['scope'], 'new': 'y'}, {'breadcrumb-cut': ['a'], 'root-reset': ['scope'], 'effective-constraints': ['scope', 'a', 'b', 'a'], 'branch-after-back': ['a', 'y'], 'active-crumb': 2, 'drilldown-depth': 3}), ({'trail': ['a', 'b', 'a'], 'index': 1, 'global_filters': [], 'new': 'y'}, {'breadcrumb-cut': ['a', 'b'], 'root-reset': [], 'effective-constraints': ['a', 'b', 'a'], 'branch-after-back': ['a', 'b', 'y'], 'active-crumb': 2, 'drilldown-depth': 3}), ({'trail': [], 'index': 0, 'global_filters': [], 'new': 'y'}, {'breadcrumb-cut': [], 'root-reset': [], 'effective-constraints': [], 'branch-after-back': ['y'], 'active-crumb': None, 'drilldown-depth': 0}), ({'trail': [], 'index': 0, 'global_filters': ['scope'], 'new': 'y'}, {'breadcrumb-cut': [], 'root-reset': ['scope'], 'effective-constraints': ['scope'], 'branch-after-back': ['y'], 'active-crumb': None, 'drilldown-depth': 0})]}
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)

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

N = 1
observations = []
def solve(d):
    return {'breadcrumb-cut':(d['trail'][:d['index']+1]), 'root-reset':(d['global_filters']), 'effective-constraints':(d['global_filters']+d['trail']), 'branch-after-back':(d['trail'][:d['index']+1]+[d['new']]), 'active-crumb':(0 if d['trail'] else None), 'drilldown-depth':(len(d['trail']))}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = {1: [({'trail': [], 'index': 0, 'global_filters': [], 'new': 'x'}, {'breadcrumb-cut': [], 'root-reset': [], 'effective-constraints': [], 'branch-after-back': ['x'], 'active-crumb': None, 'drilldown-depth': 0}), ({'trail': ['a', 'b', 'a'], 'index': 0, 'global_filters': ['scope'], 'new': 'y'}, {'breadcrumb-cut': ['a'], 'root-reset': ['scope'], 'effective-constraints': ['scope', 'a', 'b', 'a'], 'branch-after-back': ['a', 'y'], 'active-crumb': 2, 'drilldown-depth': 3}), ({'trail': [], 'index': 1, 'global_filters': ['scope'], 'new': 'y'}, {'breadcrumb-cut': [], 'root-reset': ['scope'], 'effective-constraints': ['scope'], 'branch-after-back': ['y'], 'active-crumb': None, 'drilldown-depth': 0}), ({'trail': ['a'], 'index': 0, 'global_filters': [], 'new': 'y'}, {'breadcrumb-cut': ['a'], 'root-reset': [], 'effective-constraints': ['a'], 'branch-after-back': ['a', 'y'], 'active-crumb': 0, 'drilldown-depth': 1}), ({'trail': ['a'], 'index': 0, 'global_filters': ['scope'], 'new': 'y'}, {'breadcrumb-cut': ['a'], 'root-reset': ['scope'], 'effective-constraints': ['scope', 'a'], 'branch-after-back': ['a', 'y'], 'active-crumb': 0, 'drilldown-depth': 1}), ({'trail': ['a'], 'index': 1, 'global_filters': [], 'new': 'y'}, {'breadcrumb-cut': ['a'], 'root-reset': [], 'effective-constraints': ['a'], 'branch-after-back': ['a', 'y'], 'active-crumb': 0, 'drilldown-depth': 1}), ({'trail': ['a'], 'index': 1, 'global_filters': ['scope'], 'new': 'y'}, {'breadcrumb-cut': ['a'], 'root-reset': ['scope'], 'effective-constraints': ['scope', 'a'], 'branch-after-back': ['a', 'y'], 'active-crumb': 0, 'drilldown-depth': 1}), ({'trail': ['a', 'b', 'a'], 'index': 0, 'global_filters': [], 'new': 'y'}, {'breadcrumb-cut': ['a'], 'root-reset': [], 'effective-constraints': ['a', 'b', 'a'], 'branch-after-back': ['a', 'y'], 'active-crumb': 2, 'drilldown-depth': 3}), ({'trail': ['a', 'b', 'a'], 'index': 1, 'global_filters': [], 'new': 'y'}, {'breadcrumb-cut': ['a', 'b'], 'root-reset': [], 'effective-constraints': ['a', 'b', 'a'], 'branch-after-back': ['a', 'b', 'y'], 'active-crumb': 2, 'drilldown-depth': 3}), ({'trail': ['a', 'b', 'a'], 'index': 1, 'global_filters': ['scope'], 'new': 'y'}, {'breadcrumb-cut': ['a', 'b'], 'root-reset': ['scope'], 'effective-constraints': ['scope', 'a', 'b', 'a'], 'branch-after-back': ['a', 'b', 'y'], 'active-crumb': 2, 'drilldown-depth': 3})], 2: [({'trail': [], 'index': 0, 'global_filters': [], 'new': 'y'}, {'breadcrumb-cut': [], 'root-reset': [], 'effective-constraints': [], 'branch-after-back': ['y'], 'active-crumb': None, 'drilldown-depth': 0}), ({'trail': ['a', 'b', 'a'], 'index': 1, 'global_filters': ['scope'], 'new': 'x'}, {'breadcrumb-cut': ['a', 'b'], 'root-reset': ['scope'], 'effective-constraints': ['scope', 'a', 'b', 'a'], 'branch-after-back': ['a', 'b', 'x'], 'active-crumb': 2, 'drilldown-depth': 3}), ({'trail': ['a'], 'index': 1, 'global_filters': ['scope'], 'new': 'x'}, {'breadcrumb-cut': ['a'], 'root-reset': ['scope'], 'effective-constraints': ['scope', 'a'], 'branch-after-back': ['a', 'x'], 'active-crumb': 0, 'drilldown-depth': 1}), ({'trail': ['a', 'b', 'a'], 'index': 0, 'global_filters': [], 'new': 'x'}, {'breadcrumb-cut': ['a'], 'root-reset': [], 'effective-constraints': ['a', 'b', 'a'], 'branch-after-back': ['a', 'x'], 'active-crumb': 2, 'drilldown-depth': 3}), ({'trail': ['a', 'b', 'a'], 'index': 0, 'global_filters': ['scope'], 'new': 'x'}, {'breadcrumb-cut': ['a'], 'root-reset': ['scope'], 'effective-constraints': ['scope', 'a', 'b', 'a'], 'branch-after-back': ['a', 'x'], 'active-crumb': 2, 'drilldown-depth': 3}), ({'trail': ['a', 'b', 'a'], 'index': 1, 'global_filters': [], 'new': 'x'}, {'breadcrumb-cut': ['a', 'b'], 'root-reset': [], 'effective-constraints': ['a', 'b', 'a'], 'branch-after-back': ['a', 'b', 'x'], 'active-crumb': 2, 'drilldown-depth': 3}), ({'trail': [], 'index': 0, 'global_filters': [], 'new': 'x'}, {'breadcrumb-cut': [], 'root-reset': [], 'effective-constraints': [], 'branch-after-back': ['x'], 'active-crumb': None, 'drilldown-depth': 0}), ({'trail': [], 'index': 0, 'global_filters': ['scope'], 'new': 'x'}, {'breadcrumb-cut': [], 'root-reset': ['scope'], 'effective-constraints': ['scope'], 'branch-after-back': ['x'], 'active-crumb': None, 'drilldown-depth': 0}), ({'trail': [], 'index': 1, 'global_filters': [], 'new': 'x'}, {'breadcrumb-cut': [], 'root-reset': [], 'effective-constraints': [], 'branch-after-back': ['x'], 'active-crumb': None, 'drilldown-depth': 0}), ({'trail': [], 'index': 1, 'global_filters': ['scope'], 'new': 'x'}, {'breadcrumb-cut': [], 'root-reset': ['scope'], 'effective-constraints': ['scope'], 'branch-after-back': ['x'], 'active-crumb': None, 'drilldown-depth': 0})], 3: [({'trail': [], 'index': 0, 'global_filters': ['scope'], 'new': 'x'}, {'breadcrumb-cut': [], 'root-reset': ['scope'], 'effective-constraints': ['scope'], 'branch-after-back': ['x'], 'active-crumb': None, 'drilldown-depth': 0}), ({'trail': ['a', 'b', 'a'], 'index': 0, 'global_filters': [], 'new': 'y'}, {'breadcrumb-cut': ['a'], 'root-reset': [], 'effective-constraints': ['a', 'b', 'a'], 'branch-after-back': ['a', 'y'], 'active-crumb': 2, 'drilldown-depth': 3}), ({'trail': ['a', 'b', 'a'], 'index': 1, 'global_filters': [], 'new': 'y'}, {'breadcrumb-cut': ['a', 'b'], 'root-reset': [], 'effective-constraints': ['a', 'b', 'a'], 'branch-after-back': ['a', 'b', 'y'], 'active-crumb': 2, 'drilldown-depth': 3}), ({'trail': ['a', 'b', 'a'], 'index': 1, 'global_filters': ['scope'], 'new': 'y'}, {'breadcrumb-cut': ['a', 'b'], 'root-reset': ['scope'], 'effective-constraints': ['scope', 'a', 'b', 'a'], 'branch-after-back': ['a', 'b', 'y'], 'active-crumb': 2, 'drilldown-depth': 3}), ({'trail': [], 'index': 0, 'global_filters': [], 'new': 'y'}, {'breadcrumb-cut': [], 'root-reset': [], 'effective-constraints': [], 'branch-after-back': ['y'], 'active-crumb': None, 'drilldown-depth': 0}), ({'trail': [], 'index': 0, 'global_filters': ['scope'], 'new': 'y'}, {'breadcrumb-cut': [], 'root-reset': ['scope'], 'effective-constraints': ['scope'], 'branch-after-back': ['y'], 'active-crumb': None, 'drilldown-depth': 0}), ({'trail': [], 'index': 1, 'global_filters': [], 'new': 'y'}, {'breadcrumb-cut': [], 'root-reset': [], 'effective-constraints': [], 'branch-after-back': ['y'], 'active-crumb': None, 'drilldown-depth': 0}), ({'trail': [], 'index': 1, 'global_filters': ['scope'], 'new': 'y'}, {'breadcrumb-cut': [], 'root-reset': ['scope'], 'effective-constraints': ['scope'], 'branch-after-back': ['y'], 'active-crumb': None, 'drilldown-depth': 0}), ({'trail': ['a'], 'index': 0, 'global_filters': [], 'new': 'y'}, {'breadcrumb-cut': ['a'], 'root-reset': [], 'effective-constraints': ['a'], 'branch-after-back': ['a', 'y'], 'active-crumb': 0, 'drilldown-depth': 1}), ({'trail': ['a'], 'index': 0, 'global_filters': ['scope'], 'new': 'y'}, {'breadcrumb-cut': ['a'], 'root-reset': ['scope'], 'effective-constraints': ['scope', 'a'], 'branch-after-back': ['a', 'y'], 'active-crumb': 0, 'drilldown-depth': 1})], 4: [({'trail': [], 'index': 0, 'global_filters': ['scope'], 'new': 'y'}, {'breadcrumb-cut': [], 'root-reset': ['scope'], 'effective-constraints': ['scope'], 'branch-after-back': ['y'], 'active-crumb': None, 'drilldown-depth': 0}), ({'trail': ['a', 'b', 'a'], 'index': 1, 'global_filters': [], 'new': 'x'}, {'breadcrumb-cut': ['a', 'b'], 'root-reset': [], 'effective-constraints': ['a', 'b', 'a'], 'branch-after-back': ['a', 'b', 'x'], 'active-crumb': 2, 'drilldown-depth': 3}), ({'trail': [], 'index': 1, 'global_filters': [], 'new': 'x'}, {'breadcrumb-cut': [], 'root-reset': [], 'effective-constraints': [], 'branch-after-back': ['x'], 'active-crumb': None, 'drilldown-depth': 0}), ({'trail': [], 'index': 1, 'global_filters': ['scope'], 'new': 'x'}, {'breadcrumb-cut': [], 'root-reset': ['scope'], 'effective-constraints': ['scope'], 'branch-after-back': ['x'], 'active-crumb': None, 'drilldown-depth': 0}), ({'trail': ['a'], 'index': 0, 'global_filters': [], 'new': 'x'}, {'breadcrumb-cut': ['a'], 'root-reset': [], 'effective-constraints': ['a'], 'branch-after-back': ['a', 'x'], 'active-crumb': 0, 'drilldown-depth': 1}), ({'trail': ['a'], 'index': 0, 'global_filters': ['scope'], 'new': 'x'}, {'breadcrumb-cut': ['a'], 'root-reset': ['scope'], 'effective-constraints': ['scope', 'a'], 'branch-after-back': ['a', 'x'], 'active-crumb': 0, 'drilldown-depth': 1}), ({'trail': ['a'], 'index': 1, 'global_filters': [], 'new': 'x'}, {'breadcrumb-cut': ['a'], 'root-reset': [], 'effective-constraints': ['a'], 'branch-after-back': ['a', 'x'], 'active-crumb': 0, 'drilldown-depth': 1}), ({'trail': ['a'], 'index': 1, 'global_filters': ['scope'], 'new': 'x'}, {'breadcrumb-cut': ['a'], 'root-reset': ['scope'], 'effective-constraints': ['scope', 'a'], 'branch-after-back': ['a', 'x'], 'active-crumb': 0, 'drilldown-depth': 1}), ({'trail': ['a', 'b', 'a'], 'index': 0, 'global_filters': [], 'new': 'x'}, {'breadcrumb-cut': ['a'], 'root-reset': [], 'effective-constraints': ['a', 'b', 'a'], 'branch-after-back': ['a', 'x'], 'active-crumb': 2, 'drilldown-depth': 3}), ({'trail': ['a', 'b', 'a'], 'index': 0, 'global_filters': ['scope'], 'new': 'x'}, {'breadcrumb-cut': ['a'], 'root-reset': ['scope'], 'effective-constraints': ['scope', 'a', 'b', 'a'], 'branch-after-back': ['a', 'x'], 'active-crumb': 2, 'drilldown-depth': 3})], 5: [({'trail': [], 'index': 1, 'global_filters': [], 'new': 'x'}, {'breadcrumb-cut': [], 'root-reset': [], 'effective-constraints': [], 'branch-after-back': ['x'], 'active-crumb': None, 'drilldown-depth': 0}), ({'trail': ['a', 'b', 'a'], 'index': 1, 'global_filters': ['scope'], 'new': 'y'}, {'breadcrumb-cut': ['a', 'b'], 'root-reset': ['scope'], 'effective-constraints': ['scope', 'a', 'b', 'a'], 'branch-after-back': ['a', 'b', 'y'], 'active-crumb': 2, 'drilldown-depth': 3}), ({'trail': ['a'], 'index': 0, 'global_filters': ['scope'], 'new': 'y'}, {'breadcrumb-cut': ['a'], 'root-reset': ['scope'], 'effective-constraints': ['scope', 'a'], 'branch-after-back': ['a', 'y'], 'active-crumb': 0, 'drilldown-depth': 1}), ({'trail': ['a'], 'index': 1, 'global_filters': [], 'new': 'y'}, {'breadcrumb-cut': ['a'], 'root-reset': [], 'effective-constraints': ['a'], 'branch-after-back': ['a', 'y'], 'active-crumb': 0, 'drilldown-depth': 1}), ({'trail': ['a'], 'index': 1, 'global_filters': ['scope'], 'new': 'y'}, {'breadcrumb-cut': ['a'], 'root-reset': ['scope'], 'effective-constraints': ['scope', 'a'], 'branch-after-back': ['a', 'y'], 'active-crumb': 0, 'drilldown-depth': 1}), ({'trail': ['a', 'b', 'a'], 'index': 0, 'global_filters': [], 'new': 'y'}, {'breadcrumb-cut': ['a'], 'root-reset': [], 'effective-constraints': ['a', 'b', 'a'], 'branch-after-back': ['a', 'y'], 'active-crumb': 2, 'drilldown-depth': 3}), ({'trail': ['a', 'b', 'a'], 'index': 0, 'global_filters': ['scope'], 'new': 'y'}, {'breadcrumb-cut': ['a'], 'root-reset': ['scope'], 'effective-constraints': ['scope', 'a', 'b', 'a'], 'branch-after-back': ['a', 'y'], 'active-crumb': 2, 'drilldown-depth': 3}), ({'trail': ['a', 'b', 'a'], 'index': 1, 'global_filters': [], 'new': 'y'}, {'breadcrumb-cut': ['a', 'b'], 'root-reset': [], 'effective-constraints': ['a', 'b', 'a'], 'branch-after-back': ['a', 'b', 'y'], 'active-crumb': 2, 'drilldown-depth': 3}), ({'trail': [], 'index': 0, 'global_filters': [], 'new': 'y'}, {'breadcrumb-cut': [], 'root-reset': [], 'effective-constraints': [], 'branch-after-back': ['y'], 'active-crumb': None, 'drilldown-depth': 0}), ({'trail': [], 'index': 0, 'global_filters': ['scope'], 'new': 'y'}, {'breadcrumb-cut': [], 'root-reset': ['scope'], 'effective-constraints': ['scope'], 'branch-after-back': ['y'], 'active-crumb': None, 'drilldown-depth': 0})]}
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)

prompt:
The active breadcrumb identifies the final actual drilldown step is violated by the widget projection.

A facet drilldown trail records a sequence of scoped constraints; returning to a breadcrumb truncates later drilldowns while preserving independent global filters. This example checks: The active breadcrumb identifies the final actual drilldown step.

split: open-access