FA-8476 / Assistive semantics / Open access
Accessible relationship resolution: Hidden relationship targets remain exposed · case 01
Hidden relationship targets remain exposed.
ROOT CAUSE
The visibility operation uses `if False: continue` where the contract requires `if registry[ident]['hidden']: continue`.
VERIFIED REPAIR
Implement the visibility operation as `if registry[ident]['hidden']: continue`.
Unsuccessful approach: Keeping only hidden targets hides usable relationships.
Case contract
Resolve target IDs in caller order, deduplicate, and exclude self references, missing nodes, incompatible roles and hidden targets.
Why this case matters
A deterministic model of accessible relationship resolution; 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(ids, registry, role, required_role, self_id):
seen = set()
result = []
for ident in ids:
if ident == self_id: continue
if ident in seen: continue
if ident not in registry: continue
if registry[ident]['role'] != required_role: continue
if False: continue
seen.add(ident)
result.append(ident)
return result
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('self', solve(['self','a'], {'self':{'role':'panel','hidden':False},'a':{'role':'panel','hidden':False}}, 'tab', 'panel', 'self'), ['a'])
check('dedup', solve(['a','a','b'], {'a':{'role':'panel','hidden':False},'b':{'role':'panel','hidden':False}}, 'tab', 'panel', 'self'), ['a', 'b'])
check('missing', solve(['a','gone','b'], {'a':{'role':'panel','hidden':False},'b':{'role':'panel','hidden':False}}, 'tab', 'panel', 'self'), ['a', 'b'])
check('role', solve(['bad','a'], {'bad':{'role':'button','hidden':False},'a':{'role':'panel','hidden':False}}, 'tab', 'panel', 'self'), ['a'])
check('hidden', solve(['bad','a'], {'bad':{'role':'panel','hidden':True},'a':{'role':'panel','hidden':False}}, 'tab', 'panel', 'self'), ['a'])
check('parameterized relationship identity', solve([str(N)], {str(N):dict(role='panel',hidden=False)}, 'tab', 'panel', 'self'), [str(N)])
for repetition in range(N):
check('repeat hidden', solve(['bad','a'], {'bad':{'role':'panel','hidden':True},'a':{'role':'panel','hidden':False}}, 'tab', 'panel', 'self'), ['a'])
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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| self | ['a'] | ['a'] | Passed |
| dedup | ['a', 'b'] | ['a', 'b'] | Passed |
| missing | ['a', 'b'] | ['a', 'b'] | Passed |
| role | ['a'] | ['a'] | Passed |
| hidden | ['bad', 'a'] | ['a'] | Failed |
| parameterized relationship identity | ['1'] | ['1'] | Passed |
| repeat hidden | ['bad', 'a'] | ['a'] | Failed |
SHA-256 / a56c2f45015ac57040b1dc5f4285fe49a80e7a7821fa7096f5c74afdc2f2d577
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(ids, registry, role, required_role, self_id):
seen = set()
result = []
for ident in ids:
if ident == self_id: continue
if ident in seen: continue
if ident not in registry: continue
if registry[ident]['role'] != required_role: continue
if not registry[ident]['hidden']: continue
seen.add(ident)
result.append(ident)
return result
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('self', solve(['self','a'], {'self':{'role':'panel','hidden':False},'a':{'role':'panel','hidden':False}}, 'tab', 'panel', 'self'), ['a'])
check('dedup', solve(['a','a','b'], {'a':{'role':'panel','hidden':False},'b':{'role':'panel','hidden':False}}, 'tab', 'panel', 'self'), ['a', 'b'])
check('missing', solve(['a','gone','b'], {'a':{'role':'panel','hidden':False},'b':{'role':'panel','hidden':False}}, 'tab', 'panel', 'self'), ['a', 'b'])
check('role', solve(['bad','a'], {'bad':{'role':'button','hidden':False},'a':{'role':'panel','hidden':False}}, 'tab', 'panel', 'self'), ['a'])
check('hidden', solve(['bad','a'], {'bad':{'role':'panel','hidden':True},'a':{'role':'panel','hidden':False}}, 'tab', 'panel', 'self'), ['a'])
check('parameterized relationship identity', solve([str(N)], {str(N):dict(role='panel',hidden=False)}, 'tab', 'panel', 'self'), [str(N)])
for repetition in range(N):
check('repeat hidden', solve(['bad','a'], {'bad':{'role':'panel','hidden':True},'a':{'role':'panel','hidden':False}}, 'tab', 'panel', 'self'), ['a'])
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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| self | [] | ['a'] | Failed |
| dedup | [] | ['a', 'b'] | Failed |
| missing | [] | ['a', 'b'] | Failed |
| role | [] | ['a'] | Failed |
| hidden | ['bad'] | ['a'] | Failed |
| parameterized relationship identity | [] | ['1'] | Failed |
| repeat hidden | ['bad'] | ['a'] | Failed |
SHA-256 / a4c1298ff7904e666151e44800f9e86d346b3363db8496c725d29dfa348f8d03
3 / The verified repair
Exit 0"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(ids, registry, role, required_role, self_id):
seen = set()
result = []
for ident in ids:
if ident == self_id: continue
if ident in seen: continue
if ident not in registry: continue
if registry[ident]['role'] != required_role: continue
if registry[ident]['hidden']: continue
seen.add(ident)
result.append(ident)
return result
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('self', solve(['self','a'], {'self':{'role':'panel','hidden':False},'a':{'role':'panel','hidden':False}}, 'tab', 'panel', 'self'), ['a'])
check('dedup', solve(['a','a','b'], {'a':{'role':'panel','hidden':False},'b':{'role':'panel','hidden':False}}, 'tab', 'panel', 'self'), ['a', 'b'])
check('missing', solve(['a','gone','b'], {'a':{'role':'panel','hidden':False},'b':{'role':'panel','hidden':False}}, 'tab', 'panel', 'self'), ['a', 'b'])
check('role', solve(['bad','a'], {'bad':{'role':'button','hidden':False},'a':{'role':'panel','hidden':False}}, 'tab', 'panel', 'self'), ['a'])
check('hidden', solve(['bad','a'], {'bad':{'role':'panel','hidden':True},'a':{'role':'panel','hidden':False}}, 'tab', 'panel', 'self'), ['a'])
check('parameterized relationship identity', solve([str(N)], {str(N):dict(role='panel',hidden=False)}, 'tab', 'panel', 'self'), [str(N)])
for repetition in range(N):
check('repeat hidden', solve(['bad','a'], {'bad':{'role':'panel','hidden':True},'a':{'role':'panel','hidden':False}}, 'tab', 'panel', 'self'), ['a'])
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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| self | ['a'] | ['a'] | Passed |
| dedup | ['a', 'b'] | ['a', 'b'] | Passed |
| missing | ['a', 'b'] | ['a', 'b'] | Passed |
| role | ['a'] | ['a'] | Passed |
| hidden | ['a'] | ['a'] | Passed |
| parameterized relationship identity | ['1'] | ['1'] | Passed |
| repeat hidden | ['a'] | ['a'] | Passed |
SHA-256 / 35c8f31361a84cc49c4586cbfae276274bf94ce235f540c7055c04419979d112
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:21.744506+00:00.
Case digest / 2ee94a8c37bb3cdd86c5cf1f0254ac39aa6f0f4fe651ff9fd7a91db4790a6812