FAILURE MAP
← Case archive

FA-33446 / Menu interactions / Open access

Menu contribution accepts itself as its placement anchor · case 01

Menu contribution accepts itself as its placement anchor.

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

ROOT CAUSE

The contribution-anchors model applies `True` at its self-anchor operation instead of the stipulated transformation.

THE FAILURE

The contribution-anchors model applies `True` at its self-anchor operation instead of the stipulated transformation.

Unsuccessful approach: The attempted repair `p['id'] in p['registered']` still violates the self-anchor oracle.

Case contract

Menu contribution placement uses named before/after anchors and stable fallback slots; the before anchor owns precedence when both are supplied.

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 == 'before':
        return p['rows'][:p['rows'].index(p['anchor'])]+[p['id']]+p['rows'][p['rows'].index(p['anchor']):]
    if action == 'fallback-slot':
        return p['slots'].get(p['requested'],p['slots']['default'])
    if action == 'anchor-owner':
        return (p['provider'],p['local'])
    if action == 'before-precedence':
        return p['before'] if p['before'] is not None else p['after']
    if action == 'batch-order':
        return p['rows'][:p['at']]+p['batch']+p['rows'][p['at']:]
    if action == 'self-anchor':
        return True
    return {'error': 'unsupported menu operation'}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('before contract', solve('before', {'rows':['a','b'],'anchor':'b','id':N}), ['a',N,'b'])
check('fallback-slot contract', solve('fallback-slot', {'requested':'missing','slots':{'default':N+4,'start':0}}), N+4)
check('anchor-owner contract', solve('anchor-owner', {'provider':'p'+str(N),'local':'tools'}), ('p'+str(N),'tools'))
check('before-precedence contract', solve('before-precedence', {'before':N,'after':N+1}), N)
check('batch-order contract', solve('batch-order', {'rows':['a','b'],'at':1,'batch':[N,N+1]}), ['a',N,N+1,'b'])
check('self-anchor contract', solve('self-anchor', {'id':N,'anchor':N,'registered':[N]}), False)
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
before contract['a', 1, 'b']['a', 1, 'b']Passed
fallback-slot contract55Passed
anchor-owner contract['p1', 'tools']['p1', 'tools']Passed
before-precedence contract11Passed
batch-order contract['a', 1, 2, 'b']['a', 1, 2, 'b']Passed
self-anchor contractTrueFalseFailed
unknown operation{'error': 'unsupported menu operation'}{'error': 'unsupported menu operation'}Passed

SHA-256 / 6340c27b60625248936ed7e0ccdf1df2a755a6528748189222f49319ef3a10ba

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 == 'before':
        return p['rows'][:p['rows'].index(p['anchor'])]+[p['id']]+p['rows'][p['rows'].index(p['anchor']):]
    if action == 'fallback-slot':
        return p['slots'].get(p['requested'],p['slots']['default'])
    if action == 'anchor-owner':
        return (p['provider'],p['local'])
    if action == 'before-precedence':
        return p['before'] if p['before'] is not None else p['after']
    if action == 'batch-order':
        return p['rows'][:p['at']]+p['batch']+p['rows'][p['at']:]
    if action == 'self-anchor':
        return p['id'] in p['registered']
    return {'error': 'unsupported menu operation'}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('before contract', solve('before', {'rows':['a','b'],'anchor':'b','id':N}), ['a',N,'b'])
check('fallback-slot contract', solve('fallback-slot', {'requested':'missing','slots':{'default':N+4,'start':0}}), N+4)
check('anchor-owner contract', solve('anchor-owner', {'provider':'p'+str(N),'local':'tools'}), ('p'+str(N),'tools'))
check('before-precedence contract', solve('before-precedence', {'before':N,'after':N+1}), N)
check('batch-order contract', solve('batch-order', {'rows':['a','b'],'at':1,'batch':[N,N+1]}), ['a',N,N+1,'b'])
check('self-anchor contract', solve('self-anchor', {'id':N,'anchor':N,'registered':[N]}), False)
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
before contract['a', 1, 'b']['a', 1, 'b']Passed
fallback-slot contract55Passed
anchor-owner contract['p1', 'tools']['p1', 'tools']Passed
before-precedence contract11Passed
batch-order contract['a', 1, 2, 'b']['a', 1, 2, 'b']Passed
self-anchor contractTrueFalseFailed
unknown operation{'error': 'unsupported menu operation'}{'error': 'unsupported menu operation'}Passed

SHA-256 / f69fd85e61c656140fa8adc41b9169f16146bb7e934749c0fbe7ec11612438ce

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

Case digest / 23990bb495c273e276646124032d20e41c454a88ad3b3052d8e5b655ec2365ee