FA-8831 / Selection controls / Open access
Radio group selection ownership: Removing an option retains it and removes its siblings · case 01
Removing an option retains it and removes its siblings.
ROOT CAUSE
The remove operation uses `x == target` where the contract requires `x != target`.
VERIFIED REPAIR
Implement the remove operation as `x != target`.
Unsuccessful approach: Clearing all options also loses unrelated choices.
Case contract
Radio activation replaces selection with an existing enabled option and never toggles it off; required groups cannot clear; selected removal uses first remaining option only when required.
Why this case matters
A deterministic model of radio group selection ownership; 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(options, selected, target, required, disabled, event):
if event == 'remove':
options = [x for x in options if x == target]
if selected not in options: selected = options[0] if required and options else None
elif event == 'activate':
if target in options and target not in disabled: selected = target
elif event == 'clear' and not required: selected = None
return (options, selected)
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('remove other', solve(['a','b','c'], 'a', 'b', False, [], 'remove'), (['a', 'c'], 'a'))
check('required removal', solve(['a','b','c'], 'a', 'a', True, [], 'remove'), (['b', 'c'], 'b'))
check('unknown', solve(['a','b'], 'a', 'x', False, [], 'activate'), (['a', 'b'], 'a'))
check('disabled', solve(['a','b'], 'a', 'b', False, ['b'], 'activate'), (['a', 'b'], 'a'))
check('required clear', solve(['a','b'], 'a', None, True, [], 'clear'), (['a', 'b'], 'a'))
check('optional clear', solve(['a','b'], 'a', None, False, [], 'clear'), (['a', 'b'], None))
check('activate', solve(['a','b'], 'a', 'b', False, [], 'activate'), (['a', 'b'], 'b'))
check('reactivate', solve(['a','b'], 'a', 'a', False, [], 'activate'), (['a', 'b'], 'a'))
check('parameterized radio options', solve(list(range(N+1)),0,N,False,[],'activate'), (list(range(N+1)),N))
for repetition in range(N):
check('repeat reactivate', solve(['a','b'], 'a', 'a', False, [], 'activate'), (['a', 'b'], 'a'))
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 |
|---|---|---|---|
| remove other | [['b'], None] | [['a', 'c'], 'a'] | Failed |
| required removal | [['a'], 'a'] | [['b', 'c'], 'b'] | Failed |
| unknown | [['a', 'b'], 'a'] | [['a', 'b'], 'a'] | Passed |
| disabled | [['a', 'b'], 'a'] | [['a', 'b'], 'a'] | Passed |
| required clear | [['a', 'b'], 'a'] | [['a', 'b'], 'a'] | Passed |
| optional clear | [['a', 'b'], None] | [['a', 'b'], None] | Passed |
| activate | [['a', 'b'], 'b'] | [['a', 'b'], 'b'] | Passed |
| reactivate | [['a', 'b'], 'a'] | [['a', 'b'], 'a'] | Passed |
| parameterized radio options | [[0, 1], 1] | [[0, 1], 1] | Passed |
| repeat reactivate | [['a', 'b'], 'a'] | [['a', 'b'], 'a'] | Passed |
SHA-256 / 0dc52d93dfc863ff670427fb93395872905e2474c221539bdf8c31b5fbb7e0a2
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(options, selected, target, required, disabled, event):
if event == 'remove':
options = [x for x in options if False]
if selected not in options: selected = options[0] if required and options else None
elif event == 'activate':
if target in options and target not in disabled: selected = target
elif event == 'clear' and not required: selected = None
return (options, selected)
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('remove other', solve(['a','b','c'], 'a', 'b', False, [], 'remove'), (['a', 'c'], 'a'))
check('required removal', solve(['a','b','c'], 'a', 'a', True, [], 'remove'), (['b', 'c'], 'b'))
check('unknown', solve(['a','b'], 'a', 'x', False, [], 'activate'), (['a', 'b'], 'a'))
check('disabled', solve(['a','b'], 'a', 'b', False, ['b'], 'activate'), (['a', 'b'], 'a'))
check('required clear', solve(['a','b'], 'a', None, True, [], 'clear'), (['a', 'b'], 'a'))
check('optional clear', solve(['a','b'], 'a', None, False, [], 'clear'), (['a', 'b'], None))
check('activate', solve(['a','b'], 'a', 'b', False, [], 'activate'), (['a', 'b'], 'b'))
check('reactivate', solve(['a','b'], 'a', 'a', False, [], 'activate'), (['a', 'b'], 'a'))
check('parameterized radio options', solve(list(range(N+1)),0,N,False,[],'activate'), (list(range(N+1)),N))
for repetition in range(N):
check('repeat reactivate', solve(['a','b'], 'a', 'a', False, [], 'activate'), (['a', 'b'], 'a'))
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 |
|---|---|---|---|
| remove other | [[], None] | [['a', 'c'], 'a'] | Failed |
| required removal | [[], None] | [['b', 'c'], 'b'] | Failed |
| unknown | [['a', 'b'], 'a'] | [['a', 'b'], 'a'] | Passed |
| disabled | [['a', 'b'], 'a'] | [['a', 'b'], 'a'] | Passed |
| required clear | [['a', 'b'], 'a'] | [['a', 'b'], 'a'] | Passed |
| optional clear | [['a', 'b'], None] | [['a', 'b'], None] | Passed |
| activate | [['a', 'b'], 'b'] | [['a', 'b'], 'b'] | Passed |
| reactivate | [['a', 'b'], 'a'] | [['a', 'b'], 'a'] | Passed |
| parameterized radio options | [[0, 1], 1] | [[0, 1], 1] | Passed |
| repeat reactivate | [['a', 'b'], 'a'] | [['a', 'b'], 'a'] | Passed |
SHA-256 / 29503a53d96fb3e63f2e9fc9d9c549246398a23a2ce0836534baa9989823293f
3 / The verified repair
Exit 0"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(options, selected, target, required, disabled, event):
if event == 'remove':
options = [x for x in options if x != target]
if selected not in options: selected = options[0] if required and options else None
elif event == 'activate':
if target in options and target not in disabled: selected = target
elif event == 'clear' and not required: selected = None
return (options, selected)
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('remove other', solve(['a','b','c'], 'a', 'b', False, [], 'remove'), (['a', 'c'], 'a'))
check('required removal', solve(['a','b','c'], 'a', 'a', True, [], 'remove'), (['b', 'c'], 'b'))
check('unknown', solve(['a','b'], 'a', 'x', False, [], 'activate'), (['a', 'b'], 'a'))
check('disabled', solve(['a','b'], 'a', 'b', False, ['b'], 'activate'), (['a', 'b'], 'a'))
check('required clear', solve(['a','b'], 'a', None, True, [], 'clear'), (['a', 'b'], 'a'))
check('optional clear', solve(['a','b'], 'a', None, False, [], 'clear'), (['a', 'b'], None))
check('activate', solve(['a','b'], 'a', 'b', False, [], 'activate'), (['a', 'b'], 'b'))
check('reactivate', solve(['a','b'], 'a', 'a', False, [], 'activate'), (['a', 'b'], 'a'))
check('parameterized radio options', solve(list(range(N+1)),0,N,False,[],'activate'), (list(range(N+1)),N))
for repetition in range(N):
check('repeat reactivate', solve(['a','b'], 'a', 'a', False, [], 'activate'), (['a', 'b'], 'a'))
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 |
|---|---|---|---|
| remove other | [['a', 'c'], 'a'] | [['a', 'c'], 'a'] | Passed |
| required removal | [['b', 'c'], 'b'] | [['b', 'c'], 'b'] | Passed |
| unknown | [['a', 'b'], 'a'] | [['a', 'b'], 'a'] | Passed |
| disabled | [['a', 'b'], 'a'] | [['a', 'b'], 'a'] | Passed |
| required clear | [['a', 'b'], 'a'] | [['a', 'b'], 'a'] | Passed |
| optional clear | [['a', 'b'], None] | [['a', 'b'], None] | Passed |
| activate | [['a', 'b'], 'b'] | [['a', 'b'], 'b'] | Passed |
| reactivate | [['a', 'b'], 'a'] | [['a', 'b'], 'a'] | Passed |
| parameterized radio options | [[0, 1], 1] | [[0, 1], 1] | Passed |
| repeat reactivate | [['a', 'b'], 'a'] | [['a', 'b'], 'a'] | Passed |
SHA-256 / 4f8f9a9b0059c204bdbca082b20c90cecc2a74313620caf4bb5bf20aea9fae2e
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:24.810527+00:00.
Case digest / 198631febfe5539da62e8797d4c9fa04256e40214a5ece9995c27769a32434a3