FAILURE MAP
← Case archive

FA-8636 / Client navigation / Open access

Breadcrumb ancestor rendering: Hiding root removes the only current breadcrumb · case 01

Hiding root removes the only current breadcrumb.

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

ROOT CAUSE

The root policy operation uses `if not include_root:` where the contract requires `if not include_root and len(chain) > 1:`.

VERIFIED REPAIR

Implement the root policy operation as `if not include_root and len(chain) > 1:`.

Unsuccessful approach: Reversing the flag hides roots when explicitly requested.

Case contract

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

Why this case matters

A deterministic model of breadcrumb ancestor rendering; this isolates one interface invariant without requiring a browser.

1 / The failure

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

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

SHA-256 / d447429784bf4345685f1c96d309bd33bb979fc33f5d0714e7ae3d546c9a61c7

2 / The unsuccessful fix

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

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

SHA-256 / 97f264e6e81431a22ea891ce8b16d5528e1582134222b5827f8554f38bb90feb

3 / The verified repair

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

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

SHA-256 / 79f38268100ff14c1a921590c22065845992721ca98b6bdd49a81bc14435034c

Verification & scope

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:38:23.211865+00:00.

Case digest / cae0cd64ab45225e1b168ce2bb52c88a2b56765f2e7fc26be887107ef322bc79