FA-8121 / Menu interactions / Open access
Menu item activation: Checked menu checkboxes cannot toggle off · case 01
Checked menu checkboxes cannot toggle off.
ROOT CAUSE
The checkbox operation uses `(opened, True, 'change')` where the contract requires `(opened, not checked, 'change')`.
THE FAILURE
The checkbox operation uses `(opened, True, 'change')` where the contract requires `(opened, not checked, 'change')`.
Unsuccessful approach: Closing the menu violates the persistent checkbox menu contract.
Case contract
Disabled items and nonactivation keys do nothing; click, Enter and Space activate; submenu transfers focus; checks toggle; radios select; leaf commands close.
Why this case matters
A deterministic model of menu item activation; this isolates one interface invariant without requiring a browser.
1 / The failure
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(item, opened, checked, event):
if item['disabled']: return (opened, checked, None)
if event not in ('click', 'Enter', 'Space'): return (opened, checked, None)
if item['kind'] == 'submenu': return (True, checked, 'focus-child')
if item['kind'] == 'checkbox': return (opened, True, 'change')
if item['kind'] == 'radio': return (opened, True, 'change')
return (False, checked, 'invoke')
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('disabled', solve(dict(disabled=True,kind='command'), True, False, 'click'), (True, False, None))
check('enter', solve(dict(disabled=False,kind='command'), True, False, 'Enter'), (False, False, 'invoke'))
check('space', solve(dict(disabled=False,kind='command'), True, False, 'Space'), (False, False, 'invoke'))
check('submenu', solve(dict(disabled=False,kind='submenu'), False, False, 'click'), (True, False, 'focus-child'))
check('checkbox off', solve(dict(disabled=False,kind='checkbox'), True, True, 'click'), (True, False, 'change'))
check('radio stays', solve(dict(disabled=False,kind='radio'), True, True, 'click'), (True, True, 'change'))
check('ignore arrow', solve(dict(disabled=False,kind='command'), True, False, 'Left'), (True, False, None))
check('parameterized checked state', solve(dict(disabled=False,kind='checkbox'), True, bool(N%2), 'Space'), (True, not bool(N%2), 'change'))
for repetition in range(N):
check('repeat ignore arrow', solve(dict(disabled=False,kind='command'), True, False, 'Left'), (True, False, None))
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 |
|---|---|---|---|
| disabled | [True, False, None] | [True, False, None] | Passed |
| enter | [False, False, 'invoke'] | [False, False, 'invoke'] | Passed |
| space | [False, False, 'invoke'] | [False, False, 'invoke'] | Passed |
| submenu | [True, False, 'focus-child'] | [True, False, 'focus-child'] | Passed |
| checkbox off | [True, True, 'change'] | [True, False, 'change'] | Failed |
| radio stays | [True, True, 'change'] | [True, True, 'change'] | Passed |
| ignore arrow | [True, False, None] | [True, False, None] | Passed |
| parameterized checked state | [True, True, 'change'] | [True, False, 'change'] | Failed |
| repeat ignore arrow | [True, False, None] | [True, False, None] | Passed |
SHA-256 / ad047ef0a0f222be816d14eb152d6e4fdbba511653fdc106350f66507640cda0
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(item, opened, checked, event):
if item['disabled']: return (opened, checked, None)
if event not in ('click', 'Enter', 'Space'): return (opened, checked, None)
if item['kind'] == 'submenu': return (True, checked, 'focus-child')
if item['kind'] == 'checkbox': return (False, not checked, 'change')
if item['kind'] == 'radio': return (opened, True, 'change')
return (False, checked, 'invoke')
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('disabled', solve(dict(disabled=True,kind='command'), True, False, 'click'), (True, False, None))
check('enter', solve(dict(disabled=False,kind='command'), True, False, 'Enter'), (False, False, 'invoke'))
check('space', solve(dict(disabled=False,kind='command'), True, False, 'Space'), (False, False, 'invoke'))
check('submenu', solve(dict(disabled=False,kind='submenu'), False, False, 'click'), (True, False, 'focus-child'))
check('checkbox off', solve(dict(disabled=False,kind='checkbox'), True, True, 'click'), (True, False, 'change'))
check('radio stays', solve(dict(disabled=False,kind='radio'), True, True, 'click'), (True, True, 'change'))
check('ignore arrow', solve(dict(disabled=False,kind='command'), True, False, 'Left'), (True, False, None))
check('parameterized checked state', solve(dict(disabled=False,kind='checkbox'), True, bool(N%2), 'Space'), (True, not bool(N%2), 'change'))
for repetition in range(N):
check('repeat ignore arrow', solve(dict(disabled=False,kind='command'), True, False, 'Left'), (True, False, None))
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 |
|---|---|---|---|
| disabled | [True, False, None] | [True, False, None] | Passed |
| enter | [False, False, 'invoke'] | [False, False, 'invoke'] | Passed |
| space | [False, False, 'invoke'] | [False, False, 'invoke'] | Passed |
| submenu | [True, False, 'focus-child'] | [True, False, 'focus-child'] | Passed |
| checkbox off | [False, False, 'change'] | [True, False, 'change'] | Failed |
| radio stays | [True, True, 'change'] | [True, True, 'change'] | Passed |
| ignore arrow | [True, False, None] | [True, False, None] | Passed |
| parameterized checked state | [False, False, 'change'] | [True, False, 'change'] | Failed |
| repeat ignore arrow | [True, False, None] | [True, False, None] | Passed |
SHA-256 / ae32c515e6bd2c0a37bd1994196c3258032e826b30bdfeef2c5ecd2c9966cebf
HELD IN THE MEMBER ARCHIVE
The verified repair and its recorded checks are member-only.
This mechanism has 9 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
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:38:18.583747+00:00.
Case digest / de5e6419fc425962ddebf194841e6e85bfc6943b07ae28b6a520f5b1aee640d9