FA-33776 / Menu interactions / Open access
Menu macro stringifies typed command parameters · case 01
Menu macro stringifies typed command parameters.
ROOT CAUSE
The menu-macro-recording model applies `{k:str(v) for k,v in p['args'].items()}` at its typed-parameters operation instead of the stipulated transformation.
THE FAILURE
The menu-macro-recording model applies `{k:str(v) for k,v in p['args'].items()}` at its typed-parameters operation instead of the stipulated transformation.
Unsuccessful approach: The attempted repair `{k:bool(v) for k,v in p['args'].items()}` still violates the typed-parameters oracle.
Case contract
Menu command macros record successful semantic commands, omit private context data, preserve execution order and retain typed parameter bindings.
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 == 'semantic':
return {'command':p['command'],'arguments':p['arguments']}
if action == 'failed':
return p['macro'] if not p['success'] else p['macro']+[p['entry']]
if action == 'private-args':
return {k:v for k,v in p['args'].items() if k not in p['private']}
if action == 'playback-order':
return p['steps']
if action == 'recording-playback':
return p['recording'] and not p['replaying']
if action == 'typed-parameters':
return {k:str(v) for k,v in p['args'].items()}
return {'error': 'unsupported menu operation'}
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('semantic contract', solve('semantic', {'command':'resize','arguments':{'size':N},'row':'row-7','label':'Resize'}), {'command':'resize','arguments':{'size':N}})
check('failed contract', solve('failed', {'macro':[N],'entry':N+1,'success':False}), [N])
check('private-args contract', solve('private-args', {'args':{'size':N,'document_token':'private'},'private':['document_token']}), {'size':N})
check('playback-order contract', solve('playback-order', {'steps':['create','write'+str(N),'close']}), ['create','write'+str(N),'close'])
check('recording-playback contract', solve('recording-playback', {'recording':True,'replaying':True,'step':N}), False)
check('typed-parameters contract', solve('typed-parameters', {'args':{'count':N+1,'enabled':False}}), {'count':N+1,'enabled':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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| semantic contract | {'arguments': {'size': 1}, 'command': 'resize'} | {'arguments': {'size': 1}, 'command': 'resize'} | Passed |
| failed contract | [1] | [1] | Passed |
| private-args contract | {'size': 1} | {'size': 1} | Passed |
| playback-order contract | ['create', 'write1', 'close'] | ['create', 'write1', 'close'] | Passed |
| recording-playback contract | False | False | Passed |
| typed-parameters contract | {'count': '2', 'enabled': 'False'} | {'count': 2, 'enabled': False} | Failed |
| unknown operation | {'error': 'unsupported menu operation'} | {'error': 'unsupported menu operation'} | Passed |
SHA-256 / 3c645b4ffb3e09f3dce4254bf7308433d29f15cfe0412d976cebfa811bc611bc
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 == 'semantic':
return {'command':p['command'],'arguments':p['arguments']}
if action == 'failed':
return p['macro'] if not p['success'] else p['macro']+[p['entry']]
if action == 'private-args':
return {k:v for k,v in p['args'].items() if k not in p['private']}
if action == 'playback-order':
return p['steps']
if action == 'recording-playback':
return p['recording'] and not p['replaying']
if action == 'typed-parameters':
return {k:bool(v) for k,v in p['args'].items()}
return {'error': 'unsupported menu operation'}
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('semantic contract', solve('semantic', {'command':'resize','arguments':{'size':N},'row':'row-7','label':'Resize'}), {'command':'resize','arguments':{'size':N}})
check('failed contract', solve('failed', {'macro':[N],'entry':N+1,'success':False}), [N])
check('private-args contract', solve('private-args', {'args':{'size':N,'document_token':'private'},'private':['document_token']}), {'size':N})
check('playback-order contract', solve('playback-order', {'steps':['create','write'+str(N),'close']}), ['create','write'+str(N),'close'])
check('recording-playback contract', solve('recording-playback', {'recording':True,'replaying':True,'step':N}), False)
check('typed-parameters contract', solve('typed-parameters', {'args':{'count':N+1,'enabled':False}}), {'count':N+1,'enabled':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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| semantic contract | {'arguments': {'size': 1}, 'command': 'resize'} | {'arguments': {'size': 1}, 'command': 'resize'} | Passed |
| failed contract | [1] | [1] | Passed |
| private-args contract | {'size': 1} | {'size': 1} | Passed |
| playback-order contract | ['create', 'write1', 'close'] | ['create', 'write1', 'close'] | Passed |
| recording-playback contract | False | False | Passed |
| typed-parameters contract | {'count': True, 'enabled': False} | {'count': 2, 'enabled': False} | Failed |
| unknown operation | {'error': 'unsupported menu operation'} | {'error': 'unsupported menu operation'} | Passed |
SHA-256 / 25f797b1a280456121e796a5cdf6599454f8c4025934bb9a33d3fc313ab7ff32
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:25.608689+00:00.
Case digest / 3ce16ee53251096b39c604c82064b66826a3e3ab6b0b4509839bb5a121f8c43e