FAILURE MAP
← Case archive

FA-32611 / Menu interactions / Open access

Menu command preparation ignores authorization · case 01

Menu command preparation ignores authorization.

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

ROOT CAUSE

The dispatch-lifecycle model applies `'prepared' if p['validated'] else 'rejected'` at its prepare operation instead of the stipulated transformation.

THE FAILURE

The dispatch-lifecycle model applies `'prepared' if p['validated'] else 'rejected'` at its prepare operation instead of the stipulated transformation.

Unsuccessful approach: The attempted repair `'prepared' if p['validated'] or p['authorized'] else 'rejected'` still violates the prepare oracle.

Case contract

Menu command transactions have explicit preparation, execution, success and failure phases; close policy and duplicate suppression are separate.

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 == 'prepare':
        return 'prepared' if p['validated'] else 'rejected'
    if action == 'pending':
        return p['state']=='prepared' and not p['inflight']
    if action == 'success-close':
        return p['success'] and p['policy']=='success'
    if action == 'failure':
        return {'state':'failed','error':p['error'],'retry':p['retryable']}
    if action == 'retry-id':
        return {'command':p['command'],'attempt':p['attempt']+1,'context':p['context']}
    if action == 'completion':
        return p['transaction']==p['pending']
    return {'error': 'unsupported menu operation'}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('prepare contract', solve('prepare', {'validated':True,'authorized':False,'command':N}), 'rejected')
check('pending contract', solve('pending', {'state':'prepared','inflight':True,'id':N}), False)
check('success-close contract', solve('success-close', {'success':False,'policy':'success','id':N}), False)
check('failure contract', solve('failure', {'error':'e'+str(N),'retryable':True}), {'state':'failed','error':'e'+str(N),'retry':True})
check('retry-id contract', solve('retry-id', {'command':'copy','attempt':N,'context':'doc'}), {'command':'copy','attempt':N+1,'context':'doc'})
check('completion contract', solve('completion', {'transaction':N,'pending':N+1}), 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
prepare contractpreparedrejectedFailed
pending contractFalseFalsePassed
success-close contractFalseFalsePassed
failure contract{'error': 'e1', 'retry': True, 'state': 'failed'}{'error': 'e1', 'retry': True, 'state': 'failed'}Passed
retry-id contract{'attempt': 2, 'command': 'copy', 'context': 'doc'}{'attempt': 2, 'command': 'copy', 'context': 'doc'}Passed
completion contractFalseFalsePassed
unknown operation{'error': 'unsupported menu operation'}{'error': 'unsupported menu operation'}Passed

SHA-256 / a78003c36b1a43db6393ff577eac7ff6740af49c7f29105669f1b501ca1585bb

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 == 'prepare':
        return 'prepared' if p['validated'] or p['authorized'] else 'rejected'
    if action == 'pending':
        return p['state']=='prepared' and not p['inflight']
    if action == 'success-close':
        return p['success'] and p['policy']=='success'
    if action == 'failure':
        return {'state':'failed','error':p['error'],'retry':p['retryable']}
    if action == 'retry-id':
        return {'command':p['command'],'attempt':p['attempt']+1,'context':p['context']}
    if action == 'completion':
        return p['transaction']==p['pending']
    return {'error': 'unsupported menu operation'}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('prepare contract', solve('prepare', {'validated':True,'authorized':False,'command':N}), 'rejected')
check('pending contract', solve('pending', {'state':'prepared','inflight':True,'id':N}), False)
check('success-close contract', solve('success-close', {'success':False,'policy':'success','id':N}), False)
check('failure contract', solve('failure', {'error':'e'+str(N),'retryable':True}), {'state':'failed','error':'e'+str(N),'retry':True})
check('retry-id contract', solve('retry-id', {'command':'copy','attempt':N,'context':'doc'}), {'command':'copy','attempt':N+1,'context':'doc'})
check('completion contract', solve('completion', {'transaction':N,'pending':N+1}), 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
prepare contractpreparedrejectedFailed
pending contractFalseFalsePassed
success-close contractFalseFalsePassed
failure contract{'error': 'e1', 'retry': True, 'state': 'failed'}{'error': 'e1', 'retry': True, 'state': 'failed'}Passed
retry-id contract{'attempt': 2, 'command': 'copy', 'context': 'doc'}{'attempt': 2, 'command': 'copy', 'context': 'doc'}Passed
completion contractFalseFalsePassed
unknown operation{'error': 'unsupported menu operation'}{'error': 'unsupported menu operation'}Passed

SHA-256 / c69417959eec57569d5efcc6058672f2d1976f87accbab0bd41e6d05a9bb4822

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

Case digest / e579254931152b279393c6394cd7e80701bfd9758787b1e10d4e41370ac1c521