{"abstract":"Clicking a checked child cannot deselect it.","category":"Selection controls","checks":8,"contract":"Subtree actions preserve outside selections; toggle is symmetric; parent status depends only on selected descendants and distinguishes none, mixed and all.","contract_signature":"selected, children, event, child","evaluation_group":"xi-checkbox-tree","failed_approach":"Always removing prevents unchecked children from being selected.","family":"xi-checkbox-tree-toggle","id":"FA-7941","implementations":{"attempt":{"sha256":"6670be4a9f548c3ca08325a89268d6c83cab0f36c9ed1be0793c8cab54f9bbeb","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(selected, children, event, child):\n    selected = set(selected)\n    children = set(children)\n    if event == 'all': selected |= children\n    elif event == 'none': selected -= children\n    elif event == 'toggle': selected.discard(child)\n    visible = selected & children\n    state = 'none' if not visible else ('all' if visible == children else 'mixed')\n    return (sorted(selected), state)\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('all keeps outside', solve(['x','a'], ['a','b'], 'all', None), (['a', 'b', 'x'], 'all'))\ncheck('none keeps outside', solve(['x','a'], ['a','b'], 'none', None), (['x'], 'none'))\ncheck('toggle off', solve(['a'], ['a','b'], 'toggle', 'a'), ([], 'none'))\ncheck('toggle on', solve([], ['a','b'], 'toggle', 'a'), (['a'], 'mixed'))\ncheck('outside only', solve(['x'], ['a','b'], 'read', None), (['x'], 'none'))\ncheck('all', solve(['a','b'], ['a','b'], 'read', None), (['a', 'b'], 'all'))\ncheck('parameterized checked subtree', solve(list(range(N)), list(range(N)), 'read', None), (list(range(N)), 'all'))\nfor repetition in range(N):\n    check('repeat all', solve(['a','b'], ['a','b'], 'read', None), (['a', 'b'], 'all'))\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":"988ef4f4ea9538dd3ca42edbdf98f53af31ebc174f86b6416cf69768c802e3bb","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(selected, children, event, child):\n    selected = set(selected)\n    children = set(children)\n    if event == 'all': selected |= children\n    elif event == 'none': selected -= children\n    elif event == 'toggle': selected.add(child)\n    visible = selected & children\n    state = 'none' if not visible else ('all' if visible == children else 'mixed')\n    return (sorted(selected), state)\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('all keeps outside', solve(['x','a'], ['a','b'], 'all', None), (['a', 'b', 'x'], 'all'))\ncheck('none keeps outside', solve(['x','a'], ['a','b'], 'none', None), (['x'], 'none'))\ncheck('toggle off', solve(['a'], ['a','b'], 'toggle', 'a'), ([], 'none'))\ncheck('toggle on', solve([], ['a','b'], 'toggle', 'a'), (['a'], 'mixed'))\ncheck('outside only', solve(['x'], ['a','b'], 'read', None), (['x'], 'none'))\ncheck('all', solve(['a','b'], ['a','b'], 'read', None), (['a', 'b'], 'all'))\ncheck('parameterized checked subtree', solve(list(range(N)), list(range(N)), 'read', None), (list(range(N)), 'all'))\nfor repetition in range(N):\n    check('repeat all', solve(['a','b'], ['a','b'], 'read', None), (['a', 'b'], 'all'))\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-checkbox-tree-toggle","generated_at":"2026-09-29T14:38:16.793233+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"A deterministic model of hierarchical checkbox state; this isolates one interface invariant without requiring a browser.","root_cause":"The toggle operation uses `selected.add(child)` where the contract requires `selected.symmetric_difference_update({child})`.","sha256":"88bf17c629d6ce5299753a0e7060907164942f389515321325696f633876a8cb","title":"Hierarchical checkbox state: Clicking a checked child cannot deselect it · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verified":true,"visibility":"public","verification":{"attempt":{"elapsed_ms":40.633,"exit_code":1,"observations":[{"actual":[["a","b","x"],"all"],"check":"all keeps outside","expected":[["a","b","x"],"all"],"passed":true},{"actual":[["x"],"none"],"check":"none keeps outside","expected":[["x"],"none"],"passed":true},{"actual":[[],"none"],"check":"toggle off","expected":[[],"none"],"passed":true},{"actual":[[],"none"],"check":"toggle on","expected":[["a"],"mixed"],"passed":false},{"actual":[["x"],"none"],"check":"outside only","expected":[["x"],"none"],"passed":true},{"actual":[["a","b"],"all"],"check":"all","expected":[["a","b"],"all"],"passed":true},{"actual":[[0],"all"],"check":"parameterized checked subtree","expected":[[0],"all"],"passed":true},{"actual":[["a","b"],"all"],"check":"repeat all","expected":[["a","b"],"all"],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"all keeps outside\", \"actual\": [[\"a\", \"b\", \"x\"], \"all\"], \"expected\": [[\"a\", \"b\", \"x\"], \"all\"], \"passed\": true}, {\"check\": \"none keeps outside\", \"actual\": [[\"x\"], \"none\"], \"expected\": [[\"x\"], \"none\"], \"passed\": true}, {\"check\": \"toggle off\", \"actual\": [[], \"none\"], \"expected\": [[], \"none\"], \"passed\": true}, {\"check\": \"toggle on\", \"actual\": [[], \"none\"], \"expected\": [[\"a\"], \"mixed\"], \"passed\": false}, {\"check\": \"outside only\", \"actual\": [[\"x\"], \"none\"], \"expected\": [[\"x\"], \"none\"], \"passed\": true}, {\"check\": \"all\", \"actual\": [[\"a\", \"b\"], \"all\"], \"expected\": [[\"a\", \"b\"], \"all\"], \"passed\": true}, {\"check\": \"parameterized checked subtree\", \"actual\": [[0], \"all\"], \"expected\": [[0], \"all\"], \"passed\": true}, {\"check\": \"repeat all\", \"actual\": [[\"a\", \"b\"], \"all\"], \"expected\": [[\"a\", \"b\"], \"all\"], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":42.167,"exit_code":1,"observations":[{"actual":[["a","b","x"],"all"],"check":"all keeps outside","expected":[["a","b","x"],"all"],"passed":true},{"actual":[["x"],"none"],"check":"none keeps outside","expected":[["x"],"none"],"passed":true},{"actual":[["a"],"mixed"],"check":"toggle off","expected":[[],"none"],"passed":false},{"actual":[["a"],"mixed"],"check":"toggle on","expected":[["a"],"mixed"],"passed":true},{"actual":[["x"],"none"],"check":"outside only","expected":[["x"],"none"],"passed":true},{"actual":[["a","b"],"all"],"check":"all","expected":[["a","b"],"all"],"passed":true},{"actual":[[0],"all"],"check":"parameterized checked subtree","expected":[[0],"all"],"passed":true},{"actual":[["a","b"],"all"],"check":"repeat all","expected":[["a","b"],"all"],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"all keeps outside\", \"actual\": [[\"a\", \"b\", \"x\"], \"all\"], \"expected\": [[\"a\", \"b\", \"x\"], \"all\"], \"passed\": true}, {\"check\": \"none keeps outside\", \"actual\": [[\"x\"], \"none\"], \"expected\": [[\"x\"], \"none\"], \"passed\": true}, {\"check\": \"toggle off\", \"actual\": [[\"a\"], \"mixed\"], \"expected\": [[], \"none\"], \"passed\": false}, {\"check\": \"toggle on\", \"actual\": [[\"a\"], \"mixed\"], \"expected\": [[\"a\"], \"mixed\"], \"passed\": true}, {\"check\": \"outside only\", \"actual\": [[\"x\"], \"none\"], \"expected\": [[\"x\"], \"none\"], \"passed\": true}, {\"check\": \"all\", \"actual\": [[\"a\", \"b\"], \"all\"], \"expected\": [[\"a\", \"b\"], \"all\"], \"passed\": true}, {\"check\": \"parameterized checked subtree\", \"actual\": [[0], \"all\"], \"expected\": [[0], \"all\"], \"passed\": true}, {\"check\": \"repeat all\", \"actual\": [[\"a\", \"b\"], \"all\"], \"expected\": [[\"a\", \"b\"], \"all\"], \"passed\": true}], \"passed\": false}\n"}},"member_only":{"stages":["fixed"],"fields":["implementations.fixed","verification.fixed","harness","repair"],"note":"The verified repair, its recorded checks, the repair description, and the scoring harness are available to members."}}