{"abstract":"Outside selections contaminate the parent indicator.","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.","evaluation_group":"xi-checkbox-tree","failed_approach":"Complementing selection inverts the aggregate state.","family":"xi-checkbox-tree-aggregate-scope","id":"FA-7946","implementations":{"attempt":{"sha256":"ea036ce3d75b26102b3eee31332a17a9a3c6652641ecf8366131d4c067745aeb","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.symmetric_difference_update({child})\n    visible = children - selected\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":"a93fc0727d8f838a3127f69481c59425ffdcfabbc383f4abdd458d60dc6c7cf0","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.symmetric_difference_update({child})\n    visible = selected\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"},"fixed":{"sha256":"8601b5edb6a2428e9f04dc68f017ac8fa14035179bf7c42f7b2dc6a5cc451f6a","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.symmetric_difference_update({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-aggregate-scope","generated_at":"2026-09-29T14:38:16.786801+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.","repair":"Implement the aggregate scope operation as `selected & children`.","root_cause":"The aggregate scope operation uses `selected` where the contract requires `selected & children`.","sha256":"b589d2da0dfcb62761588a005a283398ca127ac9fc5ebb6effd9e47ef1ae4b37","title":"Hierarchical checkbox state: Outside selections contaminate the parent indicator · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":39.451,"exit_code":1,"observations":[{"actual":[["a","b","x"],"none"],"check":"all keeps outside","expected":[["a","b","x"],"all"],"passed":false},{"actual":[["x"],"all"],"check":"none keeps outside","expected":[["x"],"none"],"passed":false},{"actual":[[],"all"],"check":"toggle off","expected":[[],"none"],"passed":false},{"actual":[["a"],"mixed"],"check":"toggle on","expected":[["a"],"mixed"],"passed":true},{"actual":[["x"],"all"],"check":"outside only","expected":[["x"],"none"],"passed":false},{"actual":[["a","b"],"none"],"check":"all","expected":[["a","b"],"all"],"passed":false},{"actual":[[0],"none"],"check":"parameterized checked subtree","expected":[[0],"all"],"passed":false},{"actual":[["a","b"],"none"],"check":"repeat all","expected":[["a","b"],"all"],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"all keeps outside\", \"actual\": [[\"a\", \"b\", \"x\"], \"none\"], \"expected\": [[\"a\", \"b\", \"x\"], \"all\"], \"passed\": false}, {\"check\": \"none keeps outside\", \"actual\": [[\"x\"], \"all\"], \"expected\": [[\"x\"], \"none\"], \"passed\": false}, {\"check\": \"toggle off\", \"actual\": [[], \"all\"], \"expected\": [[], \"none\"], \"passed\": false}, {\"check\": \"toggle on\", \"actual\": [[\"a\"], \"mixed\"], \"expected\": [[\"a\"], \"mixed\"], \"passed\": true}, {\"check\": \"outside only\", \"actual\": [[\"x\"], \"all\"], \"expected\": [[\"x\"], \"none\"], \"passed\": false}, {\"check\": \"all\", \"actual\": [[\"a\", \"b\"], \"none\"], \"expected\": [[\"a\", \"b\"], \"all\"], \"passed\": false}, {\"check\": \"parameterized checked subtree\", \"actual\": [[0], \"none\"], \"expected\": [[0], \"all\"], \"passed\": false}, {\"check\": \"repeat all\", \"actual\": [[\"a\", \"b\"], \"none\"], \"expected\": [[\"a\", \"b\"], \"all\"], \"passed\": false}], \"passed\": false}\n"},"broken":{"elapsed_ms":40.543,"exit_code":1,"observations":[{"actual":[["a","b","x"],"mixed"],"check":"all keeps outside","expected":[["a","b","x"],"all"],"passed":false},{"actual":[["x"],"mixed"],"check":"none keeps outside","expected":[["x"],"none"],"passed":false},{"actual":[[],"none"],"check":"toggle off","expected":[[],"none"],"passed":true},{"actual":[["a"],"mixed"],"check":"toggle on","expected":[["a"],"mixed"],"passed":true},{"actual":[["x"],"mixed"],"check":"outside only","expected":[["x"],"none"],"passed":false},{"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\"], \"mixed\"], \"expected\": [[\"a\", \"b\", \"x\"], \"all\"], \"passed\": false}, {\"check\": \"none keeps outside\", \"actual\": [[\"x\"], \"mixed\"], \"expected\": [[\"x\"], \"none\"], \"passed\": false}, {\"check\": \"toggle off\", \"actual\": [[], \"none\"], \"expected\": [[], \"none\"], \"passed\": true}, {\"check\": \"toggle on\", \"actual\": [[\"a\"], \"mixed\"], \"expected\": [[\"a\"], \"mixed\"], \"passed\": true}, {\"check\": \"outside only\", \"actual\": [[\"x\"], \"mixed\"], \"expected\": [[\"x\"], \"none\"], \"passed\": false}, {\"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"},"fixed":{"elapsed_ms":40.775,"exit_code":0,"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":[["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":true,"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\": [[\"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\": true}\n"}},"verified":true,"visibility":"public"}