FAILURE MAP
← Case archive

FA-32926 / Menu interactions / Open access

Busy menu command remains available because its document is idle · case 01

Busy menu command remains available because its document is idle.

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

ROOT CAUSE

The command-availability model applies `not p['document_busy']` at its busy operation instead of the stipulated transformation.

THE FAILURE

The command-availability model applies `not p['document_busy']` at its busy operation instead of the stipulated transformation.

Unsuccessful approach: The attempted repair `not p['document_busy'] or not p['command_busy']` still violates the busy oracle.

Case contract

Menu-specific command availability combines document cardinality, type support and command preconditions; explanations have a deterministic policy order.

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 == 'cardinality':
        return p['min']<=p['count']<=p['max']
    if action == 'all-types':
        return all(t in p['supported'] for t in p['types'])
    if action == 'nonempty':
        return bool(p['targets']) and all(p['valid'])
    if action == 'busy':
        return not p['document_busy']
    if action == 'reason':
        return next((x['reason'] for x in p if not x['ok']),None)
    if action == 'expiry':
        return p['now']<p['expires']
    return {'error': 'unsupported menu operation'}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('cardinality contract', solve('cardinality', {'min':1,'max':N+1,'count':N+2}), False)
check('all-types contract', solve('all-types', {'types':['text','binary'+str(N)],'supported':['text']}), False)
check('nonempty contract', solve('nonempty', {'targets':[],'valid':[],'revision':N}), False)
check('busy contract', solve('busy', {'document_busy':False,'command_busy':True,'id':N}), False)
check('reason contract', solve('reason', [{'ok':False,'reason':'first'+str(N)},{'ok':False,'reason':'second'}]), 'first'+str(N))
check('expiry contract', solve('expiry', {'now':N,'expires':N}), False)
check('unknown operation', solve('unknown', {}), {'error': 'unsupported menu operation'})
check('too few context objects',solve('cardinality',{'min':N+1,'max':N+3,'count':N}),False)
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
cardinality contractFalseFalsePassed
all-types contractFalseFalsePassed
nonempty contractFalseFalsePassed
busy contractTrueFalseFailed
reason contractfirst1first1Passed
expiry contractFalseFalsePassed
unknown operation{'error': 'unsupported menu operation'}{'error': 'unsupported menu operation'}Passed
too few context objectsFalseFalsePassed

SHA-256 / e0218aad8e1960e2349bdc0c834384ad336b1e8f9dc50e62e098d2f6f35cef9c

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 == 'cardinality':
        return p['min']<=p['count']<=p['max']
    if action == 'all-types':
        return all(t in p['supported'] for t in p['types'])
    if action == 'nonempty':
        return bool(p['targets']) and all(p['valid'])
    if action == 'busy':
        return not p['document_busy'] or not p['command_busy']
    if action == 'reason':
        return next((x['reason'] for x in p if not x['ok']),None)
    if action == 'expiry':
        return p['now']<p['expires']
    return {'error': 'unsupported menu operation'}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('cardinality contract', solve('cardinality', {'min':1,'max':N+1,'count':N+2}), False)
check('all-types contract', solve('all-types', {'types':['text','binary'+str(N)],'supported':['text']}), False)
check('nonempty contract', solve('nonempty', {'targets':[],'valid':[],'revision':N}), False)
check('busy contract', solve('busy', {'document_busy':False,'command_busy':True,'id':N}), False)
check('reason contract', solve('reason', [{'ok':False,'reason':'first'+str(N)},{'ok':False,'reason':'second'}]), 'first'+str(N))
check('expiry contract', solve('expiry', {'now':N,'expires':N}), False)
check('unknown operation', solve('unknown', {}), {'error': 'unsupported menu operation'})
check('too few context objects',solve('cardinality',{'min':N+1,'max':N+3,'count':N}),False)
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
cardinality contractFalseFalsePassed
all-types contractFalseFalsePassed
nonempty contractFalseFalsePassed
busy contractTrueFalseFailed
reason contractfirst1first1Passed
expiry contractFalseFalsePassed
unknown operation{'error': 'unsupported menu operation'}{'error': 'unsupported menu operation'}Passed
too few context objectsFalseFalsePassed

SHA-256 / 5861222e6044140e19aa3d0d21000429e4f9898bde1f22d695b3b8e4b3477d73

HELD IN THE MEMBER ARCHIVE

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

This mechanism has 8 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:17.245930+00:00.

Case digest / b885cb89119a6d6c2682e4d81e40fd154d7355e46ea8dc1ff0c52452c3cacf0d