FAILURE MAP
← Case archive

FA-32811 / Menu interactions / Open access

Falsy valid context owner falls through to document menu · case 01

Falsy valid context owner falls through to document menu.

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

ROOT CAUSE

The context-target-resolution model applies `p['local'] or p['document']` at its fallback operation instead of the stipulated transformation.

THE FAILURE

The context-target-resolution model applies `p['local'] or p['document']` at its fallback operation instead of the stipulated transformation.

Unsuccessful approach: The attempted repair `p['document']` still violates the fallback oracle.

Case contract

Context invocations choose the nearest eligible context owner from a composed target path; nested ownership, exclusions and document boundaries are explicit.

Why this case matters

Cascading and context menus require coherent command and session state as content changes.

1 / The failure

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json
import math
import unicodedata
N = 1
observations = []
def solve(action, p):
    if action == 'nearest':
        return next((x['id'] for x in p if x['context']),None)
    if action == 'exclude':
        return next((x['id'] for x in p if x['context'] and not x['excluded']),None)
    if action == 'document':
        return [x for x in p['path'] if x['document']==p['document']]
    if action == 'detached':
        return p['connected'] and p['owner_exists']
    if action == 'fallback':
        return p['local'] or p['document']
    if action == 'hit-target':
        return p['captured'] if p['capture_valid'] else p['hit']
    return {'error': 'unsupported menu operation'}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('nearest contract', solve('nearest', [{'id':N,'context':True},{'id':N+1,'context':True}]), N)
check('exclude contract', solve('exclude', [{'id':N,'context':True,'excluded':True},{'id':N+1,'context':False,'excluded':False},{'id':N+2,'context':True,'excluded':False}]), N+2)
check('document contract', solve('document', {'document':'a','path':[{'id':N,'document':'a'},{'id':N+1,'document':'b'}]}), [{'id':N,'document':'a'}])
check('detached contract', solve('detached', {'connected':False,'owner_exists':True,'id':N}), False)
check('fallback contract', solve('fallback', {'local':0,'document':N+1}), 0)
check('hit-target contract', solve('hit-target', {'captured':N,'capture_valid':True,'hit':N+1,'capture_owner':'canvas'}), N)
check('unknown operation', solve('unknown', {}), {'error': 'unsupported menu operation'})
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
nearest contract11Passed
exclude contract33Passed
document contract[{'document': 'a', 'id': 1}][{'document': 'a', 'id': 1}]Passed
detached contractFalseFalsePassed
fallback contract20Failed
hit-target contract11Passed
unknown operation{'error': 'unsupported menu operation'}{'error': 'unsupported menu operation'}Passed

SHA-256 / 3d09d8953587e296255de81699da7e8bc24744599ae2dae248eb9b88eb8f86ff

2 / The unsuccessful fix

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json
import math
import unicodedata
N = 1
observations = []
def solve(action, p):
    if action == 'nearest':
        return next((x['id'] for x in p if x['context']),None)
    if action == 'exclude':
        return next((x['id'] for x in p if x['context'] and not x['excluded']),None)
    if action == 'document':
        return [x for x in p['path'] if x['document']==p['document']]
    if action == 'detached':
        return p['connected'] and p['owner_exists']
    if action == 'fallback':
        return p['document']
    if action == 'hit-target':
        return p['captured'] if p['capture_valid'] else p['hit']
    return {'error': 'unsupported menu operation'}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('nearest contract', solve('nearest', [{'id':N,'context':True},{'id':N+1,'context':True}]), N)
check('exclude contract', solve('exclude', [{'id':N,'context':True,'excluded':True},{'id':N+1,'context':False,'excluded':False},{'id':N+2,'context':True,'excluded':False}]), N+2)
check('document contract', solve('document', {'document':'a','path':[{'id':N,'document':'a'},{'id':N+1,'document':'b'}]}), [{'id':N,'document':'a'}])
check('detached contract', solve('detached', {'connected':False,'owner_exists':True,'id':N}), False)
check('fallback contract', solve('fallback', {'local':0,'document':N+1}), 0)
check('hit-target contract', solve('hit-target', {'captured':N,'capture_valid':True,'hit':N+1,'capture_owner':'canvas'}), N)
check('unknown operation', solve('unknown', {}), {'error': 'unsupported menu operation'})
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
nearest contract11Passed
exclude contract33Passed
document contract[{'document': 'a', 'id': 1}][{'document': 'a', 'id': 1}]Passed
detached contractFalseFalsePassed
fallback contract20Failed
hit-target contract11Passed
unknown operation{'error': 'unsupported menu operation'}{'error': 'unsupported menu operation'}Passed

SHA-256 / 26d89b7f09598bc796494d4a6c88083eb31b1b1d00a7b2f1d5557bb22e61f9b8

HELD IN THE MEMBER ARCHIVE

The verified repair and its recorded checks are member-only.

This mechanism has 7 recorded checks per implementation. The open-access tier publishes the failure and the unsuccessful fix; the repaired source that passes every check, and the observations that prove it, are available to members.

Every case sharing this mechanism uses the same contract and the same repair, so this one record is held back for all of them.

Member access is invitation-based. Sign in with your invited account to inspect the repair.

Sign in to the archive ↗

Verification & scope

Offline supplied-valid-payload model; excludes DOM, keyboard, focus, selection, announcements and browser conformance. 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:42:16.052359+00:00.

Case digest / 4f24f6b295485d8b43bf17cb4e992a3010eb22a4048c7d6398d3a7a1027ac55f