FAILURE MAP
← Case archive

FA-8841 / Selection controls / Open access

Radio group selection ownership: An unknown radio identity becomes selected · case 01

An unknown radio identity becomes selected.

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

ROOT CAUSE

The unknown activation operation uses `target not in disabled` where the contract requires `target in options and target not in disabled`.

THE FAILURE

The unknown activation operation uses `target not in disabled` where the contract requires `target in options and target not in disabled`.

Unsuccessful approach: Checking presence alone still allows disabled targets.

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 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 fixtureActualExpectedOutcome
remove other[['a', 'c'], 'a'][['a', 'c'], 'a']Passed
required removal[['b', 'c'], 'b'][['b', 'c'], 'b']Passed
unknown[['a', 'b'], 'x'][['a', 'b'], 'a']Failed
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 / 3f82bbc3d2986c259617e0ba89484e039932333f6636749ee1c69000d3a016e7

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 x != target]
        if selected not in options: selected = options[0] if required and options else None
    elif event == 'activate':
        if target in options: 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 fixtureActualExpectedOutcome
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'], 'b'][['a', 'b'], 'a']Failed
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 / f4d05276c60ef4dea32311629b83350e0935e8138c29c77bcc1e85546f7a2b78

HELD IN THE MEMBER ARCHIVE

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

This mechanism has 10 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:24.975571+00:00.

Case digest / 713a6c9b0639c6a1b39a6b6b7ba907e7853395118c63664e1d7fe8f877f14476