FAILURE MAP
← Case archive

FA-24666 / Client state / Open access

Multiple client roots and portals: Unrelated roots retention · case 01

Unrelated roots retention.

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

ROOT CAUSE

The unrelated-roots-retention client decision evaluates `[]` instead of `[r for r in roots if r!=owner]`.

VERIFIED REPAIR

Apply the modeled unrelated-roots-retention rule: `[r for r in roots if r!=owner]`.

Unsuccessful approach: The partial repair `list(roots)` still violates the explicit fixture contract.

Case contract

Portal event ownership follows the logical root rather than its physical host. Root disposal removes only that root and its owned portals; event paths are deduplicated in order and missing containers do not create roots implicitly. Operation unrelated-roots-retention has the six explicit input/output oracles below.

Why this case matters

An offline client lifecycle model that isolates a state-management defect without DOM rendering or network services.

1 / The failure

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

N = 1
observations = []
def solve(operation, s):
    roots, owner, target, portals, event_path, disposed = s
    if operation == 'portal-logical-owner':
        return portals.get(event_path[0]) if event_path and event_path[0] in portals else next((r for r,nodes in roots.items() if event_path and event_path[0] in nodes),None)
    if operation == 'root-disposal-isolation':
        return {r:nodes for r,nodes in roots.items() if r not in disposed}
    if operation == 'owned-portal-cleanup':
        return [p for p,r in portals.items() if r in disposed]
    if operation == 'physical-container-membership':
        return target in roots.get(owner,[])
    if operation == 'event-path-deduplication':
        return list(dict.fromkeys(event_path))
    if operation == 'disposed-owner-no-delivery':
        return owner in roots and owner not in disposed
    if operation == 'portal-host-root-distinction':
        return [p for p,r in portals.items() if r==owner]
    if operation == 'unrelated-roots-retention':
        return []
    if operation == 'root-local-node-count':
        return len(roots.get(owner,[]))
    if operation == 'missing-host-no-implicit-root':
        return next((r for r,nodes in roots.items() if target in nodes),None)
    raise ValueError('unknown modeled operation')
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('portal-logical-owner scenario 1', solve('portal-logical-owner', ({'r1':['a','b'],'r2':['c']},'r1','c',{'p':'r1'},['p','c'],[],)), 'r1')
check('portal-logical-owner scenario 2', solve('portal-logical-owner', ({},'r1','a',{},[],[],)), None)
check('portal-logical-owner scenario 3', solve('portal-logical-owner', ({'r1':['a']},'r1','a',{'p':'r1'},['a'],['r1'],)), 'r1')
check('portal-logical-owner scenario 4', solve('portal-logical-owner', ({'r1':['a'],'r2':['b']},'r2','b',{'p':'r1','q':'r2'},['q','b'],[],)), 'r2')
check('portal-logical-owner scenario 5', solve('portal-logical-owner', ({'r1':['a']},'r1','missing',{'p':'r1'},['p'],[],)), 'r1')
check('portal-logical-owner scenario 6', solve('portal-logical-owner', ({'r1':['a']*N},'r1','a',{},['a','a'],[],)), 'r1')
check('root-disposal-isolation scenario 1', solve('root-disposal-isolation', ({'r1':['a','b'],'r2':['c']},'r1','c',{'p':'r1'},['p','c'],[],)), {'r1':['a','b'],'r2':['c']})
check('root-disposal-isolation scenario 2', solve('root-disposal-isolation', ({},'r1','a',{},[],[],)), {})
check('root-disposal-isolation scenario 3', solve('root-disposal-isolation', ({'r1':['a']},'r1','a',{'p':'r1'},['a'],['r1'],)), {})
check('root-disposal-isolation scenario 4', solve('root-disposal-isolation', ({'r1':['a'],'r2':['b']},'r2','b',{'p':'r1','q':'r2'},['q','b'],[],)), {'r1':['a'],'r2':['b']})
check('root-disposal-isolation scenario 5', solve('root-disposal-isolation', ({'r1':['a']},'r1','missing',{'p':'r1'},['p'],[],)), {'r1':['a']})
check('root-disposal-isolation scenario 6', solve('root-disposal-isolation', ({'r1':['a']*N},'r1','a',{},['a','a'],[],)), {'r1':['a']*N})
check('owned-portal-cleanup scenario 1', solve('owned-portal-cleanup', ({'r1':['a','b'],'r2':['c']},'r1','c',{'p':'r1'},['p','c'],[],)), [])
check('owned-portal-cleanup scenario 2', solve('owned-portal-cleanup', ({},'r1','a',{},[],[],)), [])
check('owned-portal-cleanup scenario 3', solve('owned-portal-cleanup', ({'r1':['a']},'r1','a',{'p':'r1'},['a'],['r1'],)), ['p'])
check('owned-portal-cleanup scenario 4', solve('owned-portal-cleanup', ({'r1':['a'],'r2':['b']},'r2','b',{'p':'r1','q':'r2'},['q','b'],[],)), [])
check('owned-portal-cleanup scenario 5', solve('owned-portal-cleanup', ({'r1':['a']},'r1','missing',{'p':'r1'},['p'],[],)), [])
check('owned-portal-cleanup scenario 6', solve('owned-portal-cleanup', ({'r1':['a']*N},'r1','a',{},['a','a'],[],)), [])
check('physical-container-membership scenario 1', solve('physical-container-membership', ({'r1':['a','b'],'r2':['c']},'r1','c',{'p':'r1'},['p','c'],[],)), False)
check('physical-container-membership scenario 2', solve('physical-container-membership', ({},'r1','a',{},[],[],)), False)
check('physical-container-membership scenario 3', solve('physical-container-membership', ({'r1':['a']},'r1','a',{'p':'r1'},['a'],['r1'],)), True)
check('physical-container-membership scenario 4', solve('physical-container-membership', ({'r1':['a'],'r2':['b']},'r2','b',{'p':'r1','q':'r2'},['q','b'],[],)), True)
check('physical-container-membership scenario 5', solve('physical-container-membership', ({'r1':['a']},'r1','missing',{'p':'r1'},['p'],[],)), False)
check('physical-container-membership scenario 6', solve('physical-container-membership', ({'r1':['a']*N},'r1','a',{},['a','a'],[],)), True)
check('event-path-deduplication scenario 1', solve('event-path-deduplication', ({'r1':['a','b'],'r2':['c']},'r1','c',{'p':'r1'},['p','c'],[],)), ['p','c'])
check('event-path-deduplication scenario 2', solve('event-path-deduplication', ({},'r1','a',{},[],[],)), [])
check('event-path-deduplication scenario 3', solve('event-path-deduplication', ({'r1':['a']},'r1','a',{'p':'r1'},['a'],['r1'],)), ['a'])
check('event-path-deduplication scenario 4', solve('event-path-deduplication', ({'r1':['a'],'r2':['b']},'r2','b',{'p':'r1','q':'r2'},['q','b'],[],)), ['q','b'])
check('event-path-deduplication scenario 5', solve('event-path-deduplication', ({'r1':['a']},'r1','missing',{'p':'r1'},['p'],[],)), ['p'])
check('event-path-deduplication scenario 6', solve('event-path-deduplication', ({'r1':['a']*N},'r1','a',{},['a','a'],[],)), ['a'])
check('disposed-owner-no-delivery scenario 1', solve('disposed-owner-no-delivery', ({'r1':['a','b'],'r2':['c']},'r1','c',{'p':'r1'},['p','c'],[],)), True)
check('disposed-owner-no-delivery scenario 2', solve('disposed-owner-no-delivery', ({},'r1','a',{},[],[],)), False)
check('disposed-owner-no-delivery scenario 3', solve('disposed-owner-no-delivery', ({'r1':['a']},'r1','a',{'p':'r1'},['a'],['r1'],)), False)
check('disposed-owner-no-delivery scenario 4', solve('disposed-owner-no-delivery', ({'r1':['a'],'r2':['b']},'r2','b',{'p':'r1','q':'r2'},['q','b'],[],)), True)
check('disposed-owner-no-delivery scenario 5', solve('disposed-owner-no-delivery', ({'r1':['a']},'r1','missing',{'p':'r1'},['p'],[],)), True)
check('disposed-owner-no-delivery scenario 6', solve('disposed-owner-no-delivery', ({'r1':['a']*N},'r1','a',{},['a','a'],[],)), True)
check('portal-host-root-distinction scenario 1', solve('portal-host-root-distinction', ({'r1':['a','b'],'r2':['c']},'r1','c',{'p':'r1'},['p','c'],[],)), ['p'])
check('portal-host-root-distinction scenario 2', solve('portal-host-root-distinction', ({},'r1','a',{},[],[],)), [])
check('portal-host-root-distinction scenario 3', solve('portal-host-root-distinction', ({'r1':['a']},'r1','a',{'p':'r1'},['a'],['r1'],)), ['p'])
check('portal-host-root-distinction scenario 4', solve('portal-host-root-distinction', ({'r1':['a'],'r2':['b']},'r2','b',{'p':'r1','q':'r2'},['q','b'],[],)), ['q'])
check('portal-host-root-distinction scenario 5', solve('portal-host-root-distinction', ({'r1':['a']},'r1','missing',{'p':'r1'},['p'],[],)), ['p'])
check('portal-host-root-distinction scenario 6', solve('portal-host-root-distinction', ({'r1':['a']*N},'r1','a',{},['a','a'],[],)), [])
check('unrelated-roots-retention scenario 1', solve('unrelated-roots-retention', ({'r1':['a','b'],'r2':['c']},'r1','c',{'p':'r1'},['p','c'],[],)), ['r2'])
check('unrelated-roots-retention scenario 2', solve('unrelated-roots-retention', ({},'r1','a',{},[],[],)), [])
check('unrelated-roots-retention scenario 3', solve('unrelated-roots-retention', ({'r1':['a']},'r1','a',{'p':'r1'},['a'],['r1'],)), [])
check('unrelated-roots-retention scenario 4', solve('unrelated-roots-retention', ({'r1':['a'],'r2':['b']},'r2','b',{'p':'r1','q':'r2'},['q','b'],[],)), ['r1'])
check('unrelated-roots-retention scenario 5', solve('unrelated-roots-retention', ({'r1':['a']},'r1','missing',{'p':'r1'},['p'],[],)), [])
check('unrelated-roots-retention scenario 6', solve('unrelated-roots-retention', ({'r1':['a']*N},'r1','a',{},['a','a'],[],)), [])
check('root-local-node-count scenario 1', solve('root-local-node-count', ({'r1':['a','b'],'r2':['c']},'r1','c',{'p':'r1'},['p','c'],[],)), 2)
check('root-local-node-count scenario 2', solve('root-local-node-count', ({},'r1','a',{},[],[],)), 0)
check('root-local-node-count scenario 3', solve('root-local-node-count', ({'r1':['a']},'r1','a',{'p':'r1'},['a'],['r1'],)), 1)
check('root-local-node-count scenario 4', solve('root-local-node-count', ({'r1':['a'],'r2':['b']},'r2','b',{'p':'r1','q':'r2'},['q','b'],[],)), 1)
check('root-local-node-count scenario 5', solve('root-local-node-count', ({'r1':['a']},'r1','missing',{'p':'r1'},['p'],[],)), 1)
check('root-local-node-count scenario 6', solve('root-local-node-count', ({'r1':['a']*N},'r1','a',{},['a','a'],[],)), N)
check('missing-host-no-implicit-root scenario 1', solve('missing-host-no-implicit-root', ({'r1':['a','b'],'r2':['c']},'r1','c',{'p':'r1'},['p','c'],[],)), 'r2')
check('missing-host-no-implicit-root scenario 2', solve('missing-host-no-implicit-root', ({},'r1','a',{},[],[],)), None)
check('missing-host-no-implicit-root scenario 3', solve('missing-host-no-implicit-root', ({'r1':['a']},'r1','a',{'p':'r1'},['a'],['r1'],)), 'r1')
check('missing-host-no-implicit-root scenario 4', solve('missing-host-no-implicit-root', ({'r1':['a'],'r2':['b']},'r2','b',{'p':'r1','q':'r2'},['q','b'],[],)), 'r2')
check('missing-host-no-implicit-root scenario 5', solve('missing-host-no-implicit-root', ({'r1':['a']},'r1','missing',{'p':'r1'},['p'],[],)), None)
check('missing-host-no-implicit-root scenario 6', solve('missing-host-no-implicit-root', ({'r1':['a']*N},'r1','a',{},['a','a'],[],)), 'r1')
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
portal-logical-owner scenario 1r1r1Passed
portal-logical-owner scenario 2NoneNonePassed
portal-logical-owner scenario 3r1r1Passed
portal-logical-owner scenario 4r2r2Passed
portal-logical-owner scenario 5r1r1Passed
portal-logical-owner scenario 6r1r1Passed
root-disposal-isolation scenario 1{'r1': ['a', 'b'], 'r2': ['c']}{'r1': ['a', 'b'], 'r2': ['c']}Passed
root-disposal-isolation scenario 2{}{}Passed
root-disposal-isolation scenario 3{}{}Passed
root-disposal-isolation scenario 4{'r1': ['a'], 'r2': ['b']}{'r1': ['a'], 'r2': ['b']}Passed
root-disposal-isolation scenario 5{'r1': ['a']}{'r1': ['a']}Passed
root-disposal-isolation scenario 6{'r1': ['a']}{'r1': ['a']}Passed
owned-portal-cleanup scenario 1[][]Passed
owned-portal-cleanup scenario 2[][]Passed
owned-portal-cleanup scenario 3['p']['p']Passed
owned-portal-cleanup scenario 4[][]Passed
owned-portal-cleanup scenario 5[][]Passed
owned-portal-cleanup scenario 6[][]Passed
physical-container-membership scenario 1FalseFalsePassed
physical-container-membership scenario 2FalseFalsePassed
physical-container-membership scenario 3TrueTruePassed
physical-container-membership scenario 4TrueTruePassed
physical-container-membership scenario 5FalseFalsePassed
physical-container-membership scenario 6TrueTruePassed
event-path-deduplication scenario 1['p', 'c']['p', 'c']Passed
event-path-deduplication scenario 2[][]Passed
event-path-deduplication scenario 3['a']['a']Passed
event-path-deduplication scenario 4['q', 'b']['q', 'b']Passed
event-path-deduplication scenario 5['p']['p']Passed
event-path-deduplication scenario 6['a']['a']Passed
disposed-owner-no-delivery scenario 1TrueTruePassed
disposed-owner-no-delivery scenario 2FalseFalsePassed
disposed-owner-no-delivery scenario 3FalseFalsePassed
disposed-owner-no-delivery scenario 4TrueTruePassed
disposed-owner-no-delivery scenario 5TrueTruePassed
disposed-owner-no-delivery scenario 6TrueTruePassed
portal-host-root-distinction scenario 1['p']['p']Passed
portal-host-root-distinction scenario 2[][]Passed
portal-host-root-distinction scenario 3['p']['p']Passed
portal-host-root-distinction scenario 4['q']['q']Passed
portal-host-root-distinction scenario 5['p']['p']Passed
portal-host-root-distinction scenario 6[][]Passed
unrelated-roots-retention scenario 1[]['r2']Failed
unrelated-roots-retention scenario 2[][]Passed
unrelated-roots-retention scenario 3[][]Passed
unrelated-roots-retention scenario 4[]['r1']Failed
unrelated-roots-retention scenario 5[][]Passed
unrelated-roots-retention scenario 6[][]Passed
root-local-node-count scenario 122Passed
root-local-node-count scenario 200Passed
root-local-node-count scenario 311Passed
root-local-node-count scenario 411Passed
root-local-node-count scenario 511Passed
root-local-node-count scenario 611Passed
missing-host-no-implicit-root scenario 1r2r2Passed
missing-host-no-implicit-root scenario 2NoneNonePassed
missing-host-no-implicit-root scenario 3r1r1Passed
missing-host-no-implicit-root scenario 4r2r2Passed
missing-host-no-implicit-root scenario 5NoneNonePassed
missing-host-no-implicit-root scenario 6r1r1Passed

SHA-256 / fe445ab369d4c36200e779087a13e0235ad307c78a1774bdd47d3f54cd50c07d

2 / The unsuccessful fix

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

N = 1
observations = []
def solve(operation, s):
    roots, owner, target, portals, event_path, disposed = s
    if operation == 'portal-logical-owner':
        return portals.get(event_path[0]) if event_path and event_path[0] in portals else next((r for r,nodes in roots.items() if event_path and event_path[0] in nodes),None)
    if operation == 'root-disposal-isolation':
        return {r:nodes for r,nodes in roots.items() if r not in disposed}
    if operation == 'owned-portal-cleanup':
        return [p for p,r in portals.items() if r in disposed]
    if operation == 'physical-container-membership':
        return target in roots.get(owner,[])
    if operation == 'event-path-deduplication':
        return list(dict.fromkeys(event_path))
    if operation == 'disposed-owner-no-delivery':
        return owner in roots and owner not in disposed
    if operation == 'portal-host-root-distinction':
        return [p for p,r in portals.items() if r==owner]
    if operation == 'unrelated-roots-retention':
        return list(roots)
    if operation == 'root-local-node-count':
        return len(roots.get(owner,[]))
    if operation == 'missing-host-no-implicit-root':
        return next((r for r,nodes in roots.items() if target in nodes),None)
    raise ValueError('unknown modeled operation')
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('portal-logical-owner scenario 1', solve('portal-logical-owner', ({'r1':['a','b'],'r2':['c']},'r1','c',{'p':'r1'},['p','c'],[],)), 'r1')
check('portal-logical-owner scenario 2', solve('portal-logical-owner', ({},'r1','a',{},[],[],)), None)
check('portal-logical-owner scenario 3', solve('portal-logical-owner', ({'r1':['a']},'r1','a',{'p':'r1'},['a'],['r1'],)), 'r1')
check('portal-logical-owner scenario 4', solve('portal-logical-owner', ({'r1':['a'],'r2':['b']},'r2','b',{'p':'r1','q':'r2'},['q','b'],[],)), 'r2')
check('portal-logical-owner scenario 5', solve('portal-logical-owner', ({'r1':['a']},'r1','missing',{'p':'r1'},['p'],[],)), 'r1')
check('portal-logical-owner scenario 6', solve('portal-logical-owner', ({'r1':['a']*N},'r1','a',{},['a','a'],[],)), 'r1')
check('root-disposal-isolation scenario 1', solve('root-disposal-isolation', ({'r1':['a','b'],'r2':['c']},'r1','c',{'p':'r1'},['p','c'],[],)), {'r1':['a','b'],'r2':['c']})
check('root-disposal-isolation scenario 2', solve('root-disposal-isolation', ({},'r1','a',{},[],[],)), {})
check('root-disposal-isolation scenario 3', solve('root-disposal-isolation', ({'r1':['a']},'r1','a',{'p':'r1'},['a'],['r1'],)), {})
check('root-disposal-isolation scenario 4', solve('root-disposal-isolation', ({'r1':['a'],'r2':['b']},'r2','b',{'p':'r1','q':'r2'},['q','b'],[],)), {'r1':['a'],'r2':['b']})
check('root-disposal-isolation scenario 5', solve('root-disposal-isolation', ({'r1':['a']},'r1','missing',{'p':'r1'},['p'],[],)), {'r1':['a']})
check('root-disposal-isolation scenario 6', solve('root-disposal-isolation', ({'r1':['a']*N},'r1','a',{},['a','a'],[],)), {'r1':['a']*N})
check('owned-portal-cleanup scenario 1', solve('owned-portal-cleanup', ({'r1':['a','b'],'r2':['c']},'r1','c',{'p':'r1'},['p','c'],[],)), [])
check('owned-portal-cleanup scenario 2', solve('owned-portal-cleanup', ({},'r1','a',{},[],[],)), [])
check('owned-portal-cleanup scenario 3', solve('owned-portal-cleanup', ({'r1':['a']},'r1','a',{'p':'r1'},['a'],['r1'],)), ['p'])
check('owned-portal-cleanup scenario 4', solve('owned-portal-cleanup', ({'r1':['a'],'r2':['b']},'r2','b',{'p':'r1','q':'r2'},['q','b'],[],)), [])
check('owned-portal-cleanup scenario 5', solve('owned-portal-cleanup', ({'r1':['a']},'r1','missing',{'p':'r1'},['p'],[],)), [])
check('owned-portal-cleanup scenario 6', solve('owned-portal-cleanup', ({'r1':['a']*N},'r1','a',{},['a','a'],[],)), [])
check('physical-container-membership scenario 1', solve('physical-container-membership', ({'r1':['a','b'],'r2':['c']},'r1','c',{'p':'r1'},['p','c'],[],)), False)
check('physical-container-membership scenario 2', solve('physical-container-membership', ({},'r1','a',{},[],[],)), False)
check('physical-container-membership scenario 3', solve('physical-container-membership', ({'r1':['a']},'r1','a',{'p':'r1'},['a'],['r1'],)), True)
check('physical-container-membership scenario 4', solve('physical-container-membership', ({'r1':['a'],'r2':['b']},'r2','b',{'p':'r1','q':'r2'},['q','b'],[],)), True)
check('physical-container-membership scenario 5', solve('physical-container-membership', ({'r1':['a']},'r1','missing',{'p':'r1'},['p'],[],)), False)
check('physical-container-membership scenario 6', solve('physical-container-membership', ({'r1':['a']*N},'r1','a',{},['a','a'],[],)), True)
check('event-path-deduplication scenario 1', solve('event-path-deduplication', ({'r1':['a','b'],'r2':['c']},'r1','c',{'p':'r1'},['p','c'],[],)), ['p','c'])
check('event-path-deduplication scenario 2', solve('event-path-deduplication', ({},'r1','a',{},[],[],)), [])
check('event-path-deduplication scenario 3', solve('event-path-deduplication', ({'r1':['a']},'r1','a',{'p':'r1'},['a'],['r1'],)), ['a'])
check('event-path-deduplication scenario 4', solve('event-path-deduplication', ({'r1':['a'],'r2':['b']},'r2','b',{'p':'r1','q':'r2'},['q','b'],[],)), ['q','b'])
check('event-path-deduplication scenario 5', solve('event-path-deduplication', ({'r1':['a']},'r1','missing',{'p':'r1'},['p'],[],)), ['p'])
check('event-path-deduplication scenario 6', solve('event-path-deduplication', ({'r1':['a']*N},'r1','a',{},['a','a'],[],)), ['a'])
check('disposed-owner-no-delivery scenario 1', solve('disposed-owner-no-delivery', ({'r1':['a','b'],'r2':['c']},'r1','c',{'p':'r1'},['p','c'],[],)), True)
check('disposed-owner-no-delivery scenario 2', solve('disposed-owner-no-delivery', ({},'r1','a',{},[],[],)), False)
check('disposed-owner-no-delivery scenario 3', solve('disposed-owner-no-delivery', ({'r1':['a']},'r1','a',{'p':'r1'},['a'],['r1'],)), False)
check('disposed-owner-no-delivery scenario 4', solve('disposed-owner-no-delivery', ({'r1':['a'],'r2':['b']},'r2','b',{'p':'r1','q':'r2'},['q','b'],[],)), True)
check('disposed-owner-no-delivery scenario 5', solve('disposed-owner-no-delivery', ({'r1':['a']},'r1','missing',{'p':'r1'},['p'],[],)), True)
check('disposed-owner-no-delivery scenario 6', solve('disposed-owner-no-delivery', ({'r1':['a']*N},'r1','a',{},['a','a'],[],)), True)
check('portal-host-root-distinction scenario 1', solve('portal-host-root-distinction', ({'r1':['a','b'],'r2':['c']},'r1','c',{'p':'r1'},['p','c'],[],)), ['p'])
check('portal-host-root-distinction scenario 2', solve('portal-host-root-distinction', ({},'r1','a',{},[],[],)), [])
check('portal-host-root-distinction scenario 3', solve('portal-host-root-distinction', ({'r1':['a']},'r1','a',{'p':'r1'},['a'],['r1'],)), ['p'])
check('portal-host-root-distinction scenario 4', solve('portal-host-root-distinction', ({'r1':['a'],'r2':['b']},'r2','b',{'p':'r1','q':'r2'},['q','b'],[],)), ['q'])
check('portal-host-root-distinction scenario 5', solve('portal-host-root-distinction', ({'r1':['a']},'r1','missing',{'p':'r1'},['p'],[],)), ['p'])
check('portal-host-root-distinction scenario 6', solve('portal-host-root-distinction', ({'r1':['a']*N},'r1','a',{},['a','a'],[],)), [])
check('unrelated-roots-retention scenario 1', solve('unrelated-roots-retention', ({'r1':['a','b'],'r2':['c']},'r1','c',{'p':'r1'},['p','c'],[],)), ['r2'])
check('unrelated-roots-retention scenario 2', solve('unrelated-roots-retention', ({},'r1','a',{},[],[],)), [])
check('unrelated-roots-retention scenario 3', solve('unrelated-roots-retention', ({'r1':['a']},'r1','a',{'p':'r1'},['a'],['r1'],)), [])
check('unrelated-roots-retention scenario 4', solve('unrelated-roots-retention', ({'r1':['a'],'r2':['b']},'r2','b',{'p':'r1','q':'r2'},['q','b'],[],)), ['r1'])
check('unrelated-roots-retention scenario 5', solve('unrelated-roots-retention', ({'r1':['a']},'r1','missing',{'p':'r1'},['p'],[],)), [])
check('unrelated-roots-retention scenario 6', solve('unrelated-roots-retention', ({'r1':['a']*N},'r1','a',{},['a','a'],[],)), [])
check('root-local-node-count scenario 1', solve('root-local-node-count', ({'r1':['a','b'],'r2':['c']},'r1','c',{'p':'r1'},['p','c'],[],)), 2)
check('root-local-node-count scenario 2', solve('root-local-node-count', ({},'r1','a',{},[],[],)), 0)
check('root-local-node-count scenario 3', solve('root-local-node-count', ({'r1':['a']},'r1','a',{'p':'r1'},['a'],['r1'],)), 1)
check('root-local-node-count scenario 4', solve('root-local-node-count', ({'r1':['a'],'r2':['b']},'r2','b',{'p':'r1','q':'r2'},['q','b'],[],)), 1)
check('root-local-node-count scenario 5', solve('root-local-node-count', ({'r1':['a']},'r1','missing',{'p':'r1'},['p'],[],)), 1)
check('root-local-node-count scenario 6', solve('root-local-node-count', ({'r1':['a']*N},'r1','a',{},['a','a'],[],)), N)
check('missing-host-no-implicit-root scenario 1', solve('missing-host-no-implicit-root', ({'r1':['a','b'],'r2':['c']},'r1','c',{'p':'r1'},['p','c'],[],)), 'r2')
check('missing-host-no-implicit-root scenario 2', solve('missing-host-no-implicit-root', ({},'r1','a',{},[],[],)), None)
check('missing-host-no-implicit-root scenario 3', solve('missing-host-no-implicit-root', ({'r1':['a']},'r1','a',{'p':'r1'},['a'],['r1'],)), 'r1')
check('missing-host-no-implicit-root scenario 4', solve('missing-host-no-implicit-root', ({'r1':['a'],'r2':['b']},'r2','b',{'p':'r1','q':'r2'},['q','b'],[],)), 'r2')
check('missing-host-no-implicit-root scenario 5', solve('missing-host-no-implicit-root', ({'r1':['a']},'r1','missing',{'p':'r1'},['p'],[],)), None)
check('missing-host-no-implicit-root scenario 6', solve('missing-host-no-implicit-root', ({'r1':['a']*N},'r1','a',{},['a','a'],[],)), 'r1')
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
portal-logical-owner scenario 1r1r1Passed
portal-logical-owner scenario 2NoneNonePassed
portal-logical-owner scenario 3r1r1Passed
portal-logical-owner scenario 4r2r2Passed
portal-logical-owner scenario 5r1r1Passed
portal-logical-owner scenario 6r1r1Passed
root-disposal-isolation scenario 1{'r1': ['a', 'b'], 'r2': ['c']}{'r1': ['a', 'b'], 'r2': ['c']}Passed
root-disposal-isolation scenario 2{}{}Passed
root-disposal-isolation scenario 3{}{}Passed
root-disposal-isolation scenario 4{'r1': ['a'], 'r2': ['b']}{'r1': ['a'], 'r2': ['b']}Passed
root-disposal-isolation scenario 5{'r1': ['a']}{'r1': ['a']}Passed
root-disposal-isolation scenario 6{'r1': ['a']}{'r1': ['a']}Passed
owned-portal-cleanup scenario 1[][]Passed
owned-portal-cleanup scenario 2[][]Passed
owned-portal-cleanup scenario 3['p']['p']Passed
owned-portal-cleanup scenario 4[][]Passed
owned-portal-cleanup scenario 5[][]Passed
owned-portal-cleanup scenario 6[][]Passed
physical-container-membership scenario 1FalseFalsePassed
physical-container-membership scenario 2FalseFalsePassed
physical-container-membership scenario 3TrueTruePassed
physical-container-membership scenario 4TrueTruePassed
physical-container-membership scenario 5FalseFalsePassed
physical-container-membership scenario 6TrueTruePassed
event-path-deduplication scenario 1['p', 'c']['p', 'c']Passed
event-path-deduplication scenario 2[][]Passed
event-path-deduplication scenario 3['a']['a']Passed
event-path-deduplication scenario 4['q', 'b']['q', 'b']Passed
event-path-deduplication scenario 5['p']['p']Passed
event-path-deduplication scenario 6['a']['a']Passed
disposed-owner-no-delivery scenario 1TrueTruePassed
disposed-owner-no-delivery scenario 2FalseFalsePassed
disposed-owner-no-delivery scenario 3FalseFalsePassed
disposed-owner-no-delivery scenario 4TrueTruePassed
disposed-owner-no-delivery scenario 5TrueTruePassed
disposed-owner-no-delivery scenario 6TrueTruePassed
portal-host-root-distinction scenario 1['p']['p']Passed
portal-host-root-distinction scenario 2[][]Passed
portal-host-root-distinction scenario 3['p']['p']Passed
portal-host-root-distinction scenario 4['q']['q']Passed
portal-host-root-distinction scenario 5['p']['p']Passed
portal-host-root-distinction scenario 6[][]Passed
unrelated-roots-retention scenario 1['r1', 'r2']['r2']Failed
unrelated-roots-retention scenario 2[][]Passed
unrelated-roots-retention scenario 3['r1'][]Failed
unrelated-roots-retention scenario 4['r1', 'r2']['r1']Failed
unrelated-roots-retention scenario 5['r1'][]Failed
unrelated-roots-retention scenario 6['r1'][]Failed
root-local-node-count scenario 122Passed
root-local-node-count scenario 200Passed
root-local-node-count scenario 311Passed
root-local-node-count scenario 411Passed
root-local-node-count scenario 511Passed
root-local-node-count scenario 611Passed
missing-host-no-implicit-root scenario 1r2r2Passed
missing-host-no-implicit-root scenario 2NoneNonePassed
missing-host-no-implicit-root scenario 3r1r1Passed
missing-host-no-implicit-root scenario 4r2r2Passed
missing-host-no-implicit-root scenario 5NoneNonePassed
missing-host-no-implicit-root scenario 6r1r1Passed

SHA-256 / fad2f41196163615f7602438cccf8adfaa61465324f714db19e04821826ec8d1

3 / The verified repair

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

N = 1
observations = []
def solve(operation, s):
    roots, owner, target, portals, event_path, disposed = s
    if operation == 'portal-logical-owner':
        return portals.get(event_path[0]) if event_path and event_path[0] in portals else next((r for r,nodes in roots.items() if event_path and event_path[0] in nodes),None)
    if operation == 'root-disposal-isolation':
        return {r:nodes for r,nodes in roots.items() if r not in disposed}
    if operation == 'owned-portal-cleanup':
        return [p for p,r in portals.items() if r in disposed]
    if operation == 'physical-container-membership':
        return target in roots.get(owner,[])
    if operation == 'event-path-deduplication':
        return list(dict.fromkeys(event_path))
    if operation == 'disposed-owner-no-delivery':
        return owner in roots and owner not in disposed
    if operation == 'portal-host-root-distinction':
        return [p for p,r in portals.items() if r==owner]
    if operation == 'unrelated-roots-retention':
        return [r for r in roots if r!=owner]
    if operation == 'root-local-node-count':
        return len(roots.get(owner,[]))
    if operation == 'missing-host-no-implicit-root':
        return next((r for r,nodes in roots.items() if target in nodes),None)
    raise ValueError('unknown modeled operation')
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('portal-logical-owner scenario 1', solve('portal-logical-owner', ({'r1':['a','b'],'r2':['c']},'r1','c',{'p':'r1'},['p','c'],[],)), 'r1')
check('portal-logical-owner scenario 2', solve('portal-logical-owner', ({},'r1','a',{},[],[],)), None)
check('portal-logical-owner scenario 3', solve('portal-logical-owner', ({'r1':['a']},'r1','a',{'p':'r1'},['a'],['r1'],)), 'r1')
check('portal-logical-owner scenario 4', solve('portal-logical-owner', ({'r1':['a'],'r2':['b']},'r2','b',{'p':'r1','q':'r2'},['q','b'],[],)), 'r2')
check('portal-logical-owner scenario 5', solve('portal-logical-owner', ({'r1':['a']},'r1','missing',{'p':'r1'},['p'],[],)), 'r1')
check('portal-logical-owner scenario 6', solve('portal-logical-owner', ({'r1':['a']*N},'r1','a',{},['a','a'],[],)), 'r1')
check('root-disposal-isolation scenario 1', solve('root-disposal-isolation', ({'r1':['a','b'],'r2':['c']},'r1','c',{'p':'r1'},['p','c'],[],)), {'r1':['a','b'],'r2':['c']})
check('root-disposal-isolation scenario 2', solve('root-disposal-isolation', ({},'r1','a',{},[],[],)), {})
check('root-disposal-isolation scenario 3', solve('root-disposal-isolation', ({'r1':['a']},'r1','a',{'p':'r1'},['a'],['r1'],)), {})
check('root-disposal-isolation scenario 4', solve('root-disposal-isolation', ({'r1':['a'],'r2':['b']},'r2','b',{'p':'r1','q':'r2'},['q','b'],[],)), {'r1':['a'],'r2':['b']})
check('root-disposal-isolation scenario 5', solve('root-disposal-isolation', ({'r1':['a']},'r1','missing',{'p':'r1'},['p'],[],)), {'r1':['a']})
check('root-disposal-isolation scenario 6', solve('root-disposal-isolation', ({'r1':['a']*N},'r1','a',{},['a','a'],[],)), {'r1':['a']*N})
check('owned-portal-cleanup scenario 1', solve('owned-portal-cleanup', ({'r1':['a','b'],'r2':['c']},'r1','c',{'p':'r1'},['p','c'],[],)), [])
check('owned-portal-cleanup scenario 2', solve('owned-portal-cleanup', ({},'r1','a',{},[],[],)), [])
check('owned-portal-cleanup scenario 3', solve('owned-portal-cleanup', ({'r1':['a']},'r1','a',{'p':'r1'},['a'],['r1'],)), ['p'])
check('owned-portal-cleanup scenario 4', solve('owned-portal-cleanup', ({'r1':['a'],'r2':['b']},'r2','b',{'p':'r1','q':'r2'},['q','b'],[],)), [])
check('owned-portal-cleanup scenario 5', solve('owned-portal-cleanup', ({'r1':['a']},'r1','missing',{'p':'r1'},['p'],[],)), [])
check('owned-portal-cleanup scenario 6', solve('owned-portal-cleanup', ({'r1':['a']*N},'r1','a',{},['a','a'],[],)), [])
check('physical-container-membership scenario 1', solve('physical-container-membership', ({'r1':['a','b'],'r2':['c']},'r1','c',{'p':'r1'},['p','c'],[],)), False)
check('physical-container-membership scenario 2', solve('physical-container-membership', ({},'r1','a',{},[],[],)), False)
check('physical-container-membership scenario 3', solve('physical-container-membership', ({'r1':['a']},'r1','a',{'p':'r1'},['a'],['r1'],)), True)
check('physical-container-membership scenario 4', solve('physical-container-membership', ({'r1':['a'],'r2':['b']},'r2','b',{'p':'r1','q':'r2'},['q','b'],[],)), True)
check('physical-container-membership scenario 5', solve('physical-container-membership', ({'r1':['a']},'r1','missing',{'p':'r1'},['p'],[],)), False)
check('physical-container-membership scenario 6', solve('physical-container-membership', ({'r1':['a']*N},'r1','a',{},['a','a'],[],)), True)
check('event-path-deduplication scenario 1', solve('event-path-deduplication', ({'r1':['a','b'],'r2':['c']},'r1','c',{'p':'r1'},['p','c'],[],)), ['p','c'])
check('event-path-deduplication scenario 2', solve('event-path-deduplication', ({},'r1','a',{},[],[],)), [])
check('event-path-deduplication scenario 3', solve('event-path-deduplication', ({'r1':['a']},'r1','a',{'p':'r1'},['a'],['r1'],)), ['a'])
check('event-path-deduplication scenario 4', solve('event-path-deduplication', ({'r1':['a'],'r2':['b']},'r2','b',{'p':'r1','q':'r2'},['q','b'],[],)), ['q','b'])
check('event-path-deduplication scenario 5', solve('event-path-deduplication', ({'r1':['a']},'r1','missing',{'p':'r1'},['p'],[],)), ['p'])
check('event-path-deduplication scenario 6', solve('event-path-deduplication', ({'r1':['a']*N},'r1','a',{},['a','a'],[],)), ['a'])
check('disposed-owner-no-delivery scenario 1', solve('disposed-owner-no-delivery', ({'r1':['a','b'],'r2':['c']},'r1','c',{'p':'r1'},['p','c'],[],)), True)
check('disposed-owner-no-delivery scenario 2', solve('disposed-owner-no-delivery', ({},'r1','a',{},[],[],)), False)
check('disposed-owner-no-delivery scenario 3', solve('disposed-owner-no-delivery', ({'r1':['a']},'r1','a',{'p':'r1'},['a'],['r1'],)), False)
check('disposed-owner-no-delivery scenario 4', solve('disposed-owner-no-delivery', ({'r1':['a'],'r2':['b']},'r2','b',{'p':'r1','q':'r2'},['q','b'],[],)), True)
check('disposed-owner-no-delivery scenario 5', solve('disposed-owner-no-delivery', ({'r1':['a']},'r1','missing',{'p':'r1'},['p'],[],)), True)
check('disposed-owner-no-delivery scenario 6', solve('disposed-owner-no-delivery', ({'r1':['a']*N},'r1','a',{},['a','a'],[],)), True)
check('portal-host-root-distinction scenario 1', solve('portal-host-root-distinction', ({'r1':['a','b'],'r2':['c']},'r1','c',{'p':'r1'},['p','c'],[],)), ['p'])
check('portal-host-root-distinction scenario 2', solve('portal-host-root-distinction', ({},'r1','a',{},[],[],)), [])
check('portal-host-root-distinction scenario 3', solve('portal-host-root-distinction', ({'r1':['a']},'r1','a',{'p':'r1'},['a'],['r1'],)), ['p'])
check('portal-host-root-distinction scenario 4', solve('portal-host-root-distinction', ({'r1':['a'],'r2':['b']},'r2','b',{'p':'r1','q':'r2'},['q','b'],[],)), ['q'])
check('portal-host-root-distinction scenario 5', solve('portal-host-root-distinction', ({'r1':['a']},'r1','missing',{'p':'r1'},['p'],[],)), ['p'])
check('portal-host-root-distinction scenario 6', solve('portal-host-root-distinction', ({'r1':['a']*N},'r1','a',{},['a','a'],[],)), [])
check('unrelated-roots-retention scenario 1', solve('unrelated-roots-retention', ({'r1':['a','b'],'r2':['c']},'r1','c',{'p':'r1'},['p','c'],[],)), ['r2'])
check('unrelated-roots-retention scenario 2', solve('unrelated-roots-retention', ({},'r1','a',{},[],[],)), [])
check('unrelated-roots-retention scenario 3', solve('unrelated-roots-retention', ({'r1':['a']},'r1','a',{'p':'r1'},['a'],['r1'],)), [])
check('unrelated-roots-retention scenario 4', solve('unrelated-roots-retention', ({'r1':['a'],'r2':['b']},'r2','b',{'p':'r1','q':'r2'},['q','b'],[],)), ['r1'])
check('unrelated-roots-retention scenario 5', solve('unrelated-roots-retention', ({'r1':['a']},'r1','missing',{'p':'r1'},['p'],[],)), [])
check('unrelated-roots-retention scenario 6', solve('unrelated-roots-retention', ({'r1':['a']*N},'r1','a',{},['a','a'],[],)), [])
check('root-local-node-count scenario 1', solve('root-local-node-count', ({'r1':['a','b'],'r2':['c']},'r1','c',{'p':'r1'},['p','c'],[],)), 2)
check('root-local-node-count scenario 2', solve('root-local-node-count', ({},'r1','a',{},[],[],)), 0)
check('root-local-node-count scenario 3', solve('root-local-node-count', ({'r1':['a']},'r1','a',{'p':'r1'},['a'],['r1'],)), 1)
check('root-local-node-count scenario 4', solve('root-local-node-count', ({'r1':['a'],'r2':['b']},'r2','b',{'p':'r1','q':'r2'},['q','b'],[],)), 1)
check('root-local-node-count scenario 5', solve('root-local-node-count', ({'r1':['a']},'r1','missing',{'p':'r1'},['p'],[],)), 1)
check('root-local-node-count scenario 6', solve('root-local-node-count', ({'r1':['a']*N},'r1','a',{},['a','a'],[],)), N)
check('missing-host-no-implicit-root scenario 1', solve('missing-host-no-implicit-root', ({'r1':['a','b'],'r2':['c']},'r1','c',{'p':'r1'},['p','c'],[],)), 'r2')
check('missing-host-no-implicit-root scenario 2', solve('missing-host-no-implicit-root', ({},'r1','a',{},[],[],)), None)
check('missing-host-no-implicit-root scenario 3', solve('missing-host-no-implicit-root', ({'r1':['a']},'r1','a',{'p':'r1'},['a'],['r1'],)), 'r1')
check('missing-host-no-implicit-root scenario 4', solve('missing-host-no-implicit-root', ({'r1':['a'],'r2':['b']},'r2','b',{'p':'r1','q':'r2'},['q','b'],[],)), 'r2')
check('missing-host-no-implicit-root scenario 5', solve('missing-host-no-implicit-root', ({'r1':['a']},'r1','missing',{'p':'r1'},['p'],[],)), None)
check('missing-host-no-implicit-root scenario 6', solve('missing-host-no-implicit-root', ({'r1':['a']*N},'r1','a',{},['a','a'],[],)), 'r1')
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
portal-logical-owner scenario 1r1r1Passed
portal-logical-owner scenario 2NoneNonePassed
portal-logical-owner scenario 3r1r1Passed
portal-logical-owner scenario 4r2r2Passed
portal-logical-owner scenario 5r1r1Passed
portal-logical-owner scenario 6r1r1Passed
root-disposal-isolation scenario 1{'r1': ['a', 'b'], 'r2': ['c']}{'r1': ['a', 'b'], 'r2': ['c']}Passed
root-disposal-isolation scenario 2{}{}Passed
root-disposal-isolation scenario 3{}{}Passed
root-disposal-isolation scenario 4{'r1': ['a'], 'r2': ['b']}{'r1': ['a'], 'r2': ['b']}Passed
root-disposal-isolation scenario 5{'r1': ['a']}{'r1': ['a']}Passed
root-disposal-isolation scenario 6{'r1': ['a']}{'r1': ['a']}Passed
owned-portal-cleanup scenario 1[][]Passed
owned-portal-cleanup scenario 2[][]Passed
owned-portal-cleanup scenario 3['p']['p']Passed
owned-portal-cleanup scenario 4[][]Passed
owned-portal-cleanup scenario 5[][]Passed
owned-portal-cleanup scenario 6[][]Passed
physical-container-membership scenario 1FalseFalsePassed
physical-container-membership scenario 2FalseFalsePassed
physical-container-membership scenario 3TrueTruePassed
physical-container-membership scenario 4TrueTruePassed
physical-container-membership scenario 5FalseFalsePassed
physical-container-membership scenario 6TrueTruePassed
event-path-deduplication scenario 1['p', 'c']['p', 'c']Passed
event-path-deduplication scenario 2[][]Passed
event-path-deduplication scenario 3['a']['a']Passed
event-path-deduplication scenario 4['q', 'b']['q', 'b']Passed
event-path-deduplication scenario 5['p']['p']Passed
event-path-deduplication scenario 6['a']['a']Passed
disposed-owner-no-delivery scenario 1TrueTruePassed
disposed-owner-no-delivery scenario 2FalseFalsePassed
disposed-owner-no-delivery scenario 3FalseFalsePassed
disposed-owner-no-delivery scenario 4TrueTruePassed
disposed-owner-no-delivery scenario 5TrueTruePassed
disposed-owner-no-delivery scenario 6TrueTruePassed
portal-host-root-distinction scenario 1['p']['p']Passed
portal-host-root-distinction scenario 2[][]Passed
portal-host-root-distinction scenario 3['p']['p']Passed
portal-host-root-distinction scenario 4['q']['q']Passed
portal-host-root-distinction scenario 5['p']['p']Passed
portal-host-root-distinction scenario 6[][]Passed
unrelated-roots-retention scenario 1['r2']['r2']Passed
unrelated-roots-retention scenario 2[][]Passed
unrelated-roots-retention scenario 3[][]Passed
unrelated-roots-retention scenario 4['r1']['r1']Passed
unrelated-roots-retention scenario 5[][]Passed
unrelated-roots-retention scenario 6[][]Passed
root-local-node-count scenario 122Passed
root-local-node-count scenario 200Passed
root-local-node-count scenario 311Passed
root-local-node-count scenario 411Passed
root-local-node-count scenario 511Passed
root-local-node-count scenario 611Passed
missing-host-no-implicit-root scenario 1r2r2Passed
missing-host-no-implicit-root scenario 2NoneNonePassed
missing-host-no-implicit-root scenario 3r1r1Passed
missing-host-no-implicit-root scenario 4r2r2Passed
missing-host-no-implicit-root scenario 5NoneNonePassed
missing-host-no-implicit-root scenario 6r1r1Passed

SHA-256 / dd6d76a9d8c52555eb8bdca83c6f719f2432ec6929da0dfb331c653e334ea2e1

Verification & scope

Only the explicitly specified operations and finite deterministic records are modeled; no browser or framework 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:40:59.590159+00:00.

Case digest / 925abe5c2ab32cf6bcffb295463ed306bf630db4fe6ac69bbc45a316150c55e9