{"abstract":"Clear removes the selection from a required group.","category":"Selection controls","checks":10,"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.","evaluation_group":"xi-radio-group","failed_approach":"Reversing the flag disables clearing optional groups.","family":"xi-radio-group-required-clear","id":"FA-8846","implementations":{"attempt":{"sha256":"5f598f83bce3634deded60acf7cf5744b4934e270b319c6416c2775118a99022","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(options, selected, target, required, disabled, event):\n    if event == 'remove':\n        options = [x for x in options if x != target]\n        if selected not in options: selected = options[0] if required and options else None\n    elif event == 'activate':\n        if target in options and target not in disabled: selected = target\n    elif event == 'clear' and required: selected = None\n    return (options, selected)\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('remove other', solve(['a','b','c'], 'a', 'b', False, [], 'remove'), (['a', 'c'], 'a'))\ncheck('required removal', solve(['a','b','c'], 'a', 'a', True, [], 'remove'), (['b', 'c'], 'b'))\ncheck('unknown', solve(['a','b'], 'a', 'x', False, [], 'activate'), (['a', 'b'], 'a'))\ncheck('disabled', solve(['a','b'], 'a', 'b', False, ['b'], 'activate'), (['a', 'b'], 'a'))\ncheck('required clear', solve(['a','b'], 'a', None, True, [], 'clear'), (['a', 'b'], 'a'))\ncheck('optional clear', solve(['a','b'], 'a', None, False, [], 'clear'), (['a', 'b'], None))\ncheck('activate', solve(['a','b'], 'a', 'b', False, [], 'activate'), (['a', 'b'], 'b'))\ncheck('reactivate', solve(['a','b'], 'a', 'a', False, [], 'activate'), (['a', 'b'], 'a'))\ncheck('parameterized radio options', solve(list(range(N+1)),0,N,False,[],'activate'), (list(range(N+1)),N))\nfor repetition in range(N):\n    check('repeat reactivate', solve(['a','b'], 'a', 'a', False, [], 'activate'), (['a', 'b'], 'a'))\nprint(json.dumps({\"observations\": observations, \"passed\": all(x[\"passed\"] for x in observations)}, ensure_ascii=False))\nraise SystemExit(0 if all(x[\"passed\"] for x in observations) else 1)\n"},"broken":{"sha256":"fa2c641e78232a744908826bb5fd1ff18f54ac5220a2d377499810ff7a92980a","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(options, selected, target, required, disabled, event):\n    if event == 'remove':\n        options = [x for x in options if x != target]\n        if selected not in options: selected = options[0] if required and options else None\n    elif event == 'activate':\n        if target in options and target not in disabled: selected = target\n    elif event == 'clear': selected = None\n    return (options, selected)\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('remove other', solve(['a','b','c'], 'a', 'b', False, [], 'remove'), (['a', 'c'], 'a'))\ncheck('required removal', solve(['a','b','c'], 'a', 'a', True, [], 'remove'), (['b', 'c'], 'b'))\ncheck('unknown', solve(['a','b'], 'a', 'x', False, [], 'activate'), (['a', 'b'], 'a'))\ncheck('disabled', solve(['a','b'], 'a', 'b', False, ['b'], 'activate'), (['a', 'b'], 'a'))\ncheck('required clear', solve(['a','b'], 'a', None, True, [], 'clear'), (['a', 'b'], 'a'))\ncheck('optional clear', solve(['a','b'], 'a', None, False, [], 'clear'), (['a', 'b'], None))\ncheck('activate', solve(['a','b'], 'a', 'b', False, [], 'activate'), (['a', 'b'], 'b'))\ncheck('reactivate', solve(['a','b'], 'a', 'a', False, [], 'activate'), (['a', 'b'], 'a'))\ncheck('parameterized radio options', solve(list(range(N+1)),0,N,False,[],'activate'), (list(range(N+1)),N))\nfor repetition in range(N):\n    check('repeat reactivate', solve(['a','b'], 'a', 'a', False, [], 'activate'), (['a', 'b'], 'a'))\nprint(json.dumps({\"observations\": observations, \"passed\": all(x[\"passed\"] for x in observations)}, ensure_ascii=False))\nraise SystemExit(0 if all(x[\"passed\"] for x in observations) else 1)\n"},"fixed":{"sha256":"4f8f9a9b0059c204bdbca082b20c90cecc2a74313620caf4bb5bf20aea9fae2e","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(options, selected, target, required, disabled, event):\n    if event == 'remove':\n        options = [x for x in options if x != target]\n        if selected not in options: selected = options[0] if required and options else None\n    elif event == 'activate':\n        if target in options and target not in disabled: selected = target\n    elif event == 'clear' and not required: selected = None\n    return (options, selected)\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('remove other', solve(['a','b','c'], 'a', 'b', False, [], 'remove'), (['a', 'c'], 'a'))\ncheck('required removal', solve(['a','b','c'], 'a', 'a', True, [], 'remove'), (['b', 'c'], 'b'))\ncheck('unknown', solve(['a','b'], 'a', 'x', False, [], 'activate'), (['a', 'b'], 'a'))\ncheck('disabled', solve(['a','b'], 'a', 'b', False, ['b'], 'activate'), (['a', 'b'], 'a'))\ncheck('required clear', solve(['a','b'], 'a', None, True, [], 'clear'), (['a', 'b'], 'a'))\ncheck('optional clear', solve(['a','b'], 'a', None, False, [], 'clear'), (['a', 'b'], None))\ncheck('activate', solve(['a','b'], 'a', 'b', False, [], 'activate'), (['a', 'b'], 'b'))\ncheck('reactivate', solve(['a','b'], 'a', 'a', False, [], 'activate'), (['a', 'b'], 'a'))\ncheck('parameterized radio options', solve(list(range(N+1)),0,N,False,[],'activate'), (list(range(N+1)),N))\nfor repetition in range(N):\n    check('repeat reactivate', solve(['a','b'], 'a', 'a', False, [], 'activate'), (['a', 'b'], 'a'))\nprint(json.dumps({\"observations\": observations, \"passed\": all(x[\"passed\"] for x in observations)}, ensure_ascii=False))\nraise SystemExit(0 if all(x[\"passed\"] for x in observations) else 1)\n"}},"limitations":" 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.","method":"Deterministic executable model with adversarial boundary fixtures.","provenance":{"created_by":"Failure Map","dependencies":"Python standard library","family":"xi-radio-group-required-clear","generated_at":"2026-09-29T14:38:24.971020+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"A deterministic model of radio group selection ownership; this isolates one interface invariant without requiring a browser.","repair":"Implement the required clear operation as `elif event == 'clear' and not required:`.","root_cause":"The required clear operation uses `elif event == 'clear':` where the contract requires `elif event == 'clear' and not required:`.","sha256":"d07284350d058491eeafc0e02052bcfcd1f8f0c19fe95336b3df7141ce9ac079","title":"Radio group selection ownership: Clear removes the selection from a required group · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":39.696,"exit_code":1,"observations":[{"actual":[["a","c"],"a"],"check":"remove other","expected":[["a","c"],"a"],"passed":true},{"actual":[["b","c"],"b"],"check":"required removal","expected":[["b","c"],"b"],"passed":true},{"actual":[["a","b"],"a"],"check":"unknown","expected":[["a","b"],"a"],"passed":true},{"actual":[["a","b"],"a"],"check":"disabled","expected":[["a","b"],"a"],"passed":true},{"actual":[["a","b"],null],"check":"required clear","expected":[["a","b"],"a"],"passed":false},{"actual":[["a","b"],"a"],"check":"optional clear","expected":[["a","b"],null],"passed":false},{"actual":[["a","b"],"b"],"check":"activate","expected":[["a","b"],"b"],"passed":true},{"actual":[["a","b"],"a"],"check":"reactivate","expected":[["a","b"],"a"],"passed":true},{"actual":[[0,1],1],"check":"parameterized radio options","expected":[[0,1],1],"passed":true},{"actual":[["a","b"],"a"],"check":"repeat reactivate","expected":[["a","b"],"a"],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"remove other\", \"actual\": [[\"a\", \"c\"], \"a\"], \"expected\": [[\"a\", \"c\"], \"a\"], \"passed\": true}, {\"check\": \"required removal\", \"actual\": [[\"b\", \"c\"], \"b\"], \"expected\": [[\"b\", \"c\"], \"b\"], \"passed\": true}, {\"check\": \"unknown\", \"actual\": [[\"a\", \"b\"], \"a\"], \"expected\": [[\"a\", \"b\"], \"a\"], \"passed\": true}, {\"check\": \"disabled\", \"actual\": [[\"a\", \"b\"], \"a\"], \"expected\": [[\"a\", \"b\"], \"a\"], \"passed\": true}, {\"check\": \"required clear\", \"actual\": [[\"a\", \"b\"], null], \"expected\": [[\"a\", \"b\"], \"a\"], \"passed\": false}, {\"check\": \"optional clear\", \"actual\": [[\"a\", \"b\"], \"a\"], \"expected\": [[\"a\", \"b\"], null], \"passed\": false}, {\"check\": \"activate\", \"actual\": [[\"a\", \"b\"], \"b\"], \"expected\": [[\"a\", \"b\"], \"b\"], \"passed\": true}, {\"check\": \"reactivate\", \"actual\": [[\"a\", \"b\"], \"a\"], \"expected\": [[\"a\", \"b\"], \"a\"], \"passed\": true}, {\"check\": \"parameterized radio options\", \"actual\": [[0, 1], 1], \"expected\": [[0, 1], 1], \"passed\": true}, {\"check\": \"repeat reactivate\", \"actual\": [[\"a\", \"b\"], \"a\"], \"expected\": [[\"a\", \"b\"], \"a\"], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":36.413,"exit_code":1,"observations":[{"actual":[["a","c"],"a"],"check":"remove other","expected":[["a","c"],"a"],"passed":true},{"actual":[["b","c"],"b"],"check":"required removal","expected":[["b","c"],"b"],"passed":true},{"actual":[["a","b"],"a"],"check":"unknown","expected":[["a","b"],"a"],"passed":true},{"actual":[["a","b"],"a"],"check":"disabled","expected":[["a","b"],"a"],"passed":true},{"actual":[["a","b"],null],"check":"required clear","expected":[["a","b"],"a"],"passed":false},{"actual":[["a","b"],null],"check":"optional clear","expected":[["a","b"],null],"passed":true},{"actual":[["a","b"],"b"],"check":"activate","expected":[["a","b"],"b"],"passed":true},{"actual":[["a","b"],"a"],"check":"reactivate","expected":[["a","b"],"a"],"passed":true},{"actual":[[0,1],1],"check":"parameterized radio options","expected":[[0,1],1],"passed":true},{"actual":[["a","b"],"a"],"check":"repeat reactivate","expected":[["a","b"],"a"],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"remove other\", \"actual\": [[\"a\", \"c\"], \"a\"], \"expected\": [[\"a\", \"c\"], \"a\"], \"passed\": true}, {\"check\": \"required removal\", \"actual\": [[\"b\", \"c\"], \"b\"], \"expected\": [[\"b\", \"c\"], \"b\"], \"passed\": true}, {\"check\": \"unknown\", \"actual\": [[\"a\", \"b\"], \"a\"], \"expected\": [[\"a\", \"b\"], \"a\"], \"passed\": true}, {\"check\": \"disabled\", \"actual\": [[\"a\", \"b\"], \"a\"], \"expected\": [[\"a\", \"b\"], \"a\"], \"passed\": true}, {\"check\": \"required clear\", \"actual\": [[\"a\", \"b\"], null], \"expected\": [[\"a\", \"b\"], \"a\"], \"passed\": false}, {\"check\": \"optional clear\", \"actual\": [[\"a\", \"b\"], null], \"expected\": [[\"a\", \"b\"], null], \"passed\": true}, {\"check\": \"activate\", \"actual\": [[\"a\", \"b\"], \"b\"], \"expected\": [[\"a\", \"b\"], \"b\"], \"passed\": true}, {\"check\": \"reactivate\", \"actual\": [[\"a\", \"b\"], \"a\"], \"expected\": [[\"a\", \"b\"], \"a\"], \"passed\": true}, {\"check\": \"parameterized radio options\", \"actual\": [[0, 1], 1], \"expected\": [[0, 1], 1], \"passed\": true}, {\"check\": \"repeat reactivate\", \"actual\": [[\"a\", \"b\"], \"a\"], \"expected\": [[\"a\", \"b\"], \"a\"], \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":36.856,"exit_code":0,"observations":[{"actual":[["a","c"],"a"],"check":"remove other","expected":[["a","c"],"a"],"passed":true},{"actual":[["b","c"],"b"],"check":"required removal","expected":[["b","c"],"b"],"passed":true},{"actual":[["a","b"],"a"],"check":"unknown","expected":[["a","b"],"a"],"passed":true},{"actual":[["a","b"],"a"],"check":"disabled","expected":[["a","b"],"a"],"passed":true},{"actual":[["a","b"],"a"],"check":"required clear","expected":[["a","b"],"a"],"passed":true},{"actual":[["a","b"],null],"check":"optional clear","expected":[["a","b"],null],"passed":true},{"actual":[["a","b"],"b"],"check":"activate","expected":[["a","b"],"b"],"passed":true},{"actual":[["a","b"],"a"],"check":"reactivate","expected":[["a","b"],"a"],"passed":true},{"actual":[[0,1],1],"check":"parameterized radio options","expected":[[0,1],1],"passed":true},{"actual":[["a","b"],"a"],"check":"repeat reactivate","expected":[["a","b"],"a"],"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"remove other\", \"actual\": [[\"a\", \"c\"], \"a\"], \"expected\": [[\"a\", \"c\"], \"a\"], \"passed\": true}, {\"check\": \"required removal\", \"actual\": [[\"b\", \"c\"], \"b\"], \"expected\": [[\"b\", \"c\"], \"b\"], \"passed\": true}, {\"check\": \"unknown\", \"actual\": [[\"a\", \"b\"], \"a\"], \"expected\": [[\"a\", \"b\"], \"a\"], \"passed\": true}, {\"check\": \"disabled\", \"actual\": [[\"a\", \"b\"], \"a\"], \"expected\": [[\"a\", \"b\"], \"a\"], \"passed\": true}, {\"check\": \"required clear\", \"actual\": [[\"a\", \"b\"], \"a\"], \"expected\": [[\"a\", \"b\"], \"a\"], \"passed\": true}, {\"check\": \"optional clear\", \"actual\": [[\"a\", \"b\"], null], \"expected\": [[\"a\", \"b\"], null], \"passed\": true}, {\"check\": \"activate\", \"actual\": [[\"a\", \"b\"], \"b\"], \"expected\": [[\"a\", \"b\"], \"b\"], \"passed\": true}, {\"check\": \"reactivate\", \"actual\": [[\"a\", \"b\"], \"a\"], \"expected\": [[\"a\", \"b\"], \"a\"], \"passed\": true}, {\"check\": \"parameterized radio options\", \"actual\": [[0, 1], 1], \"expected\": [[0, 1], 1], \"passed\": true}, {\"check\": \"repeat reactivate\", \"actual\": [[\"a\", \"b\"], \"a\"], \"expected\": [[\"a\", \"b\"], \"a\"], \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}